minipol
General
Posts: 560
Joined: Fri Oct 11, 2013 1:24 pm

Sun Sep 28, 2014 8:09 pm

@tripax
That's was it. This was the last battle in the log. Or maybe the last battle isn't fully described in the log?
It's ashame they change the output so often. If they gave us more info and keep it almost the same between games,
it would allow the community to build tools to for instance, add more stats (that's what I'm after).
I'll might try another turn and see what my code shows then.
Still stumped on the nr of hits :(

@ohms_law
The language you choose should be the one you know best. A lot of good languages exist and some nice tools to build gui's.

User avatar
tripax
AGEod Veteran
Posts: 777
Joined: Thu Aug 29, 2013 9:58 pm

Sun Sep 28, 2014 9:26 pm

In your Settings/General.opt file, what do you have for LogBatch? It might not be writing the whole log right away (see: http://www.ageod-forum.com/showthread.php?7816-Battle-Log&highlight=logbatch). Maybe set LogBatch=1?

minipol
General
Posts: 560
Joined: Fri Oct 11, 2013 1:24 pm

Mon Sep 29, 2014 11:52 am

I'll have a look at the opt file tonigjht, thanks!

minipol
General
Posts: 560
Joined: Fri Oct 11, 2013 1:24 pm

Mon Sep 29, 2014 6:04 pm

The setting is as follows:

// how many log lines should be written at once. Can slow down significatively the app & hosting if below 10.
LogBatch = 100

Reading the text, it should be higher then 10, but then again, it may result in some lines not written to the log.

I ran the test again. The turn is huge with 14 battles. The good news is that my parser doesn't return errors, and seems to go over the battles ok.
The bad news, the nr of casualties is nowhere near.

This is a battle fought between a Union commander less stack against an Indian force Chief Little Crow.
Casualties: Union: 30 men, 30 horses. Indians: 120 men, 120 horses
What parser returns (after all details are correct, I will tidy it up and produce a more readable report):
I don't take in account destroyed units yet or casualties from destroyed units

First line (12311): 18:38:44 (Reporting) Battle in 1049 Yellow Medecine, MN Day: 3 Round: 0
Last line (12525): 18:38:44 (Reporting) Group Sisseton Santee has retreated
--- Targetting ---
Attacker: 34. Union Detachment Target: Sisseton Santee
--- 1st round_start_offset 12 from b_sub_log 215
--- Start collecting round info from position 13
-->Searching in hst battles for 1st MI Lt., Bty.B
------> 12 men killed from unit Sisseton Santee
-- Round 0, range 5
== 1 units involved in 1 attacks ==
b' --> USA unit 1st MI Lt., Bty.B of 34. Union Detachment firing at Sisseton Santee'
--- 1st round_start_offset 25 from b_sub_log 215
--- Start collecting round info from position 26
-->Searching in hst battles for 1st MI Lt., Bty.B
-- Round 0, range 4
== 1 units involved in 1 attacks ==
b' --> USA unit 1st MI Lt., Bty.B of 34. Union Detachment firing at Sisseton Santee'
--- 1st round_start_offset 36 from b_sub_log 215
--- Start collecting round info from position 37
-->Searching in hst battles for 2nd Indiana Cav.
-->Searching in hst battles for 1st MI Lt., Bty.B
-->Searching in hst battles for 11th Kansas Cav.
-->Searching in hst battles for 2nd Indiana Cav.
-->Searching in hst battles for 11th Kansas Cav.
-- Round 0, range 3
== 3 units involved in 3 attacks ==
b' --> USA unit 2nd Indiana Cav. of 34. Union Detachment firing at Sisseton Santee'
b' --> USA unit 1st MI Lt., Bty.B of 34. Union Detachment firing at Sisseton Santee'
b' --> USA unit 11th Kansas Cav. of 34. Union Detachment firing at Sisseton Santee'
b' --> USA unit 2nd Indiana Cav. of 34. Union Detachment firing at Sisseton Santee'
b' --> USA unit 11th Kansas Cav. of 34. Union Detachment firing at Sisseton Santee'
--- 1st round_start_offset 95 from b_sub_log 215
--- Start collecting round info from position 96
-->Searching in hst battles for 1st MI Lt., Bty.B
-->Searching in hst battles for 2nd Indiana Cav.
-->Searching in hst battles for 11th Kansas Cav.
------> 20 men killed from unit Sisseton Santee
-- Round 0, range 2
== 3 units involved in 3 attacks ==
b' --> USA unit 1st MI Lt., Bty.B of 34. Union Detachment firing at Sisseton Santee'
b' --> USA unit 2nd Indiana Cav. of 34. Union Detachment firing at Sisseton Santee'
b' --> USA unit 11th Kansas Cav. of 34. Union Detachment firing at Sisseton Santee'
--- 1st round_start_offset 132 from b_sub_log 215
--- Start collecting round info from position 133
-->Searching in hst battles for 2nd Indiana Cav.
-->Searching in hst battles for 1st MI Lt., Bty.B
-->Searching in hst battles for 11th Kansas Cav.
-- Round 0, range 1
== 3 units involved in 3 attacks ==
b' --> USA unit 2nd Indiana Cav. of 34. Union Detachment firing at Sisseton Santee'
b' --> USA unit 1st MI Lt., Bty.B of 34. Union Detachment firing at Sisseton Santee'
b' --> USA unit 11th Kansas Cav. of 34. Union Detachment firing at Sisseton Santee'
--- 1st round_start_offset 167 from b_sub_log 215
--- Start collecting round info from position 168
-->Searching in hst battles for 11th Kansas Cav.
------> 20 men killed from unit Sisseton Santee
-->Searching in hst battles for 2nd Indiana Cav.
*** No next round found, end of file
-- Round 0, range 0
== 2 units involved in 2 attacks ==
b' --> USA unit 11th Kansas Cav. of 34. Union Detachment assaulting the Sisseton Santee'
b' --> USA unit 2nd Indiana Cav. of 34. Union Detachment assaulting the Sisseton Santee'
====== Battle over =========

Rounds 1, maximum range 5, minimum range 0
USA men killed 52, CSA men killed 0

== Top 10 units firing ==
b'1st MI Lt., Bty.B fired 5 times'
b'2nd Indiana Cav. fired 4 times'
b'11th Kansas Cav. fired 4 times'

== Top 10 units assaulting ==
b'11th Kansas Cav. assaulting 1 times'
b'2nd Indiana Cav. assaulting 1 times'

== Top 10 units targeting ==
b'Sisseton Santee targetted 15 times'

== Units involved ==
b'2nd Indiana Cav. saw action 5 times, 4 firing, 1 assaulting and was targeted 0'
b'1st MI Lt., Bty.B saw action 5 times, 5 firing, 0 assaulting and was targeted 0'
b'11th Kansas Cav. saw action 5 times, 4 firing, 1 assaulting and was targeted 0'

The battle log:

18:38:44 (Reporting) Battle in 1049 Yellow Medecine, MN Day: 3 Round: 0
18:38:44 (Reporting) Commit Chance 1004795 34. Union Detachment 30 %, Rolled: 83 Not commited
18:38:44 (Reporting) Commit Chance 1004795 34. Union Detachment 30 %, Rolled: 13 Commited
18:38:44 (Reporting) GiveGroupsTargets 1004795 34. Union Detachment initiating fight against faction 1000011 engaging: 1011342 Sisseton Santee
18:38:44 (Reporting) 1011342 Sisseton Santee new target is 1004795 34. Union Detachment
18:38:44 (Reporting) <<<-----START----->>>
18:38:44 (Reporting) Starting CheckBattles, a battle occurs in region Yellow Medecine, MN at day 3
18:38:44 (Reporting) Checking Battle Abilities given by 1004795 34. Union Detachment
18:38:44 (Reporting) Checking Battle Abilities given by 1011342 Sisseton Santee
18:38:44 (Reporting) GetRound SubList 5 SUs can be involved during this round.
18:38:44 (Reporting)
18:38:44 (Reporting) Round: 0 Battle is now at range 5
18:38:44 (Reporting) Picked: USA 34. Union Detachment 1004797 1st MI Lt., Bty.B firing
18:38:44 (Reporting) Target unit is: Indians\Sisseton Santee\Sisseton Santee
18:38:44 (Reporting)
18:38:44 (Reporting) *** Start of action # 1 1004797 1st MI Lt., Bty.B vs 1011346 Sisseton Santee ***
18:38:44 (Reporting) Sisseton Santee - Commander: Little Crow Cmd Coeff. %: 135
18:38:44 (Reporting) Battle effectiveness with leader rating: 100.00%
18:38:44 (Reporting) Attacker DmgDone: 2 CohDone: 10 AsltDmgDone 3 AsltCohDone: 16
18:38:44 (Reporting) Attacker ToHit: 20.00 rolled a 18 scoring a hit Defender remaining Health&Cohesion 8 / 74
18:38:44 (Reporting) *** End of action ***
18:38:44 (Reporting)
18:38:44 (Reporting) Changing range
18:38:44 (Reporting)
18:38:44 (Reporting) Round: 0 Battle is now at range 4
18:38:44 (Reporting) Picked: USA 34. Union Detachment 1004797 1st MI Lt., Bty.B firing
18:38:44 (Reporting) Target unit is: Indians\Sisseton Santee\Sisseton Santee
18:38:44 (Reporting)
18:38:44 (Reporting) *** Start of action # 2 1004797 1st MI Lt., Bty.B vs 1011346 Sisseton Santee ***
18:38:44 (Reporting) Sisseton Santee - Commander: Little Crow Cmd Coeff. %: 135
18:38:44 (Reporting) Battle effectiveness with leader rating: 100.00%
18:38:44 (Reporting) *** End of action ***
18:38:44 (Reporting)
18:38:44 (Reporting) Changing range
18:38:44 (Reporting)
18:38:44 (Reporting) Round: 0 Battle is now at range 3
18:38:44 (Reporting) Picked: IND Sisseton Santee 1011346 Sisseton Santee firing
18:38:44 (Reporting) Target unit is: United States of America\34. Union Detachment\2nd Indiana Cav.
18:38:44 (Reporting)
18:38:44 (Reporting) *** Start of action # 3 1011346 Sisseton Santee vs 1006880 2nd Indiana Cav. ***
18:38:44 (Reporting) Sisseton Santee - Commander: Little Crow Cmd Coeff. %: 135
18:38:44 (Reporting) Battle effectiveness with leader rating: 135.00%
18:38:44 (Reporting) *** End of action ***
18:38:44 (Reporting)
18:38:44 (Reporting) Picked: IND Sisseton Santee 1011346 Sisseton Santee firing
18:38:44 (Reporting) Target unit is: United States of America\34. Union Detachment\2nd Indiana Cav.
18:38:44 (Reporting)
18:38:44 (Reporting) *** Start of action # 4 1011346 Sisseton Santee vs 1006880 2nd Indiana Cav. ***
18:38:44 (Reporting) Sisseton Santee - Commander: Little Crow Cmd Coeff. %: 135
18:38:44 (Reporting) Battle effectiveness with leader rating: 135.00%
18:38:44 (Reporting) *** End of action ***
18:38:44 (Reporting)
18:38:44 (Reporting) Picked: USA 34. Union Detachment 1006880 2nd Indiana Cav. firing
18:38:44 (Reporting) Target unit is: Indians\Sisseton Santee\Sisseton Santee
18:38:44 (Reporting)
18:38:44 (Reporting) *** Start of action # 5 1006880 2nd Indiana Cav. vs 1011346 Sisseton Santee ***
18:38:44 (Reporting) Sisseton Santee - Commander: Little Crow Cmd Coeff. %: 135
18:38:44 (Reporting) Battle effectiveness with leader rating: 100.00%
18:38:44 (Reporting) *** End of action ***
18:38:44 (Reporting)
18:38:44 (Reporting) Picked: USA 34. Union Detachment 1004797 1st MI Lt., Bty.B firing
18:38:44 (Reporting) Target unit is: Indians\Sisseton Santee\Sisseton Santee
18:38:44 (Reporting)
18:38:44 (Reporting) *** Start of action # 6 1004797 1st MI Lt., Bty.B vs 1011346 Sisseton Santee ***
18:38:44 (Reporting) Sisseton Santee - Commander: Little Crow Cmd Coeff. %: 135
18:38:44 (Reporting) Battle effectiveness with leader rating: 100.00%
18:38:44 (Reporting) *** End of action ***
18:38:44 (Reporting)
18:38:44 (Reporting) Picked: USA 34. Union Detachment 1009460 11th Kansas Cav. firing
18:38:44 (Reporting) Target unit is: Indians\Sisseton Santee\Sisseton Santee
18:38:44 (Reporting)
18:38:44 (Reporting) *** Start of action # 7 1009460 11th Kansas Cav. vs 1011346 Sisseton Santee ***
18:38:44 (Reporting) Sisseton Santee - Commander: Little Crow Cmd Coeff. %: 135
18:38:44 (Reporting) Battle effectiveness with leader rating: 100.00%
18:38:44 (Reporting) *** End of action ***
18:38:44 (Reporting)
18:38:44 (Reporting) Picked: USA 34. Union Detachment 1006880 2nd Indiana Cav. firing
18:38:44 (Reporting) Target unit is: Indians\Sisseton Santee\Sisseton Santee
18:38:44 (Reporting)
18:38:44 (Reporting) *** Start of action # 8 1006880 2nd Indiana Cav. vs 1011346 Sisseton Santee ***
18:38:44 (Reporting) Sisseton Santee - Commander: Little Crow Cmd Coeff. %: 135
18:38:44 (Reporting) Battle effectiveness with leader rating: 100.00%
18:38:44 (Reporting) *** End of action ***
18:38:44 (Reporting)
18:38:44 (Reporting) Picked: USA 34. Union Detachment 1009460 11th Kansas Cav. firing
18:38:44 (Reporting) Target unit is: Indians\Sisseton Santee\Sisseton Santee
18:38:44 (Reporting)
18:38:44 (Reporting) *** Start of action # 9 1009460 11th Kansas Cav. vs 1011346 Sisseton Santee ***
18:38:44 (Reporting) Sisseton Santee - Commander: Little Crow Cmd Coeff. %: 135
18:38:44 (Reporting) Battle effectiveness with leader rating: 100.00%
18:38:44 (Reporting) *** End of action ***
18:38:44 (Reporting)
18:38:44 (Reporting) Changing range
18:38:44 (Reporting)
18:38:44 (Reporting) Round: 0 Battle is now at range 2
18:38:44 (Reporting) Picked: IND Sisseton Santee 1011346 Sisseton Santee firing
18:38:44 (Reporting) Target unit is: United States of America\34. Union Detachment\2nd Indiana Cav.
18:38:44 (Reporting)
18:38:44 (Reporting) *** Start of action # 10 1011346 Sisseton Santee vs 1006880 2nd Indiana Cav. ***
18:38:44 (Reporting) Sisseton Santee - Commander: Little Crow Cmd Coeff. %: 135
18:38:44 (Reporting) Battle effectiveness with leader rating: 135.00%
18:38:44 (Reporting) *** End of action ***
18:38:44 (Reporting)
18:38:44 (Reporting) Picked: USA 34. Union Detachment 1004797 1st MI Lt., Bty.B firing
18:38:44 (Reporting) Target unit is: Indians\Sisseton Santee\Sisseton Santee
18:38:44 (Reporting)
18:38:44 (Reporting) *** Start of action # 11 1004797 1st MI Lt., Bty.B vs 1011346 Sisseton Santee ***
18:38:44 (Reporting) Sisseton Santee - Commander: Little Crow Cmd Coeff. %: 135
18:38:44 (Reporting) Battle effectiveness with leader rating: 100.00%
18:38:44 (Reporting) *** End of action ***
18:38:44 (Reporting)
18:38:44 (Reporting) Picked: USA 34. Union Detachment 1006880 2nd Indiana Cav. firing
18:38:44 (Reporting) Target unit is: Indians\Sisseton Santee\Sisseton Santee
18:38:44 (Reporting)
18:38:44 (Reporting) *** Start of action # 12 1006880 2nd Indiana Cav. vs 1011346 Sisseton Santee ***
18:38:44 (Reporting) Sisseton Santee - Commander: Little Crow Cmd Coeff. %: 135
18:38:44 (Reporting) Battle effectiveness with leader rating: 100.00%
18:38:44 (Reporting) *** End of action ***
18:38:44 (Reporting)
18:38:44 (Reporting) Picked: USA 34. Union Detachment 1009460 11th Kansas Cav. firing
18:38:44 (Reporting) Target unit is: Indians\Sisseton Santee\Sisseton Santee
18:38:44 (Reporting)
18:38:44 (Reporting) *** Start of action # 13 1009460 11th Kansas Cav. vs 1011346 Sisseton Santee ***
18:38:44 (Reporting) Sisseton Santee - Commander: Little Crow Cmd Coeff. %: 135
18:38:44 (Reporting) Battle effectiveness with leader rating: 100.00%
18:38:44 (Reporting) Attacker DmgDone: 1 CohDone: 10 AsltDmgDone 1 AsltCohDone: 15
18:38:44 (Reporting) Attacker ToHit: 11.00 rolled a 9 scoring a hit Defender remaining Health&Cohesion 7 / 58
18:38:44 (Reporting) *** End of action ***
18:38:44 (Reporting)
18:38:44 (Reporting) Changing range
18:38:44 (Reporting)
18:38:44 (Reporting) Round: 0 Battle is now at range 1
18:38:44 (Reporting) Picked: USA 34. Union Detachment 1006880 2nd Indiana Cav. firing
18:38:44 (Reporting) Target unit is: Indians\Sisseton Santee\Sisseton Santee
18:38:44 (Reporting)
18:38:44 (Reporting) *** Start of action # 14 1006880 2nd Indiana Cav. vs 1011346 Sisseton Santee ***
18:38:44 (Reporting) Sisseton Santee - Commander: Little Crow Cmd Coeff. %: 135
18:38:44 (Reporting) Battle effectiveness with leader rating: 100.00%
18:38:44 (Reporting) *** End of action ***
18:38:44 (Reporting)
18:38:44 (Reporting) Picked: IND Sisseton Santee 1011346 Sisseton Santee firing
18:38:44 (Reporting) Target unit is: United States of America\34. Union Detachment\2nd Indiana Cav.
18:38:44 (Reporting)
18:38:44 (Reporting) *** Start of action # 15 1011346 Sisseton Santee vs 1006880 2nd Indiana Cav. ***
18:38:44 (Reporting) Sisseton Santee - Commander: Little Crow Cmd Coeff. %: 135
18:38:44 (Reporting) Battle effectiveness with leader rating: 135.00%
18:38:44 (Reporting) *** End of action ***
18:38:44 (Reporting)
18:38:44 (Reporting) Picked: USA 34. Union Detachment 1004797 1st MI Lt., Bty.B firing
18:38:44 (Reporting) Target unit is: Indians\Sisseton Santee\Sisseton Santee
18:38:44 (Reporting)
18:38:44 (Reporting) *** Start of action # 16 1004797 1st MI Lt., Bty.B vs 1011346 Sisseton Santee ***
18:38:44 (Reporting) Sisseton Santee - Commander: Little Crow Cmd Coeff. %: 135
18:38:44 (Reporting) Battle effectiveness with leader rating: 100.00%
18:38:44 (Reporting) *** End of action ***
18:38:44 (Reporting)
18:38:44 (Reporting) Picked: USA 34. Union Detachment 1009460 11th Kansas Cav. firing
18:38:44 (Reporting) Target unit is: Indians\Sisseton Santee\Sisseton Santee
18:38:44 (Reporting)
18:38:44 (Reporting) *** Start of action # 17 1009460 11th Kansas Cav. vs 1011346 Sisseton Santee ***
18:38:44 (Reporting) Sisseton Santee - Commander: Little Crow Cmd Coeff. %: 135
18:38:44 (Reporting) Battle effectiveness with leader rating: 100.00%
18:38:44 (Reporting) *** End of action ***
18:38:44 (Reporting)
18:38:44 (Reporting) Changing range
18:38:44 (Reporting)
18:38:44 (Reporting) Round: 0 Battle is now at range 0
18:38:44 (Reporting) Picked: IND Sisseton Santee 1011346 Sisseton Santee assaulting
18:38:44 (Reporting) Target unit is: United States of America\34. Union Detachment\2nd Indiana Cav.
18:38:44 (Reporting)
18:38:44 (Reporting) *** Start of action # 18 1011346 Sisseton Santee vs 1006880 2nd Indiana Cav. ***
18:38:44 (Reporting) Sisseton Santee - Commander: Little Crow Cmd Coeff. %: 135
18:38:44 (Reporting) Battle effectiveness with leader rating: 135.00%
18:38:44 (Reporting) Sisseton Santee - Commander: Little Crow Cmd Coeff. %: 135
18:38:44 (Reporting) Battle effectiveness with leader rating: 100.00%
18:38:44 (Reporting) *** End of action ***
18:38:44 (Reporting)
18:38:44 (Reporting) Picked: USA 34. Union Detachment 1009460 11th Kansas Cav. assaulting
18:38:44 (Reporting) Target unit is: Indians\Sisseton Santee\Sisseton Santee
18:38:44 (Reporting)
18:38:44 (Reporting) *** Start of action # 19 1009460 11th Kansas Cav. vs 1011346 Sisseton Santee ***
18:38:44 (Reporting) Sisseton Santee - Commander: Little Crow Cmd Coeff. %: 135
18:38:44 (Reporting) Battle effectiveness with leader rating: 100.00%
18:38:44 (Reporting) Sisseton Santee - Commander: Little Crow Cmd Coeff. %: 135
18:38:44 (Reporting) Battle effectiveness with leader rating: 135.00%
18:38:44 (Reporting) Attacker DmgDone: 1 CohDone: 10 AsltDmgDone 1 AsltCohDone: 15
18:38:44 (Reporting) Attacker ToHit: 32.40 rolled a 31 scoring a hit Defender remaining Health&Cohesion 6 / 39
18:38:44 (Reporting) Defender DmgDone: 1 CohDone: 7 AsltDmgDone 1 AsltCohDone: 10
18:38:44 (Reporting) Defender ToHit: 29.64 rolled a 1 scoring a hit Attacker remaining Health&Cohesion 19 / 45
18:38:44 (Reporting) *** End of action ***
18:38:44 (Reporting)
18:38:44 (Reporting) Picked: USA 34. Union Detachment 1006880 2nd Indiana Cav. assaulting
18:38:44 (Reporting) Target unit is: Indians\Sisseton Santee\Sisseton Santee
18:38:44 (Reporting)
18:38:44 (Reporting) *** Start of action # 20 1006880 2nd Indiana Cav. vs 1011346 Sisseton Santee ***
18:38:44 (Reporting) Sisseton Santee - Commander: Little Crow Cmd Coeff. %: 135
18:38:44 (Reporting) Battle effectiveness with leader rating: 100.00%
18:38:44 (Reporting) Sisseton Santee - Commander: Little Crow Cmd Coeff. %: 135
18:38:44 (Reporting) Battle effectiveness with leader rating: 135.00%
18:38:44 (Reporting) *** End of action ***
18:38:44 (Reporting)
18:38:44 (Reporting) Round 0 ended
18:38:44 (Reporting) Battle in 1049 Yellow Medecine, MN Day: 3 Round: 1
18:38:44 (Reporting) 1004795 34. Union Detachment new target is 1011342 Sisseton Santee
18:38:44 (Reporting) 1011342 Sisseton Santee new target is 1004795 34. Union Detachment
18:38:44 (Reporting) Checking combat stance for United States of America in region 1049 Yellow Medecine, MN
18:38:44 (Reporting) Preliminary test: No need to retreat from this battle: OppPower: 10 FacPower: 56 .
18:38:44 (Reporting) Checking combat stance for Indians in region 1049 Yellow Medecine, MN
18:38:44 (Reporting) Auto retreat triggered, TotalHits remaining: 6 Avg Cohesion%: 38 Base AutoRet%: 20 Hits taken: 4
18:38:44 (Reporting) Auto retreat: Hits received altered by the CiC's ROE retreat will 1011344 Little Crow 100
18:38:44 (Reporting) Group 1011342 Sisseton Santee faction losses reached Auto retreat level, retreat is automatic
18:38:44 (Reporting) Sisseton Santee succeeded in retreating
18:38:44 (Reporting) Sisseton Santee will take 1 hits while retreating (though no hits can be done on round 0)
18:38:44 (Reporting) Sisseton Santee is retreating toward Redwood, MN
18:38:44 (Reporting) Group Sisseton Santee has retreated

User avatar
tripax
AGEod Veteran
Posts: 777
Joined: Thu Aug 29, 2013 9:58 pm

Mon Sep 29, 2014 8:51 pm

Cool! Here are my thoughts, I'm not sure if they are right.

My feeling is that LogBatch can, for this purpose, be understood as the maximum number of lines that will not be written immediately when a turn ends. So setting it to 1 is ideal. But I could be wrong.

For that battle, my interpretation is that USA artillery landed 2 hits in action 1 and USA cavalry landed 1 each in actions 13 and 19 - a total of 4 hits at 30 men per hit equals 120 men.

Indians landed 1 hit in action 19 killing 30 men.

I didn't realize this before, but I think maybe that if a hit is in round 0, then assault damage and cohesion is deducted. If the hit is in a different round, then use ranged damage and cohesion (which, I guess, is the other damage and cohesion type listed in the battle log - I guess you could also try to grab the two types from the model.csv database).

minipol
General
Posts: 560
Joined: Fri Oct 11, 2013 1:24 pm

Tue Sep 30, 2014 12:45 pm

Thanks again Tripax

18:38:44 (Reporting) Battle effectiveness with leader rating: 100.00%
18:38:44 (Reporting) Attacker DmgDone: 2 CohDone: 10 AsltDmgDone 3 AsltCohDone: 16
18:38:44 (Reporting) Attacker ToHit: 20.00 rolled a 18 scoring a hit Defender remaining Health&Cohesion 8 / 74

For the artillery hits, are you going by the DmgDone? So Dmgdone: 1 is 1 hit, Dmgdone: 2 is 2 hits and so on?
If didn't take this in account, nor the Defender DmgDone hits.

As for the nr of casualties per hit: 1004797 1st MI Lt., Bty.B is Horse artillery.
I haven't got the hst with me to verify the actual numbers but the normal HA causes 9 men per hit, and 2 horse per hit.
2 hits of this artillery would mean 18 men, and 4 horses.

The 11th Kansas Cav. scores 2 hits in total, Sisseton Santee 1 hit.
Again, not having access to the hst at the moment, cavalry scores 30 men per hit, 30 horses per hit.
Combined casualties of the artillery and the cavalry: 78 men, 64 horses.
One hit for retreating should be added, I guess this is also a cavalry hit meaning 30 men and horses.
Total casualties for the Sisseton Santee: 108 men, 94 horses.
The game reports 120 men, 120 horses.

Union casualties calculated: 30 men and 30 horses and that is correct according to the game.

Or I am misreading the horse cavalry casualties, or the game takes in account to many casualties.

User avatar
tripax
AGEod Veteran
Posts: 777
Joined: Thu Aug 29, 2013 9:58 pm

Tue Sep 30, 2014 6:31 pm

I think you have it a bit backwards. When it says s cavalry unit has 20 hits, that means they can receive 20 hits before they are destroyed (or 19 hits, I guess they are destroyed on the 20th). 30 men per hit means that for flavor, the game displays this unit as a 600 man element/regiment. If an artillery unit hits them for 2 hits, then they lose 2 hits -in other words 60 men. Does that make sense?

Horse artillery has 12 (or 8 for the CSA) hits and each hit has 9 men (so 108 or 76 men in a element/regiment). They do 2 ranged damage and 3 assault damage (canister is more deadly, I guess). If they cause 2 ranged damage on cavalry, that kills 60 men. If the damage is against another horse artillery unit, that kills 18 men.

minipol
General
Posts: 560
Joined: Fri Oct 11, 2013 1:24 pm

Wed Oct 01, 2014 11:36 am

Thanks, indeed, I had it backwards. The hits and men per hit are for when the unit is hit not if hitting. Now I can adjust my code.
I'll get back when I have this changes in place.
Next step will be to get the leaders in the battle, and hopefully the weater in the region and region terrain.

minipol
General
Posts: 560
Joined: Fri Oct 11, 2013 1:24 pm

Wed Oct 01, 2014 9:00 pm

Is there a way to verify that a general was hit?
If found this in my log. Mind the last 2 units (Fort Jones and 2.Garrison Richmond Fortifications in the case of the first sentence), I get
from the Picked and Target line, and the unit's in the start action line.

--> USA unit 3rd & 4th Maine under T. Runyon of J. Hooker' Corps firing at Fort Jones 2.Garrison Richmond Fortifications
--> USA unit 3rd Naval under Jesse L. Reno of J. Hooker' Corps firing at Fort Jones 2.Garrison Richmond Fortifications
--> USA unit 1st PA Lt., Bty.A of J. Hooker' Corps firing at Fort Jones 2.Garrison Richmond Fortifications
----> 60 men killed from unit Fort Jones
--> USA unit RI Battery under Jesse L. Reno of J. Hooker' Corps firing at Edward Johnson Edward Johnson
--> USA unit 27th Pennsylvania under Jesse L. Reno of J. Hooker' Corps firing at Edward Johnson Edward Johnson
--> USA unit 106th PA Sharpshooters under T. Runyon of J. Hooker' Corps firing at Edward Johnson Edward Johnson
--> USA unit 1st PA Lt., Bty.D of J. Hooker' Corps firing at Edward Johnson Edward Johnson
--> USA unit 4th PA Res. under Jesse L. Reno of J. Hooker' Corps firing at Edward Johnson Edward Johnson
--> USA unit 8th New York under Jesse L. Reno of J. Hooker' Corps firing at Edward Johnson Edward Johnson
--> USA unit 5th Naval under T. Runyon of J. Hooker' Corps firing at Edward Johnson Edward Johnson

And afterwards it accounted for a hit. I get the id by looking at the hst file for a unit with the name followed by curly brackets.
This ended up giving me 291 which means Edward Johnson was hit.
If I look at the game, I can't see any message reporting him as dead but that's probably not unusual as I played the Union for this turn.
The garrison was totally destroyed so he could well be dead or captured.

Edit: When I loaded the game as the CSA, I saw a line "Edward Johnston is recovering from injuries in Petersburg, Dinwiddie, VA"
I saw him in Petersburg, but he was active again so the injuries couldn't have been very serious.

Any way to verify in the hst or somewhere else that he was injured or killed?
If I go by the hits and get the menperhit, it would mean 1 men killed.
Maybe also a "Destroyed ..." message follows if the general is dead?

User avatar
tripax
AGEod Veteran
Posts: 777
Joined: Thu Aug 29, 2013 9:58 pm

Wed Oct 01, 2014 9:36 pm

I think I know how to do this, but I won't get to it until tomorrow... Basically, instead of the message (ie. "Edward Johnston is recovering from injuries in Petersburg, Dinwiddie, VA") showing up in the hst file, the hst file just has the index of the message which refers to the local strings files in settings (something like "$ModelID $StringID $RegionID", but I'm not exactly sure). I think I might have a lot of free time tomorrow and will have a chance to try to look at it. I'll let you know if I can figure it out.

User avatar
tripax
AGEod Veteran
Posts: 777
Joined: Thu Aug 29, 2013 9:58 pm

Thu Oct 02, 2014 3:37 pm

At the end of the hst file the messages that occurred in a turn appear as events. The third number in the list seems to be some sort of string index, but I don't know how to figure out what the basis of the index is. For instance, 95 is, "¤ has been blamed for having suffered a defeat before the enemy. New Seniority: ¤" and 96 is, "¤ has been congratulated for his victory against the enemy. New Seniority: ¤". Thus the code below gives the message: "N.B. Bufordhas been congratulated for his victory against the enemy. New Seniority: 78". If you look at a hst file where a leader is injured/killed, you might be able to figure out what the index is. I'll try to remember to check if/when a general dies in my game.

Code: Select all

    {Event}
    -1
    0
    96
    1462
    -1
    1000001
    -1
    0
    0
    0
    78
    1
    -1
    0
    0
   
   
    N.B. Buford
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
    {/Event}

User avatar
ajarnlance
General of the Army
Posts: 623
Joined: Wed Sep 11, 2013 8:40 pm

Tue Oct 07, 2014 10:37 am

Is work still going on with this new battle report? I think it would be a marvellous improvement to the game!
"I can anticipate no greater calamity for the country than the dissolution of the Union... and I am willing to sacrifice everything but honor for its preservation." Robert E. Lee (1807-1870)

Check out my 'To End All Wars' AAR: http://www.ageod-forum.com/showthread.php?38262-The-Kaiser-report-the-CP-side-of-the-war-against-Jinx-and-PJL

minipol
General
Posts: 560
Joined: Fri Oct 11, 2013 1:24 pm

Tue Oct 07, 2014 11:48 am

I'm still working on it.
Just not the last couple of days.
But still active. I'm still ironing out some of the quirks but I'm getting there.
1 time I will soon be able to release is a more readable report of the battles, with some basic unit stats.

User avatar
ajarnlance
General of the Army
Posts: 623
Joined: Wed Sep 11, 2013 8:40 pm

Wed Oct 08, 2014 1:36 pm

minipol wrote:I'm still working on it.
Just not the last couple of days.
But still active. I'm still ironing out some of the quirks but I'm getting there.
1 time I will soon be able to release is a more readable report of the battles, with some basic unit stats.


Thanks for all your hard work. Dispelling some of the mystery surrounding the battle planner will be a significant contribution. Maybe AGEOD will incorporate this into a future patch! :)
"I can anticipate no greater calamity for the country than the dissolution of the Union... and I am willing to sacrifice everything but honor for its preservation." Robert E. Lee (1807-1870)



