控制台指令

本页面所适用的版本可能已经过时,最后更新于1.0
咯咯炀讨论 | 贡献2020年9月17日 (四) 23:28的版本 →‎Cheats

This page lists the codes that may be input into the Console Window, a special debugging window that may be accessed on non-ironman games whilst in debug mode by pressing Shift+2, ALT+2+1, Shift+3,§, ~, ^, °, ², or ` (key varies based upon keyboard layout). For QWERTY keyboards, the key is `. Otherwise, Shift + Alt + C may work if the combinations above did not. Press the up or down arrow keys to traverse through previously executed commands. Many codes can be turned off by repeating the command, but sometimes reloading the save or exiting the game is necessary.

Character IDs can be seen by hovering the cursor over a character with debug mode enabled.

调试模式

调试模式是游戏中对用户隐藏的一组工具。它们允许玩家在正常游玩的时候修改游戏。调试模式包含以下工具:

  • 控制台端口(用于玩家输入指定命令)
  • 调试菜单(包括Portrait Editor,GUI Editor,Tweak Menu等)
  • 调试信息(显示有关角色,隐藏的事件和互动)
  • 调试互动(玩家可以立即更改意见、囚禁等)
  • ^Ctrl + 点击肖像将控制角色,而 Alt +点击肖像将杀死他们。

Enabling debug mode

Debug mode must be enabled upon launching the game. It can also be disabled within the Console Window.

Steam

若需要在steam运行调试模式,需要在steam库里面,右键该游戏,然后点击属性,在 [常规] 选项里面点击 [设置启动选项...] ,将 [-debug_mode] 添加到启动项里面。此操作需要重启游戏。

Without Steam

在不使用steam平台打开游戏的情况下,可以通过在ck3文件夹的binaries文件夹里面找到ck3.exe,右键它发送到桌面快捷方式,然后右键桌面的ck3图标并点击属性,在目标那一栏里面的最后面,空格一下然后输入[-debug_mode],然后应用即可。

Xbox game pass

For the Xbox gamepass edition/windows 10 store edtion it's a tad more complicated, as you cannot create a normal shortcut for it, so you'll have to run the following commands in Command Prompt every time you open the game:

start shell:AppsFolder\ParadoxInteractive.ProjectTitus_zfnrdv2de78ny!App -debug_mode

Suffice you don't want to run Command Prompt every time, you can create a batch (.bat) file to execute the aforementioned command instead, that can run from your desktop. To create a simple batch file on Windows 10, follow these steps:

  • Open Start.
  • Search for Notepad, and click the top result to start the app.
  • Paste in the aforementioned command.
  • Click the File menu.
  • Select the Save As option or ^Ctrl + ⇧Shift + S.
  • Type a name for the script, for example "ck3debug.bat". whatever you call it, it must end in .bat
  • Select Desktop for location.
  • Click save and you're done!

Cheats

下面是控制台的命令,可用于玩家作弊,而不是仅仅用于测试为目的。They are different from scripted commands. 注意,在调试窗口打开时,按下 ⇆Tab 将显示指令列表,在输入选择的指令后,按下 ⇆Tab 将在调试窗口中显示适用于该指令的参数。

