Hitpoints calculation
Posted: 31 May 2017, 21:33
I was tinkering a bit with the hitpoints stats, and noticed that the calculation of the final hitpoints of a droid is pretty strange:
Each component has separate hitpoints, but only the body hitpoints can be upgraded. However, as you can see from the above, upgrading the body hitpoints will also upgrade all the other components' hitpoints as well.
I have a patch to let you modify every component's hitpoints from scripts (and hence researches), but that would really screw with the hitpoints calculation in one way or another.
The most logical calculation IMHO would be
but this would reduce the hitpoints of many upgraded droids by quite a lot, since some weapons/systems have a lot of hitpoints, and would remain un-upgraded.
Adding separate upgrade effects for each component to each armour upgrade would be rather nasty, as we would need to classify weapons to filter for cyborg vs droid, and then have one effect for each of the components for each upgrade. But maybe worth it?
Code: Select all
(sum of base components except propulsion hp) * (upgraded body hp) / (base body hp) + (base body hp * base propulsion hp) / 100
I have a patch to let you modify every component's hitpoints from scripts (and hence researches), but that would really screw with the hitpoints calculation in one way or another.
The most logical calculation IMHO would be
Code: Select all
(sum of upgraded components except propulsion hp) + (upgraded body hp * upgraded propulsion hp) / 100
Adding separate upgrade effects for each component to each armour upgrade would be rather nasty, as we would need to classify weapons to filter for cyborg vs droid, and then have one effect for each of the components for each upgrade. But maybe worth it?