Check out my 'To End All Wars' AAR: http://www.ageod-forum.com/showthread.php?38262-The-Kaiser-report-the-CP-side-of-the-war-against-Jinx-and-PJL

minipol
General
Posts: 560
Joined: Fri Oct 11, 2013 1:24 pm

Wed Oct 08, 2014 5:41 pm

I don't know, I will gladly give them my code if they would want it at any point but I think they have other worries for the moment.
This weekend it's my birthday so no programming, next week I plan to do more work and hopefully have a module with basic stats.
I already have a log with readable output that clearly shows what happens in a battle.
It's great to learn how artillery is used, what units fights more than others and so on.

Jagger2013
General of the Army
Posts: 641
Joined: Sat Apr 27, 2013 2:14 am

Tue Oct 21, 2014 3:35 am

I could see this code very useful for modding as well. For example, if you want to adjust the effectiveness of infantry, artillery or cavalry to reduce or increase their effectiveness in battle, you can tweak a lot of different model values. In general, you have an idea of the impact of the changes on the model effectiveness but in a very vague manner. It is difficult to tell if you have gone too far or not far enough. But to be able to see the exact battle results if you change the OFF/DEF or initiative values of artillery in comparison to the effectiveness of infantry or cavalry after running a series of battles would be very, very helpful and a great timesaver. Knowing the percentages of casualties and cohesion loss produced by each of the different unit types would make balancing the various arms much easier.

