Login

russian armor

[Release] DeCoHde 2.0 (Snake Edition!) WIP [Help needed]

6 Apr 2020, 13:43 PM
#1
avatar of Hannibal
Senior Moderator Badge

Posts: 3114 | Subs: 2

RELEASE VERSION


Release version of DeCoHde - Snake Edition.


Download Python version of DeCoHde here: DeCoHde Python version

Download executable version of DeCohde here (currently slightly bugged, fixes will be released when I find the time): DeCoHde executable version

Download the Visualizer tool here (only Python version available): Visualizer Python version

For more information on the release version, please read this post.





UPDATED POST AND SHEET. Hit Boxes are now correct!

Spoiler alert:
This project could use a little help by other interested members of the community. If you are interested in helping, please check the spoiler below and drop me a PM.



DeCoHde 2.0 - Snake edition

In my never ending quest to finally shut down all discussions on this forum, I moved on to a new tool: Tank fight simulations for predicting the outcomes of a fight if it comes to raw AT performance. The little piece of code runs on Python since Excel quickly reaches its point of practicability. While it is not quite ready for a "real" simulation yet, I am finally on a level that is able to showcase a little bit of data.


What can this little tool do?
- simulate one tank shooting at another at a set distance (with correct accuracy and penetration calculation)
- angle the targeted tank (to simulate flanking)
- simulate scatter shots and scatter hits
- report the data as summary for each fight as well as the for each single shot done in the simulation (currently reported are: shooter, target, simulation #, # of shots, total hits, natural hits, scatter shots, scatter hits, misses, # of pens, # of bounces, # of frontal hits, # of rear hits.



As a model, I have chosen the T34/76 and OST PanzerIV and let the P4 shoot the T34 from 40 meters until the T34 is dead.
In a simulation of 10.000 iterations, I got the following data:

selected data
(read as 'how many simulation ended with x amounts of shots/misses/bounces?', e.g. at 0° angle, 885 simulations ended after the P4 took 4 shots)


shot number graph


quality control


If we have a short look at the the graph, we see that the number of needed shots decreases if the target is angled, since rear hits become more prevalent. At large angles (that is higher chance to hit rear armor) angle, high shot counts comes mostly from misses, while at small angles they come from both bounces and misses.
In the dataset we can see that at 180° angle, the P4 is unable to even hit the frontal armor. Since the P4 always pens the rear armor, there are also no bounces. Also, in no dataset occur more than 4 rear armor hits, after which the T34 is dead and the simulation ends.


All in all, the simulation seems to come decently close to what we really know about the game. However I had to make a few assumptions, and the most important one is the scatter model:
Nobody except for Relic knows how it really works. The current simulation calculates an area where the shot can land and picks a random point inside that area. All points are equally likely to be picked.
We don't know if this really is the case though, it might be that scatter shots have a higher probability to land closer to the originally targeted area than further away. MMX has done small scale tests and suggested this, but we need proper testing on that. Please see the bottom spoiler if you can help on that one.

Second, which might be an easy task for people knowing the game files a bit better:
I do not know the actual hit boxes. For the above simulation, I took the size of a real T34 from Wikipedia and hoped it would somehow fit what is in the game. The real hit box sizes would be great though for accurate simulations.


After ironing out some minor issues, further plans are to simulate an actual fight of two tanks shooting at each other until the winner is determined. This would then include more knowledge about the time between two shots.


Cheers,

Hannibal



HELP NEEDED!


6 Apr 2020, 13:50 PM
#2
avatar of Vipper

Posts: 13496 | Subs: 1

90 decrees half the shots should hit front and the other half rear. Do you mean 180?

I can probably create a mod with the value you require.
6 Apr 2020, 13:55 PM
#3
avatar of Hannibal
Senior Moderator Badge

Posts: 3114 | Subs: 2

jump backJump back to quoted post6 Apr 2020, 13:50 PMVipper
90 decrees half the shots should hit front and the other half rear. Do you mean 180?

I can probably create a mod with the value you require.

At 90° the tank faces directly upwards and shows only his left side. So the front cannot be hit.

What you mean is 45° and even than you would not get a 50/50 split. This only works for squares. The tank is longer than it is wide. The hull forms a rectangle which basically makes the side armor more likely to be hit by scatter.

Additionally angling for only minor degrees (the exact values depend on distance, tank length and width) does not allow for rear armor hits either since the frontal side might visually block the sides.

I am proud to say that all this is perfectly implemented in the simulation though :)


