Bug in toawlog.txt output

Post bug reports and ask for game support here.
Post Reply
Martin_Goliath
Posts: 98
Joined: Fri Jul 27, 2007 3:54 pm

Bug in toawlog.txt output

Post by Martin_Goliath »

Probably of no relevance to most TOAW players, but there is an output bug in toawlog.txt that would be nice to have fixed in a future patch:

When printing combat details, the attrition of the defending side is mixed up with a strength value, and thus makes no sense. To explain what I mean, I include parts of a toawlog.txt file below. The opposing units each consist of 1000 rifle squads. Coloured lines are my added explanations.

[Skipping several lines to get to print-out of strengths]
Combat :Defender anti armor strength: 1432
Combat :Attacker anti armor strength: 954
Combat :Defender anti personnel strength: 3227
Combat :Attacker anti personnel strength: 2082
[Skipping some irrelevant lines about air strengths]
Combat :Defender survivability: 7471
Combat :Attacker survivability: 7284
[Skipping some lines to get to attacking unit AT attrition]
[The "attrit" number 19 = 100 * defender AT strength/attacker survivability:]
Combat : Attacking unit under fire: 2nd Division (attrit: 19)
Combat :
[The "attrition%" number 4 = Square-root(attrit) * 10/attrition divider]
["attrition%" is the nominal number of individual AT targets that will come under fire in the attacking unit]
Combat : Smite: 2nd Force 2nd Formation, 2nd Division, (anti-armor), attrition%= 4.
[no AT targets, so no AT combat; skipping some lines to get to defending unit AT attrition]
[The "attrit" number should be 100 * attacker AT strength/defender survivability = 12, but obviously the output actually is the bare attacker AT strength:]
Combat : Defending unit under fire: 1st Unit (attrit: 954)
Combat :
[The "attrition%" number 3 = Square-root(attrit) * 10/attrition divider comes out okay, which shows that the printed "attrit" is just an output error.]
["attrition%" is the nominal number of individual AT targets that will come under fire in the defending unit]
Combat : Smite: 1st Force 1st Formation, 1st Unit, (anti-armor), attrition%= 3.
[no AT targets, so no AT combat; skipping some lines to get to AP combat]
APCombat :Anti personnel combat begins.
[The "attrit" number 44 = 100 * defender AP strength/attacker survivability:]
Combat : Attacking unit under fire: 2nd Division (attrit: 44)
Combat :
[The "attrition%" number 6 = Square-root(attrit) * 10/attrition divider]
["attrition%" is the nominal number of individual AP targets that will come under fire in the attacking unit]
Combat : Smite: 2nd Force 2nd Formation, 2nd Division, (anti-personnel), attrition%= 6.
[Now a number of rifle squads of the attacker will suffer AP fire from the defender. In this case, "attrition%" indicates 60 squads.
The actual number of individual targets is called "specificAttrit", and is "attrition%" with some randomization.
In this example, 77 squads actually come under fire, so "specificAttrit" is 7%]

Combat : 1st Force weapons firing on 2nd Force Rifle Squad.
APCombat : Potentially effective hit on 2nd Force Rifle Squad by 1st Force Rifle Squad.
Combat : Rifle Squad destroyed. (specificAttrit=7)
[skipping several lines with fire against another 76 individual targets]
Combat : Weighted direct combat losses: 7%
[skipping some lines to get to defending unit AP attrition]
[The "attrit" number should be 100 * attacker AP strength/defender survivability = 27, but obviously the output actually is the bare attacker AP strength:]
Combat : Defending unit under fire: 1st Unit (attrit: 2082)
Combat :
[The "attrition%" number 5 = Square-root(attrit) * 10/attrition divider comes out okay, which shows that the printed "attrit" is just an output error.]
["attrition%" is the nominal number of individual AP targets that will come under fire in the defending unit]
Combat : Smite: 1st Force 1st Formation, 1st Unit, (anti-personnel), attrition%= 5.
[Now a number of rifle squads of the defender will suffer AP fire from the attacker. In this case, "attrition%" indicates 50 squads.
Again, the actual number of individual targets is called "specificAttrit", and is "attrition%" with some randomization.
In this example, 68 squads actually come under fire, so "specificAttrit" is 6%]

