Hello modders!
I have spent a lot of time hacking together various scenarios (mostly for quick MP games), and always found it annoying to make sure all the IDs are correct, all the files are included and all parentheses matched.
To simplify this, I wrote a small C++ program that generates the .eug file and all those little .inc files from a short script (or interactively with a console interface). Now generating the scenario is as simple as writing a few lines like "national ENG England Scotland Northern_Ireland", copying the generated files back to your scenario folder and maybe adding a few finishing touches and customizations.
I've included the source code, as well as three examples (one generates a pretty good approximation of the 1936 scenario, one divides the world into three 1984-style blocks and the last one is a pretty simple battle scenario). They are not meant to be played (as they are still quite incomplete), but as a reference for how the commands should be used. If anyone feels like completing them (or adding more templates and/or refining the country database) I'd be happy to include this in future versions of the program.
To use it, simply run the .exe file (for the console interface) or drag a script on top of it (for fully automatic generation).
The Tech and Policy templates are meant for Darkest Hour Full. For other mods, you'll have to write (or copy/paste) your own.
Changelog:
Alpha 6:
- buildings can now be placed along borders (useful for forts) or on the
shortest path between provinces (useful for infrastructure).
- slightly adjusted paths.cfg to point to directories, not individual files
Alpha 5:
- generates a victory point distribution based on rules in vp_rules.csv
- automatically distribute buildings and resources to countries and areas
(based on current IC/production and infrastructure)
Alpha 4:
- config files to adjust global settings (like province language and paths)
- manually add buildings and resources to provinces
Alpha 3:
- generate armies, fleets and air forces from templates
Alpha 2:
- interactive help for all commands
- support for battle scenarios and inaccessible provinces
- syntax checking for commands, preventing crashes for missing parameters
- allows listing all undistributed provinces, to check if you missed some
- added workarounds for some mismatches between DH's Provinces.csv and province_names.csv
(AREA_MOZIR vs AREA_MOZYR and AREA_RYUKYULAND vs AREA_RYUKYUSLAND)
Features to be included in later versions:
- converting a savegame into a cleaned-up scenario (maybe)
Feel free to request other features that would make your life easier - I'll prioritize those that can be expressed as a few short commands, but would be tedious to add manually to a scenario (I think provinces and armies were the worst; those should work now).
I have spent a lot of time hacking together various scenarios (mostly for quick MP games), and always found it annoying to make sure all the IDs are correct, all the files are included and all parentheses matched.
To simplify this, I wrote a small C++ program that generates the .eug file and all those little .inc files from a short script (or interactively with a console interface). Now generating the scenario is as simple as writing a few lines like "national ENG England Scotland Northern_Ireland", copying the generated files back to your scenario folder and maybe adding a few finishing touches and customizations.
I've included the source code, as well as three examples (one generates a pretty good approximation of the 1936 scenario, one divides the world into three 1984-style blocks and the last one is a pretty simple battle scenario). They are not meant to be played (as they are still quite incomplete), but as a reference for how the commands should be used. If anyone feels like completing them (or adding more templates and/or refining the country database) I'd be happy to include this in future versions of the program.
To use it, simply run the .exe file (for the console interface) or drag a script on top of it (for fully automatic generation).
The Tech and Policy templates are meant for Darkest Hour Full. For other mods, you'll have to write (or copy/paste) your own.
Changelog:
Alpha 6:
- buildings can now be placed along borders (useful for forts) or on the
shortest path between provinces (useful for infrastructure).
- slightly adjusted paths.cfg to point to directories, not individual files
Alpha 5:
- generates a victory point distribution based on rules in vp_rules.csv
- automatically distribute buildings and resources to countries and areas
(based on current IC/production and infrastructure)
Alpha 4:
- config files to adjust global settings (like province language and paths)
- manually add buildings and resources to provinces
Alpha 3:
- generate armies, fleets and air forces from templates
Alpha 2:
- interactive help for all commands
- support for battle scenarios and inaccessible provinces
- syntax checking for commands, preventing crashes for missing parameters
- allows listing all undistributed provinces, to check if you missed some
- added workarounds for some mismatches between DH's Provinces.csv and province_names.csv
(AREA_MOZIR vs AREA_MOZYR and AREA_RYUKYULAND vs AREA_RYUKYUSLAND)
Features to be included in later versions:
- converting a savegame into a cleaned-up scenario (maybe)
Feel free to request other features that would make your life easier - I'll prioritize those that can be expressed as a few short commands, but would be tedious to add manually to a scenario (I think provinces and armies were the worst; those should work now).
Attachments
Last edited:
- 3
- 2