Export Game Stats

Modding, Map Editor, IES Scripting and Other Questions
Post Reply
istyn
Posts: 3
Joined: 02 Nov 2018, 15:13

Export Game Stats

Post 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.

User avatar
Dr.MonaLisa
High Representative
Posts: 8697
Joined: 17 Jun 2010, 11:21
Location: Poland
Has thanked: 49 times
Been thanked: 108 times

Re: Export Game Stats

Post 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.
Best regards,
Dr.MonaLisa
Ministry of Game Affairs
Department of Control and Complains
istyn
Posts: 3
Joined: 02 Nov 2018, 15:13

Re: Export Game Stats

Post 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.
User avatar
Dr.MonaLisa
High Representative
Posts: 8697
Joined: 17 Jun 2010, 11:21
Location: Poland
Has thanked: 49 times
Been thanked: 108 times

Re: Export Game Stats

Post 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 2863 times
Maybe it's automatically created when game crashes...
Best regards,
Dr.MonaLisa
Ministry of Game Affairs
Department of Control and Complains
samlarsoonn
Posts: 1
Joined: 14 Apr 2021, 13:57

Re: Export Game Stats

Post by samlarsoonn »

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
Maybe it's automatically created when game crashes...
Sorry if my question is stupid but maybe you know some kind of plugin or app that could show full statistic ( not only damage dealt and units produced but as precise as how many arrow were shot )
Hi there
User avatar
Dr.MonaLisa
High Representative
Posts: 8697
Joined: 17 Jun 2010, 11:21
Location: Poland
Has thanked: 49 times
Been thanked: 108 times

Re: Export Game Stats

Post by Dr.MonaLisa »

samlarsoonn wrote: 16 Apr 2021, 15:52 Sorry if my question is stupid but maybe you know some kind of plugin or app that could show full statistic ( not only damage dealt and units produced but as precise as how many arrow were shot )
We can only see what's displayed in the statistics screen and the dump file which I posted above. I don't think that the game counts for example the number of arrows shot. All the game cares about is the health bar of the units. When it's < 0 then unit is counted as dead and shown in statistics. Nothing more precise is available. To be honest, for a 2005 game, EE2 already has got a lot of different statistics available. It's hard to expect any more, especially when even new RTS games lack in them.
Best regards,
Dr.MonaLisa
Ministry of Game Affairs
Department of Control and Complains
istyn
Posts: 3
Joined: 02 Nov 2018, 15:13

Re: Export Game Stats

Post by istyn »

The closest thing I've seen to a stats engine is the Unofficial Patch Game Dump, mentioned by Dr. MonaLisa above. It contains some useful info like number of units killed but I don't think it contains such granular stats as damage dealt or arrows shot.
I havent seen another tool that's capable of extracting stats from the game engine. Maybe Dr. MonaLisa knows of another tool.
Post Reply

Return to “Questions”