Bug in toawlog.txt output
Posted: Sat Dec 30, 2017 2:40 pm
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.
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.
