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

Lord Bolshevik

Private
Mar 18, 2023
15
1
I'm planning to make a mod, I'm still thinking about it, but I've already begin the minister writing at minister_personalities.txt. However, I've tested them as custom minister on Darkest Hour Full mod file and it always ends up in an error. Perhaps I need a good guide on how to do so. What should I do first?
 
use a program like grepwin to find out easier how the folder structure works

Here's what I got from putting in the name of a minister

1. Where I search
2. Guys name
3. He shows up in a Spanish event
4. He is A general, air marshal or admiral for both Germany and Spain (He's in the Lufewaffe and involved in the Spanish civil war)
5. He is a minister in Germany
6. He is a research team in Germany
7. The final one is Imperial world war I Germany.

We learn here that obviously some dudes get around, but it's clear that ministers_ger.csv is where the germans have their ministers. However, the game also needs to be told in what file (the aforementioned ministers_ger,csv) it can find ministers.

You speak of trying to add a minister to minister_personalities.txt. This sounds strange to me because the file clearly doesn't list ministers, and is in the same folder as a list of every countries ministers?

Anyway. So you open up your country of choices file.

Our example guy looks like this

170;Chief of Air Force;Hugo Sperrle;1939;1964;1999;NS;Carpet Bombing Doctrine;High;L470;X

and the first line of the file is this:

GER;Ruling Cabinet - Start;Name;Start Year;End Year;Retirement Year;Ideology;Personality;Loyalty;Picturename;X

So
170: His unique ID.
Chief of Air Force: The post he can have
Hugo Sperrle: His name
1939: The year he becomes avaliable as minister for Germany
1964;1999: He'll be around for the rest of the game clearly
NS: He is a National-Socialist, which means Germany can hire him. They can also fascists and paternal autocrats, but no communist or capitalist ministers can fit in hitlers cabinet.
Carpet Bombing Doctrine: What his minister trait is. This is when you should've looked in
minister_personalities.txt.
Personality;Loyalty: I believe this isnt used, or that the most loyal die slightly easier from a random death event if they are also "leaders" that is to say command troops.
L470: That's the name of the file that exists that has his picture.

Great, lets search for that then. However, you will want to use another computer program, because Grepwin searches inside text files, not the names of files. Search Everything does that really well though.

We find it, but avoid a crucial error. See this mans minister picture is not in the DH full mod folder but in [game install folder]\gfx\interface\pics\L470.bmp

Mods will use resources from there if told to. Obviously, in your mod you would have a new folder in [game install folder]/mods like so Darkest Hour\Mods\yourmod
Make sure not to fuck with files in the base game folder.

Finally, there is one more thing, there's a file which is simply a list going "Here are all the minister files for all the countries" and it's called ministers.txt and is located right above the place that has the folder "ministers" and it's literally just a list like this:

ministers_afg.csv
ministers_alb.csv
ministers_alg.csv
ministers_ang.csv
ministers_ara.csv

If this sounds complicated, it isn't. I'm simply going over the steps and showing some tools of how to deal with this.

All it is in essence is copy paste another minister to the bottom of the minister file, edit the ideology and trait etc so it fits your minister. The ID must be unique among all ministers of all countries, and you need some picture of the guy in the exact correct size and format.

In the future, not that we mind questions here, but you absolutely need to sit and look at the folder, open files, close them, open another folder, check some files in it. Be familiar with the structure. There's only 3 important normal folders, 1 folder for localization (That's just so that events and units and stuff speak english and not computer when you're in game) and 1 folder for all things grapical.

The .csv files can be easier to edit if you use vs code with rainbow csv extention:
Untitled.png



Grepwin searches inside text files really quickly. I've put numbers to correlate with my explainations.
and Search Everything searches like windows itself should be able to, just instant, anywhere, always.
Untitled.png

Untitled.png
 
I forgot the most important part. Just go in your game folder and open setttings.cfg and find

0 # Extra debug logs (savedebug.txt): 0 = disabled, 1 = enabled, 2 = enabled + extra map statistics

Change 0 to 1 to enable it. Then when you fuck up, it will say why in savedebug.txt

Example:
1;Head of State;Adolf Hitler;1933;1964;1999;NS;Afghani Goat Merchant;High;2634

will tell you

ERROR : Unknown minister personality 'Afghani Goat Merchant' for minister Adolf Hitler (ID = 1) in (db\ministers\ministers_afg.csv). This minister will use generic personality.

(note that you could make a minister type called Afghani Goat Merchant, I don't see why anyone would, but that was what the file you were editing in your initial post was for)

another example:

ERROR : Wrong government position for 'infantry proponent' personality ('Chief of the Navy' instead of 'Armaments Minister') for Erich Raeder

Only the armaments minister can have the trait infantry proponent. Erich is a chief of the navy man, so it's not right.

I am very surprised that the game let it run. I assumed the game would be okay with Adolf Adolfson as a name for Hitler, slightly surprised there's a fallback that he becomes a minister that does nothing because obviously Afghani Goat Merchant isn't a valid minister personality. Very surprised that the chief of the navy can have an armaments minister personality.
 

Attachments

  • Screenshot 2024-05-21 104937.png
    Screenshot 2024-05-21 104937.png
    397,7 KB · Views: 0
  • Screenshot 2024-05-21 105110.png
    Screenshot 2024-05-21 105110.png
    13,5 KB · Views: 0
  • Screenshot 2024-05-21 105237.png
    Screenshot 2024-05-21 105237.png
    8,9 KB · Views: 0
Last edited:
Thanks for the help, sir. But, sir, do you also know how to add new personalities on the mod so that I may use them for modding? Thanks.
Yeah compare the personality files from DH full and DH light and some mods that add special, unique ones, and see what they did, then follow their lead.

The file minister_personalities.txt contains 1962 words of instructions. If you scroll, you can even see the the DH team adding some unique ones as they patch the game




Python:
minister =  {
        trait        = "brit_nav_mis" #Arthur Henry Limpus
        id            = 129
        name        = NPERSONALITY_brit_nav_mis
        desc        = DPERSONALITY_brit_nav_mis
        position    = ChiefOfNavy
        value        = 0   
        
        command        = { type = unit when = organisation which = navy value = 0.0600 }
        command        = { type = unit when = morale which = navy value = 0.0600 }
    }
    
    ###########################
    #New unique traits DH 1.03#
    ###########################
    
    #Germany
    minister = {
        trait        = "SS Reichsfuhrer" #Heinrich Himmler
        id             = 130
        name        = NPERSONALITY_HIMMLER
        desc        = DPERSONALITY_HIMMLER
        position    = ministerofsecurity
        value        = 0
        command        = { type = production which = production when = non_national value = 0.1200 }
        command        = { type = resource which = energy value = 0.0350 }
        command        = { type = resource which = metal value = 0.0350 }
        command        = { type = resource which = rare_materials value = 0.0350 }       
        command        = { type = production which = consumer value = 0.1500 }
        command        = { type = unit which = garrison value = -0.0500 }
        command        = { type = extra which = police value = -0.0500 }
        command        = { type = dissent value = 0.0500 }
 
This is me amending Darkest Hour\Mods\Darkest Hour Full\db\ministers\minister_personalities.txt and I believe it might run fine, though I won't test it because the point is: Do something like this, read error log. Fix. Look through file system. Look through text files. Repeat endlessly.

Python:
minister =  {
        trait        = "double agent"
        id            = 187
        name        = NPERSONALITY_DOUBLE_AGENT
        desc        = DPERSONALITY_DOUBLE_AGENT
                        #    These 3 comments are my addition. Found in: "darkest hour full/config/darkest_hour.csv" Add your own or it will look like shit for the end user of the mod
                        #    NPERSONALITY_DOUBLE_AGENT;Double Agent;Agent double;Agente doppiogiochista;Agente doble;Doppelagent;Podwójny agent;;Äâîéíîé Àãåíò;;;X
                        #    DPERSONALITY_DOUBLE_AGENT;The double agent is someone who secretly works for the foreign country we are attempting to spy upon.;Un agent double est quelqu'un qui travaille secrètement pour le pays étranger que nous essayons d'espionner.;L'agente doppiogiochista è qualcuno che lavora segretamente per il paese estero che stiamo cercando di spiare.;El agente doble es alguien que trabaja secretamente para el país al que estamos intentando espiar.;Der Doppelagent arbeitet eigentlich im Verborgenen für den Gegner, den wir ausspionieren wollen.;Podwójny agent to ktoœ, kto potajemnie pracuje dla zagranicznego kraju, który usi³ujemy szpiegowaæ.;;Äâîéíîé Àãåíò-ýòî òîò, êòî òàéíî ðàáîòàåò íà ÷óæóþ ñòðàíó, ãäå ìû ïîïûòàåìñÿ ÷òî-íèáóäü ðàçóçíàòü.;;;X
        position    = MinisterOfIntelligence
        value        = 0
        command        = { type = intelligence_chances which = minister_assassination when = national value = 2 }
        command        = { type = intelligence_chances which = smear_campaign when = national value = 2 }
        command        = { type = intelligence_network when = all value = -5 }
        command        = { type = intelligence_report which = production value = -1 }
    }
   
    minister =  {    #    I made this thing as an example for you. Note that it's not tested and therefore there's like a 50% chance I made an error someplace, lol. The error log would tell me where though.
        trait        = "vichy_uk"    #    Placeholder Prime Minister for a peace in 1940 for the UK that only triggers if Axis is at peace. (Currently nearly impossible, Stalin will attack if you land. UK will not surrender if you sink 100% of shipping and firebomb every city every day and your peace deal is "Just accept Poland is gone"
        id            = 188    #    One number higher than above, for obvious reasons
        name        = NPERSONALITY_LORD_NAMESSON    #    You will need to create localization for this. See above
        desc        = DPERSONALITY_LORD_NAMESSON    #    See above
        position    = HeadOfGovernment    #    The head of state would be the king
        value        = 0
        command     = { type = dissent value = 0.15 }    #    We assume there's discontent about losing ww2
        command        = { type = populationgrowth value = -0.1000 }    #    We assume some people migrate to the west and some east based on ideology and finding a job
        command     = { type = unit which = all when = morale value = -0.25 }    #    We assume the military morale is poor
        command     = { type = research which = all when = time value = 0.1 }    #    We assume the leadership is working on how to not lose a world war
        command        = { type = intelligence_chances which = massmedia value = 3 }    #    We assume the intelligence services are not purged and are trying to get the USA in the war
        command        = { type = production which = consumer value = 0.1000 }    #    Reverse Churchil effect
       
    }
 
  • 1
  • 1Like
Reactions: