Final Tally

Norm Koger's The Operational Art of War III is the next game in the award-winning Operational Art of War game series. TOAW3 is updated and enhanced version of the TOAW: Century of Warfare game series. TOAW3 is a turn based game covering operational warfare from 1850-2015. Game scale is from 2.5km to 50km and half day to full week turns. TOAW3 scenarios have been designed by over 70 designers and included over 130 scenarios. TOAW3 comes complete with a full game editor.

Moderators: JAMiAM, ralphtricky

User avatar
decaro
Posts: 4004
Joined: Wed Aug 31, 2005 12:05 pm
Location: Stratford, Connecticut
Contact:

Final Tally

Post by decaro »

Although I'm playing under Advanced Rules I've opted to get detailed battle reports, but is there's a final tally for all casualty results when the scenario is over?
Stratford, Connecticut, U.S.A.[center]Image[/center]
[center]"The Angel of Okinawa"[/center]
Home of the Chance-Vought Corsair, F4U
The best fighter-bomber of World War II
User avatar
shunwick
Posts: 2427
Joined: Sat Oct 14, 2006 10:20 pm

RE: Final Tally

Post by shunwick »

Yes. Just check the Inventory and Replacements screen.
I love the smell of TOAW in the morning...
User avatar
golden delicious
Posts: 4114
Joined: Tue Sep 05, 2000 8:00 am
Location: London, Surrey, United Kingdom

RE: Final Tally

Post by golden delicious »

But is there a way to export that?

This is important. If I have to key it all in I am going to make errors.
"What did you read at university?"
"War Studies"
"War? Huh. What is it good for?"
"Absolutely nothing."
User avatar
shunwick
Posts: 2427
Joined: Sat Oct 14, 2006 10:20 pm

RE: Final Tally

Post by shunwick »

If you turn on the SitRep logs you will get a report each turn that is saved in your save folder. There are two files - a text file and a CSV file. The csv file has the information for units lost etc and can be loaded into a spreadsheet program.

Larry Fulkerson wrote a small program to provide formatting for the csv file. Unfortunately, it looks like it did not survive the hard disk crash. Hopefully, Larry might still be able to supply it.

Not sure if this is the sort of thing you are looking for though.

Best wishes,
Steve
I love the smell of TOAW in the morning...
ogar
Posts: 297
Joined: Sun Sep 06, 2009 8:31 pm

RE: Final Tally

Post by ogar »

AFAIK, the Sitrep logs got chopped short in version 3.4. The log only prints out "one screen's worth of eqp listings", about 18 lines of text or 18 entries. So if you have several unit types (armor, infantry, etc.) your complete eqp listing can easily exceed 18 lines, but the log only shows the first 18.

Since this problem affects the .txt and .csv versions, Larry's program will only show the truncated versions.

(I think the sitrep logs displayed more than 18 lines in earlier beta versions of 3.4, like 171, etc., but in 3.4.0.202, they are truncated.)

And while the sitreps are great -- I really depended on them for big scenarios -- they only show losses in battle for units either attacking or defending. You do not see losses in supporting units, unless those support units are directly attacking. And of course, you do not see pestilence, interdiction, and other 'frictional' losses nor replacements nor the damaged/destroyed allocation. I think the only way to get the latter is to screen-print the inventory (at each turn), and then run a screen-scraper program to extract the data. (Oh yeah, I think this also means coding the screen scraper program...)

Apologies for spreading more grumble and gloom on this topic.
User avatar
golden delicious
Posts: 4114
Joined: Tue Sep 05, 2000 8:00 am
Location: London, Surrey, United Kingdom

RE: Final Tally

Post by golden delicious »

ORIGINAL: shunwick

If you turn on the SitRep logs you will get a report each turn that is saved in your save folder. There are two files - a text file and a CSV file. The csv file has the information for units lost etc and can be loaded into a spreadsheet program.

