best would be to dive into the code tbh.
You will get a better idea how it is done, than from someone trying to explain it.
seconded.
This is especially true if you want to learn how it's done because you are a planning to alter it.
If you just want a quick, top-level summary, it's like this:
- Each armored vehicle has a front, back, and sides armor value
- Each armored vehicle has 'critical hit locations'.. places like the engine and ammo storage
- armored vehicles with skirts (the Panzer 4-H) have a special setting for this.
- Each anti-tank capable weapon has a penetration value for each range increment. (ie: a tank shell can penetrate a higher value at a shorter range)
- When an anti-tank round hits an armored vehicle, calculations are done based on angle the projectile hit, the penetration factor of the projectile at the given range, the armor value of the location that gets hit (and probably a few things I'm forgetting about).. this is to determine if the round will penetrate the armor or not.
-- if the round penetrates, it's checked if it will hit one of the critical locations (again.. ammo, engine, etc..).. and if it does, it causes an effect based on that location. (engine hits disable your engine, ammo store will cause alot of damage, etc..)
I'm probably missing alot since it's been months since I've really looked at any of the tank stuff.