Darkest Hour - Dev Diary #4 - Implementing Modifications

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

ewphoenix123

Darkest Hour Cartographer
10 Badges
Apr 26, 2007
817
2
  • Arsenal of Democracy
  • Cities in Motion
  • Crusader Kings II
  • Europa Universalis III
  • Divine Wind
  • Hearts of Iron III
  • Sword of the Stars
  • Sword of the Stars II
  • 500k Club
  • Crusader Kings II: Holy Knight (pre-order)



Playermade Modifications

Hello again,
It is monday noon, and that means it is time for another Development Diary.
As you should have already seen in the last weeks, one of our main goals was to keep it extremly easy to use your favorite HOI 2 mod with Darkest Hour.

And this week I gonna talk about how this actually gonna work for you, be it as a Modder for one of the Big Projects, someone who would like to play an old mod that is nolonger developed, or just as someone who likes to modify his own game a bit.



The first thing you gonna start to love is that Darkest Hour finally offers full MODDIR support, you no longer need jsgme or individual installations for each mod you use.

You only need one Darkest Hour installation!
Copy the mod you fancy in a subfolder the Mod folder.
Pick the mod you like to play the next time you start the game with the launcher.


launcherz.png



This works of course only when the mod is adapted to Darkest Hour, some bugfixes and new features were not possible without modification that affect basic files, there are few things that need to be changed for a mod to start properly. Don't worry It's not much, and you don't even need real modding experience to do it yourself.

Depending on mod's complexity this could take from 1-2 minutes (Confederate Armageddon) to about 15 minutes (CORE as this mod already use moddir and some paths in its DB files have to be edited and many dummy pictures to be skipped).


In one of our latest version we included a Darkest Hour Mods Pack (located in the Modding documentation folder of your installation ) that can be used for easy Armageddon 1.3 to DH mod conversion.
It contains the following files:

Code:
    \config\Buttons.txt
    \config\mods.csv
    \db\difficulty.csv
    \db\diplo_costs.txt
    \db\leaders.txt
    \db\ministers.txt
    \db\misc.txt
    \db\spy_costs.txt
    \db\teams.txt
    \gfx\interface\ill_prov_overlay.bmp
    \gfx\interface\map_circle.bmp
    \gfx\interface\plate_division.bmp
    \gfx\interface\tc_icons.bmp

These are the files that need to be in the new DH format in order for the game to work and are the only files that modders should worry about when porting their mods to DH.
  • \config\Buttons.txt - new button definition *we changed certain interface elements for new features, and of course those need new buttons*
  • \config\mods.csv - the file where all modders should put mod specific texts to ensure compatibility with further game patches. This file will never be modified by any patch.
  • \db\difficulty.csv - new difficulty settings *some of our new features are influenced by the difficult settings and got their own entry here*
  • \db\diplo_costs.txt - only one change here from 1.3: removed "-" sign from all costs
  • \db\spy_costs.txt - some changes from 1.3 as most spy system modifiers are moved to misc.txt now. Only cost and chances are left here.
  • \db\misc.txt - tons of new modifiers here, but all are set to Armageddon 1.3 defaults, so you have only to edit those values you changed for your mod for 1.3
  • \db\teams.txt - list of all tech team files that should be loaded by the game. These files could be either in MODDIR or in main game folder. By default it is populated with all 1.3 file names so you just need to add your new file names and (optionally) remove those you don't see need to be loaded by your mod
  • \db\leaders.txt - list of all leader files that should be loaded by the game. These files could be either in MODDIR or in main game folder. By default it is populated with all 1.3 file names so you just need to add your new file names and (optionally) remove those you don't see need to be loaded by your mod
  • \db\ministers.txt - list of all minister files that should be loaded by the game. These files could be either in MODDIR or in main game folder. By default it is populated with all 1.3 file names so you just need to add your new file names and (optionally) remove those you don't see need to be loaded by your mod
  • \gfx\interface\ill_prov_overlay.bmp - changed file.
  • \gfx\interface\map_circle.bmp - changed file.
  • \gfx\interface\plate_division.bmp - changed file.
  • \gfx\interface\tc_icons.bm - changed file.
Notes:
1. This pack is supposed to be Merged with the mod.
2. Only files that were actually changed by the mod, which are included in this pack should actually be updated/replaced by files from the pack. The rest (except 3 - see next) can be skipped as they are identical to DH Core files already installed in the game's main folders.
3. The only files that must be included into mod's folder are \db\ministers.txt, \db\leaders.txt and \db\teams.txt

Usual 1.3 Mod porting steps:


1. Create a new folder for your mod in Mods folder
2. Extract all mod files into that folder preserving original game folders tree
3. Using a program like WinMerge compare mod's folder with Darkest Hour Mods Pack folder and update files as required:


- Copy db\ministers.txt, \db\leaders.txt and \db\teams.txt and add any mod specific file names there
- Copy and update \config\Buttons.txt, \db\difficulty.csv, \db\diplo_costs.txt, \db\misc.txt, \db\spy_costs.txt ONLY if these are changed by your mod from vanilla 1.3 values.
- Copy \gfx\interface\ill_prov_overlay.bmp, \gfx\interface\map_circle.bmp, \gfx\interface\plate_division.bmp and \gfx\interface\tc_icons.bm ) ONLY if these are changed by your mod.
4. Create an empty "save games" folder in your mod's scenarios folder.
5. Select your mod from DH game Launcher
6. Play


