Damagetypes and Damage Resistance Bugs |
| Project: | Space Empires V |
| Version: | 1.58 |
| Component: | Code |
| Category: | bug |
| Priority: | minor |
| Assigned: | Unassigned |
| Status: | active |
Description
I've found some bugs occuring with damage resistance and the penetration percent in DamageTypes.txt
-----------------------------
1. Bug (or probably feature):
-----------------------------
The Damage from "Armor Type X Penetration Percent" does not go to structure or the next armor level. Instead it counts for the next armor plate of the same type.
Example:
Number of Armor Types := 1
Armor Type 1 Name := Normal Armor
Armor Type 1 Penetration Percent := 20
Armor Type 1 Damage Percent := 80
Now we have 2 Ships. Both will get 100 Dmg of the type above. First ship has one armor plate. Second has two.
First ship will get 80 Dmg to armor and 20 to internals. => Total 100 Dmg
Second ship will get 80 Dmg to armor 1 and 18 Dmg to armor 2 (98 Dmg total to armor) and 2 Dmg to internals => Total 100 Dmg
Perhaps thats a feature...
but now comes the really strange stuff:
-------
2. Bug:
-------
Same example as above. But now the armor provides 10 Points damage resistance.
Ship 1 will get 57 Dmg to armor (thats nearly (100*0.8 - 10)*0.8 => the Penetration Percent is added twice!) and 18 Dmg to internals (thats (100-10)*0.2 and seems correct). => total 75 Dmg
Ship 2 will get about 57 Dmg to armor 1 and about 5 Dmg to armor 2 (total of 62 Dmg to armor) and 1 Dmg to internals. => total 58 Dmg
That's maybe te following callculation:
Armor 1: (100*0.8 - 10)*0.8 = 56
Armor 2: ((100-10)*0.2 - 10) * 0.8 = 6.4
=> 62 Dmg to armor
Internals: ((100-10)*0.2 - 10) * 0.2 = 1.6
And thats defenitly a bug. Either in the mod documentation or, and for me more obvious, in the code calculating the damage amounts.
Updates
| Priority: | normal | » minor |
I'm sorry. But I have to correct the report:
There is only one bug. And it is not as big as I've reported above.
2 Possibilities:
1. Bug in documentation:
Modding.pdf (DamageTypes.txt):
Armor Type 1 Penetration Percent: The percent of damage that will penetrate this armor type. The value can be from 0 to
1000 percent. Any damage which penetrates moves to the next lower level in the
vehicle. A vehicle’s levels are Shields, Armor, Outer Hull, Inner Hull.
But: It goes to next armor. Only if it was last it goes to Hull.
2. Bug in code:
Like above. But to be fixed that it fits documentation.
Apendix:
How the dmg ist calculated:
- Substract Dmg resistance
- Split Dmg with "penetration percent"
- Multiply dmg to armor with "damage percent"
- add penetration dmg to next armor/hull
That way all calculations seem correct (still documentation or code bug). Sorry for my mistake.