Help on the mod part would be great :)
6 Apr 2020, 13:58 PM
#4
avatar of Vipper

Posts: 13496 | Subs: 1

I am not sure that we communicate correctly.

The hit box is divided into 2 halfs. A front half and rear half. A unit firing perpendicular (90°) to a vehicle can hit either the front half or back half with equal chance.

In addition I do not see the problem with linear scatter since it helps scoring collision hits since the projectile travel loner. Without it shot can fall sort.

You can PM about a MOD and I see what I can do, although my modding skill are limited that does not sound difficult.

As for Hitbox size I think one can use the map editor to measure hit boxes.
6 Apr 2020, 14:15 PM
#5
avatar of Hannibal
Senior Moderator Badge

Posts: 3114 | Subs: 2

jump backJump back to quoted post6 Apr 2020, 13:58 PMVipper
I am not sure that we communicate correctly.

The hit box is divided into 2 halfs. A front half and rear half. A unit firing perpendicular (90°) to a vehicle can hit either the front half or back half with equal chance.

In addition I do not see the problem with linear scatter since it helps scoring collision hits since the projectile travel loner. Without it shot can fall sort.

You can PM about a MOD and I see what I can do, although my modding skill are limited that does not sound difficult.

As for Hitbox size I think one can use the map editor to measure hit boxes.

Well fuck me then. I just tested it and it really is half of the hit box.
I always assumed the frontal hit box to be very small and the frontal hits from a flanking maneuver come from a whacky hit detection.

Well, it makes the above data wrong, but at least this is a relatively easy fix. The core simulation still stands though.

I'll write you a PM about the mod.

You are right that the horizontal scatter is not affected as much. In some instances it can make smaller differences though. The most important thing though is to find out about the angle scatter.
6 Apr 2020, 14:15 PM
#6
avatar of JohnSmith

Posts: 1273

That is fully correct. The other explanation is wrong. Only an unit perpendicular to the forward or backward direction of vehicle can either hit the front or the back. It is important to define what exactly things are relative to each other when defining perpendicular. Otherwise, it can be read as a shot coming perpendicular to the front of the vehicle hits either front or back - which is completely wrong.


This lovely old figure should help. It was taken approximately perpendicular to the moving direction of a vehicle, thus the chance of hitting front or back depends on other numerous values (in the most perfect case of ultimate perfection, it is a 50% chance to either hit front or back)



Note: there was one vehicle exception where this above generalisation is not true (Elefant 75% front, 25% back ) <- past tense.

Post has been edited after quote to clarify points.
6 Apr 2020, 14:25 PM
#7
avatar of Hannibal
Senior Moderator Badge

Posts: 3114 | Subs: 2

That is fully correct. The other explanation is wrong. Only an unit perpendicular to the forward or backward direction of vehicle can either hit the front or the back. It is important to define what exactly things are relative to each other when defining perpendicular. Otherwise, it can be read as a shot coming perpendicular to the front of the vehicle hits either front or back - which is completely wrong.

This lovely old figure should help. It was taken approximately perpendicular to the moving direction of a vehicle, thus the change of hitting front or back depends on other numerous values.



Thanks, just realized that too after Vipper said it.

A moving target is a completely different level for the calculations though and would include more info such as projectile speed. I don't think that is really necessary to determine how well a tank performs. Stand-offs as well as shots to the side armor and maybe simulating a moving shooter in the end are plenty.
6 Apr 2020, 14:28 PM
#8
avatar of Olekman
Modmaker Badge

Posts: 208

Interesting idea! Others have already pointed out the error in the front/rear armour. I also volunteer for the modding help. I published a couple of small mods in the workshop and I think I have a solid grasp on the Attribute Editor.
6 Apr 2020, 15:03 PM
#9
avatar of Vipper

Posts: 13496 | Subs: 1

The elephant does not have a different hit box all hit boxes are split 50% 50%.