指令 效果 参数 举例
age 添加 [指定数值] 的年龄到 [角色id], 如果没有指定角色id则默认为玩家角色,数字前面添加“-”为减少年龄。 [指定数值] [角色id] age 20
add_claim 添加宣称 [头衔id] 到 [角色id] 上, 如果没有指定角色id则默认为玩家角色。 [头衔id] [角色id] add_claim e_hre
add_doctrine 添加 [教义id] 到 [信仰id] 中,如果没有指定信仰则默认为玩家角色的信仰。按下 ⇆Tab 将显示所有教义ID。 [教义id] [信仰id] add_doctrine doctrine_pluralism_fundamentalist catholic
add_dread 添加恐惧值 [指定数值] 到 [角色id] , 如果没有指定角色id则默认为玩家角色。 [指定数值] [角色id] add_dread 100
add_maa 添加兵士的 [军团 id] 给 [角色id],如果没有指定角色id则默认为玩家角色。 [军团id] [角色id] add_maa bowmen
add_perk 添加 [技能id] 到 [角色id] ,如果没有指定角色id则默认为玩家角色。按下 ⇆Tab 将显示所有技能ID。 [技能id] [角色id] add_perk thoughtful_perk
add_piety 给玩家添加 [指定数值] 的虔诚,数字前面添加“-”为减少虔诚,默认输入此命令得到1000虔诚。 [指定数值] add_piety 9000
add_prestige 给玩家添加 [指定数值] 的声望,数字前面添加“-”为减少声望,默认输入此命令得到1000声望。 [指定数值] add_prestige 16000
add_realm_law [法律id] 在 [角色id] 的领地通过 ,如果没有指定角色id则默认为玩家角色的领地。按下 ⇆Tab 将显示所有法律ID。 [法律id] [角色id] add_realm_law crown_authority_3
add_realm_law_skip_effects [法律id] 在 [角色id] 的领地添加 ,如果没有指定角色id则默认为玩家角色的领地。按下 ⇆Tab 将显示所有法律ID。 [法律id] [角色id] add_realm_law_skip_effects crown_authority_3
add_relation [关系id] 被添加到 [角色id] 和 [角色id] 之间 ,如果只指定了一个角色,则默认为指定角色和玩家角色之间添加关系。 [关系id] [角色id] add_relation friend 1234
add_secret 给角色添加 [秘密id] 。 [秘密id] add_secret secret_witch
add_stress 增加 [指定数值] 的压力给 [角色id]。如果没有指定角色id则默认为玩家角色,数字前面添加“-”为减少压力。 [指定数值] [角色id] add_stress 50
add_title_law [头衔id] 添加 [继承法id](仅开发人员!)。 [头衔id] [法律id] add_title_law e_hre feudal_elective_succession_law
add_trait [特质id] 被添加到 [角色id],如果没有指定角色id则默认为玩家角色。 [特质id] [角色id] add_trait witch
add_lifestyle_xp_all 添加 [指定数值] 的生活方式经验到 [角色id],如果没有指定角色id则默认为玩家角色。默认输入此命令得到1000经验。 [指定数值] [角色id] add_lifestyle_xp_all 2000
add_diplomacy_lifestyle_xp 添加 [指定数值] 的外交生活方式经验到 [角色id],如果没有指定角色id则默认为玩家角色。经验默认输入此命令得到1000经验。 [指定数值] [角色id] add_diplomacy_lifestyle_xp 2000
add_martial_lifestyle_xp 添加 [指定数值] 的军事生活方式经验到 [角色id],如果没有指定角色id则默认为玩家角色。默认输入此命令得到1000经验。 [指定数值] [角色id] add_martial_lifestyle_xp 2000
add_stewardship_lifestyle_xp 添加 [指定数值] 的管理生活方式经验到 [角色id],如果没有指定角色id则默认为玩家角色。默认输入此命令得到1000经验。 [指定数值] [角色id] add_stewardship_lifestyle_xp 2000
add_intrigue_lifestyle_xp 添加 [指定数值] 的谋略生活方式经验到 [角色id],如果没有指定角色id则默认为玩家角色。默认输入此命令得到1000经验。 [指定数值] [角色id] add_intrigue_lifestyle_xp 2000
add_learning_lifestyle_xp 添加 [指定数值] 的学识生活方式经验到 [角色id],如果没有指定角色id则默认为玩家角色。默认输入此命令得到1000经验。 [指定数值] [角色id] add_learning_lifestyle_xp 2000
change_culture 改变 [伯爵领id] 的文化为 [文化id]。 [伯爵领id] [文化id] change_culture 496 swedish
change_development_level 添加 [指定数值] 的发展度到 [伯爵领id],如果没有指定伯爵领则默认为玩家角色的首都,数字前面添加“-”为降低发展度。 [指定数值] [伯爵领id] change_development_level 100 496
change_fervor 添加 [指定数值] 的宗教热情到 [信仰id],如果没有指定信仰则默认为玩家角色的信仰,数字前面添加“-”为降低宗教热情。默认数值为10。 [指定数值] [信仰id] change_fervor 100 catholic
change_diplomacy 添加 [指定数值] 的外交能力到 [角色id],如果没有指定角色id则默认为玩家角色,数字前面添加“-”为减少能力数值。 [指定数值] [角色id] change_diplomacy 16
change_martial 添加 [指定数值] 的军事能力到 [角色id],如果没有指定角色id则默认为玩家角色,数字前面添加“-”为减少能力数值。 [指定数值] [角色id] change_martial 16
change_stewardship 添加 [指定数值] 的管理能力到 [角色id],如果没有指定角色id则默认为玩家角色,数字前面添加“-”为减少能力数值。 [指定数值] [角色id] change_stewardship 16
change_intrigue 添加 [指定数值] 的谋略能力到 [角色id],如果没有指定角色id则默认为玩家角色,数字前面添加“-”为减少能力数值。 [指定数值] [角色id] change_intrigue 16
change_learning 添加 [指定数值] 的学识能力到 [角色id],如果没有指定角色id则默认为玩家角色,数字前面添加“-”为减少能力数值。 [指定数值] [角色id] change_learning 16
change_prowess 添加 [指定数值] 的勇武能力到 [角色id],如果没有指定角色id则默认为玩家角色,数字前面添加“-”为减少能力数值。 [指定数值] [角色id] change_prowess 16
clear_character_modifiers 移除 [角色id] 的所有角色修正,如果没有指定角色id则默认为玩家角色。 [角色id] clear_character_modifiers
clear_title_laws 移除 [头衔id] 的所有头衔继承法。 [头衔id] clear_title_laws e_hre
clear_traits 移除 [角色id] 的所有特质,如果没有指定角色id则默认为玩家角色。 [角色id] clear_traits
discover_all_eras [角色id] 的文化发现所有革新,如果没有指定角色id则默认为玩家角色。 [角色id] discover_all_eras
discover_era 玩家角色的文化进入 [时代id] 同时发现该时代的所有革新。按下 ⇆Tab 将显示所有时代ID。默认为当前时代。 [时代id] discover_era culture_era_early_medieval
discover_fascination [角色id] 的当前文化偏好被发现,如果没有指定角色id则默认为玩家角色。 [角色id] discover_fascination
discover_innovation [革新id] 被 [角色id] 的文化发现 ,如果没有指定角色id则默认为玩家角色。按下 ⇆Tab 将显示所有革新ID。 [革新id] [角色id] discover_innovation innovation_motte
dynasty_prestige 添加 [指定数值] 的宗族威望到 [宗族id],如果没有指定宗族则默认为玩家角色的宗族,数字前面添加“-”为减少宗族威望。默认数值为1000。 [指定数值] [宗族id] dynasty_prestige 100000
end_schemes 所有针对玩家角色的计谋被放弃。 end_schemes
event 触发 [事件id]。 [事件id] event lifestyle_nicknames.0001
gain_all_dynasty_perks [角色id] 的宗族获得所有宗族传承,如果没有指定角色id则默认为玩家角色。 [角色id] gain_all_dynasty_perks
gain_all_perks [角色id] 获得所有生活方式技能,如果没有指定角色id则默认为玩家角色。 [角色id] gain_all_perks
give_title 添加 [头衔id] 给 [角色id],如果没有指定角色id则默认为玩家角色。 [头衔id] [角色id] give_title e_hre
gold 添加 [指定数值] 的金钱给玩家,数字前面添加“-”为减少金钱,默认输入此命令得到1000金钱。 [指定数值] add_gold 500
instabuild 玩家角色直辖领地内的地产和建筑一天建成。再次输入则失效。 instabuild
instant_birth 怀孕持续一天。再次输入则失效。 instant_birth
join_era [角色id] 的文化进入 [时代id],如果没有指定角色id则默认为玩家角色。按下 ⇆Tab 将显示所有时代ID。 [时代id] join_era culture_era_high_medieval
kill 杀死 [角色id],如果没有指定角色id则默认杀死玩家角色。 [角色id] kill
know_schemes 发现针对玩家角色的所有计谋。 know_schemes
merge_culture 改变 [文化id] 下所有伯爵领的文化为 [文化id]。 [文化id] [文化id] merge_culture greek swedish
pregnancy 使女性 [角色id] 怀孕,父亲为 [角色id],如果没有指定父亲角色id则父亲未知。 [角色id] [角色id] pregnancy 1234
remove_doctrine [教义id] 在 [信仰id] 中被移除,如果没有指定信仰则默认为玩家角色的信仰。按下 ⇆Tab 将显示所有教义ID。 [教义id] [信仰id] remove_doctrine doctrine_pluralism_righteous catholic
remove_nick 移除 [角色id] 的当前绰号,如果没有指定角色id则默认为玩家角色。 [角色id] remove_nick
remove_relation 移除 [关系id]([角色id] 和 [角色id] 之间的),如果只指定了一个角色,则默认为指定角色和玩家角色之间移除关系。 [关系id] [角色id] remove_relation friend 1234
remove_trait [特质id] 从 [角色id] 上移除 ,如果没有指定角色id则默认为玩家角色。按下 ⇆Tab 将显示所有特质ID。 [特质id] [角色id] remove_trait witch
set_culture [角色id] 的文化改变为 [文化id],如果没有指定角色id则默认为玩家角色。按下 ⇆Tab 将显示所有文化ID。 [文化id] [角色id] set_culture swedish
set_dread [角色id] 的恐怖值设定为 [指定数值],如果没有指定角色id则默认为玩家角色。 [指定数值] [角色id] set_dread 100
set_faith [角色id] 的信仰改变为 [信仰id],如果没有指定角色id则默认为玩家角色。按下 ⇆Tab 将显示所有信仰ID。 [信仰id] [角色id] set_faith catholic
set_focus [角色id] 的重心设定为 [重心id],如果没有指定角色id则默认为玩家角色。 [重心id] [角色id] set_focus diplomacy_majesty_focus
set_nick 添加 [绰号id] 给 [角色id],如果没有指定角色id则默认为玩家角色。 [绰号id] [角色id] set_nick nick_the_lazy
set_sexuality [角色id] 的性取向改变为 [性取向id],如果没有指定角色id则默认为玩家角色 [重心id] [角色id] set_sexuality bisexual
set_stress [角色id] 的压力设定为 [指定数值],如果没有指定角色id则默认为玩家角色 [指定数值] [角色id] set_stress 0
set_diplomacy [角色id] 的外交能力设定为 [指定数值],如果没有指定角色id则默认为玩家角色 [指定数值] [角色id] set_diplomacy 16
set_martial [角色id] 的军事能力设定为 [指定数值],如果没有指定角色id则默认为玩家角色 [指定数值] [角色id] set_martial 16
set_stewardship [角色id] 的管理能力设定为 [指定数值],如果没有指定角色id则默认为玩家角色 [指定数值] [角色id] set_stewardship 16
set_intrigue [角色id] 的谋略能力设定为 [指定数值],如果没有指定角色id则默认为玩家角色 [指定数值] [角色id] set_intrigue 16
set_learning [角色id] 的学识能力设定为 [指定数值],如果没有指定角色id则默认为玩家角色 [指定数值] [角色id] set_learning 16
set_prowess [角色id] 的勇武能力设定为 [指定数值],如果没有指定角色id则默认为玩家角色 [指定数值] [角色id] set_prowess 16
yesmen AI角色接受所有提议。再次输入则失效。 yesmen

