钢铁雄心4
ParaWikis
最新百科
都市天际线2百科
英雄无敌3百科
维多利亚3百科
奇妙探险队2百科
罪恶帝国百科
英白拉多:罗马百科
热门百科
群星百科
欧陆风云4百科
十字军之王2百科
十字军之王3百科
钢铁雄心4百科
维多利亚2百科
ParaWikis
申请建站
ParaWikis
ParaCommons
最近更改
随机页面
加入QQ群
工具
链入页面
相关更改
特殊页面
页面信息
页面值
帮助
译名手册
字词转换
编辑指南
编辑规范
练手沙盒
资助我们
ParaTranz
资助我们
×
欢迎访问钢铁雄心4百科!
注册一个账号
,一起参与编写吧!这里是
当前的工程
。
全站已采用新UI,任何使用上的问题请点击
这里
。欢迎所有对百科感兴趣的同学加入钢4编辑群:
1137478871
。
阅读
查看源代码
查看历史
讨论
查看“模组制作”的源代码
←
模组制作
因为以下原因,您没有权限编辑本页:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
{{version|Timeless}} '''模组制作''',或者制作 [[模组]], 是修改基本游戏(有时也叫''原版'')的行为,可能是用于个人用途,也可能是要发布给其他玩家,例如,通过steam创意工坊 [http://steamcommunity.com/app/394360/workshop/ Steam Workshop]. 在所有的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文件的名字必须不包含任何空格,否则它将不会被游戏启动器自动选择。 There are three main classes of mods that pertain to the structure of the .mod file. These classes are '''Minor Mod''', '''Major Mod''', and '''Submod''' and the general structure of these mods is shown below. It is up to the maker of the mod whether or not the mod should be considered a minor, major or sub-mod. ===Mod Thumbnail=== Since the release of the "new launcher" all thumbnails must be named "thumbnail.png" and located in the root folder of your mod. ===Minor Mod=== The most common type of mod is a minor mod, or a mod that changes only a small part of the game. These types of mod don't need new savegame or graphics folders as and so do not need to use <code>user_dir</code> nor <code>replace_path</code> in order to keep compatibility with other small mods. <pre> name = "Minor Mod" path = "mod/MinorMod" picture = "thumbnail.png" tags = { "Minor" "Mod" } </pre> ===Major Mod=== Major mods can typically be divided into two categories, though can - and often do - overlap. These are Overhauls and Total Conversion Mods. Overhauls use <code>user_dir</code> due to the fact that saves cannot be loaded outside of the mod. For Total Conversion mods, <code>replace_path</code> can be used to completely ignore vanilla directories that don't make sense in the context of the mod (history, flags, ...). <pre> name = "Major Mod" path = "mod/MajorMod" user_dir = "MajorMod" replace_path = "history/states" picture = "thumbnail.png" tags = { "Major" "Mod" } </pre> ===Sub Mod=== Submods of a major mod can use <code>dependencies</code> to be able to more precisely override files from main mod. This is necessary for the submods to operate as intended. <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. ==Image file formats== Use DDS format for images. Most of the files are saved in 8.8.8.8 ARGB, 32 bit unsigned sub-format. Some files (like leader portraits) are saved using 1.5.5.5 ARGB 16 bit unsigned variant. Event Image can also be of the .tga format. Flags are saved as 32bpp .tga files. ==Tools & utilities== * [http://notepad-plus-plus.org/ Notepad++] - Powerful editor to change files. * [https://forum.paradoxplaza.com/forum/index.php?forums/hearts-of-iron-4-user-mods.950/ Official Paradox Forum for mods.] * [https://forum.paradoxplaza.com/forum/index.php?threads/information-and-faq.924764/ Maya exporter] - Clausewitz Maya Exporter to create your own 3D models. * [http://steamcommunity.com/app/394360/workshop/ Steam Workshop] - The place for where you can share your creations with other players. ==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百科
忘记密码?
其他方式登录