minipol
General
Posts: 560
Joined: Fri Oct 11, 2013 1:24 pm

Thu Oct 30, 2014 6:25 pm

I'm close to something worth releasing.
I now calculate the men, horses and guns lost, but there are still some inaccuracies when I compare the casualty numbers to that of the game itself.
Not sure where the look.
Anyway, the 1ste link is to the output of my program (still needs some rearranging).
I first go over the battles, marking the rounds and detecting hits.
Then after words, I go over the battle rounds in detail, printing top 10's and giving stats per round, per battle and per turn.
Once I get the number of casualties completely correct, I'll look for a way to save the turn numbers so you get totals to work with.
I'm thinking of sqlite.

Anyway, the 2nd link is the result I got from the game itself. As you can see, some results are spot on, some are not.

The output of my script
http://tny.cz/77c89ad0

The result from the game
http://tny.cz/40b6472e

For instance the first battle, I calculate 1202 casualties, the game says 1201
All hits scored are 2 hits. The last one is this:

Hits 2, men/horses/guns 1/0/0/
----> 2 men, 0 horses, 0 artillery, 0 ships killed from unit Edward Johnson

The model shows this type of unit has 1 men per hit. Which makes sense as it's a person.
My code says: nr_of_men = nr of hits * nr of men per hit from model file
So I get 2 * 1. Now I can correct this error. But I get other results that are way off.