Combat : 2nd Force weapons firing on 1st Force Rifle Squad.
APCombat : Potentially effective hit on 1st Force Rifle Squad by 2nd Force Rifle Squad.
Combat : Rifle Squad destroyed. (specificAttrit=6)
[skipping several lines with fire against Another 67 individual targets]
Combat : Weighted direct combat losses: 6%
[skipping some lines to get to the summary]
News : 1st Force successfully defend location 9,9.
News : 1st Force approximate equipment and personnel losses - 6%
News : 2nd Force approximate equipment and personnel losses - 7%
[skipping remaining lines of log file]

Edit: removed extra line feeds.
Oberst_Klink
Posts: 4839
Joined: Sun Feb 10, 2008 7:37 pm
Location: Germany
Contact:

RE: Bug in toawlog.txt output

Post by Oberst_Klink »

Försvarsminister,

did you take the other factors into account? I recall an older post (pre-2012 I think...) that it only makes sense if you also switch ubberdude=Y.

When in doubt.. we still can ask Norm. He's around and about.

Klink, Oberst
My Blog & on Twitter.
Visit CS Legion on Twitter & Facebook for updates.
Martin_Goliath
Posts: 98
Joined: Fri Jul 27, 2007 3:54 pm

RE: Bug in toawlog.txt output

Post by Martin_Goliath »

Herr Oberst,

I thought uberdude was for getting event trigger print-outs when playtesting. Worth turning on to see how toawlog.txt behaves. However, I'm pretty sure this is just a programmer's slip of printing the wrong variable.

Cheers,
Martin
Oberst_Klink
Posts: 4839
Joined: Sun Feb 10, 2008 7:37 pm
Location: Germany
Contact:

RE: Bug in toawlog.txt output

Post by Oberst_Klink »

ORIGINAL: MarGol

Herr Oberst,

I thought uberdude was for getting event trigger print-outs when playtesting. Worth turning on to see how toawlog.txt behaves. However, I'm pretty sure this is just a programmer's slip of printing the wrong variable.

Cheers,
Martin
Försvarsminister,

I am just a humble TOAW'ler since 20 AD of Norm (blessed be his name!) As for the 'inner works' and calcs... you got to wait for/or ask Ralphie or Uncle Bob.

My next episode of the Tutorial 'XX series will deal with artillery and de-entrenching.

Klink, Oberst
My Blog & on Twitter.
Visit CS Legion on Twitter & Facebook for updates.
Martin_Goliath
Posts: 98
Joined: Fri Jul 27, 2007 3:54 pm

RE: Bug in toawlog.txt output

Post by Martin_Goliath »

Looking forward to the next tutorial!

Gott Nytt År
Martin
Oberst_Klink
Posts: 4839
Joined: Sun Feb 10, 2008 7:37 pm
Location: Germany
Contact:

RE: Bug in toawlog.txt output

Post by Oberst_Klink »

ORIGINAL: MarGol

Looking forward to the next tutorial!

Gott Nytt År
Martin
In the making... a small/simple one...Explaining the PO path and well, artillery with the help of the TOAWlog... Not a biggie, but at least I can finish the series off...after all, WW2 will be over... until some nasty little wars aka rumble in the jungle on a fictitious Caribbean island or the fictional African country of Zangaro (Like in the novel Dogs of War).

Note: I found a good way to simulate the use of mortars for bombardments of units that actually got them; I mean... why not? for <=2.5km/hex scenarios it does make sense that even infantry units with those weapons should be able to use them for counter-battery fire and bombardment missions.

Gott nytt år 2018, försvarsminister!

Klink, Oberst



Image
Attachments
cats.jpg
cats.jpg (396.68 KiB) Viewed 99 times
My Blog & on Twitter.
Visit CS Legion on Twitter & Facebook for updates.
User avatar
ralphtricky
Posts: 6675
Joined: Sun Jul 27, 2003 4:05 am
Location: Colorado Springs
Contact:

RE: Bug in toawlog.txt output

Post by ralphtricky »

You're right, good catch! I fixed it for a future patch.

If you're checking, a lot of the formulas add 1 to avoid a divide by zero error. In this case the actual formula is attrit = (nasty * 100) / (totalDefenderStrength + 1)

Ralph



Ralph Trickey
TOAW IV Programmer
Blog: http://operationalwarfare.com
---
My comments are my own, and do not represent the views of any other person or entity. Nothing that I say should be construed in any way as a promise of anything.
Post Reply

Return to “Tech Support”