When it comes to scatter the I would test lowering the accuracy of the weapon to 0 and counting how many shot actually hit vs stationary and vs moving vehicle.

That would give a more accurate approach.
6 Apr 2020, 15:22 PM
#10
avatar of Hannibal
Senior Moderator Badge

Posts: 3114 | Subs: 2

jump backJump back to quoted post6 Apr 2020, 15:03 PMVipper
The elephant does not have a different hit box all hit boxes are split 50% 50%.

When it comes to scatter the I would test lowering the accuracy of the weapon to 0 and counting how many shot actually hit vs stationary and vs moving vehicle.

That would give a more accurate approach.

By chance I tested the Elefant. The split is not 75/25 as JohnSmith said, but also seems to be 50/50.

The problem with your suggestion is that it does not help too much.
To make this work it needs knowledge of the target's hit box, your have to angle it correctly and also set the distance perfectly. And afterwards you're waiting and counting like a moron (because you need a lot of shots), put everything into a calculator and the only info you get is if the above model is right or wrong, but it would probably not help anything to see how the shots are distributed.

Having a modded unit would need first a bit of work to manually assign the impacts after you let the unit shoot in the background and wander off somewhere else. The rest can then be done by automated analysis and looking at the values would already give a model of how shots are distributed. This could also then be applied to all units and also does not need further info about a potential target that could scew the data.
6 Apr 2020, 17:03 PM
#11
avatar of Rosbone

Posts: 2145 | Subs: 2

Arent there a lot of times when a projectile passes thru a vehicle and hits the ground behind it? So you end up with an AOE rear armor even shooting from the front?
MMX
6 Apr 2020, 17:11 PM
#12
avatar of MMX

Posts: 999 | Subs: 1

wow, that's some really great work right here, congrats!

with regards to the scatter model i'm actually doing some in-game testing atm using modded weapon profiles, similar to what you proposed (reducing either scatter angle or distance to zero and vice versa). in addition, setting the aoe damage profile to fall of linearly from, say, 10 at 0 m to 0 at 10 m provides a handy tool to measure in-game distances between point of impact and a target by simply monitoring the damage numbers via cheat mod.
using this i can say now at least that for horizontal scatter the probability distribution seems to be flat, i.e. a shot is equally likely to land anywhere between dead center and the max scatter distance. i'll do some testing for angular scatter tomorrow and see if the same applies here, too.
6 Apr 2020, 17:18 PM
#13
avatar of Hannibal
Senior Moderator Badge

Posts: 3114 | Subs: 2

Updated the opening post. New and extended graph and raw data, now with correct hit box calculations.
MMX
6 Apr 2020, 17:26 PM
#14
avatar of MMX

Posts: 999 | Subs: 1

Arent there a lot of times when a projectile passes thru a vehicle and hits the ground behind it? So you end up with an AOE rear armor even shooting from the front?


not sure how this works precisely, but if i remember correctly there is a value that defines the maximum distance a projectile flies w/o collision check after being fired (usually about 5 - 10 m). so any shot vs a tank closer to this threshold could probably "phase" through the front half of the hitbox upon scattering and land in the rear half... though this would likely require an attack ground instead of a regular attack as i think tanks would never miss at such a close range.
6 Apr 2020, 17:30 PM
#15
avatar of Vipper

Posts: 13496 | Subs: 1

Arent there a lot of times when a projectile passes thru a vehicle and hits the ground behind it? So you end up with an AOE rear armor even shooting from the front?

That might not be an actually hit but an AOE hit.
6 Apr 2020, 17:32 PM
#16
avatar of Hannibal
Senior Moderator Badge

Posts: 3114 | Subs: 2

Arent there a lot of times when a projectile passes thru a vehicle and hits the ground behind it? So you end up with an AOE rear armor even shooting from the front?


Quirky as CoH2 is, I think this happens from time to time. Or at least sometimes the shot just seems to miss the hitbox and hits the ground below the tank.
AoE penetration is yet not implemented, neither is deflection damage. At least for the showcased scenario of medium vs medium, they are very rare events or do not happen at all, respectively.

