Skip to content
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

Add distance dependent damage to d2k #14692

Closed
CH4Code opened this issue Jan 8, 2018 · 6 comments
Closed

Add distance dependent damage to d2k #14692

CH4Code opened this issue Jan 8, 2018 · 6 comments

Comments

@CH4Code
Copy link
Contributor

CH4Code commented Jan 8, 2018

Like MustaphaTR noted on #14681 units in d2k do less damage if they are further away from their targets.
I got curious and did some testing on d2k (grundtmod edition) with a combat tank:
EDIT: the coloring is wrong (blue values = red graph)
distancedamage

seems to be almost linear with dmg(dist) = (full dmg) * (100% + loss * dist) where loss= -10% for the harkonnen combat tank.

...unfortunately the slope is different for different units; siege tank for example has a low loss= -3% and trike a very steep one with loss= -17%.
The loss also does not depend on max range as the missile tank (which has more range than a siege tank) has a geater loss= -8%...
Seems just like an extra table with arbitrarily picked values (like "armor" or "damage type"). Maybe we can get that with TibEd?

Note that the yellow value is extrapolated and has not been measured.

@pchote
Copy link
Member

pchote commented Jan 8, 2018

The loss also does not depend on max range

It would be good to confirm this by repeating the experiment after using tibed to edit the max range of the same unit. You should also test the same unit vs different structures and units to make sure that it doesn't depend on the target.

Seems just like an extra table with arbitrarily picked values (like "armor" or "damage type").

There are few enough units that this could be measured empirically, and then defined on a new warhead property for each weapon.

@CH4Code
Copy link
Contributor Author

CH4Code commented Jan 8, 2018

You should also test the same unit vs different structures and units to make sure that it doesn't depend on the target.

Seems to be all over the place. trike loss becomes almost exponential when facing a quad (light armor).
On the other hand tank damage is pretty linear vs quad.
Doesn't seem this can be handled easily. Maybe they even had different functions for different weapons :S

@pchote
Copy link
Member

pchote commented Jan 8, 2018

There may be an inaccuracy factor hidden in all this: at larger distances a projectile may be less likely to hit directly which will then affect the damage dealt depending on how the original game handled hit shapes.

@GraionDilach
Copy link
Contributor

I'd like to mention here that TS also had used a logic akin - https://www.modenc.renegadeprojects.com/Degenerates - which IIRC was used on the Cyborg Commando.

@NimoStar
Copy link

This is a property of the warhead AFAIK. Tiberian Sun has also a "dispersion" mechanism for this - the farther away the unit fires, the damage is more spread thus you believe it is "losing" damage with distance. That's why it's high for some units and low for others.

@pchote
Copy link
Member

pchote commented Feb 23, 2021

Fixed by #18009 / #18010 / #18023.

@pchote pchote closed this as completed Feb 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants