CK3可以自行制作决议。决议是伯爵及以上统治者的可选行动。
位置[编辑 | 编辑源代码]
决议代码需写在mod目录中,common\decisions
文件夹的.txt文件里。每个文本文件可包含多个决议。
结构[编辑 | 编辑源代码]
决议结构如下所示:
my_decision = { # 把键值等放在这里 }
键值/区块[编辑 | 编辑源代码]
下表列举出可以使用的键值和区块。布尔值可以是yes或no。
键值/区块 | 数据类型 | 描述 | 示例 |
---|---|---|---|
title | 覆盖标题,默认值:“ <key>”; 支持事件中的动态描述(first_valid,...); 范围:字符 |
title = <key> title = { ... } | |
picture | 字符串(文件名称) | 设置决议的图像 |
picture = "image_name.dds" |
major | 布尔值(yes/no) | 重要;默认值为no。当设置为yes时,该决议将视为重要决议 |
major = yes/no |
ai_goal | 布尔值 | 如果设置,则AI将把此决议视为“目标”,并将其与例如头衔创建和地产建设之类的主要花销放同等地位考虑。
此项会忽略ai_check_interval。 此项只能用于预算十分重要,需要大宗花费的事务。原因是,与设置为高的ai_check_interval相比,其性能较低。 |
ai_goal = yes/no |
ai_check_frequency | 整数 | 设置ai检查此项决议的间隔,以月数表示。
除非决议里已写入ai_goal=yes,否则必须设置。 间隔为0意味着AI永远不会检查此决议。 |
ai_check_frequency = 42 |
selection_tooltip | 从决策列表中选择决策时,覆盖工具提示,默认值:“ <key> _tooltip”; 支持事件中的动态描述(first_valid,...); 范围:字符 |
selection_tooltip = <key> selection_tooltip = { .. } | |
desc | 覆盖描述,默认值:“ <key> _desc”; 支持事件中的动态描述(first_valid,...); 范围:字符 |
desc = <key> desc = { ... } | |
confirm_text | 覆盖确认文本,默认值:“ <key> _confirm”; 支持事件中的动态描述(first_valid,...); 范围:字符 |
confirm_text = <key> confirm_text = { ... } | |
is_shown | 此项确定决议显示在决议栏中所需的条件。 |
is_shown = { ... } | |
is_valid_showing_failures_only | 可以执行决定; 如果它们失败,这些将显示在确认按钮工具提示中; 范围:字符; 默认值:{always = yes} |
is_valid_showing_failures_only = { ... } | |
is_valid | 可以执行决定; 这些将显示在“需求”下的详细视图中; 范围:字符; 默认值:{always = yes} |
is_valid = { ... } | |
cost | 区块 | 设置决议花费的金钱、虔诚和威望。
每项资源的默认值为零。 不用将每项资源都定义出来。 |
cost = { gold = 42 piety = 42 prestige = 42 } |
effect | 区块 | 作出决定时执行的效果; 范围:字符 |
effect = { ... } |
ai_potential | AI执行决议的意愿。 |
ai_potential = { ... } | |
ai_will_do | 返回执行决策的机会百分比。 0将永远不会执行它,100将永远执行它 |
ai_will_do = { ... } | |
widget | 指定最多一个Custom Widgets以嵌入到决策中。 请参阅下面有关Custom Widgets的部分。 |
基本示例[编辑 | 编辑源代码]
custom_decision = { picture = "custom_decision.dds" desc = custom_decision_desc selection_tooltip = custom_decision_tooltip is_shown = { # Put conditions for the decision to show up here. } effect = { # Add effects of the decision here. } ai_check_frequency = 0 # Change this value if you want the AI to consider this decision. }
决议ID[编辑 | 编辑源代码]
Each decision uses an internal ID for reference within the game's files. The internal name of a decision in the game's files can be found by following these steps:
每个决议都使用游戏文件中的内部ID来引用。游戏文件中决议ID可用以下步骤确定:
- 写出决议名称。
- 把所有字母都改为小写形式(
A...Z->a...z
)。 - 用下划线(
_
)代替空格 ( - 在名字末尾添加
_decision。
Decisions with in-game names that do not match their internal name are included in the table below:
游戏内决议名称同内部ID不一致的决议如下表所示:
决议名称 | 决议ID |
---|---|
Call Hunt | start_hunt |
Search for Physician | hire_physician |
Borrow Gold from Holy Order | borrow_from_holy_order |
Challenge the Ruler | tribal_challenge_ruler |
Stop Gaining Weight | stop_gain_weight |
Stop Losing Weight | stop_lose_weight |
Attempt Suicide | commit_suicide |
Return Roma | return_rome |
Determine Bhakti | select_personal_deity |
Give Your Ancestor a Sky Burial | give_sky_burial |
Raise a Runestone | raise_runestone |
Found Holy Order | create_holy_order |
Revoke Holy Order Lease | cancel_holy_order_lease |
Go on a Pilgrimage | go_on_pilgrimage |
Undertake the Hajj | go_on_hajj |
Restore the Kingdom of Cornwall | restore_dumnonia |
Reclaim Constantinople | set_capital_constantinople |
Reclaim Rome | set_capital_rome |
Restore the Papacy | restore_papacy |
Form the Swiss Confederation | form_switzerland_kingdom |
Form Archduchy of Austria | form_austria_kingdom |
Dismantle the Papacy | dismantle_papacy |
Restore Carolingian Borders | reform_carolingian_empire |
Unify the Burgundies | unify_burgundy_kingdom |
Unify Italy | unify_italian_empire |
Adopt Feudalism (unused) | convert_to_feudalism |
Adopt Feudal / Clan Ways through Liege | convert_to_feudalism_liege_converted |
Adopt Feudal / Clan Ways | convert_whole_realm_to_feudalism |
Form the Outremer Empire | create_outremer_empire |
Sell Minor Titles | sale_of_titles |
Restore the Ash'ari Caliphate | restore_sunni_caliphate |
Restore Israel | create_israel_kingdom |
Restore the Faith High Priesthood | jewish_restore_high_priesthood |
Restore the Faith High Priesthood | zoroastrian_restore_high_priesthood |
Become the Saoshyant | become_saoshyant |
Dismantle German Pretenders | dismantle_holy_pretender |
Dismantle Greek Pretenders | dismantle_byz_pretender |
Form the Sultanate of Rum | form_rum_sultanate |
Revive Greater Armenia | create_armenian_empire |
Consecrate Bloodline | declare_bloodline_holy |
Build a Grand Church | build_grand_church |
Faith Cannibalism | accept_cannibalism |
Request Claim on Ireland | england_request_laudabiliter |
Inspire Opus Francigenum | promote_gothic_innovations |
Build a Glass Monument | lunatic_building |
Promote Christian Settlements | promote_hungarian_settlement |
Revive Táltosism | revive_magyar_paganism |
Unite the West Slavs | unite_the_western_slavs |
Unite the South Slavs | unite_the_southern_slavs |
Defenders of High God | defenders_of_highgod |
Found a New Kingdom | found_kingdom |
Found a New Empire | found_empire |
Amnesty for False Conversions | encourage_confession_of_false_conversions |
Restore the Holy Roman Empire | restore_holy_roman_empire |
Adopt Special Succession Type | adopt_special_succession |
Found the Kingdom of Aragon | form_the_kingdom_of_aragon |
Indulge in Drink | stress_loss_drunkard |
Consume Hashish Cakes | stress_loss_hashishiyah |
Visit a Brothel | stress_loss_rakish |
Seclude Yourself | stress_loss_reclusive |
Lash Out | stress_loss_irritable |
Flagellate | stress_loss_flagellant |
Visit the Market | stress_loss_profligate |
Donate to Charity | stress_loss_improvident |
Confess | stress_loss_contrite |
Indulge in Food | stress_loss_comfort_eater |
Shun Food | stress_loss_inappetetic |
Write Thoughts Down | stress_loss_journaller |
Talk to Confidant | stress_loss_confider |
Work off Some Stress | stress_loss_athletic |
Accuse the Krstjani of Heresy | accuse_krstjani_of_heresy |
Prepare to Cross the Carpathians | launch_hungarian_migration |
Restore the Roman Empire | restore_roman_empire (as Byzantine Emperor) restore_roman_empire_holy (as Holy Roman Emperor) restore_roman_empire_italian (as Emperor of Italia) |
Host Grand Rite | host_witch_ritual_decision |
Custom Widgets[编辑 | 编辑源代码]
A custom widget can be embedded into a decision.
GUI files must be placed at the decision_view_widgets path (see paths.settings). The name of the file must match the widget name.
Usually these widgets require a custom controller. This should be documented in the widget's GUI file.
The data context type available in the GUI depends on the controller type.
Available controllers:
Controller Type | Data Context Name | Notes
-------------------+------------------------------------+-----------------------------------------------------------
default | EventWindowWidget | Default controller, no special behavior
create_holy_order | DecisionViewWidgetCreateHolyOrder | Show GUI to customize the new holy order.
文档 | Effects • 触发器 • 修正 • 作用域 • 变量 • 数据类型 • 本地化 • 可定制的本地化 |
脚本 | AI • 剧本 • 角色 • 效果指令 • 内阁 • 文化 • 决议 • 宗族 • 事件 • 政体 • 历史 • 地产 • 生活方式 • 军队 • 宗教 • Story cycles • 头衔 • 特质 |
地图 | 地图 • 地形 |
图形 | 3D模型 • Exporters • 界面 • Coat of arms • Graphical assets • Fonts • Particles • Shaders • Unit models |
音频 | Music • Sound |
其他 | 控制台指令 • 校验码 • 模组结构 • Troubleshooting |