Larry Fulkerson wrote a small program to provide formatting for the csv file. Unfortunately, it looks like it did not survive the hard disk crash. Hopefully, Larry might still be able to supply it.

Not sure if this is the sort of thing you are looking for though.

Best wishes,
Steve

As I recall this dumps turn by turn results, not a running total. Still, I suppose I could lump all the files together, but it's not very neat.

Formatting is no issue. I have had to work with some pretty horrible data in my time so I expect I can interpret this with no difficulty.
"What did you read at university?"
"War Studies"
"War? Huh. What is it good for?"
"Absolutely nothing."
User avatar
golden delicious
Posts: 4114
Joined: Tue Sep 05, 2000 8:00 am
Location: London, Surrey, United Kingdom

RE: Final Tally

Post by golden delicious »

ORIGINAL: ogar

AFAIK, the Sitrep logs got chopped short in version 3.4. The log only prints out "one screen's worth of eqp listings", about 18 lines of text or 18 entries. So if you have several unit types (armor, infantry, etc.) your complete eqp listing can easily exceed 18 lines, but the log only shows the first 18.

Since this problem affects the .txt and .csv versions, Larry's program will only show the truncated versions.

(I think the sitrep logs displayed more than 18 lines in earlier beta versions of 3.4, like 171, etc., but in 3.4.0.202, they are truncated.)

And while the sitreps are great -- I really depended on them for big scenarios -- they only show losses in battle for units either attacking or defending. You do not see losses in supporting units, unless those support units are directly attacking. And of course, you do not see pestilence, interdiction, and other 'frictional' losses nor replacements nor the damaged/destroyed allocation. I think the only way to get the latter is to screen-print the inventory (at each turn), and then run a screen-scraper program to extract the data. (Oh yeah, I think this also means coding the screen scraper program...)

Apologies for spreading more grumble and gloom on this topic.

Ugh. Manual keying it is, then.
"What did you read at university?"
"War Studies"
"War? Huh. What is it good for?"
"Absolutely nothing."
User avatar
shunwick
Posts: 2427
Joined: Sat Oct 14, 2006 10:20 pm

RE: Final Tally

Post by shunwick »

It would be nice if we could persuade Ralph to export the Inventory and Replacement screen. It would not be a huge undertaking. Perhaps something for the wishlist.
I love the smell of TOAW in the morning...
kmitahj
Posts: 100
Joined: Sun Apr 24, 2011 10:31 pm

RE: Final Tally

Post by kmitahj »

Hi,
ORIGINAL: golden delicious
[...]
Ugh. Manual keying it is, then.

not sure what your particular use case is (where you going to key your data in) but if you interested in stopgap solution I have made some time ago (it was before patching AA bug story etc.) small console utility to dump contents of in-game INVENTORY & REPLACEMENT panel. It reads the data from scenario currently opened in running instance of Opart program and lists it in the console (can be redirected to a file of course).
Not sure if such arrangement would fit your needs and besides have to say the utility was written and tested on Windows XP only. Probably it could be persuaded to run on Windows7 (32bit at least) too thought likely not right off the bat (two possible hurdles to overcome would be ASLR and UAC and there may be more). And chances to get it run on Windows8+ are even more slim (but frankly who cares about Win8+ [;)])
Anyway I've attached for reference text file containing example output from few runs of the utility. If you have compatible environment (Windows XP stronly preferred as I have currently neither time nor access to Windows7 to test/fix it on ) and are interested to give it a try let me know.
Attachments
listings.txt
(55.6 KiB) Downloaded 25 times
User avatar
golden delicious
Posts: 4114
Joined: Tue Sep 05, 2000 8:00 am
Location: London, Surrey, United Kingdom

RE: Final Tally

Post by golden delicious »

ORIGINAL: kmitahj

