Interface modding allows to change some vanilla screens, but there are important limitations:
To identify interface elements, activate interface debug mode by pressing the same keys as for opening the console while still being in the main menu (does not work anymore once you've loaded into a campaign). It will display in which file and which line the elements are defined.
Here is a list of the most important interface files, and what they contain:
| Name | Description |
|---|---|
| main.gui | Main interface when running the game (minimap, chat, ...) |
| frontend.gui | Lobby interface (choose starting era, country selection, multiplayer, ...) |
| domestic_overview.gui | Primary title tab |
| domestic_dynastic.gui | Character tab |
| domestic_court.gui | Councillors tab |
| domestic_law.gui | Laws tab |
| domestic_technology.gui | Technology tab |
| domestic_military.gui | Military tab |
| domestic_plots.gui | Intrigue tab |
| domestic_factions.gui | Factions tab |
| domestic_religion.gui | Religion / College of Cardinal tabs |
| province.gui | Province window, with its settlements/fort/trade post |
| focusview.gui | Focus window |
| combat.gui | Combat window |
| waroverview.gui | Warscore window |
| unitpanel.gui | Army window |
| domestic_diplomacy.gui | Diplomacy popup |
| eventwindow.gui | Event popups (normal, narrative, letter, ...) |
| 这是一篇小作品。你可以通过编辑或修订扩充其内容。 如果可以请尽你所能的去协助完善这篇文章。 |
| As of patch 2.5, starting eras no longer require interface modding to be changed, see bookmark modding. |
The first two starting eras are DLC-locked, so best thing to do is to hide them by overriding interface/frontend.gui in the mod and by replacing position for picture / dlc_requirement / load_progress / label / year boxes dark_ages_window and viking_era_window windows, with:
position = { x=-2000 y=-2000}
In bookmarks.txt, give the hardcoded name from vanilla to the 3 bookmarks you want to see on the era screen:
name = "BM_FATE_OF_ENGLAND"name = "BM_THE_MONGOLS"name = "BM_100_YEARS_WAR"You can, if needed move these around and center them, with some fitting positions.
Override the following hardcoded localization keys inside a .csv file in the localization folder of the mod:
For each bookmark, the 1st 6 characters defined in common/bookmarks.txt will appear, and will need to be described by adding localization keys:
ERA_CHAR_INFO_%chararcter_id%
For instance with:
bookmark =
{
name = "BM_FATE_OF_ENGLAND"
desc = "BM_FATE_OF_ENGLAND_DESC"
date = 1066.9.15
character = 140 # William the Conqueror
character = 1316 # Kaiser Heinrich IV
character = 1128 # Robert de Hauteville
character = 3096 # Caliph Al-Mustansir of Fatimids
character = 3040 # Alp Arslan of Seljuks
character = 74441 # Somesvara I of Chalukyas
character = 122 # Harold Godwinson
character = 102531 # Harald Hårdråde
character = 20663 # Isaac of Khazaria
}
then ERA_CHAR_INFO_140, ERA_CHAR_INFO_1316, ERA_CHAR_INFO_1128, ERA_CHAR_INFO_1128 and ERA_CHAR_INFO_74441 have to be localized.
Finally the era images can be customized, by overriding (or updating frontend.gui) with your own gfx: GFX_pick_era_image_3, GFX_pick_era_image_4, GFX_pick_era_image_5
In order to use Papal succession (succ_papal_succession) for another religion, the first step is to mod the sucession laws:
succ_papal_succession = {
potential = {
OR = {
title = k_papal_state
title = d_<my_religion>
}
}
effect = {
succession = papal_succession
}
revoke_allowed = {
always = no
}
}
A button to open cardinal screen should magically appear in the religion screen ! However clicking the button will cause a CTD, and a bit of interface modding is required:
guiTypes = {
windowType = {
name = "domestic_religion_title_<my_religion>_cardinal"
(...)
### title cardinal entry 1
windowType = {
name = "title_<my_religion>_cardinal_entry_1"
(...)
}
(...)
}
}
In focusview.gfx, the number of frames needs to be increased:
spriteType = {
name = "GFX_focusicons"
texturefile = "gfx\\interface\\focusicons.tga"
noOfFrames = 20
loadType = "INGAME"
}
Add a 32*32 version of your icon in gfx/ambitions/, and reference it with spriteType name GFX_<focus_name>, <focus_name> being the new focus defined in common/ambitions/00_focuses.txt
spriteType = {
name = "GFX_<focus_name>"
texturefile = "gfx/ambitions/<focus_name>.tga"
noOfFrames = 1
norefcount = yes
effectFile = "gfx/FX/buttonstate.lua"
}
In focusview.gui, add an 11th focus, and adjust its position:
iconType = {
name ="focusicon_11_selected"
spriteType = "GFX_focusview_selected_focus"
position = { x = 23 y = 154 }
}
positionType = {
name = "focusicon_11"
position = { x = 40 y = 171 }
}
New keyboard shortcuts can be added via shortcut = "<key>".[1]
If using priority_shortcut flag, it will fire before any other shortcuts.
| 历史 | 角色 • 家族 • 省份 • 头衔 • 剧本 |
| 脚本 | 指令 • 条件 • 作用域 • 修正 • 事件 • 决议 |
| 常规 | 定义 • 游戏规则 • 另类开局 • 宗教 • 文化 • 政体 • 特质 • 血脉 • 科技 • 法律 • 建筑 • 宣战理由 • 朝贡国 • 单位 • 目标 • 疾病 • 死亡 • 荣誉头衔 • 社团 • 宝物 • 地图外政权 • 内阁成员 • 贸易路线 • 继承 • 奇观 • 称号 |
| 图像/音效/本地化 | 地图 • 图形 • 盾徽 • 肖像 • 界面 • 小地图 • 音乐 • 本地化 |
| 其他 | 故障排除 • 验证器 • 控制台指令 • 编辑游戏存档 • Steam创意工坊 • EU4转档器模组制作 |
Bookmark moddingConsole commandsEU4转档器模组制作Graphics moddingKeyboard shortcutsMinimap moddingPapal successionPatch 2.5Portrait moddingSteam创意工坊事件模组制作作用域修正内阁成员模组制作决议模组制作剧本模组制作单位模组制作历史模组制作另类开局模组制作图形模组制作地图外政权模组制作地图模组制作头衔模组制作奇观模组制作宗教模组制作定义宝物模组制作宣战理由模组制作家族模组制作小地图模组制作建筑模组制作指令控制台指令政体模组制作故障排除文化模组制作朝贡国类型模组制作本地化条件模组制作死亡模组制作法律模组制作游戏规则模组制作特质模组制作疾病模组制作目标模组制作盾徽模组制作省份模组制作社团模组制作科技模组制作称号模组制作继承模组制作编辑游戏存档肖像模组制作脚本荣誉头衔模组制作血脉模组制作角色模组制作贸易路线模组制作音乐模组制作