模组制作:修订间差异

本页面讲述的内容长期有效
(创建页面,内容为“{{Version|Timeless}} {{Expand}}{{Stub}} Modding allows new features to be added into the game. == Army == === Unit types === <pre> archers = { army = yes…”)
 
→‎提示和指南:​ 翻译部分条目
 
(未显示2个用户的15个中间版本)
第1行: 第1行:
{{Version|Timeless}}
{{Version|Timeless}}{{ 需要翻译}}
{{Expand}}{{Stub}}


Modding allows new features to be added into the game.
'''模组制作'''(Modding)允许改变游戏的要素或者添加新特性。<br>
Certain things are hardcoded, i.e. not available for modding, such as changing mapmodes and diplomatic actions or adding new hotkeys.<br><br>
Important: the majority of mods will change the checksum, not allowing the player to get achievements. Loading an ironman game with such a mod will irreversably corrupt the save file, so be careful.<br>
See "checksum_manifest.txt" in the game folder for the list of checksummed folders and files. The only safe mods are the ones that replace textures, fonts or music.


== Army ==
== 提示和指南==
* 创建一个模组而非直接修改游戏文件,它们将在任何游戏更新时被覆盖(原文如此,说人话就是模组文件夹里的内容会覆盖原版内容)
* 使用一个好的文本编辑器来显示语法高亮,自动补全及跨文件搜索。以下程序是免费的:
# [https://code.visualstudio.com/ Visual Studio Code]. VSCode里有一个粉丝制作的CWTools扩展, 该扩展标识了Paradox代码, 它会提示你补全括号并在提示中显示作用域和效果信息。在VSCode左侧扩展面板中搜索CWTools并下载。 (注: 如果该扩展与游戏发布版本不匹配,会有很多误报错)
# [https://www.sublimetext.com/ Sublime Text]. Imperator developers have released [https://forum.paradoxplaza.com/forum/index.php?threads/sublime-tools-for-imperator.1274246/ Sublime Tools] with syntax highlighting and function search. In addition, to be able to toggle comments, you need to add [https://cdn.discordapp.com/attachments/563655919892692996/649656191173263370/PDXComments.tmPreference this file] to the same "User" folder.
# [https://notepad-plus-plus.org/downloads/ Notepad++]. Choose Perl as your language, as it will provide good highlighting and allow to fold blocks of code and comments. To set it as default, go to Settings, Styler Configurator, find Perl in the list on the left and add "gui txt" (without quotes) to the "User ext." field at the bottom.
# [https://atom.io/ Atom]. Doesn't include UTF-8-BOM encoding needed for localization files. Choose Perl 6 as your language for better results. To set it as default, go to File, Config, find "core:" and add below it: "customFileTypes: "source.perl6": [ "txt" "gui"]", like in [https://discuss.atom.io/t/how-do-i-make-atom-recognize-a-file-with-extension-x-as-language-y/26539 this example].
* Indent properly, so that opening and closing brackets are on the same level. Proper formatting will allow you to fold blocks of code, help spot any mistakes and make it easier to read.
* 行开头加#注释,提醒后来的人这些内容如何工作,方便导航,注释掉不要的代码而非直接删除。
* txt文件使用UTF-8编码。
* 本地化文件使用UTF-8-BOM编码。(译者注:VSCode右下角编码那边点一下可以直接调,不需要记事本打开再保存为特点编码。)
* Start the game with the "-debug_mode" and "-develop" options to use the console, dev tools and "reload" commands. [[Console commands|See here how to add launch options]].
* Use the error.log to catch any bugs. It's located next to the mod folder, in Documents/Paradox Interactive/Imperator/logs.
* Use "script_docs" and "DumpDataTypes" console commands in the game to generate other logs with event effects, triggers and scopes.
* 模组上传steam创意工坊之后,移除本地模组,否则不生效。
* Clearly communicate to users whether your mod is ironman-friendly.
* 备份你的作品。手动备份或者使用譬如Git的版本控制系统都可以。也可以考虑使用GitHub以供团队写作开发。(译者注:国内访问GitHub困难,并且GitHub项目有一个G的空间限制,如果美术素材多的话很容易就超了。这里有上中下三策,上策是自己部署一个Git平台,gitlab太重了,这里建议使用轻量版的git托管平台onedev,也是国人开发的开源项目,支持docker部署;中策可以使用阿里云的代码平台codeup,免费的项目大小可以有两个G,稍微大一些;下策是使用魔法访问github。)
* 使用合适的合并工具 (譬如 [https://winmerge.org/?lang=en WinMerge]) 来合并不同文件夹并为新版本更新修改后的文件。


=== Unit types ===
== 创建你的第一个 mod==
<pre>
1. Start the game launcher, go to All Installed Mods, Upload Mod, Create a Mod and fill in all the fields, including tags. Clicking Create will create a new folder and a .mod file in Documents/Paradox Interactive/Imperator/mod.
archers = {
* "Version" refers to the game version this mod is made for.
   army = yes
* Folder name may include spaces, although it is common to use lower_spaces instead.
   assault = yes
2. Copy the game files you wish to mod to your newly created mod folder or create your own files, while using the same folder structure.
   is_second_rank = yes
* For example, if you want to mod the topbar, your should have the following: my_topbar_mod/gui/ingame_topbar.gui.
  
* If you want to add events to this mod, you would have my_topbar_mod/events/topbar_events.txt.
   enable = yes
3. After modifying the files, enable the mod in the launcher and test it in the game.
  
* If modding UI, you can use "reload gui" command to see new changes without restarting the game. (This requires both -develop and -debug_mode launch options. See above how to enable them.)
   maneuver = 1
* Remember to check the error.log for any errors.
   movement_speed = 2
4. To add a thumbnail for a mod, name your image "thumbnail.png" and put it inside your mod folder. Make it at least 200x200 pixels, so Steam doesn't add black borders around it.<br>
   build_cost = 2
5. To upload a mod, open the game launcher, go to All Installed Mods, Upload Mod. Select your mod from the dropdown menu, select the platform to upload it to and click Upload. The description isn't necessary.
   build_time = 45
* You will find your mod in your Steam profile, Workshop Items. New mods are uploaded in private mode, so change their visibility to Public to actually publish them.
  
* Remember, remove your local mod folder if you want to test the Steam version of it, otherwise they will conflict with each other. You may simply move it, along with the .mod file, to another folder and move it back whenever you want to update your mod.
   light_infantry = 2.0
6. To update a mod, simply open the launcher and upload it again.<br>
   heavy_infantry = 1.25
(When you upload a mod for the first time, the launcher creates a descriptor.mod file in your mod folder which links to your Steam mod. This is what's used for updating, so don't remove this file.)
   cavalry = 0.75
   warelephant = 1.0
   horse_archers = 1.0
   archers = 1.0
}
</pre>


== Internal country management ==
== 游戏数据 ==
{{Box wrapper}}
* [[Effects]] - 用于动态地影响游戏。
* [[Triggers]] - 用于执行命令/事件/决议/等等。只有当特定条件为真时。
* [[Scopes]] - 用于明确规定命令和条件的目标。
* [[Modifier list]] - 影响游戏方方面面的脚本修正。
* [[Defines]] - 用于游戏在几乎所有方面的全局值。
* [[国家|Country list]] - 原版游戏中全部国家的基本信息,包括国家代码。
* [[Console commands]] - 关于如何使用游戏控制台命令的指南。


=== Pops ===
* 游戏预置脚本
<pre>
freemen = {
   local_manpower = 0.05
   can_promote_to = citizen
   demotes_to = slaves
}
</pre>


=== Prices ===
* 游戏预置修正
<pre>
freemen_promotion = {
   religious = 10
}


assault = {
* 总表<!--
   manpower = 2
**[[List_of_decision_lists]]
   military = 20
**[[List_of_event_lists]]
}
**[[List_of_mission_lists]]
-->
{{End box wrapper}}


send_gift = {
== 指南 ==
   scaled_gold = 0.2
{{MultiColumn|
}
* [[AI 修改]]
</pre>
* [[建筑修改]]
* [[人物修改]]
* [[盾徽修改]]
* [[国家修改]]
* [[文化修改]]
* [[决议修改]]
* [[事件修改]]
* [[基因修改]]
* [[GFX 修改]]
* [[政府修改]]
* [[GUI 修改]]
* [[理念修改]]
* [[本地化]]
* [[地图修改]]
* [[Mod 文件]]
* [[省份设置]]
* [[宗教修改]]
* [[研究修改]]
* [[单位修改]]
|4}}


== Characters ==
== 排除故障 ==


=== Character interactions ===
===Mod 在上传到 Steam 之后不工作===
<pre>
Check whether other mods work for you. If not and your Documents folder is not in the default place, the launcher can't find it.
hold_triumph = {


   on_other_nation = no
You need to edit "launcher-settings.json":
   on_own_nation = yes
# open the game directory (Right-click on Steam, Properties, Local Files, Browse Local Files)
  
# in the 'launcher' folder open launcher-settings.json with a notepad
   sound = "event:/SFX/UI/Character/sfx_ui_character_hold_triumph"
# change gameDataPath to "%USER_DOCUMENTS%/Paradox Interactive/Imperator"
  
If this still doesn't help, try using the whole path, like "F:/Documents/Paradox Interactive/Imperator". Make sure you use forward slashes / and double quotes ".
   potential_trigger = {
     hidden:scope:target = {
       is_alive = yes
     }
   }
  
   allowed_trigger = {
     hidden:scope:actor = {
    
      
    
       can_pay_price = hold_triumph
      
       custom_tooltip = {
         text = "TRIUMPH_RECENTLY_HELD"
      
         NOT = { has_variable = triumph_recently_held }
       }
     }
     scope:target = {
       is_adult = yes
      
       days_since_last_victory < 720
     }
   }
  
   effect = {
     scope:actor = {
       pay_price = hold_triumph
      
       set_variable = {
         name = triumph_recently_held
         value = 1
         days = 365
       }
      
     }
  
     scope:target = {
       add_loyalty = loyalty_huge
       add_popularity = popularity_huge
     }
   }
  
}
</pre>


== Government ==
=== 在 .mod 文件中的路径变成绝对路径 ===
The new launcher overwrites the "mod/modname" path to the absolute one, like "C:/Users/User/Documents.../mod/modname".


=== Senate support for an action ===
While this is normal, for some modders it can prevent the game from loading the mod. To solve it:
# Change the path to relative again.
# Right-click the file -> Properties -> check Read-only.
This will prevent the launcher from editing it. Remember to disable read-only when uploading, since the launcher needs access to the file.


<pre>
== 工具与实用程序 ==
####################################
* [[forum:924764|Clausewitz Maya Exporter]] - 此工具允许更简便地创建3D模型(单位)用于较新的克劳塞维茨引擎游戏中的模组。
# Declare War
* [https://code.visualstudio.com/ VS Code] - 强大的、可控制的、免费开源编辑器,来自微软。(在VS Code扩展中心搜索安装中文语言包)
####################################
* [[forum:1170537|CWTools]] - 一个用于VS Code的扩展,提供拼写验证、代码补全、语法高亮以及更多功能给Paradox脚本文件。(在VS Code扩展中心搜索安装CWTools)
declare_war = {
* [[forum:1056010|Notepad++ Syntax Highlighter]] - Notepad++语法高亮规则定义。(已过时)
* [[forum:1371915|province setup converter 1.3.x -> 1.4]] - 一个用来转换旧的省份数据信息,从 Imperator 1.3.x 或者使用 province_setup.csv 文件到文本格式给 Imperator 1.4


   approval = {
== 社区 ==
  
* 官方论坛的模组制作指南:[[Forum:1274242|Imperator Modding Guide Index]]
     military_party = {
* [https://forum.paradoxplaza.com/forum/index.php?forums/imperator-rome-user-mods.1045/ Imperator: Rome - User Mods] - 在Paradox Plaza论坛上的子论坛,专门用于用户为I:R制作模组。
       base = 0
* [https://discord.gg/hkZUESP Imperator Modding Coop] - 一个Discord服务器,专门用于用户为I:R制作模组。
       always_modifier = {
 
         add = 0.5
== 杂项 ==
         has_civil_war = no
* [[校验码#影响校验码计算的文件|校验码]]
       }
 
       always_modifier = {
== 参考资料 ==
         add = {
<references/>
           value = 0
 
           add = root.manpower_percentage
{{Modding navbox}}
           max = 0.5
[[Category: 模组制作]]
         }
[[en:Modding]]
       }
       always_modifier = {
         add = -0.3
         war = yes
       }
       always_modifier = {
         add = {
           value = 20
           subtract = root.has_war_exhaustion
           divide = 50
           max = 0.2
         }
       }
       #######generic
       always_modifier = {
         add = {
           value = 0.01
           multiply = military_senate_support_svalue
           max = 0.2
         }
       }
       always_modifier = {
         add = {
           value = 0.01
           multiply = root.current_ruler.martial
         }
       }
       always_modifier = {
         add = 0.15
         OR = {
           AND = {
             current_ruler = {
               num_of_friends >= 1
             }
             any_character = {
               is_friend = root.current_ruler
               is_party_leader_of = root.party:military_party
             }
           }
           current_ruler = {
             is_party_leader_of = root.party:military_party
           }
         }
       }
       always_modifier = {
         add = {
           value = 0
           if = {
             limit = {
               root.current_ruler = {
                 party = military_party
               }
             }
             add = 0.2
             add = {
               value = 0
               add = root.tyranny
               divide = 100
             }
             max = 0.4
           }
         }
       }
       always_modifier = {
         add = -0.15
         current_ruler = {
           num_of_rivals >= 1
         }
         any_character = {
           is_rival = root.current_ruler
           is_party_leader_of = root.party:military_party
         }
       }
       always_modifier = {
         add = 0.1
         government = aristocratic_republic
       }
     }
  
     civic_party = {
       base = 0
       always_modifier = {
         add = -0.5
         has_civil_war = yes
       }
       always_modifier = {
         add = 0.15
         NOT = { current_ruler = { has_same_culture_group_as = scope:target.current_ruler } }
       }
       always_modifier = {
         add = 0.15
         NOT = { current_ruler = { has_same_culture_as = scope:target.current_ruler } }
       }
       always_modifier = {
         add = {
           value = 20
           subtract = root.has_war_exhaustion
           divide = 100
           max = 0.1
         }
       }
       always_modifier = {
         add = 0.2
         scope:target = {
           is_tribal = yes
         }
       }
       #######generic
       always_modifier = {
         add = {
           value = 0.01
           multiply = civic_senate_support_svalue
           max = 0.2
         }
       }
       always_modifier = {
         add = {
           value = 0.01
           multiply = root.current_ruler.finesse
         }
       }
       always_modifier = {
         add = 0.15
         OR = {
           AND = {
             current_ruler = {
               num_of_friends >= 1
             }
             any_character = {
               is_friend = root.current_ruler
               is_party_leader_of = root.party:civic_party
             }
           }
           current_ruler = {
             is_party_leader_of = root.party:civic_party
           }
         }
       }
       always_modifier = {
         add = {
           value = 0
           if = {
             limit = {
               root.current_ruler = {
                 party = civic_party
               }
             }
             add = 0.2
             add = {
               value = root.tyranny
               divide = 100
             }
             max = 0.4 
           }
         }
       }
       always_modifier = {
         add = -0.15
         current_ruler = {
           num_of_rivals >= 1
         }
         any_character = {
           is_rival = root.current_ruler
           is_party_leader_of = root.party:civic_party
         }
       }
       always_modifier = {
         add = 0.1
         government = democratic_republic
       }
     }
     religious_party = {
       base = 0.1
       always_modifier = {
         add = -0.5
         has_civil_war = yes
       }
       always_modifier = {
         add = 0.2
         NOT = { current_ruler = { has_same_religion_as = scope:target.current_ruler } }
       }
       #######generic
       always_modifier = {
         add = {
           value = 0.01
           multiply = religious_senate_support_svalue
           max = 0.2
         }
       }
       always_modifier = {
         add = {
           value = 0.01
           multiply = root.current_ruler.zeal
         }
       }
       always_modifier = {
         add = 0.15
         OR = {
           AND = {
             current_ruler = {
               num_of_friends >= 1
             }
             any_character = {
               is_friend = root.current_ruler
               is_party_leader_of = root.party:religious_party
             }
           }
           current_ruler = {
             is_party_leader_of = root.party:religious_party
           }
         }
       }
       always_modifier = {
         add = {
           value = 0
           if = {
             limit = {
               root.current_ruler = {
                 party = religious_party
               }
             }
             add = 0.2
             add = {
               value = 0
               add = root.tyranny
               divide = 100
             }
             max = 0.4
           }
         }
       }
       always_modifier = {
         add = -0.15
         current_ruler = {
           num_of_rivals >= 1
         }
         any_character = {
           is_rival = root.current_ruler
           is_party_leader_of = root.party:religious_party
         }
       }
       always_modifier = {
         add = 0.1
         government = theocratic_republic
       }
     }
     mercantile_party = {
       base = 0.5
       always_modifier = {
         add = -0.5
         has_civil_war = yes
       }
       always_modifier = {
         add = -0.5
         trade_access_with = scope:target
       }
       always_modifier = {
         add = {
           if = {
             limit = {
               root.has_war_exhaustion <= 10
             }
             value = 10
             subtract = root.has_war_exhaustion
             divide = 50
             max = 0.2
           }
           else = {
             value = 0
             subtract = root.has_war_exhaustion
             add = 10
             divide = 25
             max = -0.4
           }
         }
       }
       #######generic
       always_modifier = {
         add = {
           value = 0.01
           multiply = mercantile_senate_support_svalue
           max = 0.2
         }
       }
       always_modifier = {
         add = {
           value = 0.01
           multiply = root.current_ruler.charisma
         }
       }
       always_modifier = {
         add = 0.15
         OR = {
           AND = {
             current_ruler = {
               num_of_friends >= 1
             }
             any_character = {
               is_friend = root.current_ruler
               is_party_leader_of = root.party:mercantile_party
             }
           }
           current_ruler = {
             is_party_leader_of = root.party:mercantile_party
           }
         }
       }
       always_modifier = {
         add = {
           value = 0
           if = {
             limit = {
               root.current_ruler = {
                 party = mercantile_party
               }
             }
             add = 0.2
             add = {
               value = 0
               add = root.tyranny
               divide = 100
             }
             max = 0.4
           }
         }
       }
       always_modifier = {
         add = -0.15
         current_ruler = {
           num_of_rivals >= 1
         }
         any_character = {
           is_rival = root.current_ruler
           is_party_leader_of = root.party:mercantile_party
         }
       }
       always_modifier = {
         add = 0.1
         government = oligarchic_republic
       }
     }
     populist_party = {
       base = 0.1
       always_modifier = {
         add = 0.15
         scope:target = {
           is_monarchy = yes
         }
       }
       #######generic
       always_modifier = {
         add = {
           value = 0.01
           multiply = populist_senate_support_svalue
           max = 0.2
         }
       }
       always_modifier = {
         add = 0.15
         OR = {
           AND = {
             current_ruler = {
               num_of_friends >= 1
             }
             any_character = {
               is_friend = root.current_ruler
               is_party_leader_of = root.party:populist_party
             }
           }
           current_ruler = {
             is_party_leader_of = root.party:populist_party
           }
         }
       }
       always_modifier = {
         add = {
           value = 0
           if = {
             limit = {
               root.current_ruler = {
                 party = populist_party
               }
             }
             add = 0.3
             add = {
               value = 0
               add = root.tyranny
               divide = 100
             }
             max = 0.6 
           }
         }
       }
       always_modifier = {
         add = -0.15
         current_ruler = {
           num_of_rivals >= 1
         }
         any_character = {
           is_rival = root.current_ruler
           is_party_leader_of = root.party:populist_party
         }
       }
     }
   }
  
   loyalty = {
     military_party = 0.1
     populist_party = -0.1
   }
  
   support = {
     civic_party = -1
     military_party = 3
     mercantile_party = -1
     populist_party = -1
   }
}
</pre>

2024年5月29日 (三) 17:51的最新版本

Template:需要翻译

模组制作(Modding)允许改变游戏的要素或者添加新特性。
Certain things are hardcoded, i.e. not available for modding, such as changing mapmodes and diplomatic actions or adding new hotkeys.

Important: the majority of mods will change the checksum, not allowing the player to get achievements. Loading an ironman game with such a mod will irreversably corrupt the save file, so be careful.
See "checksum_manifest.txt" in the game folder for the list of checksummed folders and files. The only safe mods are the ones that replace textures, fonts or music.

提示和指南

  • 创建一个模组而非直接修改游戏文件,它们将在任何游戏更新时被覆盖(原文如此,说人话就是模组文件夹里的内容会覆盖原版内容)
  • 使用一个好的文本编辑器来显示语法高亮,自动补全及跨文件搜索。以下程序是免费的:
  1. Visual Studio Code. VSCode里有一个粉丝制作的CWTools扩展, 该扩展标识了Paradox代码, 它会提示你补全括号并在提示中显示作用域和效果信息。在VSCode左侧扩展面板中搜索CWTools并下载。 (注: 如果该扩展与游戏发布版本不匹配,会有很多误报错)
  2. Sublime Text. Imperator developers have released Sublime Tools with syntax highlighting and function search. In addition, to be able to toggle comments, you need to add this file to the same "User" folder.
  3. Notepad++. Choose Perl as your language, as it will provide good highlighting and allow to fold blocks of code and comments. To set it as default, go to Settings, Styler Configurator, find Perl in the list on the left and add "gui txt" (without quotes) to the "User ext." field at the bottom.
  4. Atom. Doesn't include UTF-8-BOM encoding needed for localization files. Choose Perl 6 as your language for better results. To set it as default, go to File, Config, find "core:" and add below it: "customFileTypes: "source.perl6": [ "txt" "gui"]", like in this example.
  • Indent properly, so that opening and closing brackets are on the same level. Proper formatting will allow you to fold blocks of code, help spot any mistakes and make it easier to read.
  • 行开头加#注释,提醒后来的人这些内容如何工作,方便导航,注释掉不要的代码而非直接删除。
  • txt文件使用UTF-8编码。
  • 本地化文件使用UTF-8-BOM编码。(译者注:VSCode右下角编码那边点一下可以直接调,不需要记事本打开再保存为特点编码。)
  • Start the game with the "-debug_mode" and "-develop" options to use the console, dev tools and "reload" commands. See here how to add launch options.
  • Use the error.log to catch any bugs. It's located next to the mod folder, in Documents/Paradox Interactive/Imperator/logs.
  • Use "script_docs" and "DumpDataTypes" console commands in the game to generate other logs with event effects, triggers and scopes.
  • 模组上传steam创意工坊之后,移除本地模组,否则不生效。
  • Clearly communicate to users whether your mod is ironman-friendly.
  • 备份你的作品。手动备份或者使用譬如Git的版本控制系统都可以。也可以考虑使用GitHub以供团队写作开发。(译者注:国内访问GitHub困难,并且GitHub项目有一个G的空间限制,如果美术素材多的话很容易就超了。这里有上中下三策,上策是自己部署一个Git平台,gitlab太重了,这里建议使用轻量版的git托管平台onedev,也是国人开发的开源项目,支持docker部署;中策可以使用阿里云的代码平台codeup,免费的项目大小可以有两个G,稍微大一些;下策是使用魔法访问github。)
  • 使用合适的合并工具 (譬如 WinMerge) 来合并不同文件夹并为新版本更新修改后的文件。

创建你的第一个 mod

1. Start the game launcher, go to All Installed Mods, Upload Mod, Create a Mod and fill in all the fields, including tags. Clicking Create will create a new folder and a .mod file in Documents/Paradox Interactive/Imperator/mod.

  • "Version" refers to the game version this mod is made for.
  • Folder name may include spaces, although it is common to use lower_spaces instead.

2. Copy the game files you wish to mod to your newly created mod folder or create your own files, while using the same folder structure.

  • For example, if you want to mod the topbar, your should have the following: my_topbar_mod/gui/ingame_topbar.gui.
  • If you want to add events to this mod, you would have my_topbar_mod/events/topbar_events.txt.

3. After modifying the files, enable the mod in the launcher and test it in the game.

  • If modding UI, you can use "reload gui" command to see new changes without restarting the game. (This requires both -develop and -debug_mode launch options. See above how to enable them.)
  • Remember to check the error.log for any errors.

4. To add a thumbnail for a mod, name your image "thumbnail.png" and put it inside your mod folder. Make it at least 200x200 pixels, so Steam doesn't add black borders around it.
5. To upload a mod, open the game launcher, go to All Installed Mods, Upload Mod. Select your mod from the dropdown menu, select the platform to upload it to and click Upload. The description isn't necessary.

  • You will find your mod in your Steam profile, Workshop Items. New mods are uploaded in private mode, so change their visibility to Public to actually publish them.
  • Remember, remove your local mod folder if you want to test the Steam version of it, otherwise they will conflict with each other. You may simply move it, along with the .mod file, to another folder and move it back whenever you want to update your mod.

6. To update a mod, simply open the launcher and upload it again.
(When you upload a mod for the first time, the launcher creates a descriptor.mod file in your mod folder which links to your Steam mod. This is what's used for updating, so don't remove this file.)

游戏数据

  • Effects - 用于动态地影响游戏。
  • Triggers - 用于执行命令/事件/决议/等等。只有当特定条件为真时。
  • Scopes - 用于明确规定命令和条件的目标。
  • Modifier list - 影响游戏方方面面的脚本修正。
  • Defines - 用于游戏在几乎所有方面的全局值。
  • Country list - 原版游戏中全部国家的基本信息,包括国家代码。
  • Console commands - 关于如何使用游戏控制台命令的指南。
  • 游戏预置脚本
  • 游戏预置修正
  • 总表

指南

排除故障

Mod 在上传到 Steam 之后不工作

Check whether other mods work for you. If not and your Documents folder is not in the default place, the launcher can't find it.

You need to edit "launcher-settings.json":

  1. open the game directory (Right-click on Steam, Properties, Local Files, Browse Local Files)
  2. in the 'launcher' folder open launcher-settings.json with a notepad
  3. change gameDataPath to "%USER_DOCUMENTS%/Paradox Interactive/Imperator"

If this still doesn't help, try using the whole path, like "F:/Documents/Paradox Interactive/Imperator". Make sure you use forward slashes / and double quotes ".

在 .mod 文件中的路径变成绝对路径

The new launcher overwrites the "mod/modname" path to the absolute one, like "C:/Users/User/Documents.../mod/modname".

While this is normal, for some modders it can prevent the game from loading the mod. To solve it:

  1. Change the path to relative again.
  2. Right-click the file -> Properties -> check Read-only.

This will prevent the launcher from editing it. Remember to disable read-only when uploading, since the launcher needs access to the file.

工具与实用程序

  • Clausewitz Maya Exporter - 此工具允许更简便地创建3D模型(单位)用于较新的克劳塞维茨引擎游戏中的模组。
  • VS Code - 强大的、可控制的、免费开源编辑器,来自微软。(在VS Code扩展中心搜索安装中文语言包)
  • CWTools - 一个用于VS Code的扩展,提供拼写验证、代码补全、语法高亮以及更多功能给Paradox脚本文件。(在VS Code扩展中心搜索安装CWTools)
  • Notepad++ Syntax Highlighter - Notepad++语法高亮规则定义。(已过时)
  • province setup converter 1.3.x -> 1.4 - 一个用来转换旧的省份数据信息,从 Imperator 1.3.x 或者使用 province_setup.csv 文件到文本格式给 Imperator 1.4

社区

杂项

参考资料