not sure what your particular use case is (where you going to key your data in) but if you interested in stopgap solution I have made some time ago (it was before patching AA bug story etc.) small console utility to dump contents of in-game INVENTORY & REPLACEMENT panel. It reads the data from scenario currently opened in running instance of Opart program and lists it in the console (can be redirected to a file of course).
Not sure if such arrangement would fit your needs and besides have to say the utility was written and tested on Windows XP only. Probably it could be persuaded to run on Windows7 (32bit at least) too thought likely not right off the bat (two possible hurdles to overcome would be ASLR and UAC and there may be more). And chances to get it run on Windows8+ are even more slim (but frankly who cares about Win8+ [;)])
Anyway I've attached for reference text file containing example output from few runs of the utility. If you have compatible environment (Windows XP stronly preferred as I have currently neither time nor access to Windows7 to test/fix it on ) and are interested to give it a try let me know.

This looks excellent. I'm actually running with Windows Vista believe it or not. I'm unlikely to have access to an XP environment, if you think it might run in Vista let me know.
"What did you read at university?"
"War Studies"
"War? Huh. What is it good for?"
"Absolutely nothing."
kmitahj
Posts: 100
Joined: Sun Apr 24, 2011 10:31 pm

RE: Final Tally

Post by kmitahj »

ORIGINAL: golden delicious
This looks excellent. I'm actually running with Windows Vista believe it or not. I'm unlikely to have access to an XP environment, if you think it might run in Vista let me know.
So you still one step above me in The Tower of Windows [;)]. I believe that Vista is (more or less) same case as Windows7. We may try to make it run but it may not be easy and there is no guarantee of sucess. Here are two (or three) steps to get it running (hopefully):
0. Runtime libraries:
ToawPeek needs proper Microsoft runtime libraries installed on your system. Most likely they are alredy on your system in which case this is no-op step. Presence of runtime libs can be checked on list of installed programs/components - look for "Microsoft Visual C++ 2008 Redistributable -x86 9.0.xxxxx". Alternatively if when trying to run ToawPeek you get message from the system that "such-and-such dll library is missing" and/or that "application needs to be reinstalled" that is clear sign runtime is missing. You can download it directly from Micorsoft (google: "vc++ redistributable 2008") - it is small package (few MBs only).
1. UAC aka credentials problem:
To read Opart internal data TOAWPeek uses API calls which are reserved for administrators. On Vista that means it needs to be started using "Run As Administrator" option or using "runas" on console command line. I was able to test "runas" on WinXP SP3 (thought not sure it works exactly the same on Vista). When using:
X:\path\to\toawpeek\folder> runas /env /user:mytestuser ToawPeek.exe
results depended on the credentials of the mytestuser. For ordinary user (with no admin rights) ToawPeek was not able to see running Opart instance ("No running OpArt..." message). Of course for me on XP running by default under admin credentials use of "runas" is suprefluous but on Vista it is most likely essential.
Note that it may be more comfortable to use
X:\path\to\toawpeek\folder> runas /env /user:youradminuser cmd.exe
and only run ToawPeek inside such admin-elevated console (otherwise ToawPeek output window disappers almost instatnly)
2. ASLR (Address Space Layout Randomisation) problem:
This technology on Vista and Win7 is used to randomize addresses at which program code and data are loaded - the goal is to make it harder for other processes to peek or poke into given process data (or code). It is GoodThing to have in general but in that case whole functionality of ToawPeek depends on ability to peek into selected addresses of running Opart process. On Vista ASLR can be disabled globally but it is definitly wrong way to go. Fortunately it can be also controlled on per process basis. Vista (and Win7 too I believe) use opt-in policy meaning that only processes which explicitly ask for it (via a bit set inside EXE header) will have their addresses randomized. Opart 3.4.0.202 is distributed with this ASLR bit (aka "Dynamicbase" flag) set and thus when running on Vista/Win7 ToawPeek may either crash (when it finds no memory where it expect it to be) or finish not recognizing running Opart process (so "No running OpArt..." message despite Opart running in background). I see three possible ways to deal with the issue:
a. If you are using so-called "Opart 3XBb" patch you should be good to go as it has ASLR bit already cleared.
b. You can clear that bit yourself using microsoft tools (only link.exe program is really needed). If by chance you have MS Visual C++ compiler (any version from 2005 up should do) installed on your system (slim chance I know) then you have link.exe already installed. If not you can get it by downloading and installing free version of MS C++ compiler (Express Edition C++ 2010 shall be still available for download at MS site). It is few hunderd MB to download but it is free, it also takes time to install but... it is free! All in all it is somewhat heavy-weight approach to the problem when all you need is one minute of use of single program from the whole package but its advantage (besides of beeing free [;)]) is that you are completely in control of the process. Once you have link installed and on the environment PATH all you need to switch off ASLR bit is:
X:\path\to\toaw> link /EDIT /DYNAMICBASE:NO "Opart 3.exe"
You can verify it's done properly using another tool from C++ compiler package:
X:\path\to\toaw> dumpbin /HEADERS "Opart 3.exe"
This shall produce rather lengthly output. Look into it under "OPTIONAL HEADER VALUES" you shall find "DLL characteristics" line. There should be one or more lines indented directly below "DLL characteristics" line. If one of these indented lines is "Dynamic base" it means that ASLR bit is still ON (it should BE NOT there if link command above has done its job correctly). Finally to restore ASLR bit back (if you decide to do so for whatever reason) simply run:
X:\path\to\toaw> link /EDIT /DYNAMICBASE "Opart 3.exe"
That's it. Of course after it is done you can unistall VC++ Express Compiler if you so wish
c. You may just send opart exe to me, I will switch off ASLR using my tools and send it back to you.

