Division modding

From Hearts of Iron 4 Wiki
Jump to navigation Jump to search

This tutorial page shows you how to make divisions and how to load them in HOI4 modding.

How to make an oob file[edit]

Making Divisions[edit]

You need the -debug executable command and the tdebug console command on for this to properly work

Using country files to create divisions[edit]

You have to put this in to load the oob on start up, without these the country will not build an army and train divisions until it loads an oob file

For 1936 start-date:

oob = "TAG_1936"

For 1939 start:

oob = "TAG_1939"

Using a country event file to create divisions[edit]

If you want to load an oob via events you will need to know how to mod events. First, you will have to create an event file and type:

Creating the event[edit]

add_namespace = Tutorial_events 
country_event = { 
}

This would mean the game will recognize the code as code for events, namespace can be whatever it wants to be

Use of namespace (ID, Title and Desc)[edit]

Secondly, you will have to type in the id, title and description:

country_event = {
     id = Tutorial_events.1 
     title = "This is a title" ### Can be localized via the event file or by the localization file 
     desc = "This is a description" 
}

Triggers[edit]

Thirdly, you want to put in is_triggered_only = yes and fire_only_once = yes, which you can make triggers with. After that you can put in the options! I will use my own example of a trigger

     id = Tutorial_events.1 
     title = "This is a title" ### Can be localized via the event file or by the localization file
     desc = "This is a description"
     trigger = {
          date > 1939.1.1 
     }
     is_triggered_only = yes
     fire_only_once = yes
     option = {
          name = "This is a name"
     }    

Option[edit]

Then you put:

option = {
   name = "This is a name"
   load_oob = "TAG_1936" ### Can be TAG_1939 for that start date
}