Testing commands

Testing commands are used for developer, beta tester or modder testing.

指令 效果 参数 举例
clear 清除控制台历史输入。 clear
effect 执行脚本效果。 [效果脚本] effect test
faction_spawn 生成 [派系类型],如果存在有效的省份或廷臣来建立它。 [派系类型] faction_spawn peasant_faction
generate_cadet_coa 为玩家角色的家族生成一个新的盾徽。 generate_cadet_coa
help 输出 [指令] 的相关描述,如果为空则列出所有控制台指令。 [指令] help help
instamove 军队每一天移动一个男爵领。(同时影响AI和玩家) instamove
map_editor 打开地图编辑器。 map_editor
nomen AI角色拒绝所有提议。再次输入则失效。 nomen
observe 进入观察者模式。 observe
play 切换角色为 [角色id]。 [角色id] play 1234
portrait_editor 打开肖像编辑器。 portrait_editor
run 执行 [文件名称] 中的指令。txt文件必须位于Documents/Paradox Interactive/Crusader Kings III/run run test.txt
set_is_ai 允许AI控制 [角色id]。 [角色id] set_is_ai 1234
set_is_player 禁止AI控制 [角色id]。 [角色id] set_is_player 1234

特质ID

主条目:Traits

All traits have an ID that is referenced internally by the game. They can be found in game\common\traits\00_traits.txt. A trait's ID typically matches its name. To get a trait's ID from its name, perform the following steps:

  • If a trait displays two names in-game, use the one in brackets
  • Replace spaces ( ) and dashes (-) with underscores (_)
  • Remove all apostrophes (')
  • Turn all upper case letters into lower case (A...Z->a...z)

Traits that do not follow this pattern have been listed below for reference.

教育特质 ID
天真的绥靖者 education_diplomacy_1
合格的谈判者 education_diplomacy_2
魅力非凡的说客 education_diplomacy_3
幕后操控人 education_diplomacy_4
鲁莽的战士 education_martial_1
坚强的战士 education_martial_2
优秀战术家 education_martial_3
天才军事家 education_martial_4
放荡的浪子 education_stewardship_1
节俭的职员 education_stewardship_2
财富创造者 education_stewardship_3
点石成金者 education_stewardship_4
业余阴谋家 education_intrigue_1
浮夸的诈骗师 education_intrigue_2
暗中策划者 education_intrigue_3
难以捉摸的影子 education_intrigue_4
尽职的书吏 education_learning_1
有见地的思想家 education_learning_2
明睿的智者 education_learning_3
哲学大师 education_learning_4
笨手笨脚的扈从 education_martial_prowess_1
自信的骑士 education_martial_prowess_2
令人敬畏的方旗骑士 education_martial_prowess_3
著名勇士 education_martial_prowess_4
先天特质 ID
其貌不扬 beauty_bad_1
丑陋不堪 beauty_bad_2
面目狰狞 beauty_bad_3
眉清目秀 beauty_good_1
螓首蛾眉 / 英姿飒爽 beauty_good_2
倾国倾城 beauty_good_3
迟钝 intellect_bad_1
愚笨 intellect_bad_2
痴呆 intellect_bad_3
敏锐 intellect_good_1
聪慧 intellect_good_2
天才 intellect_good_3
纤弱 physique_bad_1
脆弱 physique_bad_2
衰弱 physique_bad_3
硬朗 physique_good_1
健壮 physique_good_2
阿玛宗 / 海格力斯 physique_good_3
抑郁症患者 depressed_1 / depressed_genetic
精神错乱 lunatic_1 / lunatic_genetic
附身 possessed_1 / possessed_genetic
生活特质 ID
立志的剑客 blademaster_1
刀剑大师 blademaster_2
传奇剑圣 blademaster_3
新手猎人 hunter_1
猎人 hunter_2
狩猎大师 hunter_3
智者 / 女智者 mystic_1
神秘主义者 mystic_2
行奇迹者 mystic_3
热切的狂欢者 reveler_1
著名的狂欢者 reveler_2
传奇的狂欢者 reveler_3
新手医生 physician_1
医生 physician_2
著名医师 physician_3
顾家男人 / 顾家女人 family_first
其他特质 ID
弑族亲者 kinslayer_1
弑亲族者 kinslayer_2
弑至亲者 kinslayer_3
受伤 wounded_1
身受重伤 wounded_2
严重撕裂 wounded_3
不育 / 不孕 infertile
修士 / 修女 devoted
十字军战士
圣战士
信仰勇士
faith_warrior
圣君 crusader_king
肺炎 pneumonic
足内翻 clubfooted
救主 savior
先知的血脉(未生效) blood_of_prophet
劫掠者 / 维京 viking
/ Early Great Pox (mimics Lover's Pox) early_great_pox

Title IDs

主条目:Titles

All titles have an internal title ID that can be found in game\common\landed_titles\00_landed_titles.txt. Title IDs have a prefix based on their rank, followed by an underscore (_) and then their name.

等级 前缀 举例
 Barony b_ Wigmore -> b_wigmore
 County c_ Sundgau -> c_sundgau
 Duchy d_ Sicily -> d_sicily
 Kingdom k_ Denmark -> k_denmark
 Empire e_ Persia -> e_persia

Title IDs can also be seen in their respective title lists:

Finding title IDs based on in-game name

The title ID may not match the title's name in-game. For example, the player may have their game set to a language other than English or a title has a culture-specific name. Use the following steps to find a title ID purely on its in-game name:

  • Navigate to the file located at game\localization\LANGUAGE\titles_l_LANGUAGE.yml, replacing LANGUAGE with your game language.
  • Open the file with a text editor like Notepad++ and search for any instances of the in-game name using ^Ctrl + F.
  • If you managed to find a match:
    • The line should look similar to b_my_barony_name:0 "In-game name for barony".
    • The title ID is the word before the :0, therefore being b_my_barony_name in this example.
  • If you could not find a match:
    • Close the file.
    • In the same folder as the previous file, open the file titles_cultural_names_l_LANGUAGE.yml, replacing LANGUAGE appropriately.
    • Repeat your search for the title's in-game name in this file.
    • When you find a match, it should look like so: cn_lunden:0 "Lunden".
    • Remember/copy the word before the :0 (in this example, cn_lunden); this is a cultural name key of the title.
    • Close the file.
    • Navigate to the file game\common\landed_titles\00_landed_titles.txt and open it with your text editor.
    • Perform a search for the cultural name key you found in the previous file (e.g., cn_lunden).
    • The search query should land within a block named cultural_names enclosed by curly brackets ({, }).
    • Read the lines above until you reach another start of a block (denoted by b_london = {). Ignore any blocks like color = { or color2 ={.
    • The word in place of b_london is your title ID.

Finding custom title ID

Custom titles (i.e. the title of a player created Empire) do not follow the same naming convention. To find the ID:

  • From the debug console use the command explorer to open Object Browser
  • In Object Browser choose Provider: Landed Titles
  • Enter search term
  • Hover over the Name field to show the title card