With the above hurdles cleared TOAWPeek will hopefully work on Vista as good as on Windows XP. If not, if there are other isusues which I'm not aware about one last resort would be to run TowaPeek with --debug option redirecting output to the file - maybe additional output produced by this option will help me figure out what is wrong. Or maybe not - as I said there is no guarantee.

So all in all if the above didn't scare you off and if it does not look too daunting for an effort which may anyway end up as a failure let me know (here on the thread or pm me) and I will send you the program and try to provide some assistance when needed.


ogar
Posts: 297
Joined: Sun Sep 06, 2009 8:31 pm

RE: Final Tally

Post by ogar »

Wow. Just. Wow.
not sure what your particular use case is (where you going to key your data in) but if you interested in stopgap solution I have made some time ago (it was before patching AA bug story etc.) small console utility to dump contents of in-game INVENTORY & REPLACEMENT panel. It reads the data from scenario currently opened in running instance of Opart program and lists it in the console (can be redirected to a file of course).
Not sure if such arrangement would fit your needs and besides have to say the utility was written and tested on Windows XP only. Probably it could be persuaded to run on Windows7 (32bit at least) too thought likely not right off the bat (two possible hurdles to overcome would be ASLR and UAC and there may be more). And chances to get it run on Windows8+ are even more slim (but frankly who cares about Win8+ )
Anyway I've attached for reference text file containing example output from few runs of the utility. If you have compatible environment (Windows XP stronly preferred as I have currently neither time nor access to Windows7 to test/fix it on ) and are interested to give it a try let me know.

Looks off to horizon, sees cloud of dust...
Who was that Masked Man ?

wonders if he hears a hearty "Hi-yo !" from far up the trail.
User avatar
golden delicious
Posts: 4114
Joined: Tue Sep 05, 2000 8:00 am
Location: London, Surrey, United Kingdom

RE: Final Tally

Post by golden delicious »

ORIGINAL: kmitahj

Presence of runtime libs can be checked on list of installed programs/components - look for "Microsoft Visual C++ 2008 Redistributable -x86 9.0.xxxxx".

I have 2010 and 10.0xxxx. Hopefully this does the job.
a. If you are using so-called "Opart 3XBb" patch you should be good to go as it has ASLR bit already cleared.