Another issue is then that it is unclear how AoE hits are calculated. Do they just take the shortest route to the target (and here to the target hull or center?) or do they check for multiple points. For example, if a shot lands next to a vehicle's front part, is AoE calculated only against the frontal armor (shortest path) or also against a potential rear armor where it might penetrate? Since it is AoE, the latter would be logic, but it is also harder to implement. And maybe they did not do it that way, we don't know.

jump backJump back to quoted post6 Apr 2020, 17:11 PMMMX
wow, that's some really great work right here, congrats!

with regards to the scatter model i'm actually doing some in-game testing atm using modded weapon profiles, similar to what you proposed (reducing either scatter angle or distance to zero and vice versa). in addition, setting the aoe damage profile to fall of linearly from, say, 10 at 0 m to 0 at 10 m provides a handy tool to measure in-game distances between point of impact and a target by simply monitoring the damage numbers via cheat mod.
using this i can say now at least that for horizontal scatter the probability distribution seems to be flat, i.e. a shot is equally likely to land anywhere between dead center and the max scatter distance. i'll do some testing for angular scatter tomorrow and see if the same applies here, too.


Thank you very much!
Vipper has written a small mod that I still need to find and test for the angle scatter. I'd recommend using one of the range maps for quick testing, although your method seems to be more precise.
6 Apr 2020, 17:43 PM
#17
avatar of Hannibal
Senior Moderator Badge

Posts: 3114 | Subs: 2

jump backJump back to quoted post6 Apr 2020, 17:26 PMMMX


not sure how this works precisely, but if i remember correctly there is a value that defines the maximum distance a projectile flies w/o collision check after being fired (usually about 5 - 10 m). so any shot vs a tank closer to this threshold could probably "phase" through the front half of the hitbox upon scattering and land in the rear half... though this would likely require an attack ground instead of a regular attack as i think tanks would never miss at such a close range.

I don't think this value is used anymore. It's often 10 meters from what I remember, but vehicles that your park directly in front of each other can hit each other, although they should not according to this collision value.
However it sometimes glitches out. During the test today, I managed to get a StuG's barrel stuck inside a medium, and the StuG managed to hit the ground beneath the medium.
6 Apr 2020, 18:06 PM
#18
avatar of Vipper

Posts: 13496 | Subs: 1



.
AoE penetration is yet not implemented, ...

? AOE penetration is implement. All explosive weapons including some tank guns do damage via AOE and not via hits
6 Apr 2020, 18:32 PM
#19
avatar of Hannibal
Senior Moderator Badge

Posts: 3114 | Subs: 2

jump backJump back to quoted post6 Apr 2020, 18:06 PMVipper

? AOE penetration is implement. All explosive weapons including some tank guns do damage via AOE and not via hits

I meant implemented in my calculations
6 Apr 2020, 19:08 PM
#20
avatar of elchino7
Senior Moderator Badge

Posts: 8154 | Subs: 2

Regarding "phasing" shots, it's probably a scatter shot (not an accuracy shot) connecting with the rear part of the hitbox.

As the game doesn't count for angling, this makes performance in real games weird at times.

I don't think it should be relevant for what OP does. You could set up a 50/50 probability from a 90°.


As for whether to check how things really work i think modding a simple 2 things in would work as testing material.

An AT gun with 100% acc with no scatter and 1 pen.
An ELE or any other big model tank with armor higher than 100 and 1 rear armor.

Values of pen lower than 3% are ignored. Only rear armor hits would do dmg. And with 100% acc you would always be hitting. Now you can determine if there is any reliability depending the angle of attack.
1 user is browsing this thread: 1 guest

Ladders Top 10

  • #
    Steam Alias
    W
    L
    %
    Streak
Data provided by Relic Relic Entertainment

Replay highlight

VS
  • U.S. Forces flag cblanco ★
  • The British Forces flag 보드카 중대
  • Oberkommando West flag VonManteuffel
  • Ostheer flag Heartless Jäger
uploaded by XXxxHeartlessxxXX

Board Info

723 users are online: 723 guests
0 post in the last 24h
7 posts in the last week
34 posts in the last month
Registered members: 49122
Welcome our newest member, Harda621
Most online: 2043 users on 29 Oct 2023, 01:04 AM