It really is that straight forward and easy to convert a mod to Darkest Hour, we are testing it often enough to be sure. ;)


Some feedback on the topic from AC of the Kaiserreich team:

Well, as I said the conversion was very simple, basically because the Kaiserreich Team never messed with misc.txt and other configuration files (as far as I know). So, conversion is actually not the best word to describe this, as the process didn't involve much more then copying the files to the Mod folder.
The real conversion of the Kaiserreich for DH will use the new map and all the new features offered by DH. This is a simple "adaptation" of the KR mod from Armageddon to Darkest Hour.

However, as soon as a new game starts, it is possible to see how the Mod benefitted from this adaptation. At the start of the game, a reminder tells me that I can move my political slider: very useful to avoid missing this opportunity at the beginning of each year!
After unpausing the game, the performance increase is immediately noticeable and the game flows quickly without problems or CTDs. In my opinion, this is the biggest benefit for a casual player, but there is much more: the automated spying system, ... * peep* *peep* *peep* ..., the many useful tooltips (for example in the research tab), the colorscale of the unit and the pictures close to the units name, the * peep* for the air and naval missions and other smaller, simpler, but nonetheless useful things.

If you want, you can add that I've been using Kaiserreich over DH since May and I've developed current version 1.2 of the KR Arma Mod using DH! This was very useful especially because thanks to the debug log we could fix many (40 maybe) wrong minister traits, some problems with leaders, mistakes in the Tech Teams (missing components) and a bunch of other. So, from a certain point of view, you could say that the current version of Kaiserreich Mod for Armageddon already benefitted from DH.

I've written about many things still undisclosed, feel free to change my words as you like.

I did. *g* White & Sea as always guys.

But you can Sea even when using DH without most of its new features there are quite a lot of improvements to talk about, even if we won't talk about them yet. ;)


Here's a list of mods that already officially announced porting to DH:



I hope you enjoyed those new informations at least a bit.
See you next week for a new development diary.
Take care. :)

P.S.: I think we didn't show you Asia yet.

http://img839.imageshack.us/img839/151/aisa.png
 
Last edited by a moderator:
Okay, some negative feedback... don't worry, it's probably regarding the DD rather than DH itself.
3. The only files that must be included into mod's folder are \db\ministers.txt, \db\spy_costs.txt and \db\teams.txt
- copy db\ministers.txt, \db\spy_costs.txt and \db\teams.txt and add any mod specific file names there
- Copy and update \config\Buttons.txt, \db\difficulty.csv, \db\diplo_costs.txt, \db\misc.txt, \db\spy_costs.txt ONLY if these are changed by your mod from vanilla 1.3 values.
So, must we add spy_costs.txt or not? As it stands, twice it is written that we must and once that it is not necessary, but at the same time, given the description of what is changed in spy_costs, I can't quite see why it is an absolute necessity if the mod doesn't alter spy_costs...
 
So, must we add spy_costs.txt or not? As it stands, twice it is written that we must and once that it is not necessary, but at the same time, given the description of what is changed in spy_costs, I can't quite see why it is an absolute necessity if the mod doesn't alter spy_costs...

A copy-paste mistake. Here is the corrected text
Code:
- Copy db\ministers.txt, \db\leaders.txt and \db\teams.txt and add any mod specific file names there
 
The feature is good. But notice how it is completely orthogonal to the improvements AoD made to the game.

For hardcore fans Aod is the de facto HOI2 standard now so maybe you can really look to bring your changes back into this.
 
The feature is good. But notice how it is completely orthogonal to the improvements AoD made to the game.

For hardcore fans Aod is the de facto HOI2 standard now so maybe you can really look to bring your changes back into this.

Would you care to explain what you mean by (english isn't my native tongue):

- "But notice how it is completely orthogonal to the improvements AoD made to the game."

What's orthogonal mean in this sentence? And which improvments are the completly ortogonal to?

- "For hardcore fans Aod is the de facto HOI2 standard now so maybe you can really look to bring your changes back into this."

Bring DH changes back to what?
 
Would you care to explain what you mean by (english isn't my native tongue):

- "But notice how it is completely orthogonal to the improvements AoD made to the game."

What's orthogonal mean in this sentence? And which improvments are the completly ortogonal to?

- "For hardcore fans Aod is the de facto HOI2 standard now so maybe you can really look to bring your changes back into this."

Bring DH changes back to what?

Long Story short, he means that AoD is the new Platform for HoI2 and we should stick to it instead of making our own...
 
Orthogonal comes from geometry and literally means that two directions have an angle of 90 degrees. Here it just means that two changes are totally independent.

For example mouse wheel support (AoD) and moddir support (DH) are both good to have feature and it does not make sense that we as customers have to choose between them.

An opposite example would be if both AoD and DH changed the way combats are resolved but they deliberately do it in a different way because of different goals (eg. model WWI vs. WWII). Even these cases could be handled I think by making the HOI2 engine even more customizeable where required.

So I think we could have got both: a stronger engine and two different visions of a good game from the two dev teams.

I think this question has to go to Paradox though.