-
Notifications
You must be signed in to change notification settings - Fork 532
Fix Brain Math #20711
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
VMSolidus
wants to merge
8
commits into
Aurorastation:master
Choose a base branch
from
VMSolidus:fix-brain-math-error
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Fix Brain Math #20711
+108
−19
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!review |
hazelrat
reviewed
Apr 17, 2025
Comment on lines
+30
to
+62
//brain damage speed modifiers. All except safe include modifiers for "Stabilized with Inaprovaline" vs Not Stabilized. | ||
//damage per second is this value times deltaTime, such that no matter frametime, this will be your baseline damage. | ||
//it's also directly 1:1 with your brain's numerical healthbar. If your brain has 200hp, consider that it has "200 seconds" of budget. | ||
|
||
//think of it like, "If a perfectly healthy crewman suddenly has a heart attack that cuts off 100% of blood flow to the brain", that crewman | ||
//will lose 2s of his 200s budget, every second. Keeping this in mind, it might come up in testing that we'll want to look at tweaking these numbers for some | ||
//desired time budget that feels right. Setting the BDPS to 0.5 will turn the 200s budget into 400s. While setting it to 2 will make it a 100s budget. | ||
var/brain_damage_per_second = 1 | ||
|
||
//85% blood volume and up | ||
//this one is actually used for the passive healing rate mainly. | ||
var/safe_damage_modifier = 1 | ||
|
||
//70% to 85% | ||
var/okay_damage_modifier = 1 | ||
var/okay_stabilized_mod = 0.3 | ||
var/okay_unstable_mod = 0.6 | ||
|
||
//60% to 70% | ||
var/bad_damage_modifier = 1 | ||
var/bad_stabilized_mod = 0.4 | ||
var/bad_unstable_mod = 0.8 | ||
|
||
//30% to 60% | ||
var/crit_damage_modifier = 1 | ||
var/crit_stabilized_mod = 0.6 | ||
var/crit_unstable_mod = 1 | ||
|
||
//0% to 30% | ||
var/dying_damage_modifier = 2 | ||
var/dying_stabilized_mod = 0.8 | ||
var/dying_unstable_mod = 1 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm leaving this for someone better versed in medical code to review proper, but I'd suggest turning these comments to DMDocs. The documentation section in STYLE.md may be a useful reference.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes an issue where characters were experiencing brain damage at rates that were sometimes inconsistent depending on player population and server performance. To accomplish this, it makes it so that brain damage taken is no longer a random amount per second that fluctuates based on server performance, and is instead an amount of damage per second that scales with the previous conditions, but is "tick invariant", meaning it no longer changes if for instance you have 75 players online causing server lag.
The benefit of this is particularly noticeable in the extreme ends of lowpop as well as high pop. It'll no longer cause brain-damage at hyperspeed if theres' only 10 people online.