王国风云2
ParaWikis
最新百科
都市天际线2百科
英雄无敌3百科
维多利亚3百科
奇妙探险队2百科
罪恶帝国百科
英白拉多:罗马百科
热门百科
群星百科
欧陆风云4百科
十字军之王2百科
十字军之王3百科
钢铁雄心4百科
维多利亚2百科
ParaWikis
申请建站
ParaWikis
ParaCommons
最近更改
随机页面
加入QQ群
工具
链入页面
相关更改
特殊页面
页面信息
页面值
帮助
译名手册
字词转换
编辑指南
编辑规范
练手沙盒
资助我们
ParaTranz
资助我们
×
欢迎访问王国风云2百科!
注册一个账号
,一起参与编写吧!这里是
当前的工程
。
全站已采用新UI,任何使用上的问题请点击
这里
。欢迎所有对百科感兴趣的同学加入QQ群:
497888338
。
阅读
查看源代码
查看历史
讨论
查看“界面模组制作”的源代码
←
界面模组制作
因为以下原因,您没有权限编辑本页:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
{{version|2.4}} '''Interface modding''' allows to change some vanilla screens, but there are important limitations: *interfaces are hardcoded to match vanilla religion groups. *behavior of UI buttons is hardcoded and not moddable, though existing buttons can be moved or hidden. To identify interface elements, activate '''interface debug mode''' by pressing the same keys as for [[Console commands#Opening the console|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. ==List of interface files== Here is a list of the most important interface files, and what they contain: {| class="wikitable sortable" |- ! 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, ...) |- |} ==Structure of .gui files== {{Stub}} ==Choose starting era window== [[File:Starting_eras.jpg|600px|thumb|right|The starting era selection screen]] {{Ambox|type=content|text=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: <pre> position = { x=-2000 y=-2000} </pre> In bookmarks.txt, give the hardcoded name from vanilla to the 3 bookmarks you want to see on the era screen: *3rd era: <code>name = "BM_FATE_OF_ENGLAND"</code> *4th era: <code>name = "BM_THE_MONGOLS"</code> *5th era: <code>name = "BM_100_YEARS_WAR"</code> 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: *PICK_STARTING_ERA_TEXT *3rd era: BM_FATE_OF_ENGLAND, EARLY_MED, EARLY_MED_INFO *4th era: BM_THE_MONGOLS, HIGH_MED, HIGH_MED_INFO *5th era: BM_100_YEARS_WAR, LATE_MED, LATE_MED_INFO For each bookmark, the 1st 6 characters defined in common/bookmarks.txt will appear, and will need to be described by adding localization keys: <pre>ERA_CHAR_INFO_%chararcter_id%</pre> For instance with: <pre> 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 } </pre> 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 ==Papal succession== [[File:College of Cardinals.jpg|400px|thumb|right|The College of Cardinals screen]] In order to use [[Papal succession]] (succ_papal_succession) for another religion, the first step is to mod the sucession laws: <pre> succ_papal_succession = { potential = { OR = { title = k_papal_state title = d_<my_religion> } } effect = { succession = papal_succession } revoke_allowed = { always = no } } </pre> 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: * Open ''domestic_religion.gui'' and copy the definition for window named ''domestic_religion_title_fraticelli_cardinal'' * Create a file <my_religion>_domestic_religion.gui and paste the code. * Replace occurrences of ''title_fraticelli_cardinal'' by the new religious title defined inside folder ''common/religious_titles'' (ex: title_<my_religion>_cardinal) <pre> guiTypes = { windowType = { name = "domestic_religion_title_<my_religion>_cardinal" (...) ### title cardinal entry 1 windowType = { name = "title_<my_religion>_cardinal_entry_1" (...) } (...) } } </pre> ==Adding a focus== [[File:Foci.jpg|thumb|right|Choose focus screen]] In focusview.gfx, the number of frames needs to be increased: <pre> spriteType = { name = "GFX_focusicons" texturefile = "gfx\\interface\\focusicons.tga" noOfFrames = 20 loadType = "INGAME" } </pre> 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 <pre> spriteType = { name = "GFX_<focus_name>" texturefile = "gfx/ambitions/<focus_name>.tga" noOfFrames = 1 norefcount = yes effectFile = "gfx/FX/buttonstate.lua" } </pre> In focusview.gui, add an 11th focus, and adjust its position: <pre> iconType = { name ="focusicon_11_selected" spriteType = "GFX_focusview_selected_focus" position = { x = 23 y = 154 } } positionType = { name = "focusicon_11" position = { x = 40 y = 171 } } </pre> ==Shortcuts== New [[keyboard shortcuts]] can be added via <code>shortcut = "<key>"</code>.<ref>[[forum:here-is-how-to-add-an-embark-shortcut-key-and-others.625248]]</ref> If using <code>priority_shortcut</code> flag, it will fire before any other shortcuts. ==Minimap== {{Main|Minimap modding}} ==See also== *[[Graphics modding]] *[[Portrait modding]] ==References== <references/> {{ModdingNavbox}} [[Category:模组制作]] [[Category:Lists]]
本页使用的模板:
Template:Ambox
(
查看源代码
)
Template:Ambox/core
(
查看源代码
)
Template:Clear
(
查看源代码
)
Template:Hatnote
(
查看源代码
)
Template:Main
(
查看源代码
)
Template:ModdingNavbox
(
查看源代码
)
Template:Navbox
(
查看源代码
)
Template:Navboxgroup
(
查看源代码
)
Template:Stub
(
查看源代码
)
Template:Version
(
查看源代码
)
返回
界面模组制作
。
×
登录
密码
记住登录
加入王国风云2百科
忘记密码?
其他方式登录