• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

Bizon

Lt. General
39 Badges
Apr 4, 2004
1.479
123
  • Hearts of Iron IV: Cadet
  • 500k Club
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Cities: Skylines - After Dark
  • Cities: Skylines - Snowfall
  • Hearts of Iron IV Sign-up
  • Stellaris Sign-up
  • 200k Club
  • Hearts of Iron IV: Together for Victory
  • Cities: Skylines - Mass Transit
  • Hearts of Iron IV: Death or Dishonor
  • Age of Wonders III
  • Cities: Skylines - Green Cities
  • Hearts of Iron IV: Expansion Pass
  • Cities: Skylines - Parklife
  • Cities: Skylines Industries
  • Cities: Skylines - Campus
  • Europa Universalis IV
  • Hearts of Iron II: Armageddon
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sword of Islam
  • Europa Universalis III: Chronicles
  • Arsenal of Democracy
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • For The Glory
  • Hearts of Iron III
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Victoria 2

Hi!

I'd like to present you the effect of my recent work using savegame parser that I once wrote for Darkest Hour. The program is a savegame viewer which I wanted to make for quite a long time. The original idea was to provide a Civilization-like replay of history at the end of the game. It grew into a program that lets you extract various data from Darkest Hour savegame files and display it on the map or extract it to tables, either for the purpose of AAR writing, bugfixing or just for fun.

1. Getting the data

The program gets the data in two possible ways. Either it's read directly from savegame files (useful when you want to load only single file or have multiple Autosave_date.eug saves) or I run a small app that "listens" to savegame.eug and records the data as you play.

2. Looking at the map

Then you can read the data (saved in AAR file format, which ZIPs together different data tables for various points in time) and using various color scales, display it on the map. You can scroll through all the recorded years.

3. Exporting data

Map mode was my original idea and it's pretty but not nearly as useful as Stats mode. Here you can choose what data do I need and pull it out into a table. This table is exportable to CSV, that means you can import it to Excel. There you can filter, sort and do God knows what with the data.

4. Summing up

I'd like to use this opportunity to thank Lucifer who offered me his help and sent me vectorized version of the DH Full map which made a great starting point for the program.

Of course feedback is welcome so I can improve the program. Please refer to the manual for known issues list, planned features and other things. Nautrally, apart from bugfixing which will be top priority I plan to add new map modes along with the program development.

System requirements
1.5 GHz processor (dual-core recommended)
512 MB RAM (up to 4 GB RAM for full 1914-1963 gameplay)
10 MB of hard drive space
Microsoft Windows XP SP3 or newer
Microsoft .NET Framework 4.0

Because of huge amount of data processed and displayed (counting in gigabytes for all the savegames throughout the war), it may be taxing on your computer. I'll be optimizing the program in the following versions though, so it may improve.

Installation

Unzip the archive anywhere on the disk and run DHCompanion.exe for importing and viewing savegame data or DHObserver.exe for recording it as you play. Remember about setting your savegame.eug location in the DHObserver configuration.
 
Last edited:
  • 1Like
Reactions:
Screenshots

Stats-mode-exported casualties data at its finest


Diplomatic relations around the world


Convoy paths for anyone planning submarine attacks


IC centers and IC deserts


Daring American attack near the end of the war


DHC can play Kaiserreich too!
 
Last edited:
Impressive. However, is this only a viewer or does the DHC also have editing abilities?
 
You can't edit anything. It's pretty cool seeing the war turn out in my games. Even better is starting an Alien Invasion and watching it happen before your eyes.
 
I couldn't find my thread for a while, thanks for sticky'ing it! ;)

Before I started developing this app (but having my parser ready) thought about making an editor but I always remember how original HoI2 editor looked like (was it a feature of Doomsday expansion?). It would be a nightmare of hundreds of controls (boxes, radio buttons, etc.), becoming irrelevant with new patches. In most cases, anyway, Notepad++ beats every editor I could conceive. So when I saw that Lucifer has his map ready, there was no much thought about it.

I'll take a look at the error with Stats mode today, I suppose it's the most ugly and persistent one. It was a surprise because I thought there's no bug lurking there but I think it's easy to fix. :)
 
OK, it was not THAT easy. The problem is quite mysterious because it turned out that in the recorded AAR file there were duplicated tables. I put a check to block creation of duplicated tables for now but I'll probably have to check why they are created in the first place. Anyway, for smaller databases, the problem shouldn't show up.

