Page 1 of 1

Export Game Stats

Posted: 03 Jan 2021, 21:34
by istyn
I want to export post-game statistics, specifically the 'Battles' tab. The "Write Statistics To File" button only exports the simplest statistics.

Any idea how I might gain access the post-game statistics in memory?

Thanks for any suggestions.

Re: Export Game Stats

Posted: 03 Jan 2021, 23:19
by Dr.MonaLisa
Sorry, seems like "Write Statistics To File" doesn't contain battles information, and as far as I checked there's no custom command to enable it available.

Unofficial Patch 1.5 has a new hotkey:
https://www.ee2.eu/patch/#1.5.3
* Dump Game Log to: Unofficial Patch Files/EmpireEarth2RecentGame.dump (CTRL+ALT+SHIFT+D), for modders who need to check something.
If you click this button, file "Empire Earth II\Unofficial Patch Files\EmpireEarth2RecentGame.dump" should be updated. You can then open it with program Notepad++ to view the content of it. Then press "CTRL+F" and search for "battle". You should see something like this, but not sure if you find it useful:

Code: Select all

.g_pBattleManager : subobject -----------
..m_iLastBattleID : 64
..iNumBattles : 35
..iNumCompletedBattles : 4
..iNumBattleLocations : 4
..bIsSea : F
Another possibility, would be renaming the playback files of the games you played.
Playbacks are stored in Documents\Empire Earth II\playback

With Unofficial Patch 1.5, you can recently use new hotkeys to change the playback fast-forward speed:
https://www.ee2.eu/patch/changes/#157040
— New feature: Maximization Helper has an option named: "Playbacks Fast-Forward Speed":
* Modifies the speed of the watched game recordings after clicking on the Fast-Forward button >>|.
* Changing the status of this option has an immediate effect (no game restart is required), however it's required to re-click the Fast-Forward button if fast-forwarding is currently active.
https://www.ee2.eu/patch/changes/#157041
— "Playbacks Fast-Forward Speed" improvements:
* Added new hotkeys to control the speed: CTRL+F7 (slower) and CTRL+F8 (faster). They can be disabled by the custom configuration command: "AllowPlaybacksFastForwardHotkeys=0" in UP1.5 Settings.
* Added new available speeds: 22.5, 25.0, 27.5, 30.0, 45.0, 60.0 (but they're not recommended to use, very crashy).
Generally, you could open the playback of the game you liked, click CTRL+F8 hotkey few times and let it play for a bit. It should scroll 60 minutes of game in 1 minute. After that you can view stats as after the normal game.

I didn't test it, but you could also try this custom command:

Code: Select all

g_pauseGameOnTaskSwitch=0
It would disable pausing game when the game window is minimized. So with that, you could make the game fast-forward and watch YouTube or something during this time.
This custom command should go to file:
EE2: myconfig.cfg
AOS: myconfig_EE2X.cfg

If it still doesn't work, you can try these files instead:
EE2: myconfig_sim.cfg
AOS: myconfig_sim_EE2X.cfg
(However they're overwritten after every minor update of the patch, so I don't recommend this way. Also editing "myconfig_sim" results in incompatible version errors on multiplayer).

Hope it helps a little.

Re: Export Game Stats

Posted: 04 Jan 2021, 08:13
by istyn
Thanks Dr.MonaLisa!

The Unofficial Patch Game Dump (Ctrl+Alt+Shift+D) contains the game statistics 'Battles' section.

I'm going to have to dig to understand how the battles are serialized / organized,

But you answered my question exactly.

Re: Export Game Stats

Posted: 04 Jan 2021, 08:22
by Dr.MonaLisa
The same content as in "Empire Earth II\Unofficial Patch Files\EmpireEarth2RecentGame.dump" is sometimes created in folder: "Documents\Empire Earth II\logs".

For some reasons I have some .log files there:
Spoiler
2021-01-04_08-20-45_logs.png
2021-01-04_08-20-45_logs.png (162.62 KiB) Viewed 803 times
Maybe it's automatically created when game crashes...