heightDamageBonus request
Posted: 08 Dec 2008, 21:13
Basically, it's a request to make weapons do more damage depending on how high up above their opponent they are. This is for games like S44, who could then represent weak upper armour and to all that would like to give further advantages to high ground.
The current plan is for it to work something like this:
Three tags in the mod definitions (heightDamageBonus, heightDamageThreshold and heightDamageScalar) that states whether or not the mod uses this feature, a threshold for angle calculations and a scalar for the bonus.
How it works
Damage dealt = Weapon damage for that armour class * vertical angle between the two units * heightDamageScalar, with two additional rules:
If vertical angle * heightDamageScalar is less than 1, the height bonus is not applied.
The lower of the two units has no bonus applied
Example One
Say Unit A is on higher ground than Unit B, but a long way away (for the sake of argument, assume it's hyperaccurate guided artillery that won't miss). Whilst higher than Unit B, it is a long way away: in sensible terms, due to projectile drop and all that, this would probably be a side-on hit if it made contact. However, because he take the angle, not the 'how further up the y-axis is A than B?' value, this is taken into account, and Unit A doesn't score stupid amounts of extra damage. It gets some though (however miniscule), so it's still worth sticking it high up on that hill.
Example Two.
Unit A and Unit B are in a ravine. A is the outside of the ravine, firing in. B is at the bottom, firing back. They are quite close to each other.
Assuming Unit A = Unit B (ie they're the same unit type), Unit A should win, because it gets the damage bonus, and the bonus will be higher than in Example One even if the ravine is actually smaller than the hill of Ex. One because we're taking angle, not the vertical distance
The current plan is for it to work something like this:
Three tags in the mod definitions (heightDamageBonus, heightDamageThreshold and heightDamageScalar) that states whether or not the mod uses this feature, a threshold for angle calculations and a scalar for the bonus.
How it works
Damage dealt = Weapon damage for that armour class * vertical angle between the two units * heightDamageScalar, with two additional rules:
If vertical angle * heightDamageScalar is less than 1, the height bonus is not applied.
The lower of the two units has no bonus applied
Example One
Say Unit A is on higher ground than Unit B, but a long way away (for the sake of argument, assume it's hyperaccurate guided artillery that won't miss). Whilst higher than Unit B, it is a long way away: in sensible terms, due to projectile drop and all that, this would probably be a side-on hit if it made contact. However, because he take the angle, not the 'how further up the y-axis is A than B?' value, this is taken into account, and Unit A doesn't score stupid amounts of extra damage. It gets some though (however miniscule), so it's still worth sticking it high up on that hill.
Example Two.
Unit A and Unit B are in a ravine. A is the outside of the ravine, firing in. B is at the bottom, firing back. They are quite close to each other.
Assuming Unit A = Unit B (ie they're the same unit type), Unit A should win, because it gets the damage bonus, and the bonus will be higher than in Example One even if the ravine is actually smaller than the hill of Ex. One because we're taking angle, not the vertical distance