No idea what this is. I note there's an "Opart 3Windows98" executable in the folder. Too much to ask that this has the bit cleared?
b. You can clear that bit yourself using microsoft tools (only link.exe program is really needed). If by chance you have MS Visual C++ compiler (any version from 2005 up should do) installed on your system (slim chance I know)

Haha! I occasionally make abortive attempts to learn programming so I have Visual Studio installed already.
Once you have link installed and on the environment PATH all you need to switch off ASLR bit is:
X:\path\to\toaw> link /EDIT /DYNAMICBASE:NO "Opart 3.exe"

I had a couple more bumps on the road... but this is now fixed.
"What did you read at university?"
"War Studies"
"War? Huh. What is it good for?"
"Absolutely nothing."
User avatar
golden delicious
Posts: 4114
Joined: Tue Sep 05, 2000 8:00 am
Location: London, Surrey, United Kingdom

RE: Final Tally

Post by golden delicious »

Incidentally, if I abruptly disappear from this forum, or start spamming everyone relentlessly, use your judgement about who is responsible. I'm about to trust ogar's application with unspeakable access to my PC...
"What did you read at university?"
"War Studies"
"War? Huh. What is it good for?"
"Absolutely nothing."
kmitahj
Posts: 100
Joined: Sun Apr 24, 2011 10:31 pm

RE: Final Tally

Post by kmitahj »

ORIGINAL: golden delicious
Incidentally, if I abruptly disappear from this forum, or start spamming everyone relentlessly, use your judgement about who is responsible. I'm about to trust ogar's application with unspeakable access to my PC...
Sounds a bit desperate to me... [:D]
...but I understand your concerns of course. Good thing is you don't have to do it. It is your decision, your freedom of choice. Can't help you make the decision as whatever I say here is unencumbered by the same concern.
I have 2010 and 10.0xxxx. Hopefully this does the job.
It wouldn't. Programs compiled by VC 2008 (aka v. 9.0) needs their 2008 (9.0) runtime etc. But I have recompiled ToawPeek statically in the meantime so it does not have any dependencies now (besides OS of course).
a. If you are using so-called "Opart 3XBb" patch you should be good to go as it has ASLR bit already cleared.
No idea what this is. I note there's an "Opart 3Windows98" executable in the folder. Too much to ask that this has the bit cleared?

"Opart 3XBb" was a patch I made before in an attempt to moderate somewhat problem (bug?) with Fortified units @IgnoreLosses stance. There were couple of versions of the patch each trying to solve the issue in sligthly different way and they were differentiated by such cryptic suffixes. Anyway as you are able to handle ASLR/DYNAMICBASE flag yourself you don't need to care about it.

User avatar
golden delicious
Posts: 4114
Joined: Tue Sep 05, 2000 8:00 am
Location: London, Surrey, United Kingdom

RE: Final Tally

Post by golden delicious »

ORIGINAL: kmitahj

Sounds a bit desperate to me... [:D]
...but I understand your concerns of course. Good thing is you don't have to do it. It is your decision, your freedom of choice. Can't help you make the decision as whatever I say here is unencumbered by the same concern.

Yeah I'm not really worried. Just suddenly occurred to me... however, it does seem like it would be an awful lot of effort.

Anyway, I sent you a PM. If you could send me the program, I'd appreciate it.
"What did you read at university?"
"War Studies"
"War? Huh. What is it good for?"
"Absolutely nothing."
kmitahj
Posts: 100
Joined: Sun Apr 24, 2011 10:31 pm

RE: Final Tally

Post by kmitahj »

ORIGINAL: golden delicious
Yeah I'm not really worried. Just suddenly occurred to me... however, it does seem like it would be an awful lot of effort.

Anyway, I sent you a PM. If you could send me the program, I'd appreciate it.