Could it be because of assault damage or is this calculated the same way as the other hits?

User avatar
tripax
AGEod Veteran
Posts: 777
Joined: Thu Aug 29, 2013 9:58 pm

Thu Oct 30, 2014 8:10 pm

It sounds like the log said 2 hits were landed but the element only had 1 hit left (since it only has one hit to begin with). Fixing this is easy enough if the element involved is a general, as in this case. But the element could also be something else that just happens to have 1 hit left, which will make things slightly more confusing. Not much more, though, and great job! Do you get to keep track of how many hits/men a force has before the battle? Also, I'd like to know who were the commanding officers for units involved, not just which units were involved. Do you think you can add that to the summaries?

minipol
General
Posts: 560
Joined: Fri Oct 11, 2013 1:24 pm

Thu Oct 30, 2014 10:45 pm

Indeed, as you say, if they only have 1 hit left and 2 is done, I take in account those 2 hits.
The logs don't seem to reveal a lot on the current strength of a unit
There is health and cohesion mentioned in the actions:

23:32:47 (Reporting) *** Start of action # 67 1010086 53rd New York vs 1010534 Fort Jones ***
23:32:47 (Reporting) 53rd New York - Commander: Joseph B. Hooker Cmd Coeff. %: 125
23:32:47 (Reporting) Fort Jones - Commander: Edward Johnson Cmd Coeff. %: 115
23:32:47 (Reporting) 53rd New York - Unit Commander: Jesse L. Reno Cmd Coeff. %: 106
23:32:47 (Reporting) Battle effectiveness with leader rating: 116.00%
23:32:47 (Reporting) Attacker DmgDone: 2 CohDone: 15 AsltDmgDone 2 AsltCohDone: 15
23:32:47 (Reporting) Attacker ToHit: 15.00 rolled a 8 scoring a hit Defender remaining Health&Cohesion 0 / 0
23:32:47 (Reporting) Defender is destroyed
23:32:47 (Reporting) *** End of action ***

