Login

russian armor

Scatter This! - Your trusty scatter calculator

MMX
18 May 2020, 11:49 AM
#21
avatar of MMX

Posts: 999 | Subs: 1

Updated the OP with a revised version of the spreadsheet containing some bugfixes and additional features.
MMX
27 May 2020, 03:32 AM
#22
avatar of MMX

Posts: 999 | Subs: 1

I'm currently working on a proper implementation for off-map arty to the spreadsheet and was wondering how exactly the scatter randomization is calculated in-game. So far i found the radius of the (circular) scatter area in the abilities tab and I assume the center of impact is likely derived by randomizing the distance (between 0 and the given radius) and angle (between 0 and 360°). However, that would mean that the impact density per area would not be equal throughout the scatter circle and more shots/m^2 land close to the center than near the outer edge of the circle (i.e. probability is proportional to r).
On the other hand, the center of impact could also be calculated by picking a random (x,y) coordinate inside the circle, which would result in an equal shot density everywhere in the scatter area (i.e. probability is proportional to r^2).
Does anyone know the specifics or has anyone ever tested this?

Additionally, the offmap abilities seem to call a standard weapon profile to determine the damage and AoE properties, which makes sense to me. However, I'm not sure if and how the scatter info of the weapon (angle_scatter, distance_scatter_max, etc) is taken into account in the scatter calculation. Does anyone have info on how this works by chance?
27 May 2020, 06:42 AM
#23
avatar of Hannibal
Senior Moderator Badge

Posts: 3114 | Subs: 2

Impact density should be higher in the parts of the area that is closer to the shooter in both cases, shouldn't it?

Vipper stated that first the horizontal scatter is calculated, and based of this value the y coordinate is derived by trigonometry. I don't know his source though. It would also mean that the area is a trapeze instead of a circle intersection.

This is also how I implemented it in my calcs. The differences are relatively small and also hard to test, because you need to check if shots land in a trapeze pattern or the circular pattern. And given the small differences, this is quite hard.

However I tend to believe this, given how simple the math in calculations in this game tends to be
MMX
27 May 2020, 09:07 AM
#24
avatar of MMX

Posts: 999 | Subs: 1

Impact density should be higher in the parts of the area that is closer to the shooter in both cases, shouldn't it?


Hm, thinking about it, this appears most likely to me, too. It would actually be quite different to select a totally random point within a circle without having one of the two variables to be constrained by the other. And as soon as this happens you'd inevitably see some sort of clustering.
But I guess I'll do some testing to be sure...


Vipper stated that first the horizontal scatter is calculated, and based of this value the y coordinate is derived by trigonometry. I don't know his source though. It would also mean that the area is a trapeze instead of a circle intersection.

This is also how I implemented it in my calcs. The differences are relatively small and also hard to test, because you need to check if shots land in a trapeze pattern or the circular pattern. And given the small differences, this is quite hard.

However I tend to believe this, given how simple the math in calculations in this game tends to be


Yeah this is, at least in part, also how I think scatter works and how I implemented it. Although I'm certain that the resulting scatter cone is not a trapezoid, but indeed a circle sector. You can quite convincingly prove this using a unit with high angular scatter, e.g. by modding a weapon with 90° scatter angle as in the picture below.



The way I think it works is that the distance and angle are randomized within the bounds given by the scatter variables, and then the x,y-coordinates are simply x = sin(angle) * distance and y = cos(angle) * distance. But you are correct that the difference is quite small in most cases, and I guess for your simulation it doesn't matter at all since you don't really care how far behind a shot would scatter, only if it overshoots or not.

In any case, my question was actually rather about if the whole scatter calculation shenanigans work differently for offmap abilities, such as the railway arty strike for example, since here you don't really have a distance or direction to the shooter to work with, only the radius and center of the circle in which the arty shells land.
Chances are there's no real difference and things are calculated the same as for ballistic weapons (just substituting the scatter distance by the radius of the circle and the scatter angle becoming 360° instead). However, the weapon profiles called by the ability still have settings for distance_scatter_max, angle_scatter, distance_scatter_ratio, etc set in most cases, which don't really make sense w/o a reference position (e.g. that of the tank firing the weapon). I guess these will just be ignored, but I'd want to make sure if anyone knowing more about this can confirm.