Understood. Sure will send it happily however I didn't get any pm from you? I may try to send it to your MSN account but if you prefer other destination pm me please with the address. Anyway I didn't do it until now because I thought it wouldn't be polite to push a binary on you before you make up your mind on the issue (in fact it could be easily seen as particularly nasty kind of spamming). As said above the program is recompiled statically which means there is no more any runtime dependencies. This will leave you with two issues described above: UAC and ASLR. If yoou will have any additional questions or problems to disscuss in the process feel free to post or pm me. And needless to say I'd love to hear about your outcome either way!

Now pushing aside dirty stuff and going to the meat - that is ToawPeek output: most columns does not need any comments I think as they map directly to these on game's INV&RPLCMNT panel ("Turns" column was replaced by "from"-"to" columns in ToawPeek as it is how the data is represented internally in TOAW. Of course in practice the 1000th turn omnipresent in "to" column means "till the end of scenario"). The only thing which deserves some explanation is presence of three "Totals" columns in ToawPeek output. First "Totals" here corresponds to "Assigned" in game's panel. However why three? It has to do with the way how TOAW keeps its data. Data for all other columns are stored in global arrays and kept up to date all the time but "Assigned" numbers are derived on the fly - in the moment user opens INV&RPLCMNT panel TOAW walks over relevant units and adds up equipment numbers storing totals assigned in another global array. In ToawPeek content of that array is represented by "TotalsP" column. The way this data is derived has some implications. First if you start fresh Opart instance (with scenario open) and then run ToawPeek you will see "TotalsP" is all zeros. Only after you open INV&RPLC panel in Opart then rerun ToawPeek it will produce in this column same numbers as in "Assigned" column in the panel. If you next make some combat which incure losses on active force and rerun TaowPeek again you will see the losses in "Lost" column (and likely "OnHand" too) but "TotalsP" will not be updated till you reopen panel in game. Last when dumping data for both forces "TotalsP" will be always garbage for inactive force (either zeros or numbers produced for active force at the moment you last opened I&R panel).
Because of all the limitations of "TotalsP" there was a need for another way to get "Assigned" numbers - the way which will be always up to date independent on user (in)actions. Hence "TotalsC" which contains assigned numbers calculated by ToawPeek itself by summing equipment numbers over all relevent units. ToawPeek treats as relevent all units which are located ON MAP (means it skips over units coming as reinforcements for example). I tried to emulate the way TOAW do it and so far I have seen the results were always in agreemnet with in-game displayed numbers. However must admit that my testing on this topic was rather limited so if you notice any diffs between in-game "Assigned" and "TotalsC" I'd like to know it as I would like to investigete such cases and when possible fix ToawPeek to be in sync with game.
At last third "TotalToe" column is calculated the same way as "TotalsC" except that here ToawPeek sum up of TOE numbers.

User avatar
golden delicious
Posts: 4114
Joined: Tue Sep 05, 2000 8:00 am
Location: London, Surrey, United Kingdom

RE: Final Tally

Post by golden delicious »

ORIGINAL: kmitahj

Understood. Sure will send it happily however I didn't get any pm from you?

How strange. Well I sent one again- let me know whether you receive it.
"What did you read at university?"
"War Studies"
"War? Huh. What is it good for?"
"Absolutely nothing."
kmitahj
Posts: 100
Joined: Sun Apr 24, 2011 10:31 pm

RE: Final Tally

Post by kmitahj »

ORIGINAL: golden delicious
[...]
How strange. Well I sent one again- let me know whether you receive it.

Got it this time and sent the file at address provided.
I'd like to hear about your results - good luck!

User avatar
golden delicious
Posts: 4114
Joined: Tue Sep 05, 2000 8:00 am
Location: London, Surrey, United Kingdom

RE: Final Tally

Post by golden delicious »

OK here's my replacements window

Image
Attachments
Replacements.jpg
Replacements.jpg (67.88 KiB) Viewed 336 times
"What did you read at university?"
"War Studies"
"War? Huh. What is it good for?"
"Absolutely nothing."
Post Reply

Return to “Norm Koger's The Operational Art Of War III”