钢铁雄心4
ParaWikis
最新百科
都市天际线2百科
英雄无敌3百科
维多利亚3百科
奇妙探险队2百科
罪恶帝国百科
英白拉多:罗马百科
热门百科
群星百科
欧陆风云4百科
十字军之王2百科
十字军之王3百科
钢铁雄心4百科
维多利亚2百科
ParaWikis
申请建站
ParaWikis
ParaCommons
最近更改
随机页面
加入QQ群
工具
链入页面
相关更改
特殊页面
页面信息
页面值
帮助
译名手册
字词转换
编辑指南
编辑规范
练手沙盒
资助我们
ParaTranz
资助我们
×
欢迎访问钢铁雄心4百科!
注册一个账号
,一起参与编写吧!这里是
当前的工程
。
全站已采用新UI,任何使用上的问题请点击
这里
。欢迎所有对百科感兴趣的同学加入钢4编辑群:
1137478871
。
阅读
查看源代码
查看历史
讨论
查看“模组制作”的源代码
←
模组制作
因为以下原因,您没有权限编辑本页:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
{{version|Timeless}} '''模组制作''',或者制作[[模组]], 是修改基本游戏(有时也叫''原版'')的行为,可能是用于个人用途,也可能是要发布给其他玩家,例如,通过 [http://steamcommunity.com/app/394360/workshop/ steam创意工坊]. 在所有的P社游戏中,[[钢铁雄心4]]的模组制作可以涵盖很大的范围。模组开发者们的动力可能各有不同:更好的语言翻译和本地化,更多的事件或决议,更好的地图,或是一次巨大的改造,等等。 钢铁雄心4的mod文件默认位于以下位置: * '''Windows''': <code>C:\Users\<Username>\Documents\Paradox Interactive\Hearts of Iron IV\mod</code> * '''Mac OS''': <code>~/Documents/Paradox Interactive/Hearts of Iron IV/mod</code> * '''Linux''': <code>~/.local/share/Paradox Interactive/Hearts of Iron IV/mod</code> 为了开始模组制作, you will want to create a [[Mod_structure|mod structure]] in the mod directory. == '''指导原则''' == *'''永远不要修改游戏文件''':即使是小的修改也要通过mod文件来实现,永远不要直接修改Steam库里的钢铁雄心4文件夹中的游戏文件,因为你的改动可能在完全没有警告的情况下失败。 *'''使用好的文本编辑器'''(例如[http://notepad-plus-plus.org/ Notepad++] 或者 [https://www.sublimetext.com/ Sublime Text]) 来编辑文件并调查多个文件。 *'''尽量减少对原版文件的重写''':通过添加分开的文件并尽可能地从文件夹中加载来改善模组的兼容性和可维护性。(你的文件可以使用任何名字,文件夹中的所有文件都会被游戏加载。所以选择一个酷酷的其他人都没有用过的文件夹名字。例如: coolmod_countries) *'''使用正确的合并工具''':(例如[http://winmerge.org/ WinMerge])来 [[Merging guide|merge between folders]], and update modified vanilla files to a new vanilla patch. *'''备份你的工作'''以避免丢失全部进度:Consider using a source control system like [https://git-scm.com/ Git] and a collaborative forge like [https://github.com/ GitHub] to manage team collaboration, or just make a copy of the file somewhere else. *'''使用 UTF-8 编码'''编写文本文件。 *'''使用 UTF-8-BOM 编码'''编写localisation文件(.yml)。 *'''正确地缩进'''以快速找到未对应的花括号:原版游戏使用1个tab的缩进而不是空格。 *'''使用注释''':用 # 符号注释本行以更好地想起编写难办的代码的逻辑。 *通过使用Debug模式高效地'''Debug''':通过在Steam的游戏启动选项中添加'''-debug'''。这样可以启用error log。 == '''模组结构''' == 游戏模组位于: * 普通模组 <code>\Paradox Interactive\Hearts of Iron IV\mod\</code> * 工坊模组: <code>\Steam\steamapps\workshop\content\394360\</code> .mod文件的名字必须不包含任何空格,否则它将不会被游戏启动器自动选择。 根据.mod文件的结构可以把模组分为三类,分别是'''小型模组''','''大型模组'''和'''次级模组'''。这些种类模组的总体结构将在下文中讲述。模组是小型、大型还是次级模组取决于模组的制作者。 === '''模组缩略图''' === 在新启动器发布之后,所有的缩略图都必须被命名为"thumbnail.png",并且应该放在你的模组的根目录中。 === '''小型模组''' === 最常见的模组类型就是小型模组,即仅仅改变游戏中的一小部分内容的模组。这种模组不需要新的存档或者图形文件,也不需要使用<code>user_dir</code> 和 <code>replace_path</code>,以保持与其他小型模组的兼容性。 <pre> name = "Minor Mod" path = "mod/MinorMod" picture = "thumbnail.png" tags = { "Minor" "Mod" } </pre> === '''大型模组''' === 大型模组可以典型地划分为两类——尽管可能并且时常重叠——改造模组和Total Conversion Mods。 改造模组使用<code>user_dir</code>来保证存档不能在此模组之外加载。 对于Total Conversion mods,<code>replace_path</code>可以用来完全忽略原版游戏的在此模组背景下不合理的内容(例如历史、旗帜等)。 <pre> name = "Major Mod" path = "mod/MajorMod" user_dir = "MajorMod" replace_path = "history/states" picture = "thumbnail.png" tags = { "Major" "Mod" } </pre> === '''次级模组''' === 一个大型模组的次级模组使用<code>dependencies</code>以更精确地重写主模组内容。如果想要让次级模组正常运作这是必需的。 <pre> name = "Sub Mod" path = "mod/SubMod" dependencies = { "Major Mod" } picture = "thumbnail.png" tags = { "SubMod" "Major Mod" } </pre> ==Game data== * [[Console commands]], useful for debugging mods. * [[Defines]], which allow to influence some hardcoded vanilla behaviors * [[Scopes]], [[Conditions]], and [[Commands]] used for scripting * [[Modifiers]], used to influence calculations made by the game * [[Event_Modding|Event Modding]], used to define popups with decisions Names for in-game items (e.g. the name for research categories or rules like can_create_faction) can be found in the game's localization folder, inside the localization files. == '''图像文件格式''' == 图像应使用DDS格式。大多数文件是以8.8.8.8 ARGB 32位无符号格式保存的。一些文件(例如leader肖像)是1.5.5.5 ARGB 16位无符号格式保存的。事件图片也可以使用.tga格式。旗帜是32位像素深度的.tga文件。 == '''工具&实用程序''' == * [http://notepad-plus-plus.org/ Notepad++] - 强大的文件编辑器。 * [https://forum.paradoxplaza.com/forum/index.php?forums/hearts-of-iron-4-user-mods.950/ P社官方论坛的mod版面] * [https://forum.paradoxplaza.com/forum/index.php?threads/information-and-faq.924764/ Maya exporter] - Clausewitz Maya Exporter 创建你自己的3D模型。 * [http://steamcommunity.com/app/394360/workshop/ steam创意工坊] - 你可以和其他玩家分享作品的地方。 ==See also== *[[Mods]] * Getting started with modding [[forum: 995985]] * How to create a new ship unit in Man the Guns [[forum: 1157324]] * How to add a new unit - Checklist [[forum: 947435]] == References == <references /> {{Modding navbox}} [[Category:Modding|#]] [[hoi4fr:Modding]]
本页使用的模板:
Template:Clear
(
查看源代码
)
Template:Modding navbox
(
查看源代码
)
Template:Navbox
(
查看源代码
)
Template:Navboxgroup
(
查看源代码
)
Template:Version
(
查看源代码
)
返回
模组制作
。
×
登录
密码
记住登录
加入钢铁雄心4百科
忘记密码?
其他方式登录