27 May 2020, 13:59 PM
#25
avatar of Hannibal
Senior Moderator Badge

Posts: 3114 | Subs: 2

That P4 must have a belt-fed reload mechanism.
But very nice to know, thanks! Since I was not able to mod for quite some time, I did not think about just making a tank fire like an MG and have a look.
I will need to rework my algorithm then, too, although the difference in that case should really be marginal.

No idea how offmaps handle this though. Do they have different stats in terms of scatter distance etc? That would suggest that there is an actual influence of that stat. Maybe someone of the balance team can tell you more, they have tweaked a few offmaps once in a while.
27 May 2020, 18:50 PM
#26
avatar of Hannibal
Senior Moderator Badge

Posts: 3114 | Subs: 2

I just calculated it:
For an Ostheer P4 shooting at a target at range 40, the difference is 10 cm in the direction of horizontal scatter at most. Now units with higher angle scatter and longer range will deviate a bit stronger, but for most units this could even be neglected without introducing a large error.
MMX
28 May 2020, 04:30 AM
#27
avatar of MMX

Posts: 999 | Subs: 1

wow, never really run the numbers before but you're right. in most cases the deviation should be indeed miniscule at best.
a quick calculation ( acos(0.95)*2) shows that the scatter angle would have to exceed ~36° to have more than 5% difference - which out of the top of my head not even a howie firing into the FoW would achieve.
if it saves time and effort, your approximation is probably totally adequate
MMX
4 Feb 2021, 15:54 PM
#30
avatar of MMX

Posts: 999 | Subs: 1

UPDATE 2/4/2021 It's been quite a while since I've last revisited the spreadsheet, but a revamped version with tons of new features is now available here!
  • Complete overhaul of the calculator that now not only simulates the damage of main gun projectiles, but also offers a crude approximation of MG damage output. Ever wondered if that pintle MG on top of the PzVI is even worth the munitions? Test out how much of a difference it actually makes with the simulator!



    To enable/disable or modify the exact contribution of MG sim, just set the percentages for the Hull, Coax and Pintle (if available) in cells Q2 : S2.

  • Revamped Simulator tab that now calculates the average damage and kills dealt (total, by MG and by main gun) after each shot for each model in a squad over 100s or 1,000s of repetitions.



    To run, simply set the desired values for distance, formation, RA, etc. in the respective fields and hit "Start simulator" (be warned, though, that the cell code is pretty slow, so starting with 100 iterations to get a crude overview is recommended)

  • Graphical interface that allows quick and easy visualization and comparison of results in different plots.
    Just run a simulation in the Simulator tab and import the results by clicking the big button in the lower left corner!




  • New templates for rocket artillery and various off-map arty strikes
  • A number of bugfixes, especially for the unit stats in the Data tab

4 Feb 2021, 16:58 PM
#31
avatar of Vipper

Posts: 13496 | Subs: 1

nice work once more
4 Feb 2021, 18:16 PM
#32
avatar of Descolata

Posts: 486

MMX makes my life complete. Mmmmmm, data.....
MMX
5 Feb 2021, 03:40 AM
#33
avatar of MMX

Posts: 999 | Subs: 1

jump backJump back to quoted post4 Feb 2021, 16:58 PMVipper
nice work once more


MMX makes my life complete. Mmmmmm, data.....


thanks a lot guys, hope you give it a spin!

as always, let me know if you run into any errors or inconsistencies...

in fact i've already spotted a mayor blunder with the MG DPS implementation (DPS not affected by the damage reduction multiplier) that will get fixed soon.

MMX
19 Feb 2021, 16:10 PM
#34
avatar of MMX

Posts: 999 | Subs: 1

UPDATE 2/19/2021 A couple of bugfixes and a new interface with fancy graphs ready to download here!
  • Added a new graphical interface tab that allows comparison of up to 4 datasets and shows damage/kills over time, as well as the contribution of MGs and the main gun to overall damage and model kills.



    In addition, another set of graphs can be used to visualize and compare the probability density and cumulative probability for a squad kill after n shots (or seconds) and displays the AoE and scatter area curves for each dataset.
    On the left, a customizable table summarizes the most important values (e.g. DPS, KPS (kills per second), etc.) for quick reference.



  • Included option to export/import datasets to/from .txt
  • Fixed the damage reduction multiplier not correctly applying to machine gun damage
  • Fixed an error in the TBS (time between shots) calculation affecting weapons with cooldown