A few attacks before I see this:

Attacker DmgDone: 2 CohDone: 15 AsltDmgDone 2 AsltCohDone: 15
23:32:47 (Reporting) Attacker ToHit: 16.00 rolled a 14 scoring a hit Defender remaining Health&Cohesion 2 / 0

After this attack, the unit had only 2 health left. So if I can find the hit/health correlation, I might be able to use it.
But it would mean keeping track of all the units in the action info.

As for your question on commanders, I could add them if I find the info you want.
Do you mean the info in the action bits or the commanders as shown in the battle summaries in the game?

User avatar
tripax
AGEod Veteran
Posts: 777
Joined: Thu Aug 29, 2013 9:58 pm

Fri Oct 31, 2014 11:14 am

In my version of the battle reports based on the battlelogs in the previous patch, element health and cohesion were given when the element was selected. So instead of counting how many hits a unit took, I looked at starting health and remaining health. That way my battle report could describe how many troops an element started and ended a battle with. In the new battlelog, I think you only see the health after a unit has been hit, so it isn't going to be easy to find out if an element starts a battle with only one hit. Without going to the hst file, I'm not sure this can be overcome.

For commanders, in the piece of battle you just pasted, Joseph B. Hooker is the stack commander of the stack with the 53rd New York in it and Jesse L. Reno is the unit commander (so the 53rd NY is either in a division commanded by Reno or Reno and the brigade containing the 53rd NY have been combined). Edward Johnson is the stack commander of the Fort Jones unit and that unit has no subordinate unit commander.

