-
Notifications
You must be signed in to change notification settings - Fork 257
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
Update WorldObjectDamageWorker.cs #2751
Conversation
You can download the rebuilt assembly for this PR here: https://combatextended.lp-programming.com/CombatExtended-6163867794.zip |
You can download the rebuilt assembly for this PR here: https://combatextended.lp-programming.com/CombatExtended-6172297507.zip |
You can download the rebuilt assembly for this PR here: https://combatextended.lp-programming.com/CombatExtended-6240076582.zip |
Originally this damage property was used as a mulitplier for damage. |
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.
It looks like this turns only the damage
tag into a flat overwrite rather than a factor? I'm onboard with the change--it's more straightforward for cases where we want fine control over a shell's properties, and the existing auto calculations for damage generally have us covered for most cases.
However, it doesn't appear to be working (if I'm understanding the override damage
correctly). If I add an overwrite value of 15 to a shell and fire it at a settlement, it should do 15 damage to the settlement's HP, is that correct?
Because, at present shells with a custom damage value of about 70 are only doing 0.003 damage to the settlement. Setting the value to 200 increased the damage done to 0.005. Is it intended for the overwrite to work that way?
You can download the rebuilt assembly for this PR here: https://combatextended.lp-programming.com/CombatExtended-6467018100.zip |
No issues in testing, but I think there's some damage value scaling that might still need to be done in the xml? |
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.
Copied remarks from Discord:
From a bit more testing of #2751, the xml value of damage set for shells is not translating to the HP damage dealt to settlements. I'm testing values of 10 and it's dealing 500+ damage, wiping out Empire settlements in one hit.
@@ -37,12 +37,13 @@ public virtual float CalculateDamage(ThingDef projectile, Faction faction) | |||
var result = FragmentsPotentialDamage(projectile) + ExplosionPotentialDamage(projectile) + FirePotentialDamage(projectile) + EMPPotentialDamage(projectile, empModifier); | |||
//Damage calculated as in-map damage, needs to be converted into world object damage. 3500f experimentally obtained | |||
result /= 3500f; |
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.
Are we actually dividing the xml-defined damage by the factor of 3500? Or is it only being applied to the damage being automatically calculated from the shell properties?
…nued/CombatExtended into world-tile-damage-change
You can download the rebuilt assembly for this PR here: https://combatextended.lp-programming.com/CombatExtended-6625575775.zip |
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.
No issues in testing, and the change from a multiplier to a flat override is easier to wrangle from a balancing perspective.
Changes
Makes damage field in shellingproperties replace evaluated damage instead of multiply it
Reasoning
Imagine, now we have a nuclear LGIS missile dealing 1.145 x E^-14 damage to a tribe tent, which isn't much. I wrote 1000, expecting damage to be 1000, but it's not. It's 1.145 x E^-11.
If someone wanted to code a projectile's damage, one have to know how many damage it does before coding, and for those without the few hardcoded damage types, usually none.
Changing it from result *= damage to result = damage makes it more sensible for anyone who intend to change a projectile's shelling damage, especially those that doesn't do any damage before.
Testing
Check tests you have performed: