Cosmetic tag
Creating cosmetic tags is much easier than creating a complete country.
Whereas a complete country requires the chosen tag to be declared in the vanilla file in /Hearts of Iron IV/common/country_tags, a cosmetic tag is completely dynamic in this sense and scripting the tag is not required. The tag is also not required to be of 3 characters, but spaces should not be used in the tag as the game will not recognize it as one tag (the tag is not what you see in-game though once you add in localisation).
Flag
Flags are added in for cosmetic countries the same way as one would for regular countries:
Three flags need to be added:
- A large one (82x52 pixel) in /Hearts of Iron IV/gfx/flags
- A medium one (41x26 pixel) in /Hearts of Iron IV/gfx/flags/medium
- A small one (10x7 pixel) in /Hearts of Iron IV/gfx/flags/small
All three should be in TGA-file format and named as follows:
<your dynamic tag>_<ideology>.tga
So for instance:
GCA_democratic.tga
It is recommended that add in flags for all 4 ideologies (_neutrality, _communism, _democratic and _fascism) are added in, as it is not possible to use only your cosmetic tag as a fallback; the flag would not change. It is possible however to use the same flags for different ideologies, as long as all 4 flags are there.
Map color
The color of a cosmetic tag can be changed by adding an entry to the game's common\countries\cosmetic.txt file:
<your cosmetic tag> = { color = rgb { 201 56 93 } color_ui = rgb { 255 73 121 } }
Localisation
In order to change the name of your country when your scripted cosmetic tag becomes in use, one should add in localisation. To do so, go to /Hearts of Iron IV/localisation/. It is recommended to use a hex-editor such as Notepad++
By using vanilla files
If one uses the vanilla file /Hearts of Iron IV/localisation/countries_cosmetic_l_<language>.yml, the process is fairly straightforward; one should simply add their localisation the same way the others are set up:
<your cosmetic tag>_<ideology>:0 "<your desired name>" <your cosmetic tag>_<ideology>_ADJ:0 "<your desired name's adjective>" <your cosmetic tag>_<ideology>_DEF:0 "<your desired name as used in events>" #'the United States of America' instead of 'United States of America'
For instance:
GCA_democratic:0 "Gran Colombia" GCA_democratic_ADJ:0 "Gran Colombian" GCA_democratic_DEF:0 "Gran Colombia" #Gran Colombia doesn't need 'the'
By using your own file
For compatibility-purposes, it may be wise to add in your own file. It does not matter what name for your localisation file is chosen, but it has to end in '_l_<language>.yml', with <language> being the language your localisation is in. It is important to have at least english as the game will then default to that instead of the keys used by the game data when an unsupported language is used.
Once inside the file, it should be set up as follows:
l_<language>: #Should be the same as your file name's l_<language> <your dynamic tag>_<ideology>:0 "<your desired name>"
From here on one can follow the vanilla file guide.
Adding the cosmetic tag into the game
There are four ways to implement your cosmetic tag into the game:
- By events
- Through national focuses
- By adding it to a country's history file
- By decisions
Implementing a cosmetic tag through event
- 主条目:Event Modding
The dynamic tag is enabled by the following command:
set_cosmetic_tag = <your cosmetic tag>
Using this command as an effect in your event is sufficient to see results in-game. It is possible to create new leaders or portraits here for your new country as well. You can alter the cosmetic tag of a non-player country by targeting its TAG, as follows:
TAG = { set_cosmetic_tag = <your cosmetic tag> }
Implementing a cosmetic tag through national focus
Implementing a cosmetic tag is very similar to implementing the tag through event; the only difference is that the command has to be added to the completion reward rather than the effect of the event.
The focus-trees can be found in /Hearts of Iron IV/common/national_focus
Implementing a cosmetic tag through history
The easiest way to do this is by simply adding the command anywhere outside any scope inside a country's history file in /Hearts of Iron IV/history/countries/. It is also possible to declare a date at which point the cosmetic tag is implemented, in order to restrict the tag to certain bookmarks.
Implementing a cosmetic tag through decision
To implement cosmetic tags via decision, just add the set_cosmetic_tag command within the decision's effects.
文件 | 效果 • 条件 • 定义 • 修正 • 修正列表 • 作用域 • 本地化 • on action • 数据结构 (标记, 临时标记, 国家别名, 变量, 数组) |
脚本 | 成就修改 • AI修改 • AI focuses • 自治领修改 • 权力平衡修改 • 剧本/标签 (游戏规则)• 建筑修改 • 人物修改 • 修饰性TAG修改 • 国家创建 • 军队修改 • 决议制作 • 装备修改 • 事件修改 • Idea修改 • 意识形态修改 • 军工商修改 • 国策制作 • 资源修改 • Scripted GUI • 科技制作 • 单位修改 |
地图 | 地图 • 省份 • 补给区域 • 战略区域 |
图形图像 | 界面 • 图形资产 • 实体模型 • 后期特效 • 离子效果 • 字体 |
装饰性 | 肖像 • 命名列表 • 音乐 • 音效 |
其他 | 控制台指令 • 故障排除 • 模组结构 • 成就代码分析 • Mod相关 • Nudger修改 |