User avatar
ajarnlance
General of the Army
Posts: 623
Joined: Wed Sep 11, 2013 8:40 pm

Fri Oct 31, 2014 11:42 am

Glad to see this important project is making progress. Thanks for all your hard work minipol. I am so looking forward to gaining a better understanding of what actually happens in battles. Currently it all seems a bit of a mystery... ;)
"I can anticipate no greater calamity for the country than the dissolution of the Union... and I am willing to sacrifice everything but honor for its preservation." Robert E. Lee (1807-1870)



Check out my 'To End All Wars' AAR: http://www.ageod-forum.com/showthread.php?38262-The-Kaiser-report-the-CP-side-of-the-war-against-Jinx-and-PJL

minipol
General
Posts: 560
Joined: Fri Oct 11, 2013 1:24 pm

Fri Oct 31, 2014 1:26 pm

@tripax
Ok, I have that code already so I'll add that to the output.
Mind that I will change the output to html for easier reading.

@ajarnlance
Thanks, it's coming along nicely but as you can deduce from tripax's response, the value of such a project largely depends on what the devs do next.
If they keep changing the output of the Battle log, it will keep on breaking and might break into a point where it's impossible to get correct info from the db.
The numbers I calculate are not completely correct because I can't get the current health from the units.
If a unit with health for 1 hit receives 2 hits, I calculate 2 hits on that unit while only 1 can be dealt.
I have no means for the moment to correct this. Anyway, these are small inaccuracies that don't diminish the goal of the project: readable battle log,
and some fun stats in a gui and html reporting.

