Division modding:修订间差异

本页面所适用的版本可能已经过时,最后更新于1.5
(merge from offical wiki)
 
(文本替换 - 替换“[[Category:”为“[[分类:”)
第70行: 第70行:


{{Modding navbox}}
{{Modding navbox}}
[[Category:Modding]]
[[ 分类:Modding]]

2022年12月5日 (一) 15:27的版本

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

How to make an oob file

Making Divisions

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

Using country files to create divisions

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

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

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)

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

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

Then you put:

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