十字军之王3
ParaWikis
最新百科
都市天际线2百科
英雄无敌3百科
维多利亚3百科
奇妙探险队2百科
罪恶帝国百科
英白拉多:罗马百科
热门百科
群星百科
欧陆风云4百科
十字军之王2百科
十字军之王3百科
钢铁雄心4百科
维多利亚2百科
ParaWikis
申请建站
ParaWikis
ParaCommons
最近更改
随机页面
加入QQ群
工具
链入页面
相关更改
特殊页面
页面信息
页面值
帮助
译名手册
字词转换
编辑指南
编辑规范
练手沙盒
资助我们
×
欢迎访问十字军之王3百科!
注册一个账号
,一起参与编写吧!这里是
当前的工程
。
全站已采用新UI,任何使用上的问题请点击
这里
。欢迎所有对百科感兴趣的同学加入QQ群:
497888338
。
阅读
编辑
编辑源代码
查看历史
讨论
编辑“
模组制作
”
咯咯炀
(
讨论
|
贡献
)
2020年11月25日 (三) 20:49的版本
(01:19, 25 November 2020 Steinbeard)
(
差异
)
←上一版本
|
最后版本
(
差异
) |
下一版本→
(
差异
)
警告:您正在编辑的是本页面的旧版本。
如果您发布该更改,该版本后的所有更改都会丢失。
警告:
您没有登录。如果您做出任意编辑,您的IP地址将会公开可见。如果您
登录
或
创建
一个账户,您的编辑将归属于您的用户名,且将享受其他好处。
反垃圾检查。
不要
加入这个!
切换编辑器
您已切换至源代码编辑
关闭
您可以随时通过点击该图标切换回可视化编辑。
可视化编辑
源代码编辑
更多
高级
特殊字符
帮助
标题
2级
3级
4级
5级
格式
插入
拉丁字母
扩展拉丁字母
国际音标
符号
希腊字母
希腊字母扩展
西里尔字母
阿拉伯字母
扩展阿拉伯字母
希伯来字母
孟加拉语字符集
泰米尔数字和符号
泰卢固语字符集
僧伽罗语字符集
梵文字符集
古吉拉特语字符集
泰语字符集
老挝语
高棉语字母
加拿大原住民音节文字
卢恩
Á
á
À
à
Â
â
Ä
ä
Ã
ã
Ǎ
ǎ
Ā
ā
Ă
ă
Ą
ą
Å
å
Ć
ć
Ĉ
ĉ
Ç
ç
Č
č
Ċ
ċ
Đ
đ
Ď
ď
É
é
È
è
Ê
ê
Ë
ë
Ě
ě
Ē
ē
Ĕ
ĕ
Ė
ė
Ę
ę
Ĝ
ĝ
Ģ
ģ
Ğ
ğ
Ġ
ġ
Ĥ
ĥ
Ħ
ħ
Í
í
Ì
ì
Î
î
Ï
ï
Ĩ
ĩ
Ǐ
ǐ
Ī
ī
Ĭ
ĭ
İ
ı
Į
į
Ĵ
ĵ
Ķ
ķ
Ĺ
ĺ
Ļ
ļ
Ľ
ľ
Ł
ł
Ń
ń
Ñ
ñ
Ņ
ņ
Ň
ň
Ó
ó
Ò
ò
Ô
ô
Ö
ö
Õ
õ
Ǒ
ǒ
Ō
ō
Ŏ
ŏ
Ǫ
ǫ
Ő
ő
Ŕ
ŕ
Ŗ
ŗ
Ř
ř
Ś
ś
Ŝ
ŝ
Ş
ş
Š
š
Ș
ș
Ț
ț
Ť
ť
Ú
ú
Ù
ù
Û
û
Ü
ü
Ũ
ũ
Ů
ů
Ǔ
ǔ
Ū
ū
ǖ
ǘ
ǚ
ǜ
Ŭ
ŭ
Ų
ų
Ű
ű
Ŵ
ŵ
Ý
ý
Ŷ
ŷ
Ÿ
ÿ
Ȳ
ȳ
Ź
ź
Ž
ž
Ż
ż
Æ
æ
Ǣ
ǣ
Ø
ø
Œ
œ
ß
Ð
ð
Þ
þ
Ə
ə
格式
链接
标题
列表
文件
参考
讨论
说明
输入内容
输出结果
斜体
''斜体文字''
斜体文字
粗体
'''粗体文字'''
粗体文字
粗斜体
'''''粗斜体文字'''''
粗斜体文字
{{Version|timeless}}{{需要翻译}} '''模组制作'''('''Modding'''),或者说创建模组,是一种修改游戏资源或行为的方式,有时候仅仅是为了个人使用,有时候制作者也会发布出来供其它玩家一起使用。可以通过以下途径了解mod制作[https://mods.paradoxplaza.com/games/ck3 Paradox Mods]和[https://steamcommunity.com/app/1158310/workshop/ Steam Workshop]。 在所有的P社游戏中,十字军之王3的可修改程度都是相当高的。mod制作者可以修改的内容也相当宽泛,比如语言翻译,更多的事件和决议,更优秀的地图,更大程度上的内容修改和作弊。 这篇引导的目的在于降低制作mod的门槛。但是学习的曲线总是曲折的,这需要你通过不断的练习和阅读他人优秀mod代码来提升自己制作mod的水平。 ''重要'':大多数模组会改变校验码,将禁止玩家获得成就。在{{Cite file|Crusader Kings III\game}}中的{{Cite file|checksum_manifest.txt}}查看校验文件夹和文件。唯一安全的是替换纹理、字体、着色器或音乐的模组。 == 提示 & 指引== *'''创建一个mod对游戏进行修改''': 即使是很小的改动,也不要直接修改CK3游戏本体的游戏文件,而是要单独创建一个mod。因为本体更新时会直接覆盖这些修改,并且没有任何提示。 *'''使用好的文本编辑器''' 用来编辑和搜索文件。以下软件均免费: **[https://code.visualstudio.com/ Visual Studio Code]. 有一个粉丝自制的CWTools扩展,具有Paradox语法高亮、验证以及触发器和效果的工具提示。要安装它,请到VS左侧面板的扩展,搜索CWTools。(注意:验证规则是不完整的,会在gui和本地化文件中显示许多错误) **[https://notepad-plus-plus.org/downloads/ Notepad++]。选择Perl作为你的语言,因为它可以提供良好的高亮显示,并允许折叠代码块和注释。要将其设置为默认语言,请进入“设置”,“样式器配置器”,在左侧列表中找到Perl,并在底部的“User ext.”字段中添加“gui txt”(不加引号)。 **[https://atom.io/ Atom]。不包括本地化文件所需的UTF-8-BOM编码。除此之外,其可自定义程度高。选择Perl 6作为你的语言以获得更好的效果。要将其设置为默认,请到文件,配置,找到“core:”,并在下面添加:“customFileTypes: "source.perl6"。["txt""gui"]",比如[https://discuss.atom.io/t/how-do-i-make-atom-recognize-a-file-with-extension-x-as-language-y/26539 这个例子]。 **[https://www.sublimetext.com/ Sublime Text]. There is an extension for it released by the developers of Imperator which could be used with CK3: [https://forum.paradoxplaza.com/forum/index.php?threads/sublime-tools-for-imperator.1274246/ Sublime Tools]. It adds colored highlighting for effects and triggers. If you want to toggle comments in Sublime, you also need to add [https://cdn.discordapp.com/attachments/563655919892692996/649656191173263370/PDXComments.tmPreference this file] to the same "User" folder. *'''总是通过 error.log 文件检查mod运行中出现的bug'''。<nowiki>...\Documents\Paradox Interactive\Crusader Kings III\logs</nowiki> *'''The log folder also contains lists of effects, triggers and scopes.''' Use "script_docs" and "DumpDataTypes" console commands in the game to generate them. *'''Start the game with -debug_mode -develop''' launch options to use the console and "reload gui", "reload gfx" commands. **On Steam: right-click the game on Steam -> Properties -> Set Launch Options -> add -debug_mode -develop **Windows: Create a shortcut for the .exe file -> right-click it -> Properties -> add -debug_mode -develop at the end of the Target field *'''CK3文件夹在Linux系统的路径 ''' <nowiki>~/.local/share/Paradox Interactive/Crusader Kings III</nowiki> *Clearly communicate whether your mod is ironman-friendly to players. *Remove your local mod when you subscribe to the Steam version, otherwise it may not work in the game. *Backup your work. Either manually or with a source control system like Git. Also consider using GitHub for team collaboration. *Use a proper merge tool (like [https://winmerge.org/?lang=en WinMerge]) to merge between folders and update modified files for a new patch. *If you're replacing text across dozens or hundreds lines of code, you may want to use regular expressions. They are available in all of the text editors above. Learning resources: [https://regexone.com/ RegexOne], [https://regexr.com/ RegExr]. ===本地化文件=== *本地化文件夹中的yml后缀结尾的文件必须以'''UTF-8 + BOM'''编码保存,以便游戏正确读取。 *为了保证游戏正确读取文件,文件名需要以'''*l_<language>.yml'''形式保存。例如'''council_l_english.yml'''。 * To overwrite existing localization values, put your files with changes into a folder named "replace" within the localization folder. ==Creating a mod== {{main|Mod structure#Creating initial files}} It is recommended to use the game launcher to create the mod's initial files. ==上传/更新模组== 再次上传您的模组更新, #打开启动器, #导航到“Mods”部分, #点击“Mod工具”,从下拉菜单中选择你的模组。 #选择什么平台上传它。 #输入任何描述。(如果更新,请确保启动器从网站上复制最新的描述。) #添加一个缩略图 #*对于Steam创意工坊,把thumbnail.png放在mod文件夹里。使用1:1的比例,最大1MB。创意工坊显示的最大缩略图约为600x600像素。 #*对于Paradox Mods,将缩略图拖到描述下方的区域。建议最小尺寸为900x500,png或jpg,最大1MB。 #点击“上传MOD”。 #*在Steam上,模组将以私人模式上传,并出现在你的Steam资料->创意工坊项目中。打开它,并将侧栏上的可见性改为 “公开”,即可实际发布。 #*在Paradox Mods上,mod将在验证过程后被发布。你可能需要编辑你的描述,因为网站通常会删除换行符和BBCode格式。 ==保存修改的内容== Save files are located in: *Windows: Documents\Paradox Interactive\Crusader Kings III\save games *Linux: ~/.local/share/Paradox Interactive/Crusader Kings III/save games ''It is not possible to edit an ironman save!'' First start the game in the debug mode and save. *On Steam: right-click the game on Steam -> Properties -> Set Launch Options -> add -debug_mode *Windows: Create a shortcut for the .exe file -> right-click it -> Properties -> add -debug_mode at the end of the Target field PC(Windows): #Find the save file in the save games folder. #Right-click the save file and extract it like an archive with 7-Zip or WinRar. #将提取出的'gamestate'文件的扩展名重名为.ck3 #Right-click it and open with your text editor (Windows Notepad is not recommended as the save files are very big). #Edit the file and save it. #游戏中会直接加载mod(不需要重复压缩)。 Autosaves can be edited directly without extracting the gamestate. Mac: #打开终端 #确认当前路径是正确的 #输入命令 "unzip FileName.ck3" #将提取出的'gamestate'文件的扩展名重名为.ck3 #保存此纯文本 #游戏中会直接加载mod(不需要重复压缩) {| class="wikitable" !平台!!保存方式!!路径 |- |Windows||本地||<code>C:\Users\%USERPROFILE%\Documents\Paradox Interactive\Crusader Kings III\save games</code> |- |Windows||Steam 云端||<code>C:\Program Files (x86)\Steam\userdata\####\1158310\remote\save games</code> |- |Mac||本地||<code>$HOME/Documents/Paradox Interactive/Crusader Kings III/save games</code> |- |Linux||本地||<code>$HOME/.local/share/Paradox Interactive/Crusader Kings III/save games</code> |} ===Contents of the gamestate file=== The table below contains the possible first-level blocks in the gamestate file. Entries are provided in order of appearance. {| class="wikitable" !Block !Description |- |meta_data |Contains metadata about the game, such as the game version. Used by the main menu screen. |- |ironman_manager |Related to ironman saving. |- |(various variables) |These variables do not belong in a block. {| class="wikitable" !Variable |- |date |- |bookmark_date |- |first_start |- |speed |- |random_seed |- |random_count |} |- |variables |Contains script flags. |- |game_rules |Contains the save's current game rules. |- |provinces |Contains province data, including buildings. |- |landed_titles |Contains the following sub-blocks: {| class="wikitable" !Sub-block !Description |- |dynamic_templates | |- |landed_titles<br>''(repetition)'' |Contains an entry for each landed title in the game, in the format: <pre> # Exact formatting in file is different in terms of spaces and lines # It is usually more compact. # It has been edited here for clarity and demonstration. # Index for titles starts at 0 index={ key="(title id)" # The one used in 00_landed_titles.txt, e.g. k_england de_facto_liege=(title index) # Optional de_jure_liege=(title index) # Optional. The number at the start of a similar block, NOT the title id de_jure_vassals={ (title index...) } # Optional, list of title indices. holder="(character id)" # Optional name="..." adj="..." # Optional pre="..." # Optional article="..." # Optional date=2020.10.27 # yyyy.mm.dd heir={ (character id...) } # Optional. List of character ids. claim={ (character id...) } # Optional history = { (...) } # Optional capital=(province id) capital_barony=yes # Optional theocratic_lease=yes # Optional history_government="(government id)" # Optional laws={ "(law id)"... } # Optional. List of law ids. # Optional (succession_election). succession_election={ electors = { (character id...) } candidates={ (character id...) } nominations={ { elector=(character id) candidate=(character id) strength=(value) } } } # end of succession_election block coat_of_arms_id=(coat of arms id) localization_key="(localization key)" # Optional # All below is used for mercenary bands special={ type=mc identity=(id) } color=rgb { (r) (g) (b) } landless=yes destroy_if_invalid_heir=yes no_automatic_claims=yes definite_form=yes } </pre> In vanilla CK3, this block ends at entry ~12369. |- |index=(value)<br>''(variable)'' | |} |- |dynasties |Contains the following sub-blocks: *dynasty_house (ends at entry ~6401) *dynasties (ends at entry ~6239) *static_dynasties (list of numbers) *static_dynasty_houses (list of numbers) |- |deleted_characters | |- |living |Contains entries of living characters. The following format is used for each character: <pre> index={ first_name="..." birth=(date) female=yes # Optional culture=(culture index) faith=(faith index) dynasty_house=(dynasty house index) # Optional skill={ (diplomacy) (stewardship) (martial) (intrigue) (learning) (prowess) } # One value for each skill sexuality=(sexuality id) # Optional dna="(dna string)" # Optional mass=(value) # Optional traits={ (trait index...) } # List of trait indices inactive_traits = { (trait index...) } # Optional. List of trait indices # Optional (family_data) family_data={ primary_spouse=(character id) spouse=(character id) child = { (character id...) } # List of character ids } alive_data={ # Optional (variables), contains flags variables={ data={ # (...) } } gold=(value) # Optional income=(value) # Optional location=(landed title index) # Optional fertility=(value) health=(value) piety={ currency=(value) accumulated=(value) # Optional } prestige={ currency=(value) accumulated=(value) # Optional } weight_update=(value) } # End of alive_data block court_data={ # All keys within this block are optional employer=(character id) council_task=(council task index) regiment=(regiment index) knight=yes } # Optional (landed_data) landed_data={ domain={ (landed title index...) } # List of landed title indices vassal_contracts={ (values) } # List of values became_ruler_date=(date) laws={ "(law id)"... } # List of law ids strength=(value) balance=(value) succession={ (character id...) } # List of character ids domain_limit=(value) vassal_limit=(value) vassals_towards_limit=(value) government="(government id)" realm_capital=(value ai_allowed_to_marry=yes council={ (value...) } # List of values at_peace_penalty=(value) diplo_centers={ (value...) } # List of values election_titles={ (landed title index...) } # List of landed title indices } # End of landed_data block # Optional (playable_data) playable_data={ knights={ (character id...) } # List of character ids was_player=yes } } </pre> |- |dead_unprunable |Contains character entries. |- |characters |Contains the following sub-blocks: *dead_prunable (contains character entries) *prune_queue *dummy_female (contains a character entry) *dummy_male (contains a character entry) *unborn (contains unborn data entries) *natural_deaths *current_natural_death *sexuality_chances |- |character_lookup | |- |units | |- |activities | |- |opinions |Contains the following sub-blocks: *active_opinions (contains opinion entries) |- |relations |Encompasses hooks, alliances, Contains the following sub-blocks: *active_relations |- |schemes |Contains the following sub-blocks: *active (contains scheme entries) |- |stories |Contains the following sub-blocks: *active (contains story entries) *next=(date) ''(variable)'' |- |pending_character_interactions |Contains the following sub-blocks: *data *player |- |secrets |Contains the following sub-blocks: *secrets (contains entries of secrets) ''(repetition)'' *known_secrets |- |armies |Contains the following sub-blocks: *regiments *army_regiments *armies |- |religion |Contains the following sub-blocks: *religions *faiths *great_holy_wars *holy_sites |- |wars |Contains the following sub-blocks: *active_wars *names |- |sieges |Contains the following sub-blocks: *sieges ''(repetition)'' |- |raid |Contains the following sub-blocks: *raid ''(repetition)'' |- |succession | |- |holdings | |- |ai |Contains the following sub-blocks: *war_coordinator_db *war_plan_db *ai_stategies |- |county_manager |Contains the following sub-blocks: *counties *monthly_increase (list of values) |- |fleet_manager |Contains the following sub-blocks: *fleets |- |council_task_manager |Contains the following sub-blocks: *active |- |important_action_manager |Contains the following sub-blocks: *active |- |faction_manager |Contains the following sub-blocks: *factions |- |culture_manager |Contains the following sub-blocks: *cultures *template_cultures (list of numbers) *era_discovery |- |mercenary_company_manager |Contains the following sub-blocks: *mercenary_companies |- |holy_orders |Contains the following sub-blocks: *holy_orders *religion_name *faith_name |- |coat_of_arms |Contains the following sub-blocks: *coat_of_arms_manager_name_map *coat_of_arms_manager_database (ends at entry ~17278) *next_id=(id) ''(variable)'' |- |(triggered events) |Each triggered event has its own block, started using triggered_event={ |- |next_player_event_id=(value) ''(variable)'' | |- |played_character |Contains the following sub-blocks: *name="..." ''(variable)'' *character=(character id) ''(variable)'' *player=(value) ''(variable)'' *important_decisions *legacy *rally_points |- |currently_played_characters={ (character id...) } |List of character ids. |} ==Extracting files From Microsoft Store version== If you want to read the files using the Microsoft Store version, you can use a program called UWPDumper to extract the files. #Download the latest x64 binary of [[Modding#Tools & utilities|UWPDumper]] #Enable Developer Mode (Windows Settings -> Update and Security -> For Developers -> Developer Mode). #Run CK3. #Run UWPInjector.exe from the program you just downloaded. #Enter the number next to ck3.exe : ParadoxInteractive.ProjectTitus_zfnrdv2de78ny as the processID. #Check where it is going to store the files (probably somewhere like C:\Users\%USERPROFILE%\AppData\Local\Packages\ParadoxInteractive.ProjectTitus_zfnrdv2de78ny\TempState\DUMP #Wait for the program to finish. The files should then be present in the directory specified earlier. If you want to edit the files, create a mod and copy the desired files there. ==工具与实用程序== *[[Exporters]] (Maya and Photoshop) *[https://forum.paradoxplaza.com/forum/threads/information-and-faq.924764/ Clausewitz Maya Exporter]: 一个可以创建和导出3D模型并且在CK3和其他Clausewitz游戏中使用的工具。 *[https://github.com/Wunkolo/UWPDumper UWPDumper]:一个从微软商店游戏中提取文件的工具。 ==外部链接== *[https://forum.paradoxplaza.com/forum/forums/crusader-kings-iii-user-mods.1080/ CK3 User Mods] P社论坛 *[https://discord.gg/ck3 Crusader Kings] 官方Discord模组频道。Go to the server-roles channel and choose CK3 Modding in the [https://discordapp.com/channels/616881873506795550/710484698924711976/710490306788982804 Channel Access post]. *[https://discord.gg/apEvxDZ CK3 Mod Coop] A community Discord server dedicated to modding for CK3. <br> {{Modding navbox}} [[Category:模组制作]] [[en:Modding]] {{Mechanics navbox}}
摘要:
请注意您对十字军之王3百科的所有贡献都被认为是在知识共享署名-非商业性使用-相同方式共享下发布,请查看在
十字军之王3百科:版权
的细节。如果您不希望您的文字被任意修改和再散布,请不要提交。
您同时也要向我们保证您所提交的内容是您自己所作,或得自一个不受版权保护或相似自由的来源。
未经许可,请勿提交受版权保护的作品!
为防止机器编辑,请完成下方验证
取消
编辑帮助
(在新窗口中打开)
Template:Ambox 2020
(
编辑
)
Template:Cite file
(
编辑
)
Template:Clear
(
编辑
)
Template:Hover box
(
编辑
)
Template:Main
(
编辑
)
Template:Mechanics navbox
(
编辑
)
Template:Modding navbox
(
编辑
)
Template:Navbox
(
查看源代码
)(受保护)
Template:Navboxgroup
(
编辑
)
Template:Version
(
查看源代码
)(受保护)
Template:悬停
(
编辑
)
Template:需要翻译
(
编辑
)
×
登录
密码
记住登录
加入十字军之王3百科
忘记密码?
其他方式登录