It can be usefull to modders, and just plain fun to keep "real" stats for the game.
I like to know what the bloodiest battles where, or what general fought in most battles and so on.

This week, I added database support to write the stats to. I have adjust the program to work with a gui altough no gui yet.
I can build the project and create an exe, so all the parts are starting to come together.
I will probably add the ini support first.
I could then release a text version of the tool, where you would edit the ini file to match your game setup.
Then you could run the tool every turn and look at the output.
It would also mean more testing because there will be bugs when more and more people test it.

User avatar
ajarnlance
General of the Army
Posts: 623
Joined: Wed Sep 11, 2013 8:40 pm

Fri Oct 31, 2014 3:48 pm

You guys are incredibly smart to figure all this out... it would be wonderful to know the biggest battles, best generals etc... I wonder if there is a way to alter the NM effects from battles. It has been mentioned on the forums before but small skirmishes/ garrison overruns should not affect NM like they do. The emphasis on NM should be on the outcome of the big battles. But perhaps this is outside your scope. Keep up the great work... thanks again!!
"I can anticipate no greater calamity for the country than the dissolution of the Union... and I am willing to sacrifice everything but honor for its preservation." Robert E. Lee (1807-1870)



Check out my 'To End All Wars' AAR: http://www.ageod-forum.com/showthread.php?38262-The-Kaiser-report-the-CP-side-of-the-war-against-Jinx-and-PJL

