版本 Diff 差异对比
条目:指令 · 对比历史版本与当前版本间的真实 Wikitext 差异
+348 行新增-208 行移除
历史基准版本Rev #102115
(未填写修改说明)
Cghvbnv222024-01-06 12:01:07
当前最新版本Rev #103685
当前线上生效正文
Heiljsf2024-08-05 01:08:49
Wikitext 语法逐行变动
当前版本新增历史版本移除
{{需要翻译|en=Commands}}
:{{Hatnote|这个页面介绍的是改派用到的指令语句,[[控制台指令]](Console commands)请参阅另一页面}}
'''效果(effects)指令''' 用于在特定的[[作用域]](scope)中动态地影响游戏。在早前,这部分被直接称为Effects,现在则是Commands,从而避免与[[Scopes#Effect scopes|效果作用域]]混淆。
指令只能用于特定的作用域上下文(scope contexts),也只能操作特定的值域。否则,就会因“数据类型不一致”而失效。而“数据类型转换”要通过域的转换,而不是指令。因此,要特别注意域上下文是条件(Triggers)、效果(Effects)或者其他段落,也要注意指令用于国家(country)、省份(province)或者其他类型。大体上,指令(Commands)主要用于效果(Effects)域内的国家(country)型或省份(province)型子域。
==多作用域==
{{SVersion|1.24}}
这些效果指令在国家或省份的作用域中都可以被使用。
参照[[Scopes#Dual_scopes]],观察可见,这部分指令都有全局性。与作用域的双重域不同,指令的双重域仍然只能写在效果域上下文内,但是它们的操作目标(上下文中的某个子域)可能是双重的。
- {| width=\"100%\" class=\"wikitable sortable\"
- ! width=\"10%\" |语句
- ! width=\"25%\" |参数
- ! width=\"25%\" |例子
- ! width=\"20%\" |描述
- ! width=\"15%\" |备注
- ! width=\"5%\" |版本
+ {| width="100%" class="wikitable sortable"
+ ! width="10%" |语句
+ ! width="25%" |参数
+ ! width="25%" |例子
+ ! width="20%" |描述
+ ! width="15%" |备注
+ ! width="5%" |版本
|-
|set_global_flag
|<code><flag></code><br>用于标识全局标志
|<code>set_global_flag = my_flag</code> <br> <code>set_global_flag = my_flag@ROOT</code> <br> <code>set_global_flag = my_flag@event_target:name</code>
|定义一个全局标志
|标志可以附加作用域或事件目标
|1.1
|-
|clr_global_flag
|<code><flag></code><br>用于清除全局标志
|<code>clr_global_flag = my_flag</code>
|清除一个全局标志
|
|1.1
|-
|custom_tooltip
|<code><string></code><br>以一段文字代替效果显示
|<code>custom_tooltip = my_tooltip_tt</code>
|以一段文字代替效果显示
|
|1.1
|-
|log
|<code><string></code><br>game.log中的字符串
- |<code>log = \"myVariable: [Root.myVariable.GetValue]\"</code>
+ |<code>log = "myVariable: [Root.myVariable.GetValue]"</code>
|执行时在game.log中显示一个字符串。
|接受所有本地化命令(即[Root.GetName]等)
|1.21
|-
|save_event_target_as
|<code><string></code><br>用于标识事件目标的独特字符串。
|<pre>
capital_scope = {
save_event_target_as = my_province
}
</pre>
|将当前范围另存为关键点。一旦执行结束(即事件结束)就清除。
|使用event_target:<key>确定范围。
|1.8
|-
|save_global_event_target_as
|<code><string></code><br>用于标识全局事件目标的独特字符串。
|<pre>random_country = {
save_global_event_target_as = my_country
}
</pre>
|将当前范围另存为关键点。执行后持续存在,直到通过效果清除。
|使用event_target:<key>确定范围。
|1.8
|-
|clear_global_event_target
|<code><string></code><br>用于清除全局事件目标的独特字符串。
|<code>clear_global_event_target = my_country</code>
|清除特定的全局事件目标。
|
|1.8
|-
|clear_global_event_targets
|<code>yes</code><br>布尔值。
|<code>clear_global_event_targets = yes</code>
|清除所有全局事件目标。
|
|1.8
|-
|show_ambient_object
|<code><string></code><br>用于显示环境对象的独特字符串。
|<code>show_ambient_object = nammi2_hagia_sophia_minarets_entity</code>
|显示<code>map/ambient_objects.txt</code> 文件中隐藏的环境对象。
|
|1.19
|-
|hide_ambient_object
|<code><string></code><br>用于隐藏环境对象的独特字符串。
|<code>hide_ambient_object = nammi2_hagia_sophia_minarets_entity</code>
|在<code>map/ambient_objects.txt</code> 文件中隐藏可见的环境对象。
|
|1.19
|}
==作用域:国家==
{{SVersion|1.24}}
这些指令只能在作用域为国家时使用。
===一般指令===
{{SVersion|1.24}}
- {| width=\"100%\" class=\"wikitable sortable\"
- ! width=\"10%\" |语句
- ! width=\"25%\" |参数
- ! width=\"25%\" |例子
- ! width=\"20%\" |描述
- ! width=\"15%\" |备注
- ! width=\"5%\" |版本
+ {| width="100%" class="wikitable sortable"
+ ! width="10%" |语句
+ ! width="25%" |参数
+ ! width="25%" |例子
+ ! width="20%" |描述
+ ! width="15%" |备注
+ ! width="5%" |版本
|-
|country_event
|<code>id = <id></code><br>
需要触发的事件ID <br>
<code>days = <days></code><br>
可选。 指定天数后触发此事件 <br>
<code>random = <days></code><br>
可选。 加入随机参数,增加触发事件的 ''天数'' 最大值 <br>
<code>tooltip = <string></code><br>
可选。 以本地化文字代替 ''country_event'' 显示效果
|<pre>country_event = {
id = celestial_empire_events.1
days = 30
random = 15
tooltip = CELESTIAL_EMPIRE_TOOLTIP
}</pre>
|当前国家触发一个国家事件
|若以事件效果触发,请注意,不能再触发此事件本身。
|1.1
|-
|add_country_modifier
|<code>name = <name></code><br>
添加一个事件修正 <br>
<code>duration = <days></code><br>
可选。 事件修正的持续时间 <br>
<code>hidden = yes</code><br>
可选。 此修正是否隐藏,是否可以在政府界面中查看到 <br>
<code>desc = <string></code><br>
可选。 添加修正额外的文字描述 <!-- The string used to override the automatic duration string. -->
|<pre>
add_country_modifier = {
name = the_proper_old_ways
duration = -1
desc = PROPER_OLD_WAYS_DESC_TOOLTIP
hidden = yes
}
</pre>
|当前国家添加一个事件修正
|
|1.1
|-
|remove_country_modifier
|<code><modifier></code><br>
移除事件修正
|<code>remove_country_modifier = the_proper_old_ways</code>
|当前国家移除一个事件修正
|
|1.1
|-
|set_country_flag
|<code><flag></code><br>一个特殊的标识
|<code>set_country_flag = my_flag</code> <br> <code>set_country_flag = my_flag@ROOT</code> <br> <code>set_country_flag = my_flag@event_target:name</code>
|定义一个国家标识
|Flags可以作为条件范围与事件目标
|1.1
|-
|clr_country_flag
|<code><flag></code><br>确认一个特殊的标识以清除
|<code>clr_country_flag = my_flag</code>
|清除一个国家标识
|
|1.1
|-
|change_tag
|<code><scope></code><br>
变更控制的TAG
|<code>change_tag = FRA</code><br><code>change_tag = ROOT</code><br><code>change_tag = event_target:my_country</code>
|变更控制的TAG。控制的国家变身为指定的tag。
|
|1.1
|-
|switch_tag
|<code><scope></code><br>
切换控制的TAG
|<code>switch_tag = FRA</code><br><code>switch_tag = ROOT</code><br><code>switch_tag = event_target:my_country</code>
|切换玩家控制的TAG。原本的国家将变为由AI控制。
|
|1.8
|-
|change_graphical_culture
|<code><gfxculture></code><br>
变更的文化配图
|<code>change_graphical_culture = westerngfx</code>
|变更指定国家的文化配图。文化配图包括兵模、顾问肖像等。
|文化配图可见{{path|common/graphicalculturetype.txt}}
|1.11
|-
|add_adm_power
|<code><int></code><br>
增加或减少的君主力量点数
|<code>add_adm_power = 100</code>
|增加行政君主力量点数
|
|1.1
|-
|add_dip_power
|<code><int></code><br>
增加或减少的君主力量点数
|<code>add_dip_power = 100</code>
|增加外交君主力量点数
|
|1.1
|-
|add_mil_power
|<code><int></code><br>
增加或减少的君主力量点数
|<code>add_mil_power = 100</code>
|增加军事君主力量点数
|
|1.1
|-
|set_saved_name
|<code>key = <string></code><br>
保留名字的代号。<br>
<code>type = advisor / simple</code><br>
名称生成类型。Advisor从名称列表中提取,简单地利用name参数。<br>
<code>name = <string></code><br>
要保存在代号下的名称。仅与简单类型一起使用。<br>
<code>scope = <scope></code><br>
从中提取名单的国家/地区范围。仅与''advisor'' 类型一起使用。<br>
|'''Simple:'''<br>
<pre>set_saved_name = {
key = simple_name
type = simple
- name = \"My Simple Name\"
+ name = "My Simple Name"
}
</pre>
<pre>define_ruler = {
name = simple_name
}</pre>
'''Advisor:'''<br>
<pre>set_saved_name = {
key = noble_zealot
type = advisor
scope = ROOT
}
</pre>
<pre>spawn_rebels = {
size = 1
leader = noble_zealot
type = religious_rebels
}</pre>
|将名称保存到唯一代号下以用于其他效果。
|可与 ''define_admiral'', ''define_explorer'', ''define_conquistador'', ''define_general'', ''define_ruler'', ''define_consort'', ''define_heir'', ''define_advisor'', ''spawn_rebels''
一起使用。
|1.23
|-
|clear_saved_name
|<code><key></code><br>
要清除的名称代号。
|<code>clear_saved_name = noble_zealot</code>
|清除已保存的名称。
|在使用保存名称后使用此效果。
|1.23
|-
|add_power_projection
|<code><int></code><br>
要增加的数值
<code>type</code><br>
力量投射的来源类型
|add_power_projection = {
type = mission_rewards_power_projection
amount = 10
}
|获得力量投射
|常用的type有:
mission_rewards_power_projection
任务和事件奖励
zim_african_great_power
后者是不会随时间衰减的。
每个类型的力量投射分别计算年度衰减
|1.31
|-
|change_innovativeness
|<code><int></code><br>
: 创新度增加的数值
|change_innovativeness = 3
|为当前作用域增加(减少)创新度
|数值范围[-100.0, 100.0]
创新度的上限与下限[0.0, 100.0]
|1.25
|-
|complete_mission
|<code><key></code><br>
:任务的标识符
|complete_mission = expand_country_mission
|完成一个任务
|使用此效果时不给予任务奖励。 相反,任务被简单地标记为完成。 它将计入任何需要它的任务,并将在mission_completed 触发器中计为已完成。
|1.25
|-
|swap_non_generic_missions
|<code>yes</code>
布尔值
|swap_non_generic_missions = yes
|刷新非通用任务树
|
|?
|-
|adm_power_cost
|<code><int></code><br>
The amount of power to scale and then subtract.
|<code>adm_power_cost = 100</code>
|Scales the amount with the power cost modifier, then takes [[administrative power|行政力量点数]] from the current scope.
|
|1.27
|-
|dip_power_cost
|<code><int></code><br>
The amount of power to scale and then subtract.
|<code>dip_power_cost = 100</code>
|Scales the amount with the power cost modifier, then takes [[diplomatic power|外交力量点数]] from the current scope.
|
|1.27
|-
|mil_power_cost
|<code><int></code><br>
The amount of power to scale and then subtract.
|<code>mil_power_cost = 100</code>
|Scales the amount with the power cost modifier, then takes [[military power|军事力量点数]] from the current scope.
|
|1.27
|-
|override_country_name
|<code><string></code><br>
变更为指定作用域的国家本地化名称
|<code>override_country_name = KINGDOM_OF_GOD</code>
|变更指定作用域的国家名称为<string>。
|
|1.30
|-
|restore_country_name
|<code><yes></code><br>
布尔值
|<code>restore_country_name = yes</code>
|恢复指定作用域的国家名称为最初的名称。
|
|1.30
|}
===经济===
{{SVersion|1.34}}
- {| width=\"100%\" class=\"wikitable sortable\"
- ! width=\"10%\" |语句
- ! width=\"25%\" |参数
- ! width=\"25%\" |例子
- ! width=\"20%\" |描述
- ! width=\"15%\" |备注
- ! width=\"5%\" |版本
+ {| width="100%" class="wikitable sortable"
+ ! width="10%" |语句
+ ! width="25%" |参数
+ ! width="25%" |例子
+ ! width="20%" |描述
+ ! width="15%" |备注
+ ! width="5%" |版本
|-
|add_years_of_income
|<code><float></code><br>
增加或减少的收入数字
|<code>add_years_of_income = 0.5</code>
|获得当前年收入X倍的金币:即获得若干年年收入(当前状况下)的金币
|每'''1'''个单位相当于当前1年的收入,年收入多少根据当前国家月收入计算。
|1.1
|-
|add_treasury
|<code><int></code><br>
增加或减少的金币数量
|<code>add_treasury = 50</code>
|获得指定数目的金币
|
|1.1
|-
|add_inflation
|<code><float></code><br>
增加或减少通货膨胀率
|<code>add_inflation = 2</code>
|获得指定的通货膨胀率
|
|1.1
|-
|add_mercantilism
|<code><int></code><br>
增加或减少重商主义
|<code>add_mercantilism = 2</code>
|获得指定的重商主义
|
|1.1
|-
|add_tariff_value
|<code><float></code><br>
增加或减少关税税率
|<code>add_tariff_value = 0.1</code>
|提高的关税税率幅度
|关税是殖民地等附庸国向宗主国输送的财富。
|1.4
|-
|loan_size
|<code><int></code><br>
变更的数值
|<code>loan_size = 24</code>
|贷款规模
|贷款规模与月收入相关,当月中贷款的额度都是相近的。
|1.1
|-
|add_loan
|<code>duration = <integer></code>
贷款的月份数
<code>interest_modifier = <value></code><br>
活跃的利率修正
<code>fixed_interest = <boolean></code><br>
如果为yes则利率被锁定(不随国家利率变化而变化)
|<pre>add_loan = {
fixed_interest = 1
duration = 60
estate_loan = yes
}</pre>
|获得一笔贷款
|fixed_interest 锁定利息利率 这是可选的
duration 确定了贷款自然到期的月份数
estate_loan = yes 规定了是否债权人为阶级
<nowiki>*</nowiki>但是不能确定具体的阶级
<nowiki>*</nowiki>目前债权人只能为阶级或银行
|1.26
|-
|change_price
|<code>trade_goods = <tradegood></code><br>
贸易品价格的变化。<br>
<code>key = <string></code><br>
在贸易品价格提示框中显示的文本。<br>
<code>value = <float></code><br>
贸易品价格变化的百分比。<br>
<code>duration = <days></code><br>
贸易品价格变化持续的时间。
|<pre>
change_price = {
trade_goods = grain
key = grain_shortage
value = 0.5
duration = 3650
}
</pre>
|变更全球贸易品价格
|贸易品价格可以在{{path|common/prices/*.txt}}搜索到<br>
新价格 = 基础价格 + (基础价格 * 价格变化的百分比)<br>
''duration'' = -1 表示永久变更。
|1.8
|-
|raise_war_taxes
|<code>yes</code>:布尔值
|<pre>raise_war_taxes = yes</pre>
|可不使用军事点数征收战争税
|
|1.26
|-
|add_years_of_owned_provinces_production_income
|<code>years = <value></code>
:给予相当于多少年生产收入总额的钱
<code>trigger = <scope></code>
:计算的范围(包含的省份)
<code>custom_tooltip = <string></code>
:显示的文本提示
|<pre>add_years_of_owned_provinces_production_income = {
years = 8
trigger = {
OR = {
trade_goods = cloth
trade_goods = silk
}
}
custom_tooltip = MONOPOLY_INCOME_CLOTH_DESC
}</pre>
|计算指定的范围,给予相当于多少年生产收入总额的钱
|
|1.30
|-
|set_bankruptcy
|<code><scope></code><br>
使特定国家破产
|<pre>
set_bankruptcy = FRA
</pre>
|使特定国家破产
|
|1.34
|-
|native_policy
|变更为指定的原住民政策
|<pre>native_policy = native_policy_coexist</pre>
|改变原住民政策
|
|1.28
|}
===政府===
{{SVersion|1.30}}
- {| width=\"100%\" class=\"wikitable sortable\"
- ! width=\"10%\" |语句
- ! width=\"25%\" |参数
- ! width=\"25%\" |例子
- ! width=\"20%\" |描述
- ! width=\"15%\" |备注
- ! width=\"5%\" |版本
+ {| width="100%" class="wikitable sortable"
+ ! width="10%" |语句
+ ! width="25%" |参数
+ ! width="25%" |例子
+ ! width="20%" |描述
+ ! width="15%" |备注
+ ! width="5%" |版本
|-
|add_absolutism
|<code><int></code><br>
专制度变化的数值
|<code>add_absolutism = 10</code>
|变化相应数值的专制度
|若专制度未被启用则无效果
|1.20
|-
|add_legitimacy
|<code><int></code><br>
正统度变化的数值。<br>
<code><scope></code><br>
增加或者减少正统度,以达到当前目标的值<br>
|<code>add_legitimacy = 10</code><br><code>add_legitimacy = CAS</code>
|变化相应数值的正统度
|若政体无 ''monarchy = yes'' 则无效果
|1.1
|-
|add_republican_tradition
|<code><int></code><br>
共和传统变化的数值<br>
|<code>add_republican_tradition = 10</code>
|变化相应数值的共和传统
|若政体无 ''republic = yes'' 则无效果
|1.1
|-
|add_scaled_republican_tradition
|<code><int></code><br>
添加共和传统<br>
|<code>add_scaled_republican_tradition = 10</code>
|为当前作用域添加共和传统
|数值与任期有关,任期为4年时添加的共和传统数值与该值相同
|1.7
|-
|add_devotion
|<code><int></code><br>
奉献度变化的数值<br>
|<code>add_devotion = 10</code>
|变化相应数值的奉献度
|若非 ''has_devotion = yes'' 则无效果
|1.12
|-
|add_horde_unity
|<code><int></code><br>
部族统一度变化的数值<br>
|<code>add_horde_unity = 10</code>
|变化相应数值的部族统一度
|若政体无 ''nomad = yes'' 则无效果
|1.14
|-
|add_meritocracy
|<code><int></code><br>
精英度变化的数值<br>
|<code>add_meritocracy = 10</code>
|变化相应数值的精英度
|若政体无 ''has_meritocracy = yes'' 则无效果
|1.20
|-
|set_meritocracy
|<code><int></code><br>
设置精英度的数值<br>
|<code>set_meritocracy = 10</code>
|设置精英度为指定的数值
|若政体无 ''has_meritocracy = yes'' 则无效果
|1.20
|-
|add_tribal_allegiance
|<code><int></code><br>
部族忠诚度变化的数值<br>
|<code>add_tribal_allegiance = 10</code>
|变化相应数值的部族忠诚度
|若政体无 ''tribal_federation_mechanic = yes'' 则无效果
|1.23
|-
|change_statists_vs_orangists
|<code><int></code><br>
派别倾向的数值变化<br>
|<code>change_statists_vs_orangists = 10</code>
|议会派与奥兰治派,变化相应数值的派别倾向
|正数倾向奥兰治派,负数倾向议会派
|1.7
|-
|change_government
|<code><government></code><br>
变更为指定的政体
|<code>change_government = dictatorship</code>
|变更为指定的政体类型
|政体类型可以在{{path|common/governments/*.txt}}搜索到
|1.1
|-
|set_government_rank
|<code><int></code><br>
变更政府等级到指定的等级
|<code>set_government_rank = 3</code>
|政府等级变更为指定的级别
|原版默认政府等级为1-3级,分别对应公国级、王国级、帝国级
|1.12
|-
|add_government_power
|<code>government_mechanic = <type></code><br>
指定的政府机制<br>
<code>which = <type></code><br>
政府力量类型 ''行政(ADM),外交(DIP) 或者 军事(MIL)''<br>
<code>amount = <type></code><br>
获得的力量点数
|<pre>
add_government_power = {
government_mechanic = russian_mechanic
which = ADM
amount = 10
}
</pre>
|变更政府机制中任意一项力量点数的多少
|目前拥有特殊政府机制的政体列表:<br>
*俄罗斯政府机制(russian_mechanic)
*封建神权政府机制(feudal_theocracy_mechanic)
*部族忠诚政府机制(tribal_federation_mechanic)
*马穆鲁克政府机制(mamluk_mechanic)
*伊克塔政府机制(iqta_mechanic)
|1.23
|-
|set_government_and_rank
|<code>government = <government></code><br>
变更为指定的政体<br>
<code>rank = <int></code><br>
变更政府等级到指定的级别
|<pre>
set_government_and_rank = {
government = celestial_empire
rank = 3
}
</pre>
注:此例仅为举例,原版中天朝政体(celestial_empire)锁定帝国级(fix = 3),故而无需特别设置。
|变更政体的同时设置政府级别
|政体类型可以在{{path|common/governments/*.txt}}搜索到<br>
注:这项指令无法变更锁定政府级别和附庸的最大政府级别
|1.22
|-
|dissolve_parliament
|<code>yes</code><br>
布尔值
|<code>dissolve_parliament = yes</code>
|去除议会机制
|若政体无 ''has_parliament = yes'' 则无效果
|1.15
|-
|reinstate_parliament
|<code>yes</code><br>
布尔值
|<code>reinstate_parliament = yes</code>
|用于 ''dissolve_parliament = yes'' 去除议会机制后,来恢复议会机制
|若政体无 ''has_parliament = yes'' 则无效果
|1.15
|-
|change_government_reform_progress
|<code><int></code><br>
要改变的政府改革点数的数值
|change_government_reform_progress = 250
|为当前作用域增加(或减少)政府改革点数
|正数获得政府改革点数,负数则失去
无法降低至0以下
|1.26
|-
|adopt_reform_progress
|<code><country scope></code><br>
获得与目标作用域相同的政府改革进程<br>
|<code>adopt_reform_progress = FROM</code>
|获得与目标作用域相同的政府改革进程。
|可用于教皇国被释放的情况下。
|
|-
|set_legacy_government
|<code>government = <government></code><br>
使政府变为达摩DLC以前的样子。
|<code>set_legacy_government = despotic_monarchy</code>
|切换为指定的政府
|若达摩 {{icon|dhr}}DLC生效则无效。
|1.26
|-
+ |add_government_reform
+ |<code><reform></code><br>
+ 实行指定的政府改革项
+ |<code>add_government_reform = revolutionary_empire_reform</code>
+ |
+ 实行指定的政府改革项
+ |<s>若达摩{{icon|dhr}}DLC为未用状态,该语句不生效。</s>(这在1.36.2以前可能是正确的,未测试)
+ 无论达摩{{icon|dhr}}DLC是否启用皆生效(1.36.2编辑,已测试)
+ |1.26
+ |-
|remove_government_reform
|<code><reform></code><br>
移除指定的政府改革项
|<code>remove_government_reform = revolutionary_empire_reform</code>
|
- 若达摩{{icon|dhr}}DLC为启用状态,可以使用该语句移除政府改革。若被移除的改革非第一项改革,则可以重新选择一项改革。
- |若达摩{{icon|dhr}}DLC为未用状态,该语句不生效。
+ 移除指定的政府改革项
+ |<s>若达摩{{icon|dhr}}DLC为未用状态,该语句不生效。</s>(这在1.36.2以前可能是正确的,未测试)
+ 无论达摩{{icon|dhr}}DLC是否启用皆生效(1.36.2编辑,已测试)
|1.26
|-
|add_revolutionary_zeal
|<code><int></code><br>
增加革命热情<br>
|<code>add_revolutionary_zeal = 10</code>
|增加革命热情
|若当前作用域政府无 ''革命热情'' 机制则无效。
|1.30
|-
|add_years_of_manpower_scaled_to_seats
|<code><int></code><br>
从议会省份获得人力<br>
|<code>add_years_of_manpower_scaled_to_seats = 10</code>
|从议会省份获得人力
|若当前作用域无 ''议会省份'' 则无效。
|1.26
|-
|add_years_of_sailors_scaled_to_seats
|<code><int></code><br>
从议会省份获得水手<br>
|<code>add_years_of_sailors_scaled_to_seats = 10</code>
|从议会省份获得水手
|若当前作用域无 ''议会省份'' 则无效。
|1.26
|-
|add_years_of_tax_scaled_to_seats
|<code><int></code><br>
从议会省份获得税收<br>
|<code>add_years_of_tax_scaled_to_seats = 10</code>
|从议会省份获得税收
|若当前作用域无 ''议会省份'' 则无效。
|1.26
|-
|add_prestige_scaled_to_seats
|<code><int></code><br>
从议会省份获得威望<br>
|<code>add_prestige_scaled_to_seats = 10</code>
|从议会省份获得威望
|若当前作用域无 ''议会省份'' 则无效。
|1.26
|}
===文化===
{{SVersion|1.24}}
- {| width=\"100%\" class=\"wikitable sortable\"
- ! width=\"10%\" |语句
- ! width=\"25%\" |参数
- ! width=\"25%\" |例子
- ! width=\"20%\" |描述
- ! width=\"15%\" |备注
- ! width=\"5%\" |版本
+ {| width="100%" class="wikitable sortable"
+ ! width="10%" |语句
+ ! width="25%" |参数
+ ! width="25%" |例子
+ ! width="20%" |描述
+ ! width="15%" |备注
+ ! width="5%" |版本
|-
|add_accepted_culture
|<code><culture></code><br>
添加可接受文化<br>
<code><scope></code><br>
添加目标的可接受文化
|<code>add_accepted_culture = english</code><br>
<code>add_accepted_culture = ENG</code><br>
<code>add_accepted_culture = event_target:my_event_target</code><br>
<code>add_accepted_culture = variable:my_variable</code><br>
|添加目标(文化、国家、变量)为新的可接受文化
|文化请参考{{path|common/cultures/*.txt}}。<br>
另外也可以参考[[Variables|事件范围变量]]。
|1.1
|-
|change_primary_culture
|<code><culture></code><br>
变更主流文化, 文化请参考{{path|common/cultures/}}。<br>
<code><scope></code><br>
变更为目标的主流文化
|<code>change_primary_culture = english</code><br>
<code>change_primary_culture = ENG</code><br>
<code>change_primary_culture = event_target:my_event_target</code><br>
<code>change_primary_culture = variable:my_variable</code><br>
|添加目标(文化、国家、变量)为新的主流文化
|文化请参考{{path|common/cultures/*.txt}}。<br>
另外也可以参考[[Variables|事件范围变量]]。
|1.1
|-
|remove_accepted_culture
|<code><culture></code><br>
移除可接受文化,文化请参考{{path|common/cultures/}}<br>
<code><scope></code><br>
移除目标的可接受文化
|<code>remove_accepted_culture = english</code><br>
<code>remove_accepted_culture = ENG</code><br>
<code>remove_accepted_culture = event_target:my_event_target</code><br>
<code>remove_accepted_culture = variable:my_variable</code><br>
|移除目标(文化、国家、变量)的可接受文化
|文化请参考{{path|common/cultures/*.txt}}。<br>
另外也可以参考[[Variables|事件范围变量]]。
|1.1
|}
===宗教===
{{SVersion|1.24}}
- {| width=\"100%\" class=\"wikitable sortable\"
- ! width=\"10%\" |语句
- ! width=\"25%\" |参数
- ! width=\"25%\" |例子
- ! width=\"20%\" |描述
- ! width=\"15%\" |备注
- ! width=\"5%\" |版本
+ {| width="100%" class="wikitable sortable"
+ ! width="10%" |语句
+ ! width="25%" |参数
+ ! width="25%" |例子
+ ! width="20%" |描述
+ ! width="15%" |备注
+ ! width="5%" |版本
|-
|change_religion
|<code><religion></code><br>
要改变的宗教<br>
<code><scope></code><br>
改变宗教的范围
|<code>change_religion = catholic</code><br>
<code>change_religion = CAS</code><br>
<code>change_religion = event_target:my_event_target</code><br>
<code>change_religion = variable:my_variable</code><br>
|在当前范围内改变宗教
|宗教可以在{{path|common/religions/*.txt}}里面找到<br>
Can utilise [[Variables|Event Scope Values]].
|1.1
|-
|enable_religion
|<code><religion></code><br>
要启用的宗教
|<code>enable_religion = reformed</code><br>
|启用一个受条件限制的宗教
|宗教可以在{{path|common/religions/*.txt}}里面找到
|1.1
|-
|force_converted
|<code>yes</code><br>
是或者否
|<code>force_converted = yes</code><br>
|设定当前作用域是否“被强制转教”的记录
|
|1.1
|-
|add_authority
|<code><int></code><br>
增加或减少权威值
|<code>add_authority = 10</code><br>
|增加权威值,权威值作用于因蒂崇拜的宗教改革
|如果国家没有因蒂崇拜的宗教改革系统,那么增加或减少权威值将不会产生任何效果
|1.10
|-
|add_doom
|<code><int></code><br>
增加或减少末日值
|<code>add_doom = 10</code><br>
|增加末日值,末日值作用于纳瓦特尔神话的宗教改革
|如果国家没有纳瓦特尔神话的宗教改革系统,那么增加或减少末日值将不会产生任何效果
|1.10
|-
|remove_religious_reforms
|<code><int></code><br>
移除指定宗教改革数量
|<code>remove_religious_reforms = 2</code><br>
|移除指定宗教改革数量
|如果国家没有因蒂崇拜的宗教改革系统,将不会产生任何效果
|1.10
|-
|add_fervor
|<code><int></code><br>
增加或减少狂热点
|<code>add_fervor = 10</code><br>
|改变指定数额的狂热点,狂热点作用于改革宗的狂热系统
|如果国家没有改革宗的狂热系统,将不会产生任何效果
|1.6
|-
|add_karma
|<code><int></code><br>
增加或减少业力
|<code>add_karma = 10</code><br>
|改变指定数额的业力,业力作用于佛教通用的业力系统
|如果国家没有佛教诸教派的业力系统,将不会产生任何效果
|1.12
|-
|set_karma
|<code><int></code><br>
设置业力值
|<code>set_karma = 10</code><br>
|将业力值设定为指定数额,业力作用于佛教通用的业力系统
|如果国家没有佛教诸教派的业力系统,将不会产生任何效果
|1.12
|-
|add_church_power
|<code><int></code><br>
增加或减少教会力量
|<code>add_church_power = 10</code><br>
|改变指定数量的教会力量,教会力量作用于新教的教会系统
|如果国家没有新教的教会力量系统,将不会产生任何效果
|1.12
|-
|add_church_aspect
|<code><aspect></code><br>
启用的信条
|<code>add_church_aspect = adult_baptism_aspect</code><br>
|对当前作用域启用指定的信条。
|原版信条可在{{path|common/church_aspects/00_church_aspects.txt}}找到<br>
如果国家没有新教的教会力量系统或者指定的教会力量对该国家不可用则无效<br>
对科普特祝福机制无效。
|1.12
|-
|remove_church_aspect
|<code><aspect></code><br>
要移除的信条,可填random而随机移除一项
|<code>remove_church_aspect = adult_baptism_aspect</code><br>
|移除当前作用域国家指定的信条
||原版信条可在{{path|common/church_aspects/00_church_aspects.txt}}找到<br>
如果国家没有新教的教会力量系统或者指定的教会力量对该国家不可用则无效<br>
对科普特祝福机制无效。
|1.12
|-
|add_papal_influence
|<code><int></code><br>
增加或减少教廷影响力
|<code>add_papal_influence = 10</code><br>
|改变指定数额的教廷影响力
|如果国家没有天主教的教廷系统,将不会产生任何效果
|1.1
|-
|add_reform_desire
|<code><float></code><br>
增加或减少改革呼声
|<code>add_reform_desire = 0.5</code><br>
|改变指定数额改革呼声
|
|1.1
|-
|excommunicate
|<code><scope></code><br>
开除教籍
|<code>excommunicate = FRA</code>
|将指定国家开除教籍,如果目标国家已经被开除教籍,则恢复教籍
|
|1.12
|-
|set_papacy_active
|<code>yes</code><code>no</code><br>
是或者否
|<code>set_papacy_active = yes</code>
|启用或禁用教廷机制
|
|1.1
|-
|add_piety
|<code><float></code><br>
增加或减少虔诚
|<code>add_piety = 0.5</code><br>
|改变指定数额的虔诚
|如果国家没有伊斯兰教的虔诚系统,将不会产生任何效果
|1.1
|-
|set_school_opinion
|<code>who = <who></code><br>
目标学派<br>
<code>opinion = <opinion></code><br>
设置为何种关系<br>
|<pre>set_school_opinion = {
who = TUR
opinion = -1
}
</pre>
|设置当前作用域国家所属学派对指定作用域国家所属学派的关系。
|''-1''为负面(敌视), ''0''为中立(暧昧), ''1''为正面(友好)。
|1.23
|-
|set_religious_school
|<code>group = <religious group></code><br>
目标宗教组<br>
<code>school = <school></code><br>
目标学派<br>
|<pre>set_religious_school = {
group = muslim
school = hanafi_school
}
</pre>
|变更当前作用域的学派
|学派可以在{{path|common/religions/00_religions.txt}}找到。
|1.23
|-
|add_patriarch_authority
|<code><float></code><br>
牧首权威的改变量
|<code>add_patriarch_authority = 0.5</code><br>
|增加或者减少当前国家的牧首权威
|如果国家没有牧首权威机制则无效。
|1.1
|-
|change_personal_deity
|<code><deity></code><br>
要变更的守护神(主神)
|<code>change_personal_deity = odin</code><br>
|将当前作用域国家的守护神改为指定主神
|主神可以在{{path|common/personal_deities/*.txt}}找到<br>
对信仰没有主神信仰机制的宗教的国家无效
|1.6
|-
|add_harmony
|<code><int></code><br>
要增加或者减少的和谐值
|<code>add_harmony = 10</code><br>
|增加或者修改和谐值
|对不信仰使用和谐机制的宗教的国家无效
|1.20
|-
|add_harmonized_religion
|<code><religion></code><br>
要和谐的宗教
|<code>add_harmonized_religion = catholic</code><br>
|为作用域国家增加一个'''宗教'''到已和谐宗教列表,注意即使是异教也只能填写该宗教组的任意一宗教,不能填写宗教组
|对不信仰使用和谐机制的宗教的国家无效
|1.20
|-
|add_harmonization_progress
|<code><int></code><br>
要增加或者减少的和谐进度
|<code>add_harmonization_progress = 10</code><br>
|增加或者减少当前作用域国家的和谐进度
|对不信仰使用和谐机制的宗教的国家无效
|1.20
|-
|unlock_cult
|<code><cult></code><br>
解锁崇拜物
|<code>unlock_cult = yemoja_cult</code><br>
|为当前作用域国家解锁指定的崇拜物
|崇拜物可以在{{path|common/fetishist_cults/*.txt}}找到<br>
对不信仰使用崇拜物机制的宗教的国家无效
|1.18
|-
|add_isolationism
|<code><int></code><br>
要改变的孤立主义的值
|<code>add_isolationism = 1</code><br>
|增加或者减少当前作用域国家的孤立主义
|对信仰不使用孤立主义机制的宗教的国家无效
|1.20
|-
|set_isolationism
|<code><int></code><br>
要设置的孤立主义状态
|<code>set_isolationism = 2</code><br>
|设置当前作用域国家的孤立主义状态
|对信仰不使用孤立主义机制的宗教的国家无效
|1.20
|-
|add_incident_variable_value
|<code>incident = <incident></code><br>
要改变变量的事变<br>
<code>value = <int></code><br>
要改变的变量值
|<pre>
add_incident_variable_value = {
incident = incident_urbanization
value = -1
}
</pre>
|改变当前作用域国家指定事变的变量
|事变可以在{{path|common/isolationism/*.txt}}找到<br>
对信仰不使用孤立主义机制的宗教的国家无效
|1.20
|-
|set_incident_variable_value
|<code>incident = <incident></code><br>
要改变变量的事变<br>
<code>value = <int></code><br>
要设为的变量值
|<pre>
set_incident_variable_value = {
incident = incident_urbanization
value = 1
}
</pre>
|设置当前作用域国家指定事变的变量
|事变可以在{{path|common/isolationism/*.txt}}找到<br>
对信仰不使用孤立主义机制的宗教的国家无效
|1.20
|-
|add_curia_treasury
|<code><float></code><br>
增加或减少教廷金库的金钱。
|<code>add_curia_treasury = 100</code><br>
|增加或减少教廷金库的金钱。
|
|1.30
|-
|change_cult
|<code><cult></code><br>
变更崇拜物
|<code>change_cult = yemoja_cult</code><br>
|Changes the current cult for the current scope.
|崇拜物可以在{{path|common/fetishist_cults/*.txt}}找到。<br>
非拜物教则指令无效
|1.32
+ |-
+ |set_defender_of_the_faith
+ |成为信仰守护者<code>who = <scope></code><br>
+ 目标作用域<br>
+ <code>religion = <religion></code><br>
+ 指定宗教<br>
+ |<pre>set_defender_of_the_faith = {
+ who = ROOT #指定国家
+ religion = ROOT #指定宗教
+ }
+ </pre>
+ |设置目标作用域成为指定宗教的信仰守护者。
+ |
+ |1.32
+ |-
+ |transfer_papal_controller
+ |<code><scope></code><br>
+ 转移教监到目标作用域。
+ |<code>transfer_papal_controller = FRA</code><br>
+ |转移教监,它将更改教廷监护控制者而不杀死当前教皇。
+ |
+ |1.36
|}
===科技===
{{SVersion|1.24}}
- {| width=\"100%\" class=\"wikitable sortable\"
- ! width=\"10%\" |语句
- ! width=\"25%\" |参数
- ! width=\"25%\" |例子
- ! width=\"20%\" |描述
- ! width=\"15%\" |备注
- ! width=\"5%\" |版本
+ {| width="100%" class="wikitable sortable"
+ ! width="10%" |语句
+ ! width="25%" |参数
+ ! width="25%" |例子
+ ! width="20%" |描述
+ ! width="15%" |备注
+ ! width="5%" |版本
|-
|add_idea
|<code><idea></code><br>
获得一个理念
|<code>add_idea = military_traditions</code>
|为当前作用域添加”军事传统(military_traditions)“理念
|理念可以在 {{path|common/ideas/*.txt}}找到。<br>
若该理念无法在理念组中被找到,则无法起效。
|1.6
|-
|add_idea_group
|<code><ideagroup></code><br>
获得一个理念组
|<code>add_idea_group = aristocracy_ideas</code>
|为当前作用域添加”贵族理念“理念组
|理念组可以在 {{path|common/ideas/*.txt}}找到<br>
若当前国家无可用的理念槽,则无法起效。
|1.6
|-
|add_active_policy
|<code><policy></code><br>
获得一个理念政策
|<code>add_active_policy = the_statute_of_monopolies</code>
|为当前作用域添加”垄断法令“理念政策
|政策可以在{{path|common/policies/*.txt}}找到。<br>
若当前国家不符合政策的启用条件,或者无可用地政策槽,则无法起效。
|1.21
|-
|change_technology_group
|<code><technology group></code><br>
转变科技组
|<code>change_technology_group = western</code>
|为当前作用域添转变为西方科技组
|科技组可以在 {{path|common/technology.txt}}找到。<br>
{{red|请注意:}}该指令并不会造成兵种组的改变,改变兵种组请寻找”change_unit_type“指令。
|1.1
|-
|remove_idea
|<code><idea></code><br>
移除理念
|<code>remove_idea = military_traditions</code>
|为当前作用域移除”军事传统(military_traditions)“理念
|理念可以在{{path|common/ideas/*.txt}}找到。<br>
若未开启指定的理念,则无法起效。
|1.6
|-
|remove_idea_group
|<code><ideagroup></code><br>
移除一个理念组
|<code>remove_idea_group = military_traditions</code>
|为当前作用域移除”贵族理念“理念组
|理念组可以在{{path|common/ideas/*.txt}}找到。<br>
若未开启指定的理念组,则无法起效。
|1.6
|-
|set_primitive
|<code><yes><no></code><br>
布尔值
|<code>set_primitive = no</code>
|为当前作用域设定是否为原始土著国家
|原始土著国家无法建造船只,只能建造原始建筑,还有宗教改革。
|1.18
|-
|swap_free_idea_group
|<code><yes></code><br>
布尔值
|<code>swap_free_idea_group = yes</code>
|为当前作用域检测国家理念是否相符,若不符则重置为正确的国家理念。
|用于转变国家后检测国家理念的变更。
|1.1
|-
|add_next_institution_embracement
|<code><int></code><br>
增加未接纳思潮的进程
|<code>add_next_institution_embracement = 10</code>
|为当前作用域增加未接纳思潮的进程10%
|思潮可以在{{path|common/institutions/*.txt}}找到。<br>
|1.21
|-
|add_adm_tech
|<code><int></code><br>
提升行政科技等级
|<code>add_adm_tech = 1</code>
|为当前作用域提升“行政”科技等级。
|{{red|请注意:}}该指令无法降低科技。
|1.21
|-
|add_dip_tech
|<code><int></code><br>
提升外交科技等级
|<code>add_dip_tech = 1</code>
|为当前作用域提升“外交”科技等级。
|{{red|请注意:}}该指令无法降低科技。
|1.21
|-
|add_mil_tech
|<code><int></code><br>
提升军事科技等级
|<code>add_mil_tech = 1</code>
|为当前作用域提升“军事”科技等级。
|{{red|请注意:}}该指令无法降低科技。
|1.21
|}
===宫廷===
{{SVersion|1.24}}
- {| width=\"100%\" class=\"wikitable sortable\"
- ! width=\"10%\" |语句
- ! width=\"25%\" |参数
- ! width=\"25%\" |例子
- ! width=\"20%\" |描述
- ! width=\"15%\" |备注
- ! width=\"5%\" |版本
+ {| width="100%" class="wikitable sortable"
+ ! width="10%" |语句
+ ! width="25%" |参数
+ ! width="25%" |例子
+ ! width="20%" |描述
+ ! width="15%" |备注
+ ! width="5%" |版本
|-
|add_prestige
|<code><float></code><br>
增加或减少威望
<code><scope></code><br>
可指向'''作用域''',加减数值
|<code>add_prestige = 50</code>
|增加威望。
|
|1.1
|-
|add_prestige_or_monarch_power
|<code><float></code>
增加威望(滥出威望可转化成君主点数)
<code><scope></code>
|<code>add_prestige_or_monarch_power = { amount = 50 }</code>
|增加威望。
|所有溢出的威望将转化成三类君主点数
|1.34
|-
|add_corruption
|<code><float></code><br>
增加或减少腐败
|<code>add_corruption = 2</code>
|增加腐败。
|
|1.16
|-
|add_splendor
|<code><int></code><br>
增加或减少辉煌值
|<code>add_splendor = 2</code>
|增加辉煌点数。
|辉煌点数可用来获得时代能力
|1.20
|-
|create_advisor
|<code><advisor></code><br>
生成顾问
|<code>create_advisor = philosopher</code>
|生成顾问。
|该指令生成的顾问默认诞生在首都,文化与宗教默认为当前作用域的国教与主流文化
|1.1
|-
|kill_advisor
|<code><random></code><br>
随机杀死一名本国顾问。<br>
<code><advisor></code><br>
杀死指定类型的顾问。<br>
<code><advisor id></code><br>
杀死指定ID的顾问。<br>
|<code>kill_advisor = philosopher</code><br>
<code>kill_advisor = random</code><br>
<code>kill_advisor = 30</code>
|杀死作用域中已雇佣的顾问。
|顾问类型可以在{{path|common/advisortypes/*.txt}}找到。<br>
执行该指令后会显示已雇佣顾问的死亡提示框。<br>{{red|请注意:}}该指令仅可作用于已雇佣的顾问。
|1.1
|-
|remove_advisor
|<code><random></code><br>
随机移除一名顾问
<code><advisor></code><br>
移除指定类型的顾问。<br>
<code><advisor id></code><br>
移除指定ID的顾问。<br>
|<code>remove_advisor = philosopher</code><br>
<code>remove_advisor = random</code><br>
<code>remove_advisor = 30</code>
|移除作用域中已雇佣的顾问。
|顾问类型可以在{{path|common/advisortypes/*.txt}}找到。<br>
执行该指令后不会显示已雇佣顾问的死亡提示框。<br>{{red|请注意:}}该指令仅可作用于已雇佣的顾问。
|1.1
|-
|remove_advisor_by_category
|<code><type></code><br>
按指定类型移除顾问,类型划分: ''ADM''(行政), ''DIP''(外交)或 ''MIL''(军事).
|<code>remove_advisor_by_category = ADM</code>
|按指定类型移除当前作用域的顾问
|{{red|请注意:}}该指令仅可作用于已雇佣的顾问。
|1.20
|-
|define_advisor
|<code>type = <type></code><br>
要生成的顾问类型<br>
<code>skill = <int></code><br>
要生成的顾问等级。原版游戏最高为5级。<br>
<code>name = <string></code><br>
可选项。顾问姓名。<br>
<code>location = <province id></code><br>
可选项。顾问出生地。<br>
<code>discount = yes</code><br>
可选项。顾问价格是否打折,与cost_multiplier互斥。<br>
<code>cost_multiplier = 0.5</code><br>
可选项。顾问价格打折比例,与discount互斥。<br>
<code>female = yes</code><br>
可选项。顾问性别是否为女性<br>
<code>culture = <culture> / <scope></code><br>
可选项。顾问的文化。<br>
<code>religion = <religion> / <scope></code><br>
可选项。顾问的宗教
|<pre>define_advisor = {
type = treasurer
- name = \"John Smith\"
+ name = "John Smith"
skill = 3
culture = english
religion = catholic
}</pre>
<pre>define_advisor = {
type = treasurer
name = rising_star_advisor
skill = 2
culture = event_target:wrong_religion_province
religion = event_target:wrong_religion_province
}</pre>
<pre>define_advisor = {
type = recruitmaster
skill = 3
discount = yes
culture = variable:new_ruler_culture
}</pre>
|获得自定义顾问到当前作用域
|顾问类型可以在{{path|common/advisortypes/*.txt}}找到。<br>
可以使用[[Variables|事件域值]]设定顾问的''文化''与''宗教''。<br>顾问名称也可以参考''set_saved_name'' 作为设定。
|1.1
|-
|change_national_focus
|焦点的力量点数<pre>
<ADM>
<DIP>
<MIL>
</pre>
|<pre>
change_national_focus = ADM
</pre>
|变更指定作用域范围内的国家焦点。
|
|1.32
|-
|extend_regency
|延长摄政年限
|<pre>
extend_regency = 5
</pre>
|延长指定作用域范围内的摄政统治年限。
|
|1.31
|-
|regency
|设置摄政的主导阶层
|<pre>
regency = { estate = xxxx }
</pre>
|设置指定作用域范围内的摄政主导阶层。
|
|1.31
|-
|set_estate_led_regency_privilege
|授予摄政阶层指定特权;random为随机
|<pre>
set_estate_led_regency_privilege = random
</pre>
|授予指定作用域范围内的摄政阶层特权。
|
|1.31
+ |-
+ |extend_golden_age
+ |<code><int></code><br>
+ 延长当前黄金时代(月数)
+ |<code>extend_golden_age = 12</code>
+ |延长当前黄金时代。
+ |
+ |1.34
+ |-
+ |reset_golden_age
+ |布尔值<br>
+ 重置黄金时代
+ |<code>reset_golden_age = yes</code>
+ |重置当前或过往黄金时代,并重新开始。
+ |
+ |1.34
|}
===稳定===
{{SVersion|1.24}}
- {| width=\"100%\" class=\"wikitable sortable\"
- ! width=\"10%\" |语句
- ! width=\"25%\" |参数
- ! width=\"25%\" |例子
- ! width=\"20%\" |描述
- ! width=\"15%\" |备注
- ! width=\"5%\" |版本
+ {| width="100%" class="wikitable sortable"
+ ! width="10%" |语句
+ ! width="25%" |参数
+ ! width="25%" |例子
+ ! width="20%" |描述
+ ! width="15%" |备注
+ ! width="5%" |版本
|-
|add_stability
|<code><int></code><br>
增加或者减少稳定。
|<code>add_stability = 1</code>
|增加稳定。
|
|1.1
|-
|add_war_exhaustion
|<code><int></code><br>
增加或者减少厌战。
|<code>add_war_exhaustion = 2</code>
|增加厌战。
|
|1.1
|-
|add_liberty_desire
|<code><int></code><br>
增加或者减少独立倾向。
|<code>add_liberty_desire = 10</code>
|增加独立倾向。
|该命令用于增加或者减少附庸国对宗主国的独立倾向。
|1.4
|-
|disband_rebels
|<code><type></code><br>
消灭指定类型的叛军。
|<code>disband_rebels = anti_tax_rebels</code>
|为当前作用域中所有省份去除指定类型的叛军。
|叛军类型可以在{{path|common/rebel_types/*.txt}}找到。
|1.1
|-
|collapse_nation
|<code>yes</code><br>
布尔值
|<code>collapse_nation = yes</code>
|使当前作用域释放所其有他国家核心的省份,不存在的国家也将获得独立,
|{{red|国家崩溃指令}},国家将被削弱至10个省份
|1.10
|-
|add_disaster_modifier
|<code>name = <modifier></code><br>
获得的事件修正。<br>
<code>disaster = <disaster></code><br>
获得的灾难。<br>
<code>duration = <days></code><br>
持续时间。
|<pre>add_disaster_modifier = {
- name = \"restrict_serfdom\"
+ name = "restrict_serfdom"
duration = -1
disaster = internal_conflicts
}</pre>
|为当前作用域添加一个事件修正,此修正会在灾难读条完成后或者在灾难结束后移除。
|灾难可以在{{path|common/disasters/*.txt}}找到。
|1.10
|-
|add_disaster_progress
|<code>disaster = <disaster></code>
需要调整的灾难
<br><code>value = <int></code><br>需要调整的灾难进程值
|<pre>add_disaster_progress = {
disaster = internal_conflicts
value = 10
}</pre>
|为当前作用域中已经触发的灾难调整灾难进程。
|灾难可以在{{path|common/disasters/*.txt}}找到。
|1.16
|-
|end_disaster
|<code><disaster></code><br>
结束灾难
|<code>end_disaster = internal_conflicts</code>
|使当前作用域中已经触发的灾难结束
|灾难可以在{{path|common/disasters/*.txt}}找到。
|1.9
|}
===军事===
{{SVersion|1.24}}
- {| width=\"100%\" class=\"wikitable sortable\"
- ! width=\"10%\" |语句
- ! width=\"25%\" |参数
- ! width=\"25%\" |例子
- ! width=\"20%\" |描述
- ! width=\"15%\" |备注
- ! width=\"5%\" |版本
+ {| width="100%" class="wikitable sortable"
+ ! width="10%" |语句
+ ! width="25%" |参数
+ ! width="25%" |例子
+ ! width="20%" |描述
+ ! width="15%" |备注
+ ! width="5%" |版本
|-
|add_army_tradition
|<code><int></code><br>
增加或减少指定数量的陆军传统
|<code>add_army_tradition = 10</code>
|将陆军传统添加到当前范围。
|
|1.1
|-
|add_navy_tradition
|<code><int></code><br>
增加或减少指定数量的海军传统
|<code>add_navy_tradition = 10</code>
|将海军传统添加到当前范围。
|
|1.1
|-
|add_army_professionalism
|<code><float></code><br>
增加或减少指定数量的陆军职业度
|<code>add_army_professionalism = 0.05</code>
|将陆军职业度添加到当前范围。
|
|1.23
|-
|add_manpower
|<code><float></code><br>增加或减少指定数量的人力
|<code>add_manpower = 1</code>
|将人力添加到当前范围。
|1等于1000人力。
|1.1
|-
|add_sailors
|<code><int></code><br>
增加或减少指定数量的水手
|<code>add_sailors = 1000</code>
|将水手添加到当前范围。
|1000等于1000水手。
|1.16
|-
|add_yearly_manpower
|<code><float></code><br>
增加或减少指定百分比的全年总人力
|<code>add_yearly_manpower = 0.5</code>
|以每年总人力的百分比形式,添加人力到当前范围。
|1等于每年总人力的100%。
|1.4
|-
|add_yearly_sailors
|<code><float></code><br>
增加或减少指定百分比的全年总水手
|<code>add_yearly_sailors = 10</code>
|以每年总水手的百分比形式,添加人力到当前范围。
|1等于每年总水手的100%。
|1.16
|-
|create_admiral
|<code>tradition = <int></code><br>
创建一个海军提督
|<code>create_admiral = { tradition = 50 add_fire = 1 culture = greek }</code>
|为当前国家创建一个指定海军传统的提督,可以设置其保底属性和文化(1.23前语法同探险家)
|
|1.1
|-
|create_explorer
|<code><int></code><br>
创建一个探险家
|<code>create_explorer = 50</code>
|为当前国家创建一个指定海军传统的探险家,注意与提督的语法不同
|
|1.1
|-
|create_conquistador
|<code><int></code><br>
创建一个征服者
|<code>create_conquistador = 50</code>
|为当前国家创建一个指定陆军传统的征服者,注意与将领的语法不同
|
|1.1
|-
|create_general
|<code>tradition = <int></code><br>
创建一个陆军将领
|<code>create_general = { tradition = 50 add_fire = 1 culture = greek }</code>
|为当前国家创建一个指定陆军传统的将领,可以设置其保底属性和文化(1.23前语法同征服者)
|
|1.1
|-
|change_unit_type
|<code><type></code><br>
将兵种组改为指定类型
|<code>change_unit_type = western</code>
|更改当前范围的兵种组。
|兵种组对应于科技组{{path|common/technology.txt}}.
|1.1
|-
|kill_leader
|<code>type = <type></code><br>
杀死某一类的将领,或使用名字来指定杀死某一特定将领。
|<pre>kill_leader = { type = random }</pre>
<pre>kill_leader = { type = general }</pre>
- <pre>kill_leader = { type = \"John Smith\" }</pre>
+ <pre>kill_leader = { type = "John Smith" }</pre>
|杀死当前范围内所匹配的将领
|类型:
*general:陆军将领
*admiral:海军提督
*conquistador:陆军征服者
*explorer:海军探险家
*random:随机
*<leader name>指定将领名字
|1.32
|-
|define_admiral
|<code>shock = <int></code>
海军提督冲击属性。<br>
<code>fire = <int></code><br>海军提督火力属性。<br>
<code>manuever = <int></code><br>海军提督机动属性。<br>
<code>siege = <int></code><br>海军提督围城属性。<br>
<code>name = <string></code><br>可选的,提督的名字。<br>
<code>female = yes</code><br>可选的,使提督成为女性。<br>
<code>trait = <trait></code><br>可选的,提督的特质。
|<pre>define_admiral = {
shock = 2
fire = 2
manuever = 2
siege = 2
}</pre>
|在当前范围创建具有已定义属性的海军提督。
|将领特质可以在{{path|common/leader_personalities/*.txt}}.<br>找到。
攻城属性提高了海军提督的封锁效率。<br>姓名参数接受一个已经保存的预定参数,可见于''set_saved_name'' 栏目。
|1.1
|-
|define_explorer
|<code>shock = <int></code>
海军探险家冲击属性。<br>
<code>fire = <int></code><br>海军探险家火力属性。<br>
<code>manuever = <int></code><br>海军探险家机动属性。<br>
<code>siege = <int></code><br>海军探险家围城属性。<br>
<code>name = <string></code><br>可选的,探险家的名字。<br>
<code>female = yes</code><br>可选的,使探险家成为女性。<br>
<code>trait = <trait></code><br>可选的,探险家的特质。
|<pre>define_explorer = {
shock = 2
fire = 2
manuever = 2
siege = 2
}</pre>
|在当前范围创建具有已定义属性的海军探险家。
|将领特质可以在{{path|common/leader_personalities/*.txt}}.<br>找到。
攻城属性提高了海军探险家的封锁效率。<br>姓名参数接受一个已经保存的预定参数,可见于''set_saved_name'' 栏目。
|1.1
|-
|define_conquistador
|<code>shock = <int></code>
陆军征服者冲击属性。<br>
<code>fire = <int></code><br>陆军征服者火力属性。<br>
<code>manuever = <int></code><br>陆军征服者机动属性。<br>
<code>siege = <int></code><br>陆军征服者围城属性。<br>
<code>name = <string></code><br>可选的,征服者的名字。<br>
<code>female = yes</code><br>可选的,使征服者成为女性。<br>
<code>trait = <trait></code><br>可选的,征服者的特质。
|<pre>define_conquistador = {
shock = 2
fire = 2
manuever = 2
siege = 2
}</pre>
|在当前范围创建具有已定义属性的陆军征服者。
|将领特质可以在{{path|common/leader_personalities/*.txt}}.<br>找到。<br>姓名参数接受一个已经保存的预定参数,可见于''set_saved_name'' 栏目。
|1.1
|-
|define_general
|<code>shock = <int></code>
陆军将军冲击属性。<br>
<code>fire = <int></code><br>陆军将军火力属性。<br>
<code>manuever = <int></code><br>陆军将军机动属性。<br>
<code>siege = <int></code><br>陆军将军围城属性。<br>
<code>name = <string></code><br>可选的,将军的名字。<br>
<code>female = yes</code><br>可选的,使将军成为女性。<br>
<code>trait = <trait></code><br>可选的,将军的特质。
|<pre>define_general = {
shock = 2
fire = 2
manuever = 2
siege = 2
}</pre>
|在当前范围创建具有已定义属性的陆军将军。
|将领特质可以在{{path|common/leader_personalities/*.txt}}.<br>找到。<br>姓名参数接受一个已经保存的预定参数,可见于''set_saved_name'' 栏目。
|1.1
|-
|artillery
|<code><scope></code>
炮兵产生的省份及范围。
|<pre>capital_scope = {
ROOT = {
artillery = PREV
}
}</pre>
|在目标省份为当前范围生成一支炮兵部队。
|使用当前选择的炮兵单位。
|1.1
|-
|cavalry
|<code><scope></code><br>骑兵产生的省份及范围。
|<pre>capital_scope = {
ROOT = {
cavalry = PREV
}
}</pre>
|在目标省份为当前范围生成一支骑兵部队。
|使用当前选择的骑兵单位。
|1.1
|-
|infantry
|<code><scope></code><br>步兵产生的省份及范围。
|<pre>capital_scope = {
ROOT = {
infantry = PREV
}
}</pre>
|在目标省份为当前范围生成一支步兵部队。
|使用当前选择的步兵单位。
|1.1
|-
|mercenary_infantry
|<code><scope></code><br>雇佣步兵产生的省份及范围。
|<pre>capital_scope = {
ROOT = {
mercenary_infantry = PREV
}
}</pre>
|在目标省份为当前范围生成一支雇佣步兵部队。
|使用当前选择的步兵单位。
|1.1
|-
|mercenary_cavalry
|<code><scope></code><br>雇佣骑兵产生的省份及范围。
|<pre>capital_scope = {
ROOT = {
mercenary_cavalry = PREV
}
}</pre>
|在目标省份为当前范围生成一支雇佣骑兵部队。
|使用当前选择的骑兵单位。
|1.1
|-
|heavy_ship
|<code><scope></code>
重型船产生的省份及范围。
|<pre>random_owned_province = {
limit = { has_port = yes }
ROOT = {
heavy_ship = PREV
}
}</pre>
|在已定义的省范围内为当前范围生成重型战舰单位。
|使用当前范围的当前重型战舰单位。
要求省范围有一个港口。
|1.1
|-
|light_ship
|<code><scope></code><br>轻型船产生的省份及范围。
|<pre>random_owned_province = {
limit = { has_port = yes }
ROOT = {
light_ship = PREV
}
}</pre>
|在已定义的省范围内为当前范围生成轻型战舰单位。
|使用当前范围的当前轻型战舰单位。
要求省范围有一个港口。
|1.1
|-
|galley
|<code><scope></code><br>中型船产生的省份及范围。
|<pre>random_owned_province = {
limit = { has_port = yes }
ROOT = {
galley = PREV
}
}</pre>
|在定义的省范围内为当前范围生成一个浆帆战舰单位。
|使用当前范围的当前浆帆战舰单位。
要求省范围有一个港口。
|1.1
|-
|transport
|<code><scope></code><br>运输船产生的省份及范围。
|<pre>random_owned_province = {
limit = { has_port = yes }
ROOT = {
transport = PREV
}
}</pre>
|在定义的省范围内为当前范围生成一个运输船单位。
|使用当前范围的当前运输船单位。
要求省范围有一个港口。
|1.1
|-
|<unit name>
|<code><scope></code><br>
单位产生的省范围。
|<pre>random_owned_province = {
limit = { has_port = yes }
ROOT = {
british_redcoat = PREV
}
}</pre>
|在定义的省范围内为当前范围生成一个特定单位。
|单位可在 {{path|common/units/*.txt}}找到
|1.1
|}
===外交===
{{SVersion|1.24}}
- {| width=\"100%\" class=\"wikitable sortable\"
- ! width=\"10%\" |语句
- ! width=\"25%\" |参数
- ! width=\"25%\" |例子
- ! width=\"20%\" |描述
- ! width=\"15%\" |备注
- ! width=\"5%\" |版本
+ {| width="100%" class="wikitable sortable"
+ ! width="10%" |语句
+ ! width="25%" |参数
+ ! width="25%" |例子
+ ! width="20%" |描述
+ ! width="15%" |备注
+ ! width="5%" |版本
|-
|add_historical_friend
|<code><scope></code><br>
为当前国家添加历史友邦
|<code>add_historical_friend = FRA</code>
|使指定的作用域成为当前作用域的历史友邦
|
|1.12
|-
|add_rival
|<code><scope></code><br>
为当前国家添加宿敌
|<code>add_rival = FRA</code>
|使指定的作用域成为当前作用域的宿敌
|
|1.30
|-
|remove_rival
|<code><scope></code><br>
移除当前国家的宿敌
|<code>remove_rival = FRA</code>
|移除的作用域成为当前作用域的宿敌
|
|1.30
|-
|add_historical_rival
|<code><scope></code><br>
为当前国家添加历史宿敌
|<code>add_historical_rival = FRA</code>
|使指定的作用域成为当前作用域的历史宿敌
|
|1.12
|-
|add_historical_friend
|<code><scope></code><br>
为当前国家添加历史友邦
|<code>add_historical_friend = FRA</code>
|使指定的作用域成为当前作用域的历史友邦
|
|1.12
|-
|add_historical_rival
|<code><scope></code><br>
为当前国家添加历史宿敌
|<code>add_historical_rival = FRA</code>
|使指定的作用域成为当前作用域的历史宿敌
|
|1.12
|-
|remove_historical_friend
|<code><scope></code><br>
为当前国家移除历史友邦
|<code>remove_historical_friend = FRA</code>
|移除指定的作用域与当前作用域的历史友邦关系
|
|1.12
|-
|remove_historical_rival
|<code><scope></code><br>
为当前国家移除历史宿敌
|<code>remove_historical_rival = FRA</code>
|移除指定的作用域与当前作用域的历史宿敌关系
|
|1.12
|-
|add_trust
|<code>who = <scope></code><br>
增加信任值的作用域<br>
<code>value = <int></code><br>
信任变化的数值<br>
<code>mutual = yes</code>
可选项。是否同时为双方增加信任值
|<pre>add_trust = {
who = FRA
value = 25
mutual = yes
}</pre>
|指定作用域获得当前作用域的信任值
|需要DLC{{icon|cos}} '''哥萨克'''
|1.20
|-
|add_opinion
|<code>who = <scope></code><br>
添加该关系修正的作用域<br>
<code>modifier = <modifier></code><br>
使用何种关系修正<br>
<code>years = <int></code>
可选项。改关系修正将随时间(年)衰减
|<pre>add_opinion = {
who = FRA
modifier = renounced_as_heretics
}</pre>
|指定作用域获得对当前作用域的关系修正
|关系修正的内容可见: {{path|common/opinion_modifiers/*.txt}}
|1.1
|-
|reverse_add_opinion
|<code>who = <scope></code><br>
添加该关系修正的作用域国家<br>
<code>modifier = <modifier></code><br>
使用哪一种关系修正<br>
<code>years = <int></code>
可选性,关系修正会在多少年后过期
|<pre>reverse_add_opinion = {
who = FRA
modifier = renounced_as_heretics
}</pre>
|当前作用域国家获得对指定作用域国家的关系修正
|存在关系修正内容的文件位于文件夹:{{path|common/opinion_modifiers/*.txt}}
|1.30.4
|-
|remove_opinion
|<code>who = <scope></code><br>
移除该关系修正的作用域国家<br>
<code>modifier = <modifier></code><br>
移除哪一种关系修正<br>
|<pre>remove_opinion = {
who = FRA
modifier = renounced_as_heretics
}</pre>
|指定作用域国家失去对当前作用域国家的关系修正
|存在关系修正内容的文件位于文件夹:{{path|common/opinion_modifiers/*.txt}}
|1.30.4
|-
|reverse_remove_opinion
|<code>who = <scope></code><br>
移除该关系修正的作用域国家<br>
<code>modifier = <modifier></code><br>
移除哪一种关系修正<br>
|<pre>reverse_remove_opinion = {
who = FRA
modifier = renounced_as_heretics
}</pre>
|当前作用域国家失去对指定作用域国家的关系修正。
|存在关系修正内容的文件位于文件夹:{{path|common/opinion_modifiers/*.txt}}
|1.30.4
|-
|create_alliance
|<code><scope></code><br>
与指定国家同盟
|<code>create_alliance = FRA</code>
|当前作用域国家与指定作用域国家达成同盟
|
|1.1
|-
|create_guarantee
|<code><scope></code><br>
给予保障独立的国家
|<code>create_guarantee = FRA</code>
|当前作用域国家给予指定作用域国家保障独立
|
|1.30.4
|-
|create_marriage
|<code><scope></code><br>
与指定国家联姻
|<code>create_marriage = FRA</code>
|建立对当前作用域国家的王室联姻
|
|1.1
|-
|create_union
|<code><scope></code><br>
对指定国家进行联合统治
|<code>create_union = FRA</code>
|建立对当前作用域国家的联合统治
|
|1.1
|-
|create_vassal
|<code><scope></code><br>
将指定国家设置为附庸国
|<code>create_vassal = FRA</code>
|创建指定作用域的国家,设置为当前作用域国家的附庸国
|附属国类型为:''附庸国''
|1.22
|-
|create_march
|<code><scope></code><br>
将指定国家设置为卫戍国
|<code>create_march = FRA</code>
|创建指定作用域的国家,设置为当前作用域国家的卫戍国
|附属国类型为:''卫戍国''
|1.12
|-
|vassalize
|<code><scope></code><br>
使当前国家成为附庸国
|<code>vassalize = FRA</code>
|将指定作用域的国家设置为当前作用域国家的附庸国
|附属国类型为:''附属国''。<br>{{red|请注意:该语句的效果与''create_vassal''一致}}
|1.1
|-
|create_subject
|<code>subject_type = <type></code><br>
附属国类型<br>
<code>subject = <scope></code><br>
指定的范围(国家)
|<pre>create_subject = {
subject_type = tributary_state
subject = FRA
}</pre>
''tributary_state''是朝贡国;
|将指定作用域的国家设置为当前作用域国家的附属国
|附属国类型请参照文件 {{path|common/subject_types/*.txt}}
|1.20
|-
|break_marriage
|<code><scope></code><br>
与指定国家取消王室联姻
|<code>break_marriage = FRA</code>
|取消与当前作用域国家的王室联姻
|
|1.11
|-
|break_union
|<code><scope></code><br>
与指定国家取消联合统治
|<code>break_union = FRA</code>
|取消与当前作用域国家的联合统治
|
|1.1
|-
|inherit
|<code><scope></code><br>
继承指定的国家
|<code>inherit = FRA</code>
|继承指定作用域的全部省份
|
|1.1
|-
|release
|<code><scope></code><br>
释放指定国家
|<code>release = FRA</code>
|将当前作用域所拥有的指定作用域国家的核心全部释放
|
|1.1
|-
|release_all_subjects
|<code>yes</code><br>
布尔值
|<code>release_all_subjects = yes</code>
|将当前作用域所拥有的他国核心全部释放
|1.10
|-
|grant_independence
|<code>yes</code><br>
布尔值
|<code>grant_independence = yes</code>
|使当前作用域独立于他的宗主国
|
|1.22
|-
|declare_war
|<code><scope></code><br>
对指定国家宣战
|<code>declare_war = FRA</code>
|使当前作用域对指定作用域发起一场无理由战争
|若发动无理由宣战,国家将受到 {{red|+30}} {{icon|ae impact}} 侵略扩张和 {{red|−2}} {{icon|stability}} 稳定度的惩罚
|1.1
|-
|declare_war_with_cb
|<code>who = <scope></code><br>
对指定国家宣战<br>
<code>casus_belli = <cb></code>
使用的战争借口(CB)<br>
<code>war_goal_province = <province id></code><br>
战争借口的目标省份<br>
|<pre>declare_war_with_cb = {
who = FRA
casus_belli = cb_annex
}</pre>
|对指定的国家使用指定的战争借口宣战。若是战争借口需要目标省份的,则需添加“war_goal_province = <province id>”
|战争理由可以在{{path|common/cb_types/*.txt}}中找到。
|1.1
|-
|add_truce_with
|<code><scope></code><br>
与指定国家签订一个和平条约
|<code>add_truce_with = FRA</code>
|当前作用域与指定作用域之间添加一个和平条约
|休战时间默认为达成无条件和平的停战时间
|1.1
|-
|white_peace
|<code><scope></code><br>
需达成和平的作用域
|<code>white_peace = FRA</code>
|与指定作用域强制达成无条件和平
|
|1.30.4
|-
|form_coalition_against
|<code><scope></code><br>
在指定作用域国家创建或加入一个包围网联盟
|<code>form_coalition_against = FRA</code>
|当前作用域国家加入一个对抗指定作用域国家的包围网联盟
|包围网相关
|1.30.4
|-
|add_casus_belli
|<code>target = <scope></code><br>
战争借口的目标作用域<br>
<code>type = <cb></code><br>
战争借口<br>
<code>months = <months></code><br>
战争借口的有效期,以月份计
|<pre>add_casus_belli = {
target = FRA
type = cb_annex
month = 60
}</pre>
|为当前作用域的国家增加对目标国家的战争借口(CB)
|战争理由(借口)可以在 {{path|common/cb_types/*.txt}}中找到
|1.1
|-
|reverse_add_casus_belli
|<code>target = <scope></code><br>
拥有战争借口的作用域<br>
<code>type = <cb></code><br>
战争借口<br>
<code>months = <months></code><br>
战争借口的有效期,以月份计
|<pre>reverse_add_casus_belli = {
target = FRA
type = cb_annex
month = 60
}</pre>
|为目标国家增加以当前作用域国家为目标的战争借口(CB)
|战争理由(借口)可以在 {{path|common/cb_types/*.txt}}中找到
|1.1
|-
|remove_casus_belli
|<code>target = <scope></code><br>
移除战争借口的目标作用域<br>
<code>type = <cb></code><br>
战争借口<br>
|<pre>remove_casus_belli = {
target = FRA
type = cb_annex
}</pre>
|为当前作用域的国家移除对目标国家的战争借口(CB)
|战争理由(借口)可以在 {{path|common/cb_types/*.txt}}中找到
|1.1
|-
|reverse_remove_casus_belli
|<code>target = <scope></code><br>
拥有战争借口的作用域<br>
<code>type = <cb></code><br>
战争借口<br>
|<pre>reverse_remove_casus_belli = {
target = FRA
type = cb_annex
}</pre>
|为目标域国家移除以当前作用域国家为目标的战争借口(CB)
|战争理由(借口)可以在 {{path|common/cb_types/*.txt}}中找到
|1.1
|-
|remove_fow
|<code><months></code><br>
移除多久的战争迷雾
|<pre>random_rival_country = {
limit = { war_with = ROOT }
remove_fow = 3
}</pre>
|为作用域范围内的省份移除战争迷雾
|
|1.1
|-
|add_spy_network_from
|<code>who = <scope></code><br>
目标作用域<br>
<code>value = <int></code><br>
间谍网进度变化
|<pre>add_spy_network_from = {
who = FRA
value = 10
}</pre>
|改变指定作用域在当前作用域的间谍网进程
|
|1.16
|-
|add_spy_network_in
|<code>who = <scope></code><br>
目标作用域<br>
<code>value = <int></code><br>
间谍网进度变化
|<pre>add_spy_network_in = {
who = FRA
value = 10
}</pre>
|改变当前作用域在指定作用域的间谍网进程
|
|1.16
|-
|join_all_offensive_wars_of
|<code><scope></code>加入目标作用域的进攻战争
|join_all_offensive_wars_of = TUR
|使当前作用域加入指定作用域的所有进攻战争。
|
|1.30
|-
|join_all_defensive_wars_of
|<code><scope></code>加入目标作用域的防御战争
|join_all_defensive_wars_of = BYZ
|使当前作用域加入指定作用域的所有防御战争。
|
|1.30
|-
|transfer_trade_power
|<code><scope></code>转移贸易竞争力给目标作用域
|transfer_trade_power = BYZ
|使当前作用域转移贸易竞争力给指定作用域。
|
|1.30
|-
|join_trade_league
|<code><scope></code>加入目标作用域的贸易联盟
|join_trade_league = BYZ
|使当前作用域加入指定作用域的贸易联盟。
|
|1.30
|-
|support_independence_of
|<code><scope></code>支持目标作用域的独立
|support_independence_of = BYZ
|使当前作用域支持指定作用域独立。
|
|1.30
|-
|add_favors
|<code>who = <scope></code><br>
目标作用域<br>
<code>amount = <int></code><br>
亏欠人情变化
|<pre>add_favors = {
who = FRA
amount = 10
}</pre>
|改变当前作用域在目标作用域的亏欠人情
|1.32
+ |-
+ |remove_hegemon
+ |<code>yes</code><br>失去霸权
+ |remove_hegemon = yes
+ |使当前作用域失去霸权
+ |1.34
+ |-
+ |break_alliance
+ |<code><scope></code><br>
+ 断盟的作用域
+ |<code>break_alliance = FRA</code>
+ |使指定作用域强制断盟
+ |
+ |1.34
+ |-
+ |add_aggressive_expansion
+ |对指定国家获得侵略扩张<code>who = <scope></code><br>
+ 目标作用域<br>
+ <code>value = <int></code><br>
+ 侵略扩张变化<br>
+ <code>apply_calc = <yes></code><br>
+ 计算文化和宗教的修正影响
+ |<pre>add_aggressive_expansion = {
+ who = FRA
+ value = 50
+ apply_calc = yes
+ }</pre>
+ |增加当前作用域对目标作用域的侵略扩张
+ |1.34
+ |-
+ |reverse_add_aggressive_expansion
+ |对指定国家获得失去扩张<code>who = <scope></code><br>
+ 目标作用域<br>
+ <code>value = <int></code><br>
+ 侵略扩张变化<br>
+ <code>apply_calc = <yes></code><br>
+ 计算文化和宗教的修正影响
+ |<pre>reverse_add_aggressive_expansion = {
+ who = FRA
+ value = -50
+ apply_calc = yes
+ }</pre>
+ |减少当前作用域对目标作用域的侵略扩张
+ |1.34
|}
===阶级及派系===
{{SVersion|1.24}}
- {| width=\"100%\" class=\"wikitable sortable\"
- ! width=\"10%\" |语句
- ! width=\"25%\" |参数
- ! width=\"25%\" |例子
- ! width=\"20%\" |描述
- ! width=\"15%\" |备注
- ! width=\"5%\" |版本
+ {| width="100%" class="wikitable sortable"
+ ! width="10%" |语句
+ ! width="25%" |参数
+ ! width="25%" |例子
+ ! width="20%" |描述
+ ! width="15%" |备注
+ ! width="5%" |版本
|-
|create_independent_estate
|<code><estate></code><br>
成立独立国家的阶层
|<code>create_independent_estate = {</code> <code>estate = estate_cossacks #阶层</code>
<code>government = republic #政体</code>
<code>government_reform = cossacks_reform #政府改革</code>
<code>custom_national_ideas = cossack_ideas #采用的理念</code>
<code>play_as = no #是否扮演该国家</code>
<code>}</code>
|当前作用域拥有的省份中,在该阶层'''所拥有'''(由阶层文件中所定义的“省份独立权重”来决定)的省份上创建独立国家.
新生国家的宗教与这些省份中绝大多数省份的宗教一致(不知指的是省份数量还是总发展度)
|阶层文件位于 {{path|common/estates/*.txt}}
|1.14
|-
|add_estate_influence_modifier
|<code>estate = <estate></code><br>
目标阶层<br>
<code>desc = <string></code><br>
在游戏中显示的此影响力变化的名称<br>
<code>influence = <int></code><br>
增加或减少的影响力值(1%)<br>
<code>duration = <days></code><br>
持续时长<br>
|<pre>add_estate_influence_modifier = {
estate = estate_nobles
desc = EST_VAL_FURTHERED_SPOUSES_FAMILY_NOBLES
influence = 10
duration = 7300
}</pre>
|对指定阶层增加指定数值的影响力,influence为增加值,duration为时间长度(-1为永久)
|阶层文件位于 {{path|common/estates/*.txt}}
|1.14
|-
|add_estate_loyalty
|<code>estate = <estate></code><br>
目标阶层<br>
<code>loyalty = <int></code><br>
增加或减少的忠诚度值(1%)<br>
|<pre>add_estate_loyalty = {
estate = estate_nobles
loyalty = 10
}</pre>
|对指定阶层增加指定数值的忠诚度
|阶层文件位于 {{path|common/estates/*.txt}}
|1.14
|-
|add_estate_loyalty_modifier
|<code>estate = <estate></code><br>
目标阶层<br>
<code>desc = <string></code><br>
在游戏中显示的此忠诚度均衡值变化的名称<br>
<code>loyalty = <int></code><br>
增加或减少的忠诚度均衡值(1%)<br>
<code>duration = <days></code><br>
持续时长<br>
|<pre>add_estate_loyalty_modifier = {
estate = estate_nobles
desc = EST_VAL_EXAMPLE
loyalty = 10
duration = 7300
}</pre>
|对指定阶层增加指定数值的忠诚度均衡值
例如:
原始均衡值为50,增加10后变为60,忠诚值会缓慢从50向60变化
|阶层文件位于 {{path|common/estates/*.txt}}
|1.14
|-
|add_faction
|<code><faction></code><br>要添加的派系
|<code>add_faction = temples</code>
|Adds a faction to the current scope.
添加一个派系到当前作用域
|派系文件位于 {{path|common/factions/}}.
|1.1
|-
|remove_faction
|<code><faction></code><br>要删除的派系
|<code>remove_faction = temples</code>
|Removes a faction from the current scope.
删除当前作用域的一个派系
|派系文件位于 {{path|common/factions/}}.
|1.1
|-
|add_faction_influence
|<code>faction = <faction></code><br>要增加影响力的派系
<br><code>influence = <int></code>
派系影响力增加的数值
|<pre>add_faction_influence = {
faction = temples
influence = 10
}</pre>
|Adds influence for the defined faction.
为定义的派系增加派系影响力
|Mimics the influence boost from pressing the button in the faction window.
|1.1
|-
|change_estate_land_share
|<code>estate = <estate></code><br>要增加领地的阶层
<br><code>share = <int></code>
阶层领地增加的数值
|<pre>change_estate_land_share = {
estate = estate_burghers
share = 5
}</pre>
|Adds percentage of land share to defined estate.
对指定阶层增加指定数值的领地
|阶层文件位于 {{path|common/estates/*.txt}}
|
|-
|remove_estate_privilege
|移除阶级特权
|remove_estate_privilege = estate_church_land_rights
|移除指定的阶级特权
|阶层特权文件位于 {{path|common/estate_privileges/*.txt}}
|
|-
|set_estate_privilege
|添加阶级特权
|set_estate_privilege = estate_church_land_rights
|添加指定的阶级特权
|阶层特权文件位于 {{path|common/estate_privileges/*.txt}}
|
|}
===统治者===
{{SVersion|1.24}}
- {| width=\"100%\" class=\"wikitable sortable\"
- ! width=\"10%\" |语句
- ! width=\"25%\" |参数
- ! width=\"25%\" |例子
- ! width=\"20%\" |描述
- ! width=\"15%\" |备注
- ! width=\"5%\" |版本
+ {| width="100%" class="wikitable sortable"
+ ! width="10%" |语句
+ ! width="25%" |参数
+ ! width="25%" |例子
+ ! width="20%" |描述
+ ! width="15%" |备注
+ ! width="5%" |版本
|-
|change_adm
|<code><int></code><br>
The amount to add or subtract from the ruler's ADM skill.
|<code>change_adm = 1</code>
|为当前统治者提高行政能力
|
|1.1
|-
|change_dip
|<code><int></code><br>
The amount to add or subtract from the ruler's DIP skill.
|<code>change_dip = 1</code>
|为当前统治者提高外交能力
|
|1.1
|-
|change_mil
|<code><int></code><br>
The amount to add or subtract from the ruler's MIL skill.
|<code>change_mil = 1</code>
|为当前统治者提高军事能力
|
|1.1
|-
|add_ruler_personality
|<code><personality></code><br>
需要增加的统治者特质。
|<code>add_ruler_personality = righteous_personality</code>
|为当前统治者添加特定特质
|统治者特质文件位于 {{path|common/ruler_personalities/00_core.txt}}
|1.18
|-
|remove_ruler_personality
|<code><personality></code><br>
|<code>remove_ruler_personality = righteous_personality</code>
|为当前统治者移除特定特质
|统治者特质文件位于{{path|common/ruler_personalities/00_core.txt}}
|1.18
|-
|set_ruler_flag
|<code><flag></code><br>
An unique string to identify the ruler flag with.
|<code>set_ruler_flag = my_flag</code><br>
<code>set_ruler_flag = my_flag@ROOT</code><br>
<code>set_ruler_flag = my_flag@event_target:name</code>
|为当前作用域的统治者定义一个属于统治者的标志
|Flags can be appended with scopes or event targets
|1.7
|-
|clr_ruler_flag
|<code><flag></code>特定标志的字符串
|<code>clr_ruler_flag = my_flag</code><br>
|为当前作用域的统治者移除一个属于统治者的标志
|
|1.7
|-
|set_dynasty
|<code><string> / <scope> / original_dynasty</code>
王朝名<br>
- |<code>set_dynasty = \"Smith\"</code><br>
+ |<code>set_dynasty = "Smith"</code><br>
<code>set_dynasty = FRA</code><br>
<code>set_dynasty = original_dynasty</code>
|改变当前统治者的王朝
|
|1.1
|-
|set_ruler_culture
|<code><culture></code><br>统治者将被改为的文化<br>
|<code>set_ruler_culture = english</code><br>
<code>set_ruler_culture = CAS</code><br>
<code>set_ruler_culture = event_target:my_event_target</code><br>
<code>set_ruler_culture = variable:my_variable</code><br>
|改变当前作用域的统治者的文化
|Cultures are found in {{path|common/cultures/*.txt}}<br>
Can utilise [[Variables|Event Scope Values]].
|1.23
|-
|set_ruler_religion
|<code><religion></code><br>统治者将被改为的宗教
|<code>set_ruler_religion = catholic</code><br>
<code>set_ruler_religion = CAS</code><br>
<code>set_ruler_religion = event_target:my_event_target</code><br>
<code>set_ruler_religion = variable:my_variable</code><br>
|改变当前作用域的统治者的宗教
|Religions are found in {{path|common/religions/*.txt}}<br>
Can utilise [[Variables|Event Scope Values]].
|1.23
|-
|exile_ruler_as
|<code><string></code><br>
The unique string to identify the exiled ruler with.
|<code>exile_ruler_as = my_exiled_ruler</code><br>
|将当前作用域目前的统治者流放,并将其保存为一个独特的字符串。
|
|1.12
|-
|set_ruler
|<code><string></code><br>属于被流放统治者的独特字符串
|<code>set_ruler = my_exiled_ruler</code><br>
|让一个被流放的统治者成为当前作用域的统治者
|
|1.12
|-
|kill_ruler
|<code>yes</code>
布尔值
|<code>kill_ruler = yes</code><br>
|杀死当前作用域的统治者
|
|1.1
|-
|convert_female_ruler_to_general
|<code>yes</code><br>
布尔值
|<code>convert_female_ruler_to_general = yes</code><br>
|将女统治者变为将军
|
|1.15
|-
|convert_ruler_to_general
|<code>yes</code><br>
布尔值
|<code>convert_ruler_to_general = yes</code><br>
|将统治者变为将军
|
|1.8
|-
|add_ruler_modifier
|<code>name = <name></code><br><br>
<code>duration = <days></code><br>
Optional. The number of days to add the ruler modifier for.<br>
<code>hidden = yes</code><br>
Optional. Whether the ruler modifier is hidden in the government view.<br>
<code>desc = <string></code><br>
Optional. The string used to override the automatic duration string.
|<pre>
add_ruler_modifier = {
name = mad_and_bad
duration = -1
desc = MAD_AND_BAD_DESC
hidden = yes
}
</pre>
|为当前统治者添加一个统治者修正
|统治者死亡后,属于他的统治者修正会被清除。
|1.1
|-
|define_ruler_to_general
|<code>shock = <int></code><br>将军的冲击能力
<br><code>fire = <int></code><br>将军的火力能力
<br><code>manuever = <int></code><br>将军的机动能力
<br><code>siege = <int></code><br>将军的围城能力
<br><code>name = <name></code><br>(可选)<br>
|<pre>define_ruler_to_general = {
fire = 3
shock = 3
manuever = 3
siege = 3
}</pre>
|将当前统治者变成一位将军
|
|1.8
|-
|define_leader_to_ruler
|<code>type = general / conquistador / admiral / explorer</code><br>被选取的将领的种类(将军/征服者/提督/探险家)
<br><code>name = <string></code><br>被选取的将领的姓名
可以替代type参数
<br><code>claim = <int></code><br>(可选)统治者的宣称
<br><code>adm = <int></code><br>(可选)统治者的最低行政能力
<br><code>dip = <int></code><br>(可选)统治者的最低外交能力
<br><code>mil = <int></code><br>(可选)统治者的最低军事能力
<br><code>fixed = yes</code><br>(可选)是否使统治者的君主能力固定不变<br>
|<pre>define_leader_to_ruler = {
type = general
adm = 3
dip = 3
mil = 3
fixed = yes
claim = 100
}</pre>
<pre>define_leader_to_ruler = {
- name = \"John Smith\"
+ name = "John Smith"
}</pre>
|在当前作用域内将一位将领变成统治者
|
|1.12
|-
|define_ruler
|<code>name = <string></code><br>(可选)统治者的名字
<br><code>dynasty = <string> / <scope> / original_dynasty</code>
(可选)统治者的王朝
<br><code>age = <years></code><br>(可选)统治者的年龄
<br><code>claim = <int></code><br>(可选)统治者的起始正统性
<br><code>adm = <int></code><br>(可选)统治者的最低行政能力
<br><code>dip = <int></code><br>(可选)统治者的最低外交能力
<br><code>mil = <int></code><br>(可选)统治者的最低军事能力
<br><code>fixed = yes</code><br>(可选)统治者的君主能力是否固定不变
<br><code>max_random_adm = <int></code><br>(可选)统治者的最高行政能力
<br><code>max_random_dip = <int></code><br>(可选)统治者的最高外交能力
<br><code>max_random_mil = <int></code><br>(可选)统治者的最高军事能力
<br><code>hide_skills = yes</code><br>(可选)统治者的君主能力是否隐藏
<code>regency = yes</code><br>(可选)该统治者是否是摄政王
<code>attach_leader = <string></code><br>(可选)统治者产生的将领的名字
<br><code>female = yes</code><br>(可选)强制统治者为女性
<br><code>male = yes</code><br>(可选)强制统治者为男性
<br><code>culture = <culture> / <scope></code><br>(可选)统治者的文化
<br><code>religion = <religion> / <scope></code><br>(可选)统治者的宗教信仰
|<pre>define_ruler = {
- name = \"Ntare I Kivimira\"
- dynasty = \"Cambarantama\"
+ name = "Ntare I Kivimira"
+ dynasty = "Cambarantama"
adm = 5
dip = 4
mil = 4
age = 20
claim = 95
}</pre>
<pre>define_ruler = {
culture = event_target:first_ruler_alternative_province
hide_skills = yes
age = 30
}</pre>
<pre>define_ruler = {
dynasty = ROOT
culture = ROOT
religion = ROOT
}</pre>
<pre>define_ruler = {
dip = 4
adm = 1
mil = 1
fixed = yes
}</pre>
|为当前作用域创建一个统治者
|文化和宗教信仰的属性可以使用[[Variables|Event Scope Values]].<br>
'''name'''参数允许使用一个保存的变量,你可以在'''set_saved_name'''里看到具体信息
|1.1
|}
===配偶===
{{SVersion|1.24}}
- {| width=\"100%\" class=\"wikitable sortable\"
- ! width=\"10%\" |语句
- ! width=\"25%\" |参数
- ! width=\"25%\" |例子
- ! width=\"20%\" |描述
- ! width=\"15%\" |备注
- ! width=\"5%\" |版本
+ {| width="100%" class="wikitable sortable"
+ ! width="10%" |语句
+ ! width="25%" |参数
+ ! width="25%" |例子
+ ! width="20%" |描述
+ ! width="15%" |备注
+ ! width="5%" |版本
|-
|change_consort_adm
|<code><int></code>
增加或减少的配偶的行政能力的值
|<code>change_consort_adm = 1</code>
|为当前配偶提高行政能力
|
|1.18
|-
|change_consort_dip
|<code><int></code>
增加或减少的配偶的外交能力的值
|<code>change_consort_dip = 1</code>
|为当前配偶提高外交能力
|
|1.18
|-
|change_consort_mil
|<code><int></code><br>增加或减少的配偶的军事能力的值
|<code>change_consort_mil = 1</code>
|为当前配偶提高军事能力
|
|1.18
|-
|add_queen_personality
|<code><personality></code><br>需要添加的[[特质]]
|<code>add_queen_personality = righteous_personality</code>
|为当前作用域的配偶添加一个特质
|统治者特质文件位于{{path|common/ruler_personalities/00_core.txt}}
|1.18
|-
|remove_queen_personality
|<code><personality></code><br>需要移除的[[特质]]
|<code>remove_queen_personality = righteous_personality</code>
|为当前作用域的配偶移除一个特质
|统治者特质文件位于{{path|common/ruler_personalities/00_core.txt}}
|1.18
|-
|set_consort_flag
|<code><flag></code><br>标志的名字
|<code>set_consort_flag = my_flag</code><br>
<code>set_consort_flag = my_flag@ROOT</code><br>
<code>set_consort_flag = my_flag@event_target:name</code>
|为当前作用域的配偶定义一个配偶的标志
|Flags can be appended with scopes or event targets
|1.18
|-
|clr_consort_flag
|<code><flag></code>
标志的名字
|<code>clr_consort_flag = my_flag</code><br>
|为当前作用域的配偶移除一个配偶的标志
|
|1.18
|-
|set_consort_culture
|<code><culture></code><br>将要改变成的[[文化]]<br>
|<code>set_consort_culture = english</code><br>
<code>set_consort_culture = CAS</code><br>
<code>set_consort_culture = event_target:my_event_target</code><br>
<code>set_consort_culture = variable:my_variable</code><br>
|改变当前作用域配偶的文化
|Cultures are found in {{path|common/cultures/*.txt}}<br>
Can utilise [[Variables|Event Scope Values]].
|1.23
|-
|set_consort_religion
|<code><religion></code><br>将要改变成的[[宗教]]<br>
|<code>set_consort_religion = catholic</code><br>
<code>set_consort_religion = CAS</code><br>
<code>set_consort_religion = event_target:my_event_target</code><br>
<code>set_consort_religion = variable:my_variable</code><br>
|改变当前作用域配偶的宗教信仰
|Religions are found in {{path|common/religions/*.txt}}<br>
Can utilise [[Variables|Event Scope Values]].
|1.23
|-
|change_consort_regent_to_ruler
|<code>yes</code><br>布尔值
|<code>change_consort_regent_to_ruler = yes</code><br>
|Makes a consort regent into the current ruler for the current scope.
|
|1.18
|-
|kill_consort
|<code>yes</code><br>布尔值
|<code>kill_consort = yes</code><br>
|杀死当前作用域的配偶
|
|1.18
|-
|remove_consort
|<code>yes</code><br>布尔值
|<code>remove_consort = yes</code><br>
|移除当前作用域的配偶
|
|1.18
|-
|define_consort
|<code>name = <string></code><br>
Optional. The name of the consort.<br>
<code>country_of_origin = <scope></code><br>
Optional. The origin country of the consort.<br>
<code>dynasty = <string> / <scope> / original_dynasty</code><br>
Optional. The dynasty of the consort.<br>
<code>age = <years></code><br>
Optional. The age of the consort.<br>
<code>adm = <int></code><br>
Optional. The ADM skill for the consort.<br>
<code>dip = <int></code><br>
Optional. The DIP skill for the consort.<br>
<code>mil = <int></code><br>
Optional. The MIL skill for the consort.<br>
<code>hide_skills = yes</code><br>
Optional. Hides the skill values for this consort.
<code>female = yes</code><br>
Optional. Forces the consort to be female.<br>
<code>male = yes</code><br>
Optional. Forces the consort to be male.<br>
<code>culture = <culture> / <scope></code><br>
Optional. The culture of the consort.<br>
<code>religion = <religion> / <scope></code><br>
Optional. The religion of the consort.<br>
|<pre>define_consort = {
country_of_origin = ROOT
religion = ROOT
culture = ROOT
}</pre>
<pre>define_consort = {
- name = \"Kösem Sultan\"
+ name = "Kösem Sultan"
culture = greek
adm = 5
dip = 4
mil = 5
female = yes
}</pre>
|为当前作用域创建一个配偶
|The skill values are not rolled for consorts, meaning the values set are the exact values a consort gets.<br>
The ''culture'' and ''religion'' attributes can utilise [[Variables|Event Scope Values]].<br>
The ''name'' parameter can accept a saved name variable, see ''set_saved_name'' for more context.
|1.18
+ |-
+ |exile_consort_as
+ |<code><string></code><br>
+ |<code>exile_consort_as = my_exiled_consort</code><br>
+ |将当前作用域目前的配偶流放,并将其保存为一个独特的字符串。
+ |
+ |1.33
+ |-
+ |set_consort
+ |<code><string></code><br>属于被流放配偶的独特字符串
+ |<code>set_consort = my_exiled_consort</code><br>
+ |让一个被流放的配偶成为当前作用域的配偶
+ |
+ |1.33
|}
===继承人===
{{SVersion|1.24}}
- {| width=\"100%\" class=\"wikitable sortable\"
- ! width=\"10%\" |语句
- ! width=\"25%\" |参数
- ! width=\"25%\" |例子
- ! width=\"20%\" |描述
- ! width=\"15%\" |备注
- ! width=\"5%\" |版本
+ {| width="100%" class="wikitable sortable"
+ ! width="10%" |语句
+ ! width="25%" |参数
+ ! width="25%" |例子
+ ! width="20%" |描述
+ ! width="15%" |备注
+ ! width="5%" |版本
|-
|change_heir_adm
|<code><int></code>
增加或减少的继承人的行政能力的值
|<code>change_heir_adm = 1</code>
|为当前继承人提高行政能力
|
|1.14
|-
|change_heir_dip
|<code><int></code>
增加或减少的继承人的外交能力的值
|<code>change_heir_dip = 1</code>
|为当前继承人提高外交能力
|
|1.14
|-
|change_heir_mil
|<code><int></code><br>增加或减少的继承人的军事能力的值
|<code>change_heir_mil = 1</code>
|为当前继承人提高军事能力
|
|1.14
|-
|add_heir_personality
|<code><personality></code><br>需要添加的[[特质]]
|<code>add_heir_personality = righteous_personality</code>
|为当前继承人添加特定特质
|统治者特质文件位于{{path|common/ruler_personalities/00_core.txt}}
|1.18
|-
|remove_heir_personality
|<code><personality></code><br>需要移除的[[特质]]
|<code>remove_heir_personality = righteous_personality</code>
|为当前继承人移除特定特质
|统治者特质文件位于{{path|common/ruler_personalities/00_core.txt}}
|1.18
|-
|set_heir_flag
|<code><flag></code>
An unique string to identify the heir flag with.
|<code>set_heir_flag = my_flag</code><br>
<code>set_heir_flag = my_flag@ROOT</code><br>
<code>set_heir_flag = my_flag@event_target:name</code>
|为当前作用域的继承人定义一个属于统治者的标志
|Flags can be appended with scopes or event targets
|1.1
|-
|clr_heir_flag
|<code><flag></code>
特定标志的字符串
|<code>clr_heir_flag = my_flag</code><br>
|为当前作用域的继承人移除定义一个属于统治者的标志
|
|1.1
|-
|add_heir_claim
|<code><int></code>
增加或减少继承人的宣称
|<code>add_heir_claim = 10</code>
|增加当前作用域继承人的宣称
|
|1.1
|-
|add_heir_support
|<code><int></code>
增加或减少继承人的支持度
|<code>add_heir_support = 10</code>
|增加当前作用域继承人的选举支持度
|选举支持度是波兰的选举君主制特有的
|1.7
|-
|set_heir_culture
|<code><culture></code><br>
需要转变的文化。<br>
|<code>set_heir_culture = english</code><br>
<code>set_heir_culture = CAS</code><br>
<code>set_heir_culture = event_target:my_event_target</code><br>
<code>set_heir_culture = variable:my_variable</code><br>
|为当前作用域的继承人转变文化。
|Cultures are found in {{path|common/cultures/*.txt}}<br>
Can utilise [[Variables|Event Scope Values]].
|1.23
|-
|set_heir_religion
|<code><religion></code><br>
需要转变的宗教信仰<br>
|<code>set_heir_religion = catholic</code><br>
<code>set_heir_religion = CAS</code><br>
<code>set_heir_religion = event_target:my_event_target</code><br>
<code>set_heir_religion = variable:my_variable</code><br>
|Changes the heir religion of the current scope.
|Religions are found in {{path|common/religions/*.txt}}<br>
Can utilise [[Variables|Event Scope Values]].
|1.23
|-
|exile_heir_as
|<code><string></code><br>
The unique string to identify the exiled heir with.
|<code>exile_heir_as = my_exiled_heir</code><br>
|Removes the current heir of the current scope, saving them to the unique string.
|
|1.12
|-
|set_heir
|<code><string></code><br>
The unique string of an exiled heir.
|<code>set_heir = my_exiled_heir</code><br>
|Makes the exiled heir the ruler of the current scope.
|
|1.12
|-
|kill_heir
|allow_new_heir = no<br>
kill_heir ={}
|<code>kill_heir = { allow_new_heir = no }</code><br><code>kill_heir = { }</code>
|杀死当前作用域的继承人。
|显示继承人的死亡信息。<br>
1.32 取消布尔值 变更写法
|1.1
|-
|remove_heir
|无
|<code>remove_heir = {}</code><br>
|移除当前作用域的继承者。
|不显示继承人死亡信息。<br>
1.32 取消布尔值
|1.32
|-
|convert_female_heir_to_general
|<code>yes</code><br>
布尔值
|<code>convert_female_heir_to_general = yes</code><br>
|Converts a female heir into a general.
|
|1.15
|-
|convert_heir_to_general
|<code>yes</code><br>
布尔值
|<code>convert_heir_to_general = yes</code><br>
|Converts a male heir into a general.
|
|1.8
|-
|define_heir_to_general
|<code>shock = <int></code><br>将军的冲击点数<br><code>fire = <int></code><br>将军的火力点数<br><code>manuever = <int></code><br>将军的机动点数<br><code>siege = <int></code><br>将军的围城点数<br>
|<pre>define_heir_to_general = {
fire = 3
shock = 3
manuever = 3
siege = 3
}</pre>
|Creates a general from the heir of the current scope.
|
|1.8
|-
|define_heir
|<code>name = <string></code><br>
Optional. The name of the heir.<br>
<code>dynasty = <string> / <scope> / original_dynasty</code><br>
Optional. The dynasty of the heir.<br>
<code>age = <years></code><br>
Optional. The age of the heir.<br>
<code>birth_date = <date></code><br>
Optional. The birth date of the heir. Can be used instead of the ''age'' parameter.<br>
<code>claim = <int></code><br>
Optional. The starting legitimacy of the heir.<br>
<code>adm = <int></code><br>
Optional. The minimum ADM skill roll for the heir.<br>
<code>dip = <int></code><br>
Optional. The minimum DIP skill roll for the heir.<br>
<code>mil = <int></code><br>
Optional. The minimum MIL skill roll for the heir.<br>
<code>fixed = yes</code><br>
Optional. Makes the heir skill roll fixed to the defined minimums.<br>
<code>max_random_adm = <int></code><br>
Optional. The maximum ADM skill roll for the heir.<br>
<code>max_random_dip = <int></code><br>
Optional. The maximum DIP skill roll for the heir.<br>
<code>max_random_mil = <int></code><br>
Optional. The maximum MIL skill roll for the heir.<br>
<code>hide_skills = yes</code><br>
Optional. Hides the skill values for this heir.
<code>hidden = yes</code><br>
Optional. Hides the skill values for this heir. Legacy version of ''hide_skills''.
<code>no_consort_with_heir = yes</code><br>
Optional. Makes the heir a child not of the consort, i.e. a bastard
<code>female = yes</code><br>
Optional. Forces the heir to be female.<br>
<code>male = yes</code><br>
Optional. Forces the heir to be male.<br>
<code>culture = <culture> / <scope></code><br>
Optional. The culture of the heir.<br>
<code>religion = <religion> / <scope></code><br>
Optional. The religion of the heir.<br>
|<pre>define_heir = {
- dynasty = \"Kamegere\"
+ dynasty = "Kamegere"
claim = 100
}</pre>
<pre>define_heir = {
male = yes
dynasty = ROOT
- name = \"Viracocha\"
+ name = "Viracocha"
claim = 100
adm = 6
}</pre>
<pre>define_heir = {
dynasty = ROOT
age = 13
adm = 3
dip = 3
mil = 3
claim = 50
female = yes
no_consort_with_heir = yes
}</pre>
|为当前作用域创建一个继承人
|The ''culture'' and ''religion'' attributes can utilise [[Variables|Event Scope Values]].<br>
The ''name'' parameter can accept a saved name variable, see ''set_saved_name'' for more context.
|1.1
|}
===神罗、天朝和革命===
{{SVersion|1.24}}
- {| width=\"100%\" class=\"wikitable sortable\"
- ! width=\"10%\" |语句
- ! width=\"25%\" |参数
- ! width=\"25%\" |例子
- ! width=\"20%\" |描述
- ! width=\"15%\" |备注
- ! width=\"5%\" |版本
+ {| width="100%" class="wikitable sortable"
+ ! width="10%" |语句
+ ! width="25%" |参数
+ ! width="25%" |例子
+ ! width="20%" |描述
+ ! width="15%" |备注
+ ! width="5%" |版本
|-
|add_imperial_influence
|<code><int></code><br>
增加或减少的帝国权威值
|<code>add_imperial_influence = 10</code>
|改变当前的帝国威望
|请注意:帝国威望只有神罗皇帝能用
|1.1
|-
|add_scaled_imperial_influence
|<code><int></code><br>
增加或减少的帝国权威值
|<code>add_scaled_imperial_influence = 10</code>
|改变当前的帝国威望
|请注意:帝国威望只有神罗皇帝能用
|1.1
|-
|elector
|<code><bool></code><br>
授予或取消选帝侯地位
|<code>elector = yes</code>
|当前作用域获得或失去神罗选帝侯地位
|
|1.1
|-
|revoke_reform
|<code><reform></code><br>
要移除的帝国改革项目
|<code>revoke_reform = reichsreform</code>
|移除一项帝国改革
|帝国改革可以在{{path|common/imperial_reforms/00_hre.txt}}中找到
|1.1
|-
|set_in_empire
|<code>yes</code><br>
布尔值
|<code>set_in_empire = yes</code>
|使当前作用域的全部省份加入帝国领土
|
|1.12
|-
|hre_inheritable
|<code>yes</code><br>
布尔值
|<code>hre_inheritable = yes</code>
|允许神罗皇帝可以世袭
|
|1.1
|-
|imperial_ban_allowed
|<code>yes</code><br>
布尔值
|<code>imperial_ban_allowed = yes</code>
|允许“夺回帝国领土”成为战争借口
|
|1.1
|-
|internal_hre_cb
|<code>no</code><br>
布尔值
|<code>internal_hre_cb = no</code>
|帝国成员之间不允许创建新的战争借口
|
|1.1
|-
|set_allow_female_emperor
|<code>yes</code><br>
布尔值
|<code>set_allow_female_emperor = yes</code>
|允许女性君主成为神圣罗马帝国皇帝
|
|1.1
|-
|dismantle_hre
|<code>yes</code><br>
布尔值
|<code>dismantle_hre = yes</code>
|解散神圣罗马帝国
|
|1.30
|-
|enable_hre_leagues
|<code>yes</code><br>
布尔值
|<code>enable_hre_leagues = yes</code>
|允许组建的宗教战争同盟.
|
|1.30
|-
|set_hre_religion
|<code><religion></code><br>
选择一个宗教
|<code>set_hre_religion = catholic</code>
|指定一个宗教成为神圣罗马帝国的官方宗教
|
|1.8
|-
|set_hre_heretic_religion
|<code><religion></code><br>
选择一个宗教
|<code>set_hre_religion = catholic</code>
|指定一个宗教成为神圣罗马帝国的异端宗教
|
|1.8
|-
|set_hre_religion_locked
|<code>yes</code><br>
布尔值
|<code>set_hre_religion_locked = yes</code>
|锁定神圣罗马帝国的官方宗教,并取缔异教,结束宗教战争
|
|1.8
|-
|set_hre_religion_treaty
|<code>yes</code><br>
布尔值
|<code>set_hre_religion_treaty = yes</code>
|结束宗教战争,但不设置官方宗教
|
|1.8
|-
|join_league
|<code><scope></code><br>
加入指定的宗教联盟
|<code>join_league = FRA</code>
|使得当前作用域加入指定的宗教联盟
|
|1.8
|-
|leave_league
|<code><scope></code><br>
离开指定的宗教联盟
|<code>leave_league = FRA</code>
|使得当前作用域离开指定的宗教联盟
|
|1.8
|-
|dismantle_empire_of_china
|<code><yes> / <no></code><br>
布尔值
|<code>dismantle_empire_of_china = yes</code>
|关闭天命系统,移除中国皇帝地位
|
|1.20
|-
|set_emperor_of_china
|<code><scope></code><br>
获得中国皇帝地位的国家
|<code>set_emperor_of_china = MNG</code>
|开启天命系统,确立中国皇帝地位
|
|1.20
|-
|set_emperor
|<code><yes></code><br>
获得神罗皇帝地位
|<code>set_emperor = yes</code>
|获得神罗皇帝地位
|
|1.32
|-
|add_mandate
|<code><int></code><br>
变更天命的数值
|<code>add_mandate = 10</code>
|获得或减少天命值
|请注意:天命值只有中国皇帝可以使用
|1.20
|-
|set_mandate
|<code><int></code><br>
变更天命的数值
|<code>set_mandate = 10</code>
|设定当前天命的数值
|请注意:天命值只有中国皇帝可以使用
|1.20
|-
|set_revolution_target
|<code><scope></code><br>
获得革命标记的国家
|<code>set_revolution_target = FRA</code>
|使得当前作用域成为革命目标
|革命目标消失后不会重新出现
|1.1
|}
===AI===
{{SVersion|1.24}}
- {| width=\"100%\" class=\"wikitable sortable\"
- ! width=\"10%\" |语句
- ! width=\"25%\" |参数
- ! width=\"25%\" |例子
- ! width=\"20%\" |描述
- ! width=\"15%\" |备注
- ! width=\"5%\" |版本
+ {| width="100%" class="wikitable sortable"
+ ! width="10%" |语句
+ ! width="25%" |参数
+ ! width="25%" |例子
+ ! width="20%" |描述
+ ! width="15%" |备注
+ ! width="5%" |版本
|-
|set_ai_personality
|<code>personality = <type></code><br>使用的特质
<br>
<code>locked = <yes> / <no></code><br>
特质是否能被改变
|<pre>set_ai_personality = {
personality = ai_capitalist
locked = yes
}</pre>
|改变当前作用域的特质(如果是AI)
|AI的特质位于 {{path|common/ai_personalities/00_ai_personalities.txt}}.
这个特质指的是AI的个性,而不是统治者、继承人和配偶的特性
|1.1
|-
|set_ai_attitude
|<code>attitude = <type></code><br>使用的态度
<br>
<code>who = <scope></code><br>
改变对谁的态度
<br>
<code>locked = <yes> / <no></code><br>
态度是否可以被改变
|<pre>set_ai_attitude = {
attitude = attitude_friendly
who = FRA
locked = yes
}</pre>
|转变当前作用域对目标作用域的态度
|AI的态度位于 {{path|common/ai_attitudes/00_ai_attitudes.txt}}.
|1.1
|}
==作用域:省份==
{{SVersion|1.24}}
这些指令只能在作用域为省份时使用。
===普适===
{{SVersion|1.24}}
- {| width=\"100%\" class=\"wikitable sortable\"
- ! width=\"10%\" |语句
- ! width=\"25%\" |参数
- ! width=\"25%\" |例子
- ! width=\"20%\" |描述
- ! width=\"15%\" |备注
- ! width=\"5%\" |版本
+ {| width="100%" class="wikitable sortable"
+ ! width="10%" |语句
+ ! width="25%" |参数
+ ! width="25%" |例子
+ ! width="20%" |描述
+ ! width="15%" |备注
+ ! width="5%" |版本
|-
|province_event
|<code>id = <id></code><br>
The event id to fire.<br>
<code>days = <days></code><br>
Optional. The number of days to wait after the effect is executed to fire the event.<br>
<code>random = <days></code><br>
Optional. The max number of additional days that can be added to the ''days'' parameter for randomness.<br>
<code>tooltip = <string></code><br>
Optional. The tooltip to display in the effect tooltip ''country_event'' is used in.
|<pre>province_event = {
id = uprising.1
days = 30
random = 15
tooltip = UPRISING_TOOLTIP
}</pre>
|Fire a province event for the current province scope. Appears for the owner of the province scope.
|You cannot fire the same event within itself.
|1.1
|-
|add_province_modifier
|<code>name = <name></code><br>要添加的省份修正<br>
<code>duration = <days></code><br>
可选的,修正持续天数,该值为-1或留空则持续到游戏结束。<br>
<code>hidden = yes</code><br>
可选的,该修正是否隐藏。<br>
<code>desc = <string></code><br>
可选的,对该修正的描述。
|<pre>
add_province_modifier = {
name = annoyed_people
duration = -1
desc = annoyed_people_tooltip
hidden = yes
}
</pre>
|为当前作用域添加省份修正
|当省份拥有者变更时,该省份修正将会消失。
省份修正位于根目录下的common\event_modifiers\*.txt中
|1.1
|-
|add_permanent_province_modifier
|<code>name = <name></code><br>要添加的省份修正<br>
<code>duration = <days></code><br>
可选的,修正持续天数,该值为-1或留空则持续到游戏结束。<br>
<code>hidden = yes</code><br>
可选的,该修正是否隐藏。<br>
<code>desc = <string></code><br>
可选的,对该修正的描述。
|<pre>
add_permanent_province_modifier = {
name = annoyed_people
duration = -1
desc = annoyed_people_tooltip
hidden = yes
}
</pre>
|为当前作用域添加省份修正
|与add_province_modifier不同,当省份拥有者变更时,该省份修正不会消失.
省份修正位于根目录下的common\event_modifiers\*.txt中
|1.1
|-
|add_province_triggered_modifier
|<code><modifier></code><br>添加省份触发修正<br>
|<pre>
add_province_triggered_modifier = test_modifier
</pre>
|给当前作用域添加一个省份触发修正
|这个指令不会显示在效果中,建议使用指令custom_tooltip来对效果进行描述。
省份触发修正位于根目录下的common\province_triggered_modifiers\*.txt中
|1.24
|-
|extend_province_modifier
|<code>name = <name></code><br>被延长时间的省份修正名
<br><code>duration = <days></code><br>需要延长的时间(天)
|<pre>
extend_province_modifier = {
name = annoyed_people
duration = 365
}
</pre>
|为当前作用域内存在的省份修正延长一段时间
|Modifiers added with this effect persist through ownership changes.
|1.1
|-
|remove_province_modifier
|<code><modifier></code><br>需要移除的省份修正名
|<code>remove_province_modifier = annoyed_people</code>
|从当前省份范围内移除一个存在的省份修正
|
|1.1
|-
|set_province_flag
|<code><flag></code><br>
需要添加的省份标志
|<code>set_province_flag = my_flag</code><br>
<code>set_province_flag = my_flag@ROOT</code><br>
<code>set_province_flag = my_flag@event_target:name</code>
|为当前省份范围添加一个省份标志
|标志可以作为条件使用
|1.1
|-
|clr_province_flag
|<code><flag></code><br>
需要移除的省份标志
|<code>clr_province_flag = my_flag</code>
|为当前省份范围移除一个已存在的省份标志
|
|1.1
|-
|change_province_name
|<code><string></code><br>
要更改的名称
- |<code>change_province_name = \"Paris\"</code>
+ |<code>change_province_name = "Paris"</code>
|更改当前作用域的省份名称
|省份名称为省份界面左上角的第一个名称
|1.1
|-
|rename_capital
|<code><string></code><br>
要更改的名称
- |<code>rename_capital = \"Paris\"</code>
+ |<code>rename_capital = "Paris"</code>
|更改当前作用域的省会名称
|省会名称为省份界面左上角的第二个名称
|1.1
|-
|move_capital_effect
|<code><string></code>
省份ID
|<code>151 = {move_capital_effect = yes}</code>
|迁都,改变某省份为首都
|
|1.26
|}
===发展度===
{{SVersion|1.24}}
- {| width=\"100%\" class=\"wikitable sortable\"
- ! width=\"10%\" |语句
- ! width=\"25%\" |参数
- ! width=\"25%\" |例子
- ! width=\"20%\" |描述
- ! width=\"15%\" |备注
- ! width=\"5%\" |版本
+ {| width="100%" class="wikitable sortable"
+ ! width="10%" |语句
+ ! width="25%" |参数
+ ! width="25%" |例子
+ ! width="20%" |描述
+ ! width="15%" |备注
+ ! width="5%" |版本
|-
|add_base_tax
|<code><int></code><br>
增加或减少基础税收的数值。
|<code>add_base_tax = 1</code>
|当前的省份增加税收。
|
|1.1
|-
|add_base_production
|<code><int></code><br>
增加或减少基础生产的数值。
|<code>add_base_production = 1</code>
|当前的省份增加生产。
|
|1.1
|-
|add_base_manpower
|<code><int></code><br>
增加或减少基础人力的数值。
|<code>add_base_manpower = 1</code>
|当前的省份增加人力。
|
|1.1
|-
|set_base_tax
|<code><int></code><br>
更改基础税收为目标数值。
|<code>set_base_tax = 1</code>
|更改当前省份税收。
|
|1.27
|-
|set_base_production
|<code><int></code><br>
更改基础生产为目标数值。
|<code>set_base_production = 1</code>
|更改当前省份生产。
|
|1.27
|-
|set_base_manpower
|<code><int></code><br>
更改基础人力为目标数值。
|<code>set_base_manpower = 1</code>
|更改当前省份人力。
|
|1.27
|-
|add_prosperity
|<code><int></code><br>
增加或减少繁荣的数值。
|<code>add_prosperity = 1</code>
|当前的省份增加繁荣。
|
|1.20
|-
|add_devastation
|<code><int></code><br>
增加或减少荒废度的数值。
|<code>add_devastation = 1</code>
|当前省份增加荒废度。
|
|1.20
|-
|add_local_autonomy
|<code><int></code><br>
增加或减少当地自治度的数值。
|<code>add_local_autonomy = 10</code>
|当前省份增加自治度。
|
|1.8
|-
|set_local_autonomy
|<code><int></code><br>
更改当地自治度为目标数值。
|<code>set_local_autonomy = 50</code>
|更改当前省份自治度。
|
|1.12
|-
|change_trade_goods
|<code><good></code><br>
更改商品。
|<code>change_trade_goods = grain</code>
|更改当前省份的商品。
|可以在这里找到商品 {{path|common/tradegoods/*.txt}}.
|1.1
|-
|add_scaled_local_adm_power
|<code><int></code><br>
获得行政点数
|<code>add_scaled_local_adm_power = 10</code>
|添加数值为该值与当前作用域省份基础税收的乘积的行政点数。
|
|1.12
|-
|add_scaled_local_dip_power
|<code><int></code><br>
获得外交点数
|<code>add_scaled_local_dip_power = 10</code>
|添加数值为该值与当前作用域省份基础生产的乘积的外交点数。
|
|1.12
|-
|add_scaled_local_mil_power
|<code><int></code><br>
获得军事点数
|<code>add_scaled_local_mil_power = 10</code>
|添加数值为该值与当前作用域省份基础人力的乘积的军事点数。
|
|1.12
|-
|cancel_construction
|<code>yes</code><br>
布尔值.
|<code>cancel_construction = yes</code>
|取消省份正在进行的活动。
|包括造核,传教,转文化,建筑和运河工程。
|1.6
|-
- |add_great_project
- |<code><project></code><br>
- 添加运河工程。
- |<code>add_great_project = kiel_canal</code>
- |当前省份将开始运河工程。
- |运河工程在这里 {{path|common/great_projects/*.txt}}.
- |1.6
+ |add_great_project_tier
+ |<code>分句</code><br>
+ 开始修建指定伟大工程。
+ |<code>add_great_project = {
+ type = kiel_canal
+ instant = no
+ }</code>
+ |当前省份开始修建指定伟大工程。
+ |伟大工程在这里 {{path|common/great_projects/*.txt}}.
+ |1.32
|-
|add_great_project_tier
|<code>分句</code><br>
建造伟大工程。
|<code>add_great_project_tier = {
type = temple_of_confucius
tier = 1
}</code>
- |当前省份建造伟大工程。
+ |当前省份建造指定伟大工程。
|伟大工程在这里 {{path|common/great_projects/*.txt}}.
|1.31
|-
+ |move_great_project
+ |<code>分句</code><br>
+ 搬迁指定伟大工程。
+ |<code>move_great_project = {
+ type = alhambra
+ province = 370
+ instant = yes
+ }</code>
+ |搬迁指定伟大工程。
+ |伟大工程在这里 {{path|common/great_projects/*.txt}}.
+ |1.32
+ |-
+ |destroy_great_project
+ |<code>分句</code><br>
+ 摧毁指定伟大工程。
+ |<code>destroy_great_project = {
+ type = chichen_itza
+ }</code>
+ |摧毁指定伟大工程。
+ |伟大工程在这里 {{path|common/great_projects/*.txt}}.
+ |1.32
+ |-
|add_construction_progress
|<code><float></code><br>
增加或减少省份活动进度数值。
|<code>add_construction_progress = 0.05</code>
|改变省份活动和运河工程进度。
|
|1.6
|-
|add_building
|<code><building></code><br>
添加建筑
|<code>add_building = temple</code>
|当前省份添加一个造好的建筑。
|建筑在这里 {{path|common/buildings/*.txt}}.
|1.1
|-
|remove_building
|<code><building></code><br>
移除建筑。
|<code>remove_building = temple</code>
|当前省份移除一个建筑。
|建筑在这里{{path|common/buildings/*.txt}}.
|1.1
|-
|add_building_construction
|<code>building = <building></code>
建筑种类
<br><code>speed = <float></code><br>基础速度的百分比。
<br><code>cost = <float></code><br>基础花费的百分比。<br>
|<pre>add_building_construction = {
building = temple
speed = 0.5
cost = 0.5
}</pre>
|当前省份开始建造建筑。
|花费(cost)和速度(speed)的值是基础值的百分比,也就是说0.5是基础值的一半。
|1.11
|-
|add_center_of_trade_level
|<code><int></code>
要更改的贸易中心的等级数值
|add_center_of_trade_level = 1
|增加(或减少)贸易中心的等级
|数值为正则增加、为负则减少
|1.27
|-
|center_of_trade
|<code><int></code>
要创建的贸易公司的等级数
|center_of_trade = 2
|在该省份创造一个贸易中心节点
|似乎只有在该省份不是贸易中心时此语句有效,不能在原有基础上增加。
若版本允许推荐使用下方的语句:
create_or_add_center_of_trade_level
|1.27
|-
|create_or_add_center_of_trade_level
|<code><int></code>
要更改的贸易中心的等级数值
|create_or_add_center_of_trade_level = 1
|建立或增加一个贸易中心等级
|
|?
|-
|add_to_trade_company
|<code><int></code>
添加省份贸易公司区域
|add_to_trade_company = ROOT
|添加省份贸易公司区域
|
|1.26
|-
|add_trade_company_investment
|<code><int></code>
进行贸易公司建筑投资
|<code>add_trade_company_investment = {
investor = ROOT
investment = company_warehouse
}</code>
|
|
|1.26
|}
+
===社会===
{{SVersion|1.24}}
- {| width=\"100%\" class=\"wikitable sortable\"
- ! width=\"10%\" |语句
- ! width=\"25%\" |参数
- ! width=\"25%\" |例子
- ! width=\"20%\" |描述
- ! width=\"15%\" |备注
- ! width=\"5%\" |版本
+ {| width="100%" class="wikitable sortable"
+ ! width="10%" |语句
+ ! width="25%" |参数
+ ! width="25%" |例子
+ ! width="20%" |描述
+ ! width="15%" |备注
+ ! width="5%" |版本
|-
|create_advisor
|<code><advisor></code><br>顾问种类
|<code>create_advisor = treasurer</code>
|添加顾问。
|顾问在这里 {{path|common/advisors/*.txt}}.
|1.1
|-
|set_seat_in_parliament
|<code>yes / no</code><br>布尔值
|<code>set_seat_in_parliament = yes</code>
|添加议席。
|如果该省份所属国家没有 '''国会'''则无效。
|1.12
|-
|back_current_issue
|<code>yes / no</code><br>布尔值
|<code>back_current_issue = yes</code>
|如果省份有议席,支持或反对议案。
|No effect if the owner of the province does not have a government using '''has_parliament'''.
|1.12
|-
|change_culture
|<code><culture></code>
将要变成的文化
|<code>change_culture = english</code><br>
<code>change_culture = ENG</code><br>
<code>change_culture = event_target:my_event_target</code><br>
<code>change_culture = variable:my_variable</code><br>
|改变省份文化。
|Cultures are found in {{path|common/cultures/*.txt}}.<br>
Can utilise [[Variables|Event Scope Values]].
|1.1
|-
|add_culture_construction
|<code>yes</code><br>布尔值
|<code>add_culture_construction = yes</code>
|开始转文化。
|
|1.12
|-
|change_religion
|<code><religion></code><br>将要变成的宗教<br><code><scope></code><br>变成目标作用域的宗教
|<code>change_religion = catholic</code><br>
<code>change_religion = CAS</code><br>
<code>change_religion = event_target:my_event_target</code><br>
<code>change_religion = variable:my_variable</code><br>
|改变省份宗教。
|文件存在于{{path|common/religions/*.txt}}<br>
可以y事件范围值
|1.1
|-
|change_to_secondary_religion
|<code>yes</code><br>布尔值
|<code>change_to_secondary_religion = yes</code>
|改变成副宗教。
|
|1.14
|-
|send_missionary
|<code>yes</code><br>布尔值
|<code>send_missionary = yes</code>
|开始传教。
|
|1.12
|-
|add_cardinal
|<code>yes</code><br>布尔值
|<code>add_cardinal = yes</code>
|添加枢机主教。
|
|1.8
|-
|remove_cardinal
|<code>yes</code>
布尔值
|<code>remove_cardinal = yes</code>
|移除枢机主教。
|
|1.8
|-
|add_reform_center
|<code><religion></code>
宗教名
|<code>add_reform_center = reformed</code>
|添加一个宗教改革中心。
|
|1.8
|-
|remove_reform_center
|<code><religion></code>
宗教名
|<code>remove_reform_center = reformed</code>
|移除宗教改革中心。
|
|1.8
|-
|set_estate
|<code><estate></code>
阶层名
|<code>set_estate = estate_nobles</code>
|把省份封给阶级。
|会覆盖原来的阶级。
|1.1
|-
|remove_estate
|<code><estate></code>
阶层名
|<code>remove_estate = estate_nobles</code>
|拔掉阶级。
|Does not produce a tooltip.
|1.1
|-
|set_in_empire
|<code>yes / no</code>
布尔值
|<code>set_in_empire = yes</code>
|把省份加进神罗。
|
|1.1
|-
|add_institution_embracement
|<code>which = <institution></code>
要添加的思潮。
<br><code>value = <int></code><br>增加或减少的数值。
|<pre>add_institution_embracement = {
which = feudalism
value = 10
}</pre>
|添加思潮进度。
|The defined institution must be enabled for the owner of the province first.
|1.18
|}
===动荡===
{{SVersion|1.24}}
- {| width=\"100%\" class=\"wikitable sortable\"
- ! width=\"10%\" |语句
- ! width=\"25%\" |参数
- ! width=\"25%\" |例子
- ! width=\"20%\" |描述
- ! width=\"15%\" |备注
- ! width=\"5%\" |版本
+ {| width="100%" class="wikitable sortable"
+ ! width="10%" |语句
+ ! width="25%" |参数
+ ! width="25%" |例子
+ ! width="20%" |描述
+ ! width="15%" |备注
+ ! width="5%" |版本
|-
|add_nationalism
|<code><int></code>
增加或减少的值
|<code>add_nationalism = 10</code>
|增加当前省份的分离主义。
|
|1.1
|-
|add_unrest
|<code><int></code>
增加或减少的值
|<code>add_unrest = 10</code>
|增加当前省份的叛乱。
|将会显示在'''''基本'''''上。
|1.8
|-
|create_native
|<code><int></code>
叛乱的规模
|<code>create_native = 1</code>
|在当前省份产生原住民叛乱
|只能对没有被殖民完成的省份产生效果
|1.1
|-
|create_pirate
|<code><int></code>
海盗的规模
|<code>create_pirate = 1</code>
|在当前省份产生海盗
|只能对海上省份和有港口的省份产生效果
|1.1
|-
|create_revolt
|<code><int></code>
叛乱的规模
|<code>create_revolt = 1</code>
|在当前省份激发最可能的叛乱
|
|1.1
|-
|<rebel type>
|<code><rebel type></code>叛军种类
<code><int></code>
叛乱的规模
|<code>anti_tax_rebels = 1</code>
|在当前省份激发一定规模特定叛乱
|叛军种类在这里{{path|common/rebel_types/*.txt}}.
|1.1
|-
|spawn_rebels
|<code>type = <type></code><br>
The size type to use.<br>
<code>size = <int></code><br>
The size to use.<br>
<code>culture = <culture> / <scope></code><br>
Optional. The culture the rebels belong to.<br>
<code>religion = <religion> / <scope></code><br>
Optional. The religion the rebels belong to.<br>
<code>unrest = <int></code><br>
Optional. Adds this amount of unrest to the province the rebels spawn in.<br>
<code>win = yes</code><br>
Optional. Changes control of the province the rebels spawn in to the rebels.<br>
<code>friend = <scope></code><br>
Optional. Associate a country with the rebels.<br>
<code>leader = <string></code><br>
Optional. Assigns the rebel leader a specific name. Can use ''set_saved_name''.<br>
<code>female = yes</code><br>
Optional. Makes the rebel leader female.<br>
<code>use_monarch_as_leader = yes</code><br>
Optional. Makes the owner's monarch the rebel leader. Removes monarch.<br>
<code>use_heir_as_leader = yes</code><br>
Optional. Makes the owner's heir the rebel leader. Removes heir.<br>
<code>use_consort_as_leader = yes</code><br>
Optional. Makes the owner's consort the rebel leader. Removes consort.
|<pre>spawn_rebels = {
type = noble_rebels
size = 1
}</pre>
<pre>spawn_rebels = {
type = pretender_rebels
size = 2
leader = rebel_preacher
}</pre>
<pre>spawn_rebels = {
type = catholic_rebels
size = 2
friend = FROM
}</pre>
|Spawns the defined rebels in the current province scope.
|Rebel types found in {{path|common/rebel_types/*.txt}}.
|1.1
|}
'''Note:''' the size of revolts follows this formulae:
- :<math>{ \text{number of regiments} = round \left[\left( 4 + 0.3 \cdot \text{total development}
ight) \cdot (1 + 0.03 \cdot \text{technology level}) \cdot \text{rebellion size}
ight] }</math>
+ :<math>{ \text{number of regiments} = round \left[\left( 4 + 0.3 \cdot \text{total development} \right) \cdot (1 + 0.03 \cdot \text{technology level}) \cdot \text{rebellion size} \right] }</math>
===殖民===
{{SVersion|1.24}}
- {| width=\"100%\" class=\"wikitable sortable\"
- ! width=\"10%\" |语句
- ! width=\"25%\" |参数
- ! width=\"25%\" |例子
- ! width=\"20%\" |描述
- ! width=\"15%\" |备注
- ! width=\"5%\" |版本
+ {| width="100%" class="wikitable sortable"
+ ! width="10%" |语句
+ ! width="25%" |参数
+ ! width="25%" |例子
+ ! width="20%" |描述
+ ! width="15%" |备注
+ ! width="5%" |版本
|-
|create_colony
|<code><int></code><br>
The initial size of the colony.
|<pre>random_empty_neighbor_province = {
create_colony = 200
}</pre>
|在当前省份建立殖民地,归属于ROOT省份作用域的拥有者。
|
|1.1
|-
|add_colonysize
|<code><int></code><br>
增加定居者的数量
|<code>add_colonysize = 10</code>
|在当前被殖民省份增加一定数量的定居者。
|
|1.1
|-
|multiply_colonysize
|<code><float></code><br>
The multiplier to use.
|<code>multiply_colonysize = 2</code>
|在当前被殖民省份将定居者数量乘以一定倍率。
|
|1.1
|-
|add_siberian_construction
|<code><int></code><br>
The initial size of the colony.
|<code>add_siberian_construction = 400</code>
|在当前省份建立一个西伯利亚拓荒区。
|
|1.22
|-
|change_native_ferocity
|<code><int></code><br>
The amount to add or subtract.
|<code>change_native_ferocity = 5</code>
|在一个未殖民省份增加土著野蛮度。
|
|1.1
|-
|change_native_hostileness
|<code><int></code><br>
The amount to add or subtract.
|<code>change_native_hostileness = 5</code>
|在一个未殖民省份增加土著侵略性。
|
|1.1
|-
|change_native_size
|<code><int></code><br>
The amount to add or subtract.
|<code>change_native_size = 50</code>
|在一个未殖民省份增加土著数量。
|
|1.1
|-
|discover_country
|<code><scope></code><br>
The country that gains vision.
|<pre>upper_peru_region = {
discover_country = FRA
}</pre>
|指定作用域(国家)获得当前省份的视野。
|最好对区域、地区等作用域使用该指令。
|1.1
|-
|undiscover_country
|<code><scope></code><br>
The country that loses vision.
|<pre>upper_peru_region = {
undiscover_country = FRA
}</pre>
|指定作用域(国家)失去当前省份的视野。
|最好对区域、地区等作用域使用该指令。
|1.1
|}
===外交===
{{SVersion|1.24}}
- {| width=\"100%\" class=\"wikitable sortable\"
- ! width=\"10%\" |语句
- ! width=\"25%\" |参数
- ! width=\"25%\" |例子
- ! width=\"20%\" |描述
- ! width=\"15%\" |备注
- ! width=\"5%\" |版本
+ {| width="100%" class="wikitable sortable"
+ ! width="10%" |语句
+ ! width="25%" |参数
+ ! width="25%" |例子
+ ! width="20%" |描述
+ ! width="15%" |备注
+ ! width="5%" |版本
|-
|add_claim
|<code><scope></code><br>
获得宣称的国家。
|<pre>capital_scope = {
add_claim = FRA
}</pre>
|定义的范围对当前省获得宣称。
|
|1.1
|-
|add_core
|<code><scope></code><br>获得核心的国家。
|<pre>capital_scope = {
add_core = FRA
}</pre>
|定义的范围对当前省获得核心。
|
|1.1
|-
|add_core_construction
|<code>yes</code><br>
Boolean.
|<code>add_core_construction = yes</code>
|为当前所有者在当前省范围内开始核心建设。
|
|1.11
|-
|add_permanent_claim
|<code><scope></code><br>
获得永久性宣称的国家。
|<pre>capital_scope = {
add_permanent_claim = FRA
}</pre>
|对定义的范围获得永久宣称。
|
|1.14
|-
|add_territorial_core
|<code><scope></code><br>
获得领土核心的国家。
|<pre>capital_scope = {
add_territorial_core = FRA
}</pre>
|定义的范围获得自治领地核心。
|
|1.18
|-
|cede_province
|<code><scope></code><br>
获得所有权的国家。
|<pre>capital_scope = {
cede_province = FRA
}</pre>
|定义范围获得当前省范围的所有权。 也就是割让土地给定义范围。如果定义范围本身不存在,那么割让的土地独立建国。
|先前的所有者可以用来将所有权让给某个省份的最后一个先前的所有者。
|1.1
|-
|change_controller
|<code><scope></code><br>
获得控制的国家。
|<pre>capital_scope = {
change_controller = FRA
}</pre>
|定义的范围将获得对当前省范围的控制。
|这里的控制意味着占有,而不是所有权。
|1.1
|-
|change_tribal_land
|<code><scope></code><br>获得所有权的国家。
|<pre>any_tribal_land = {
change_tribal_land = FRA
}</pre>
|定义范围获得当前部落领地省范围的所有权。
|
|1.31
|-
|remove_claim
|<code><scope></code><br>
失去宣称的国家。
|<pre>capital_scope = {
remove_claim = FRA
}</pre>
|定义的范围将失去对当前范围的宣称。
|适用于这两种类型的宣称。
|1.1
|-
|remove_core
|<code><scope></code><br>
失去核心的国家。
|<pre>capital_scope = {
remove_core = FRA
}</pre>
|定义的范围在当前省份范围上失去其核心。
|
|1.1
|-
|remove_territorial_core
|<code><scope></code><br>失去领土核心的国家。
|<pre>capital_scope = {
remove_territorial_core = FRA
}</pre>
|定义的范围在当前省份范围上失去了其领土核心。
|
|1.18
|}
===军事===
{{SVersion|1.24}}
- {| width=\"100%\" class=\"wikitable sortable\"
- ! width=\"10%\" |语句
- ! width=\"25%\" |参数
- ! width=\"25%\" |例子
- ! width=\"20%\" |描述
- ! width=\"15%\" |备注
- ! width=\"5%\" |版本
+ {| width="100%" class="wikitable sortable"
+ ! width="10%" |语句
+ ! width="25%" |参数
+ ! width="25%" |例子
+ ! width="20%" |描述
+ ! width="15%" |备注
+ ! width="5%" |版本
|-
|artillery
|<code><scope></code><br>
炮兵所属国家
|<pre>capital_scope = {
artillery = FRA
}</pre>
|在当前省份范围生成一队指定国家的炮兵。
|使用当前选定的炮兵单位。
|1.1
|-
|cavalry
|<code><scope></code><br>
骑兵所属国家
|<pre>capital_scope = {
cavalry = FRA
}</pre>
|在当前省份范围生成一队指定国家的骑兵。
|使用当前选定的骑兵单位。
|1.1
|-
|infantry
|<code><scope></code><br>
步兵所属国家
|<pre>capital_scope = {
infantry = FRA
}</pre>
|在当前省份范围生成一队指定国家的步兵。
|使用当前选定的步兵单位。
|1.1
|-
|mercenary_infantry
|<code><scope></code><br>
步兵(雇佣兵)所属国家
|<pre>capital_scope = {
mercenary_infantry = FRA
}</pre>
|在当前省份范围生成一队指定国家的步兵(雇佣兵)。
|使用当前选定的步兵单位。
|1.11
|-
|mercenary_cavalry
|<code><scope></code><br>
骑兵(雇佣兵)所属国家
|<pre>capital_scope = {
mercenary_cavalry = FRA
}</pre>
|在当前省份范围生成一队指定国家的骑兵(雇佣兵)。
|使用当前选定的骑兵单位。
|1.11
|-
|streltsy_infantry
|<code><scope></code><br>
射击军所属国家
|<pre>capital_scope = {
streltsy_infantry = FRA
}</pre>
|在当前省份范围生成一队指定国家的射击军。
|使用当前选定的步兵单位。
|1.22
|-
|cossack_cavalry
|<code><scope></code><br>
哥萨克所属国家
|<pre>capital_scope = {
cossack_cavalry = FRA
}</pre>
|在当前省份范围生成一队指定国家的哥萨克。
|使用当前选定的骑兵单位。
|1.22
|-
|heavy_ship
|<code><scope></code><br>
重型战舰
|<pre>random_owned_province = {
limit = { has_port = yes }
heavy_ship = FRA
}</pre>
|在当前省份范围生成一队指定国家的重型战舰。
|使用当前选定的海军单位。<br>当前省份要有港口
|1.1
|-
|light_ship
|<code><scope></code><br>
小型战舰所属国家
|<pre>random_owned_province = {
limit = { has_port = yes }
light_ship = FRA
}</pre>
|在当前省份范围生成一队指定国家的小型战舰。
|使用当前选定的海军单位。<br>当前省份要有港口
|1.1
|-
|galley
|<code><scope></code><br>
桨帆所属国家
|<pre>random_owned_province = {
limit = { has_port = yes }
galley = FRA
}</pre>
|在当前省份范围生成一队指定国家的桨帆战舰。
|使用当前选定的海军单位。<br>当前省份要有港口
|1.1
|-
|transport
|<code><scope></code><br>
运输船所属国家
|<pre>random_owned_province = {
limit = { has_port = yes }
transport = FRA
}</pre>
|在当前省份范围生成一队指定国家的运输船。
|使用当前选定的海军单位。<br>当前省份要有港口
|1.1
|-
|<unit name>
|<code><scope></code><br>
The country scope the unit belongs to
|<pre>capital_scope = {
british_redcoat = FRA
}</pre>
|在当前省份生成一支隶属于指定国家的特定单位。
|单位名称可参考{{path|common/units/*.txt}}.
|1.1
|-
|kill_leader
|<code>type = <type></code><br>
杀死某一类的将领,或使用名字来指定杀死某一特定将领。
|<pre>kill_leader = { type = random }</pre>
<pre>kill_leader = { type = general }</pre>
- <pre>kill_leader = { type = \"John Smith\" }</pre>
+ <pre>kill_leader = { type = "John Smith" }</pre>
|杀死当前范围内所匹配的将领
|类型:
*general:陆军将领
*admiral:海军提督
*conquistador:陆军征服者
*explorer:海军探险家
*random:随机
*<leader name>指定将领名字
|1.32
|-
|kill_units
|<code>who = <scope></code><br>
Optional. Which country scopes should be affected.<br>
<code>type = <type></code><br>
Optional. Which type of units that should be affected.<br>
<code>amount = <int></code><br>
Optional. The specific amount to kill.
|<pre>kill_units = {
who = enemy
}</pre>
<pre>kill_units = {
who = owner
type = infantry
}</pre>
<pre>kill_units = {
who = controller
type = artillery
amount = 5
}</pre>
|杀死当前省份符合设定参数的单位
|你可以用敌人(enemy), 拥有者(owner)和控制者(controller)作为who的参数<br>
当没有who参数时,该指令会杀死当前省份作用域内的所有单位。<br>类型(type)的可用参数:
*infantry:步兵
*cavalry:骑兵
*artillery:炮兵
*heavy_ship:重型战舰
*light_ship:轻型战舰
*galley:浆帆战舰
*transport:运输船
*<unit_name>:该单位的名字
|1.12
|-
|add_unit_construction
|<code>type = <type></code><br>
Which type of unit to build.<br>
<code>amount = <int></code><br>
The amount to build.<br>
<code>speed = <float></code><br>
The speed percentage of the base unit construction speed to use.<br>
<code>cost = <float></code><br>
The cost percentage of the base unit construction cost to use.<br>
<code>mercenary = yes</code><br>
Optional. Makes the constructed units mercenaries.<br>
|<pre>add_unit_construction = {
type = light_ship
amount = 20
speed = 0.1
cost = 0
}</pre>
|在当前省份开始招募(建造)指定的单位。
|类型(type)的可用参数:
*infantry:步兵
*cavalry:骑兵
*artillery:炮兵
*heavy_ship:重型战舰
*light_ship:轻型战舰
*galley:浆帆战舰
*transport:运输船
*<unit_name>:该单位的名字
|1.1
|-
|build_to_forcelimit
|<code><type> = <float></code><br>
The type is any of the base unit types. The value is the percentage of forcelimit.
|<pre>build_to_forcelimit = {
heavy_ship = 0.3
light_ship = 0.3
transport = 0.2
}</pre>
|在当前省份按指定百分比建造指定的单位直到达到该省份拥有者的陆军或海军规模上限
|1相当于100%的陆军或海军规模上限<br>类型(type)的可用参数:
*infantry:步兵
*cavalry:骑兵
*artillery:炮兵
*heavy_ship:重型战舰
*light_ship:轻型战舰
*galley:浆帆战舰
*transport:运输船
*<unit_name>:该单位的名字
|1.1
|-
|remove_loot
|<code>who = <scope></code><br>
The country scope that receives the loot.<br>
<code>amount = <int></code><br>
The amount of loot to take.
|<pre>remove_loot = {
who = ROOT
amount = 5
}</pre>
|Removes loot from the current province scope and grants it to the defined country scope.
|The ''who'' parameter accepts ''enemy'', which distributes the loot to all current enemies of the province owner.
|1.15
|-
|change_siege
|<code><int></code><br>
The process adjustment to add or subtract.
|<code>change_siege = 5</code>
|在当前省份改变围城进程
|
|1.1
|-
|clear_rebels
|<code>yes</code>
布尔值
|clear_rebels = yes
|清除当前作用域省份的所有叛军
|
|1.29
|}
===贸易===
{{SVersion|1.24}}
- {| width=\"100%\" class=\"wikitable sortable\"
- ! width=\"10%\" |语句
- ! width=\"25%\" |参数
- ! width=\"25%\" |例子
- ! width=\"20%\" |描述
- ! width=\"15%\" |备注
- ! width=\"5%\" |版本
+ {| width="100%" class="wikitable sortable"
+ ! width="10%" |语句
+ ! width="25%" |参数
+ ! width="25%" |例子
+ ! width="20%" |描述
+ ! width="15%" |备注
+ ! width="5%" |版本
|-
|recall_merchant
|<code><scope></code><br>国家作用域
|<code>recall_merchant = FRA</code>
|召回当前贸易节点本埠省份内属于某国家的商人
|只有当前省份作用域是一个'''贸易节点本埠'''时才有效果
|1.1
|-
|add_trade_node_income
|<code><int></code><br>
增加或减少数量
|<code>add_trade_node_income = 10</code>
|将收入加入到当前交易节点
|仅当当前省范围是'''贸易节点本埠'''的位置时有效。
|1.1
|-
|add_trade_modifier
|<code>who = <scope></code><br>
接受修正的国家作用域<br>
<code>duration = <days></code><br>
修正的持续时间<br>
<code>power = <float></code><br>
要增加或减少的贸易力量<br>
<code>key = <string></code><br>
在提示中显示文字对应的键值(需要本地化)<br>
|<pre>add_trade_modifier = {
who = ROOT
duration = 5475
power = 15
key = STRONG_MERCHANTS
}</pre>
|在当前贸易点省份作用域内,对制定的国家作用域增加一个贸易修正。
|可以在贸易点中任何一个省份增加。
|1.1
|-
|remove_trade_modifier
|<code>who = <scope></code><br>拥有该贸易修正的国家作用域。<br>
<code>name = <string></code><br>
应被去除的修正的键值。<br>
|<pre>remove_trade_modifier = {
who = ROOT
key = STRONG_MERCHANTS
}</pre>
|Removes a trade modifier for the defined country scope in the current tradenode province scope.
|
|1.1
|}
==流程控制==
{{SVersion|1.24}}
有些效果域(effect scopes)用某种方式改变执行流程。强调,这些都是效果域中的流程控制,不能用于触发器条件。
===隐藏效果===
{{SVersion|1.24}}
隐藏效果是指可以隐藏游戏中指令的提示文本,特别是如果你希望对玩家隐藏相关指令的效果。
你可以在需要的指令外层使用''hidden_effect'' 语句来达到隐藏指令的效果。用法如下:
<pre>
hidden_effect = {
<指令效果>
}
</pre>
===文本提示===
{{SVersion|1.24}}
提示文本是指可以在指令未生效的情况下以文本形式查看到当前指令的效果。
你可以在需要的指令外层使用 ''tooltip'' 语句来达到文本提示指令的效果。用法如下:
<pre>
tooltip = {
<指令效果>
}
</pre>
===如果, 否则和另外(IF语句)===
{{SVersion|1.24}}
The ''if'', ''else_if'' and ''else'' scopes are used to introduce effects within an effect scope that hidge on a set of trigger values.
从[[1.1 版本]]开始支持if的使用,格式如下:
<pre>
if = {
limit = {
<triggers>
}
<effects>
}
</pre>
从[[1.23 版本]]开始支持else_if和else的使用,格式如下:
<pre>
if = {
limit = {
<triggers>
}
<effects>
}
# optional - executed when the trigger values return false, and the else_if trigger values return true
else_if = {
limit = {
<triggers>
}
<effects>
}
# optional - executed when the trigger values return false
else = {
<effects>
}
</pre>
Note that you can nest ''if'' scopes, allowing for multiple layers of triggers and effects.
===当…的时(WHILE语句)===
{{SVersion|1.24}}
while语句被用作当一系列条件被满足时重复执行一系列效果。
从[[1.18 版本|1.18版本]]开始支持while的使用,格式如下:
<pre>
while = {
limit = {
<triggers>
}
<effects>
}
</pre>
Note:
*一个永远满足条件的while语句会进行100,000轮循环,之后便会终止。
*A ''while'' scope will produce no tooltip.
Due to the nature of execution flow in game, you ideally need to add effects '''within''' the while scope effect section that make the trigger values false. There is no way to reduce the execution rate, so the effects will be triggered multiple times a second otherwise.
===触发开关===
{{SVersion|1.24}}
The ''trigger_switch'' scope is used in conjuction with triggers that return discrete values. You list each trigger value you wish to act on, and add the effects within.
The format is as follows:
<pre>
trigger_switch = {
on_trigger = <trigger>
<trigger value> = { <effect> }
<trigger value> = { <effect> }
}
</pre>
As an example, let's say you want to add 1 stability for western countries, and remove 1 stability for eastern countries. You can do this with an ''if'' scope, but it will be more verbose compared to a ''trigger_switch'':
<pre>
trigger_switch = {
on_trigger = technology_group
western = { add_stability = 1 }
eastern = { add_stability = -1 }
}
</pre>
===随机 和 随机列表(random的用法)===
{{SVersion|1.24}}
使用''random''和''random_list''语句可以随机产生效果。
The ''random'' scope is used to add a single random roll to a set of effects. The format is as follows:
<pre>
random = {
chance = 50
<effects>
}
</pre>
The chance is out of 100, and only displays integer values in game, although it does accept decimal values.
The ''random_list'' scope is used to add different sets of effects to a single random roll. The format is as follows:
<pre>
- random = {
+ random_list = {
<chance> = {
<effects>
}
<chance> = {
<effects>
}
}
</pre>
Note that the chance total will be out of 100. If the chance values used do not add up to 100, they will be scaled to maintain the same ratio.
The ''random_list'' accepts parameters as chance values when in a file in a ''scripted_effect''. For example:
<pre>
random_list = {
$chance_of_secondary$ = { set_country_flag = jewish_advisor }
$chance_of_primary$ = { set_country_flag = state_religion_advisor }
$chance_of_secondary$ = { set_country_flag = protestant_or_coptic_advisor }
$chance_of_secondary$ = { set_country_flag = reformed_or_orthodox_advisor }
$chance_of_tertiary$ = { set_country_flag = heathen_advisor }
}
</pre>
'''Note:''' It is important to understand that both of these scopes may not always return a random result. This occurs when they are used in a non-seeded script location. An example of this (from the past), was in the estate interaction effect scopes, which meant using a random scope there returned the same result everytime.
===脚本效果===
{{SVersion|1.24}}
{{main|scripted_effects}}
脚本效果(Scripted effects)本质上是指令宏,能被用于事件、决议等以便改善代码可读性。通过将混乱的代码保持在脚本效果中,可以更容易地保持可读性。
脚本效果能在这里找到:{{path|common/scripted_effects/*.txt}}。
这是一个脚本效果,把7行减少到一行:
<pre>
clear_religious_scholar_modifiers_effect = {
remove_country_modifier = hanafi_scholar_modifier
remove_country_modifier = hanbali_scholar_modifier
remove_country_modifier = maliki_scholar_modifier
remove_country_modifier = shafii_scholar_modifier
remove_country_modifier = ismaili_scholar_modifier
remove_country_modifier = jafari_scholar_modifier
remove_country_modifier = zaidi_scholar_modifier
}
</pre>
在事件中添加如下代码来执行脚本效果:
<pre>clear_religious_scholar_modifiers_effect = yes</pre>
脚本效果现在接受参数,在[[1.23 版本]]中。这意味着你能把数据传递进脚本效果,从而用于更广泛的用途。
要在脚本效果内部定义参数,只需简单地用''$''符号包围关键字。例如:''$DURATION$''。
这里有一个脚本效果增加或扩展了 '''any''' 传递给它修正的省份:
<pre>
add_or_extend_province_modifier_effect = {
if = {
limit = {
has_province_modifier = $MODIFIER$
}
extend_province_modifier = { name = $MODIFIER$ duration = $DURATION$ }
}
else = {
add_province_modifier = { name = $MODIFIER$ duration = $DURATION$ }
}
}
</pre>
在事件中添加如下代码来执行脚本效果:
<pre>
add_or_extend_province_modifier_effect = { MODIFIER = pasha_removed_modifier DURATION = 3650 }
</pre>
==已被移除的效果指令==
{{SVersion|1.24}}
- {| width=\"100%\" class=\"wikitable sortable\"
- ! width=\"40%\" |指令
- ! width=\"40%\" |示例
- ! width=\"20%\" |移除版本
+ {| width="100%" class="wikitable sortable"
+ ! width="40%" |指令
+ ! width="40%" |示例
+ ! width="20%" |移除版本
|-
|add_province_manpower
|<code>add_province_manpower = 1</code>
|1.12
|-
|add_revolt_risk
|<code>add_revolt_risk = 5</code>
|1.8
|-
|culture_group_union
|<code>culture_group_union = ROOT</code>
|1.14
|-
|create_protectorate
- |<code>create_protectorate = ROOT</code>
- |1.20
+ |<code> create_protectorate = ROOT</code>
+ | 1.20
+ |-
+ |set_estate
+ |<code>set_estate = estate_nobles</code>
+ |1.30
+ |-
+ |remove_estate
+ |<code>remove_estate = estate_nobles</code>
+ |1.30
|}
{{Modding navbox}}
[[Category:模组制作]]
[[en:Commands]]