As a bonus there's a small interface improvement:
dhc_091.png

I updated the download link.

Code:
0.9.1b1
- made checks to prevent duplicated tables from being created
- both selected province and the province over which the cursor is moved are presented through the interface
- displayed values are now properly formatted (e.g. "12 987,88" instead of "12987,34324233")
 
I no intention to derail your thread, but can I ask just one question?

Your map-to-map convertor worked a treat.
Have you any plans to create a similar program for converting the DH map to mumia's E3 map ...?
.. if you do it would be a great asset for the modders.

Thanks and Best Regards, novapaddy
 
Your map-to-map convertor worked a treat.
Have you any plans to create a similar program for converting the DH map to mumia's E3 map ...?
Bizon would need vectorized data of E3 map to do it. Then, it would be trivial for him (at least, I'm confident that it would be). But I don't have the time nor the will to provide them, sorry.
 
Lucifer, novapaddy:

I see you talk about two different things:
For Map-to-Map converter to work with E3 map I would need a conversion table stating which provinces in DH Full map (or vanilla DH map?) correspond to which provinces in E3 Map. In this case, I believe that there's no need for me to code anything, you would just have to replace mmc_provinces.csv that comes with the utility with a new file. Even if it's somehow not enough I suppose I could code that thing from scratch. But I'd need that conversion table to begin with.

For DH Companion to work with E3 map I would need a vectorized version of the map which would be, I can only imagine, a huge time-consuming task that I wouldn't expect anyone to devote their time to. E3 map has much bigger number of provinces which would make creating such a dataset even harder than the DH Full one (which is a true masterpiece, see Lucifer's maps in his signature). But also I would need to make big changes to the current DH Companion engine which would probably work too slow with so many polygons displayed. This makes it a really unrealistic target.
 
Lucifer, novapaddy:

I see you talk about two different things:
For Map-to-Map converter to work with E3 map I would need a conversion table stating which provinces in DH Full map (or vanilla DH map?) correspond to which provinces in E3 Map. In this case, I believe that there's no need for me to code anything, you would just have to replace mmc_provinces.csv that comes with the utility with a new file. Even if it's somehow not enough I suppose I could code that thing from scratch. But I'd need that conversion table to begin with.

Bizon: That's great news, as I think the future of DH could be with the E3 map, as lots of guys like to have many many provinces..??
... I was hoping you would say that, as I figured you would hopefully just need a new table...

When doing all those ports to DH, I used my own province tool for checking stuff quickly, but I used your province tool to actually DO the conversions, which was BRILLIANT and saved about 2/3 of the workload. THANKS AGAIN... !!
It did a great job, with me just having to check things after, not actually toil through the files, line by line.
 
I bogged down in petty moving around of data structures so couldn't do anything REALLY useful. But I fixed a couple of places with twisted coding so there's not much to do other than adding new features. For now, there's the first part of fixes before the final release, downloadable from the first page of the thread.

Version 0.9.5

- made several changes in data structure for greater extensibility and reliability of the program
- progress of importing, opening and saving files should now be displayed correctly
- added map modes for: research modifiers, wartime and peacetime IC modifiers and infrastructure in provinces
- changing monitored savegame location will no longer make DH Observer automatically import this savegame
- the program now uses the closed set of country tags present in Darkest Hour; this should help with non-typical country.csv and world_names.csv files
- made a few bugfixes and file access performance improvements.
 
I meant to upload the new version earlier but because of a magic "1.0" label didn't want to publish it half-baked. After a couple of days more and testing the application by myself, finally I've got the release that I hope is reasonably stable and useful.

Here's the changelog:

- corrected several unintended "Data not initialized" errors
- selected and mouseover province group boxes have their places switched
- added information about region and area of a mouseover and selected province
- new map modes: regions and areas
- corrected glitches appearing when land outlines was set to yes and sea outlines was set to no
- fixed problems with setting currently selected country
- EYR textbox below the map no longer steals focus from the map
- X and Y axis comboboxes had their places switched, fixed
- fixed a problem with duplicated import of savegames
- even in case of duplicated import, the program should no longer hang on displaying stats
- automated border mode implemented properly

And here's the screenshot for the new map mode. I use it myself as a little helper for modding.

dhc_100.png