minipol
General
Posts: 560
Joined: Fri Oct 11, 2013 1:24 pm

Thu Nov 13, 2014 5:23 pm

Attached the installer of the first release of the tool.
The tool is hosted here: http://dropcanvas.com/up61w
(I will probably add another link for instance, a http://pastelink.me/ link if necessary. The pastelink service was down when I tried however).
A sample output can be viewed here: http://tny.cz/78182dad

It still lacks testing as I'm the only one testing now so bugs could and probably will be present.
I'll try to fix those as quick as possible.
I have tested the program with patch 1.04. I haven't yet tried 1.05 RCx.
You might post bugs or improvement requests here or sent me a mail. See the docs for my email address.
The stats aren't yet saved to the database so you can only use the tool to get a more readable view on the battle log.

After installing the program, you need to change the ini file to reflect your CWII installation.
The ini file is located in C:\Users\<user>\AppData\Local\CWII Battle logger\data\cwIIbl.ini where <user> is the current windows user.
Check the html documentation in the doc directory to see what settings need to be changed.
The battle log output is located in C:\Users\<user>\AppData\Local\CWII Battle logger\logs.
Just open the file with any text editor.
The tool also splits the battles in files and keeps them in a turn folder together with the hst and battelog.
It gives you a good idea of how the battles went.

It's my intent for the next version, to add a gui where the settings in the ini file can be set.
Also, by then, I would like to save some stats to the database, and some basic reports.
If would like to add some more info such as weather, location and so on.

Mind, that this kind of parsing program depends on a certain output.
If Ageod changes these logs (as they have done in the past), the program probably won't produce worthwhile info.
The stats aren't completely correct as I have no way of checking the health of a unit when subtracting the hits.
This means there are small errors in the reported number of casualties.
Unless Ageod adds some extra info to the battle log, I can't change this.
If they do, this could be a very nice add-on tool.
However if the essential output of the game keeps on changing in a fundamental way, it will
be impossible for me to keep up with the changes.

Cheers!

Return to “Civil War II”

Who is online

Users browsing this forum: No registered users and 21 guests