16 May 2021, 19:57 PM
#35
avatar of Klement Pikhtura

Posts: 772

Well done, very helpful! Now I can skip on geometry while drawing AOE :D

But how do I use comparison tab? It only shows 4 heavy tanks (w/o KV2).
MMX
17 May 2021, 04:05 AM
#36
avatar of MMX

Posts: 999 | Subs: 1

thanks a lot, glad to hear you found some use for it!

now that you say it the function of the tabs is probably not very intuitive. the tutorial isn't very helpful here either since the functions and layout of the spreadsheet changed quite drastically from that of the 1st version and i haven't updated it ever since...

but to your question: the "comparison" tab uses the info in each of the "graph" tabs to allow for some head-to-head comparison, so in order to get a different data set for another tank you'll have to load the data you want into each of the "graph" tabs.

there are two ways to do this:

  • you can use the "simulator" tab to calculate a data set with the parameters set there (the unit, range, formation, target size, etc). once you set the parameters you just need to press the "start simulator" button (depending on the number of iterations used this can take quite a while; 1,000 iterations usually take about 4-5 mins). after the sim is finished you can fetch the results into any of the "graph" tabs using the "get data from simulator!" button.

  • you can load data previously calculated and exported as .txt if you have any with the "import data from file" button. this is basically meant to allow storage of some results so you don't need to recalculate it each time you override it with a new data set.


if you're just interested in the AoE damage and scatter area plots, there's unfortunately no straightforward way to display these in the comparison tab without simulating some data first (i'll probably change that in an upcoming release). however, you can reduce the number of iterations to 1 in the simulator to quickly generate the curves and load them into each "graph" tab as described above.

hope this helps and let me know if you need any additional info ;)
17 May 2021, 12:43 PM
#37
avatar of Klement Pikhtura

Posts: 772

Thank you, I got it!

'Simulation' tab -> choose simulation parameters -> press 'start simulation' -> open any of graphs tabs (from 1 to 4) -> press 'get data from simulator' -> open 'Comparison' tab and change table names match the content of the graph.

But there is a weird issue with AOE graphs that show AOE with +.5 offset, e.g. p4 should be 1.18, but for some reason it shows 1.68, some with t34s, cromwell and Tiger. Perhaps there are issues with Serelia's AOE numbers, although last time I checked some of them they were correct.
29 Nov 2021, 15:21 PM
#38
avatar of Klement Pikhtura

Posts: 772

Hey, MMX, how's it going? I wanted to ask if highlighted change could be integrated into the spreadsheet? In advance, thanks for the reply.

The T-70 is having some of its potential slightly lowered, particularly in the AI role. Recon Mode has also been adjusted to have a delay before the main gun activates, reducing its effectiveness when caught out of position.
  • Reload from 2.1/2.5 to 2.6
  • AOE capped at 3 models per squad
MMX
29 Nov 2021, 16:45 PM
#39
avatar of MMX

Posts: 999 | Subs: 1

Hey, MMX, how's it going? I wanted to ask if highlighted change could be integrated into the spreadsheet? In advance, thanks for the reply.



Everything great, thanks a lot!

The model cap feature is already integrated for the Ostwind, just not for the T-70 yet as I haven't updated the spreadsheet for quite a while and I'm afraid the last version predates the AoE change you mentioned. That reminds me I wanted to publish the most-recent version along time ago already...
Anyway, in the meantime you can simply enable the model cap yourself by editing the data table (there should be a column with sth like "max targets", just setting this to three should do the trick).

Cheers

29 Nov 2021, 18:41 PM
#40
avatar of Hannibal
Senior Moderator Badge

Posts: 3114 | Subs: 2

At this point we're just waiting for the day until MMX will program the rest of CoH2 into an Excel sheet and we finally don't need steam or the Relic servers anymore.
Probably comes with the added bonus of higher stability because Excel does not bugsplat.
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

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