欢迎访问欧陆风云4百科!注册一个账号,一起参与编写吧!这里是当前的工程

2019年11月服务器费用已由站长支付,若您想帮助我们可以点这里!欢迎所有对百科感兴趣的同学加入QQ群:602439518

本页面所适用的版本可能已经过时,最后更新于1.24

“指令”的版本间的差异

来自欧陆风云4百科
跳转至: 导航搜索
(译名统一)
 
第2,039行: 第2,039行:
 
The amount to add or subtract from the ruler's ADM skill.
 
The amount to add or subtract from the ruler's ADM skill.
 
|<code>change_adm = 1</code>
 
|<code>change_adm = 1</code>
|为当前 君主 提高政 能力
+
|为当前 统治者 提高 政能力
 
|
 
|
 
|1.1
 
|1.1
第2,047行: 第2,047行:
 
The amount to add or subtract from the ruler's DIP skill.
 
The amount to add or subtract from the ruler's DIP skill.
 
|<code>change_dip = 1</code>
 
|<code>change_dip = 1</code>
|为当前 君主 提高外交能力
+
|为当前 统治者 提高外交能力
 
|
 
|
 
|1.1
 
|1.1
第2,055行: 第2,055行:
 
The amount to add or subtract from the ruler's MIL skill.
 
The amount to add or subtract from the ruler's MIL skill.
 
|<code>change_mil = 1</code>
 
|<code>change_mil = 1</code>
|为当前 君主 提高军事能力
+
|为当前 统治者 提高军事能力
 
|
 
|
 
|1.1
 
|1.1
第2,450行: 第2,450行:
 
The amount to add or subtract from the heir's ADM skill.
 
The amount to add or subtract from the heir's ADM skill.
 
|<code>change_heir_adm = 1</code>
 
|<code>change_heir_adm = 1</code>
|为当前继承人提高政 能力
+
|为当前继承人提高 政能力
 
|
 
|
 
|1.14
 
|1.14

2019年12月1日 (日) 23:23的最新版本

这个页面介绍的是改派用到的指令语句,控制台指令(Console commands)请参阅另一页面

效果(effects)指令 用于在特定的作用域(scope)中动态地影响游戏。在早前,这部分被直接称为Effects,现在则是Commands,从而避免与Scopes#Effect scopes混淆。 指令只能用于特定的作用域上下文(scope contexts),也只能操作特定的值域。否则,就会因“数据类型不一致”而失效。而“数据类型转换”要通过域的转换,而不是指令。因此,要特别注意域上下文是Triggers、Effects或者其他段落,也要注意指令用于country、province或者其他类型。大体上,Commands主要用于Effects域内的country型或province型子域。

多作用域

这些效果指令在国家或省份的作用域中都可以被使用。 参照Scopes#Dual_scopes,观察可见,这部分指令都有全局性。与作用域的双重域不同,指令的双重域仍然只能写在效果域上下文内,但是它们的操作目标(上下文中的某个子域)可能是双重的。

语句 参数 例子 描述 备注 版本
set_global_flag <flag>
用于标识全局标志
set_global_flag = my_flag
set_global_flag = my_flag@ROOT
set_global_flag = my_flag@event_target:name
定义一个全局标志 标志可以附加作用域或事件目标 1.1
clr_global_flag <flag>
用于清除全局标志
clr_global_flag = my_flag 清除一个全局标志 1.1
custom_tooltip <string>
以一段文字代替效果显示
custom_tooltip = my_tooltip_tt 以一段文字代替效果显示 1.1
log <string>
An string to in the game.log
log = "myVariable: [Root.myVariable.GetValue]" Displays a string in the game.log when executed. Accepts all localization commands (i.e. [Root.GetName], etc) 1.21
save_event_target_as <string>
An unique string to identify the event target with.
capital_scope = {
    save_event_target_as = my_province
}
Saves the current scope as a key. Is cleared once execution ends (i.e. end of event). Use event_target:<key> to access the scope. 1.8
save_global_event_target_as <string>
An unique string to identify the global event target with.
random_country = {
    save_global_event_target_as = my_country
}
Saves the current scope as a key. Persists after execution until cleared via effect. Use event_target:<key> to access the scope. 1.8
clear_global_event_target <string>
The unique string of the global event target to clear.
clear_global_event_target = my_country Clears a specific global event target. 1.8
clear_global_event_targets yes
Boolean.
clear_global_event_targets = yes Clears all global event targets. 1.8
show_ambient_object <string>
The unique string of the ambient object to show.
show_ambient_object = nammi2_hagia_sophia_minarets_entity Displays a hidden ambient object from the map/ambient_objects.txt file. 1.19
hide_ambient_object <string>
The unique string of the ambient object to hide.
hide_ambient_object = nammi2_hagia_sophia_minarets_entity Hides a visible ambient object from the map/ambient_objects.txt file. 1.19

作用域:国家

这些指令只能在作用域为国家时使用。

一般指令

语句 参数 例子 描述 备注 版本
country_event id = <id>

需要触发的事件ID
days = <days>
可选。 指定天数后触发此事件
random = <days>
可选。 加入随机参数,增加触发事件的 天数 最大值
tooltip = <string>
可选。 以本地化文字代替 country_event 显示效果

country_event = { 
    id = celestial_empire_events.1
    days = 30
    random = 15
    tooltip = CELESTIAL_EMPIRE_TOOLTIP
}
当前国家触发一个国家事件 若以事件效果触发,请注意,不能再触发此事件本身。 1.01
add_country_modifier name = <name>

添加一个事件修正
duration = <days>
可选。 事件修正的持续时间
hidden = yes
可选。 此修正是否隐藏,是否可以在政府界面中查看到
desc = <string>
可选。 添加修正额外的文字描述

add_country_modifier = { 
    name = the_proper_old_ways
    duration = -1  
    desc = PROPER_OLD_WAYS_DESC_TOOLTIP
    hidden = yes
}
当前国家添加一个事件修正 1.01
remove_country_modifier <modifier>

移除事件修正

remove_country_modifier = the_proper_old_ways 当前国家移除一个事件修正 1.01
set_country_flag <flag>
一个特殊的标识
set_country_flag = my_flag
set_country_flag = my_flag@ROOT
set_country_flag = my_flag@event_target:name
定义一个国家标识 Flags可以作为条件范围与事件目标 1.01
clr_country_flag <flag>
确认一个特殊的标识以清除
clr_country_flag = my_flag 清除一个国家标识 1.01
change_tag <scope>

变更控制的TAG

change_tag = FRA
change_tag = ROOT
change_tag = event_target:my_country
变更控制的TAG。控制的国家变身为指定的tag。 1.01
switch_tag <scope>

切换控制的TAG

switch_tag = FRA
switch_tag = ROOT
switch_tag = event_target:my_country
切换玩家控制的TAG。原本的国家将变为由AI控制。 1.08
change_graphical_culture <gfxculture>

变更的文化配图

change_graphical_culture = westerngfx 变更指定国家的文化配图。文化配图包括兵模、顾问肖像等。 文化配图可见/Europa Universalis IV/common/graphicalculturetype.txt 1.11
add_adm_power <int>

增加或减少的君主力量点数

add_adm_power = 100 增加行政君主力量点数 1.01
add_dip_power <int>

增加或减少的君主力量点数

add_dip_power = 100 增加外交君主力量点数 1.01
add_mil_power <int>

增加或减少的君主力量点数

add_mil_power = 100 增加军事君主力量点数 1.01
set_saved_name key = <string>

The key that holds the name.
type = advisor / simple
The name generation type. Advisor draws from namelist, simple utilises name parameter.
name = <string>
The name to hold in the key. Only used with the simple type.
scope = <scope>
The country scope to draw the namelist from. Only used with the advisor type.

Simple:
set_saved_name = {
    key = simple_name
    type = simple
    name = "My Simple Name"
}
define_ruler = {
    name = simple_name
}

Advisor:

set_saved_name = {
    key = noble_zealot
    type = advisor
    scope = ROOT
}
spawn_rebels = {
    size = 1
    leader = noble_zealot
    type = religious_rebels
}
Saves a name to an unique key for usage in other effects. Usable with define_admiral, define_explorer, define_conquistador, define_general, define_ruler, define_consort, define_heir, define_advisor and spawn_rebels. 1.23
clear_saved_name <key>

The name key to clear.

clear_saved_name = noble_zealot Clears a saved name key. Use this after using the saved name in an effect. 1.23

经济

语句 参数 例子 描述 备注 版本
add_years_of_income <float>

增加或减少的收入数字

add_years_of_income = 0.5 获得当前年收入X倍的金币:即获得若干年年收入(当前状况下)的金币 1个单位相当于当前1年的收入,年收入多少根据当前国家月收入计算。 1.01
add_treasury <int>

增加或减少的金币数量

add_treasury = 50 获得指定数目的金币 1.01
add_inflation <float>

增加或减少通货膨胀率

add_inflation = 2 获得指定的通货膨胀率 1.01
add_mercantilism <int>

增加或减少重商主义

add_mercantilism = 2 获得指定的重商主义 1.01
add_tariff_value <float>

增加或减少关税税率

add_tariff_value = 0.1 提高的关税税率幅度 关税是殖民地等附庸国向宗主国输送的财富。 1.04
loan_size <int>

变更的数值

loan_size = 24 贷款规模 贷款规模与月收入相关,当月中贷款的额度都是相近的。 1.01
change_price trade_goods = <tradegood>

贸易品价格的变化。
key = <string>
在贸易品价格提示框中显示的文本。
value = <float>
贸易品价格变化的百分比。
duration = <days>
贸易品价格变化持续的时间。

change_price = {
    trade_goods = grain
    key = grain_shortage
    value = 0.5
    duration = 3650
}
变更全球贸易品价格 贸易品价格可以在/Europa Universalis IV/common/prices/*.txt搜索到

新价格 = 基础价格 + (基础价格 * 价格变化的百分比)
duration = -1 表示永久变更。

1.08

政府

语句 参数 例子 描述 备注 版本
add_absolutism <int>

专制度变化的数值

add_absolutism = 10 变化相应数值的专制度 若专制度未被启用则无效果 1.20
add_legitimacy <int>

正统度变化的数值。
<scope>
增加或者减少正统度,以达到当前目标的值

add_legitimacy = 10
add_legitimacy = CAS
变化相应数值的正统度 若政体无 monarchy = yes 则无效果 1.01
add_republican_tradition <int>

共和传统变化的数值

add_republican_tradition = 10 变化相应数值的共和传统 若政体无 republic = yes 则无效果 1.01
add_scaled_republican_tradition <int>

The amount of republican tradition to add or subtract.

add_scaled_republican_tradition = 10 Adds republican tradition to the current scope. Scales to the government's election cycle duration.
No effect if not a government using republic.
1.07
add_devotion <int>

奉献度变化的数值

add_devotion = 10 变化相应数值的奉献度 若非 has_devotion = yes 则无效果 1.12
add_horde_unity <int>

部族统一度变化的数值

add_horde_unity = 10 变化相应数值的部族统一度 若政体无 nomad = yes 则无效果 1.14
add_meritocracy <int>

精英度变化的数值

add_meritocracy = 10 变化相应数值的精英度 若政体无 has_meritocracy = yes 则无效果 1.20
set_meritocracy <int>

设置精英度的数值

set_meritocracy = 10 设置精英度为指定的数值 若政体无 has_meritocracy = yes 则无效果 1.20
add_militarised_society <int>

军事化度变化的数值

add_militarised_society = 10 变化相应数值的军事化度 若政体无 militarised_society = yes 则无效果 1.18
add_tribal_allegiance <int>

部族忠诚度变化的数值

add_tribal_allegiance = 10 变化相应数值的部族忠诚度 若政体无 tribal_federation_mechanic = yes 则无效果 1.23
change_statists_vs_orangists <int>

派别倾向的数值变化

change_statists_vs_orangists = 10 议会派与奥兰治派,变化相应数值的派别倾向 正数倾向奥兰治派,负数倾向议会派 1.07
change_government <government>

变更为指定的政体

change_government = dictatorship 变更为指定的政体类型 政体类型可以在/Europa Universalis IV/common/governments/*.txt搜索到 1.01
set_government_rank <int>

变更政府等级到指定的等级

set_government_rank = 3 政府等级变更为指定的级别 原版默认政府等级为1-3级,分别对应公国级、王国级、帝国级 1.12
add_government_power government_mechanic = <type>

指定的政府机制
which = <type>
政府力量类型 行政(ADM),外交(DIP) 或者 军事(MIL)
amount = <type>
获得的力量点数

add_government_power = {
    government_mechanic = russian_mechanic
    which = ADM
    amount = 10
}
变更政府机制中任意一项力量点数的多少 目前拥有特殊政府机制的政体列表:
  • 俄罗斯政府机制(russian_mechanic)
  • 封建神权政府机制(feudal_theocracy_mechanic)
  • 部族忠诚政府机制(tribal_federation_mechanic)
  • 马穆鲁克政府机制(mamluk_mechanic)
  • 伊克塔政府机制(iqta_mechanic)
1.23
set_government_and_rank government = <government>

变更为指定的政体
rank = <int>
变更政府等级到指定的级别

set_government_and_rank = { 
    government = celestial_empire
    rank = 3
}

注:此例仅为举例,原版中天朝政体(celestial_empire)锁定帝国级(fix = 3),故而无需特别设置。

变更政体的同时设置政府级别 政体类型可以在/Europa Universalis IV/common/governments/*.txt搜索到

注:这项指令无法变更锁定政府级别和附庸的最大政府级别

1.22
dissolve_parliament yes

布尔值

dissolve_parliament = yes 去除议会机制 若政体无 has_parliament = yes 则无效果 1.15
reinstate_parliament yes

布尔值

reinstate_parliament = yes 用于 dissolve_parliament = yes 去除议会机制后,来恢复议会机制 若政体无 has_parliament = yes 则无效果 1.15

文化

语句 参数 例子 描述 备注 版本
add_accepted_culture <culture>

添加可接受文化
<scope>
添加目标的可接受文化

add_accepted_culture = english

add_accepted_culture = ENG
add_accepted_culture = event_target:my_event_target
add_accepted_culture = variable:my_variable

添加目标(文化、国家、变量)为新的可接受文化 文化请参考/Europa Universalis IV/common/cultures/*.txt

另外也可以参考事件范围变量

1.01
change_primary_culture <culture>

变更主流文化, 文化请参考/Europa Universalis IV/common/cultures/
<scope>
变更为目标的主流文化

change_primary_culture = english

change_primary_culture = ENG
change_primary_culture = event_target:my_event_target
change_primary_culture = variable:my_variable

添加目标(文化、国家、变量)为新的主流文化 文化请参考/Europa Universalis IV/common/cultures/*.txt

另外也可以参考事件范围变量

1.01
remove_accepted_culture <culture>

移除可接受文化,文化请参考/Europa Universalis IV/common/cultures/
<scope>
移除目标的可接受文化

remove_accepted_culture = english

remove_accepted_culture = ENG
remove_accepted_culture = event_target:my_event_target
remove_accepted_culture = variable:my_variable

移除目标(文化、国家、变量)的可接受文化 文化请参考/Europa Universalis IV/common/cultures/*.txt

另外也可以参考事件范围变量

1.01

宗教

语句 参数 例子 描述 备注 版本
change_religion <religion>

要改变的宗教
<scope>
改变宗教的范围

change_religion = catholic

change_religion = CAS
change_religion = event_target:my_event_target
change_religion = variable:my_variable

在当前范围内改变宗教 宗教可以在/Europa Universalis IV/common/religions/*.txt里面找到

Can utilise Event Scope Values.

1.1
enable_religion <religion>

要启用的宗教

enable_religion = reformed
启用一个受条件限制的宗教 宗教可以在/Europa Universalis IV/common/religions/*.txt里面找到 1.1
force_converted yes

是或者否

force_converted = yes
设定当前作用域是否“被强制转教”的记录 1.1
add_authority <int>

增加或减少权威值

add_authority = 10
增加权威值,权威值作用于因蒂崇拜的宗教改革 如果国家没有因蒂崇拜的宗教改革系统,那么增加或减少权威值将不会产生任何效果 1.10
add_doom <int>

增加或减少末日值

add_doom = 10
增加末日值,末日值作用于纳瓦特尔神话的宗教改革 如果国家没有纳瓦特尔神话的宗教改革系统,那么增加或减少末日值将不会产生任何效果 1.10
remove_religious_reforms <int>

移除指定宗教改革数量

remove_religious_reforms = 2
移除指定宗教改革数量 如果国家没有因蒂崇拜的宗教改革系统,将不会产生任何效果 1.10
add_fervor <int>

增加或减少狂热点

add_fervor = 10
改变指定数额的狂热点,狂热点作用于改革宗的狂热系统 如果国家没有改革宗的狂热系统,将不会产生任何效果 1.6
add_karma <int>

增加或减少业力

add_karma = 10
改变指定数额的业力,业力作用于佛教通用的业力系统 如果国家没有佛教诸教派的业力系统,将不会产生任何效果 1.12
set_karma <int>

设置业力值

set_karma = 10

将业力值设定为指定数额,业力作用于佛教通用的业力系统

如果国家没有佛教诸教派的业力系统,将不会产生任何效果 1.12
add_church_power <int>

增加或减少教会力量

add_church_power = 10
改变指定数量的教会力量,教会力量作用于新教的教会系统 如果国家没有新教的教会力量系统,将不会产生任何效果 1.12
add_church_aspect <aspect>

启用的信条

add_church_aspect = adult_baptism_aspect
对当前作用域启用指定的信条。 原版信条可在/Europa Universalis IV/common/church_aspects/00_church_aspects.txt找到

如果国家没有新教的教会力量系统或者指定的教会力量对该国家不可用则无效
对科普特祝福机制无效。

1.12
remove_church_aspect <aspect>

要移除的信条,可填random而随机移除一项

remove_church_aspect = adult_baptism_aspect
移除当前作用域国家指定的信条 原版信条可在/Europa Universalis IV/common/church_aspects/00_church_aspects.txt找到

如果国家没有新教的教会力量系统或者指定的教会力量对该国家不可用则无效
对科普特祝福机制无效。

1.12
add_papal_influence <int>

增加或减少教廷影响力

add_papal_influence = 10
改变指定数额的教廷影响力 如果国家没有天主教的教廷系统,将不会产生任何效果 1.1
add_reform_desire <float>

增加或减少改革呼声

add_reform_desire = 0.5
改变指定数额改革呼声 1.1
excommunicate <scope>

开除教籍

excommunicate = FRA 将指定国家开除教籍,如果目标国家已经被开除教籍,则恢复教籍 1.12
set_papacy_active yesno

是或者否

set_papacy_active = yes 启用或禁用教廷机制 1.1
add_piety <float>

增加或减少虔诚

add_piety = 0.5
改变指定数额的虔诚 如果国家没有伊斯兰教的虔诚系统,将不会产生任何效果 1.1
set_school_opinion who = <who>

目标学派
opinion = <opinion>
设置为何种关系

set_school_opinion = {
    who = TUR
    opinion = -1
}
设置当前作用域国家所属学派对指定作用域国家所属学派的关系。 -1为负面(敌视), 0为中立(暧昧), 1为正面(友好)。 1.23
add_patriarch_authority <float>

牧首权威的改变量

add_patriarch_authority = 0.5
增加或者减少当前国家的牧首权威 如果国家没有牧首权威机制则无效。 1.1
change_personal_deity <deity>

要变更的守护神(主神)

change_personal_deity = odin
将当前作用域国家的守护神改为指定主神 主神可以在/Europa Universalis IV/common/personal_deities/*.txt找到

对信仰没有主神信仰机制的宗教的国家无效

1.6
add_harmony <int>

要增加或者减少的和谐值

add_harmony = 10
增加或者修改和谐值 对不信仰使用和谐机制的宗教的国家无效 1.20
add_harmonized_religion <religion>

要和谐的宗教

add_harmonized_religion = catholic
为作用域国家增加一个宗教到已和谐宗教列表,注意即使是异教也只能填写该宗教组的任意一宗教,不能填写宗教组 对不信仰使用和谐机制的宗教的国家无效 1.20
add_harmonization_progress <int>

要增加或者减少的和谐进度

add_harmonization_progress = 10
增加或者减少当前作用域国家的和谐进度 对不信仰使用和谐机制的宗教的国家无效 1.20
unlock_cult <cult>

解锁崇拜物

unlock_cult = yemoja_cult
为当前作用域国家解锁指定的崇拜物 崇拜物可以在/Europa Universalis IV/common/fetishist_cults/*.txt找到

对不信仰使用崇拜物机制的宗教的国家无效

1.18
add_isolationism <int>

要改变的孤立主义的值

add_isolationism = 1
增加或者减少当前作用域国家的孤立主义 对信仰不使用孤立主义机制的宗教的国家无效 1.20
set_isolationism <int>

要设置的孤立主义状态

set_isolationism = 2
设置当前作用域国家的孤立主义状态 对信仰不使用孤立主义机制的宗教的国家无效 1.20
add_incident_variable_value incident = <incident>

要改变变量的事变
value = <int>
要改变的变量值

add_incident_variable_value = {
    incident = incident_urbanization
    value = -1
}
改变当前作用域国家指定事变的变量 事变可以在/Europa Universalis IV/common/isolationism/*.txt找到

对信仰不使用孤立主义机制的宗教的国家无效

1.20
set_incident_variable_value incident = <incident>

要改变变量的事变
value = <int>
要设为的变量值

set_incident_variable_value = {
    incident = incident_urbanization
    value = 1
}
设置当前作用域国家指定事变的变量 事变可以在/Europa Universalis IV/common/isolationism/*.txt找到

对信仰不使用孤立主义机制的宗教的国家无效

1.20

科技

语句 参数 例子 描述 备注 版本
add_idea <idea>

The idea to add.

add_idea = military_traditions 为当前作用域添加一个理念 理念可以在 /Europa Universalis IV/common/ideas/*.txt找到

Won't work if the idea isn't present in a National Idea set or a taken Ideagroups set for the country.

1.6
add_idea_group <ideagroup>

The ideagroup to add.

add_idea_group = aristocracy_ideas 为当前作用域添加一个理念组 理念组可以在 /Europa Universalis IV/common/ideas/*.txt找到

Won't work if the country doesn't have any free ideagroup slots.

1.6
add_active_policy <policy>

The policy to add.

add_active_policy = the_statute_of_monopolies Adds a policy for the current scope. Policies are found in /Europa Universalis IV/common/policies/*.txt.

Won't work if the policy triggers are not met by the country, or there are no free policy slots.

1.21
change_technology_group <technology group>

The technology group to change to.

change_technology_group = western Changes the technology group of the current scope. Technology Groups are found in /Europa Universalis IV/common/technology.txt.

Doesn't change units, use change_unit_type.

1.1
remove_idea <idea>

The idea to remove.

remove_idea = military_traditions Removes an idea for the current scope. Ideas are found in /Europa Universalis IV/common/ideas/*.txt.

Won't work if the idea isn't held.

1.6
remove_idea_group <ideagroup>

The ideagroup to remove.

remove_idea_group = military_traditions Removes an ideagroup for the current scope. Ideagroups are found in /Europa Universalis IV/common/ideas/*.txt.

Won't work if the ideagroup isn't held.

1.6
set_primitive <yes><no>

Boolean.

set_primitive = no Toggles Primitive status for the current scope. Primitive status controls whether a country has ships and if they can see Primitive-only mechanics, such as Religious Reforms. 1.18
swap_free_idea_group <yes>

Boolean.

swap_free_idea_group = yes Re-evaluates the current scope's national idea set assignment, if they match a different set, they will switch to it. Used after tag changes to change Nationa Idea sets. 1.1
add_next_institution_embracement <int>

The amount of embracement to add.

add_next_institution_embracement = 10 Adds embracement for the current progressing institution within the current scope. Institutions are found in /Europa Universalis IV/common/institutions/*.txt.
1.21
add_adm_tech <int>

The amount of technologies to add.

add_adm_tech = 1 Adds ADM technologies to the current scope. You cannot remove technologies. 1.21
add_dip_tech <int>

The amount of technologies to add.

add_dip_tech = 1 Adds DIP technologies to the current scope. You cannot remove technologies. 1.21
add_mil_tech <int>

The amount of technologies to add.

add_mil_tech = 1 Adds MIL technologies to the current scope. You cannot remove technologies. 1.21

宫廷

语句 参数 例子 描述 备注 版本
add_prestige <float>

The amount to add or subtract. <scope>
The value to take from scope, to add or subtract.

add_prestige = 50 增加威望。 1.1
add_corruption <float>

The amount to add or subtract.

add_corruption = 2 增加腐败。 1.16
add_splendor <int>

The amount to add or subtract.

add_splendor = 2 增加辉煌值。 Splendor is used to purchase Age abilities. 1.20
create_advisor <advisor>

The advisor to create.

create_advisor = philosopher 生成顾问。 Defaults the advisor's location to the capital, and religion and culture to the current scope's. 1.1
kill_advisor <random>

Kill a random advisor.
<advisor>
Kill a specific advisor type.
<advisor id>
Kill a specific advisor id.

kill_advisor = philosopher

kill_advisor = random
kill_advisor = 30

Kills a hired advisor for the current scope. Advisor types are found in /Europa Universalis IV/common/advisortypes/*.txt

Displays the advisor death message box when used.
Only works for advisors that have been hired.

1.1
remove_advisor <random>

Remove a random advisor. <advisor>
Remove a specific advisor type
<advisor id>
Remove a specific advisor id.

remove_advisor = philosopher

remove_advisor = random
remove_advisor = 30

Removes a hired advisor for the current scope. Advisor types are found in /Europa Universalis IV/common/advisortypes/*.txt

Does not display the advisor death message box when used.
Only works for advisors that have been hired.

1.1
remove_advisor_by_category <type>

Removes an advisor by monarch power type: ADM, DIP or MIL.

remove_advisor_by_category = ADM Removes a hired advisor of a monarch power type for the current scope. Only works for advisors that have been hired. 1.20
define_advisor type = <type>

The advisor type to create.
skill = <int>
The amount of skill the advisor has. Limited to 3 maximum.
name = <string>
Optional. The name to use.
location = <province id>
Optional. The province that the advisor comes from.
discount = yes
Optional. If the SCRIPTED_ADVISOR_DISCOUNT cost reduction applies to this advisor.
female = yes
Optional. Makes this advisor female.
culture = <culture> / <scope>
Optional. The culture of this advisor.
religion = <religion> / <scope>
Optional. The religion of this advisor.

define_advisor = {
    type = treasurer
    name = "John Smith"
    skill = 3
    culture = english
    religion = catholic
}
define_advisor = {
    type = treasurer
    name = rising_star_advisor
    skill = 2
    culture = event_target:wrong_religion_province
    religion = event_target:wrong_religion_province
}
define_advisor = {
    type = recruitmaster
    skill = 3
    discount = yes
    culture = variable:new_ruler_culture
}
Adds the defined advisor to the current scope. Advisor types are found in /Europa Universalis IV/common/advisortypes/*.txt

Can utilise Event Scope Values for the culture and religion parameters.
The name parameter can accept a saved name variable, see set_saved_name for more context.

1.1

稳定

语句 参数 例子 描述 备注 版本
add_stability <int>

The amount to add or subtract.

add_stability = 1 增加稳定。 1.1
add_war_exhaustion <int>

The amount to add or subtract.

add_war_exhaustion = 2 增加厌战。 1.1
add_liberty_desire <int>

The amount to add or subtract.

add_liberty_desire = 10 增加独立倾向。 Used on the subject to raise liberty desire for the overlord. 1.4
disband_rebels <type>

The rebel type to disband.

disband_rebels = anti_tax_rebels Disbands all active rebels of the specified type in the provinces of the current scope. Rebel types are found in /Europa Universalis IV/common/rebel_types/*.txt 1.1
collapse_nation yes

Boolean

collapse_nation = yes Causes owned cores of the current scope to be released as nations and for them to take a percentage of the current scope's owned provinces. 1.10
add_disaster_modifier name = <modifier>

The event modifier to add.
disaster = <disaster>
The disaster to apply the modifier to.
duration = <days>
The duration for the modifier to be active for.

add_disaster_modifier = {
    name = "restrict_serfdom"
    duration = -1
    disaster = internal_conflicts
}
Applies an event modifier to the current scope that is removed when the disaster is over, or the duration runs out. Disasters are found in /Europa Universalis IV/common/disasters/*.txt 1.10
add_disaster_progress disaster = <disaster>

The disaster to alter.
value = <int>
The amount of progress to add or subtract.

add_disaster_progress = {
    disaster = internal_conflicts
    value = 10
}
Adds progress towards a disaster occuring for the curretn scope whilst in the disaster progress state. Disasters are found in /Europa Universalis IV/common/disasters/*.txt 1.16
end_disaster <disaster>

The disaster to end.

end_disaster = internal_conflicts Immediately ends an active disaster for the current scope. Disasters are found in /Europa Universalis IV/common/disasters/*.txt 1.9

军事

语句 参数 例子 描述 备注 版本
add_army_tradition <int>

The amount of army tradition to add or subtract.

add_army_tradition = 10 Adds Army Tradition to the current scope. 1.1
add_navy_tradition <int>

The amount of navy tradition to add or subtract.

add_navy_tradition = 10 Adds Navy Tradition to the current scope. 1.1
add_army_professionalism <float>

The amount of army professionalism to add or subtract.

add_army_professionalism = 0.05 Adds Army Professionalism to the current scope. 1.23
add_manpower <float>

The amount of manpower to add or subtract.

add_manpower = 1 Adds manpower to the current scope. 1 is equal to 1000 manpower. 1.1
add_sailors <int>

The amount of sailors to add or subtract.

add_sailors = 10 Adds sailos to the current scope. 1 is equal to 1 sailor. 1.16
add_yearly_manpower <float>

The amount of manpower to add or subtract.

add_yearly_manpower = 0.5 Adds manpower to the current scope, as a percentage of total yearly manpower. 1 is equal to 100% of total yearly manpower. 1.4
add_yearly_sailors <float>

The amount of sailors to add or subtract.

add_yearly_sailors = 10 Adds sailors to the current scope, as a percentage of total yearly sailors. 1 is equal to 100% of total yearly sailors. 1.16
create_admiral tradition = <int>

提督对应的传统

create_admiral = { tradition = 50 add_fire = 1 culture = greek } 为当前国家创建一个指定传统的提督,可以设置其保底属性和文化(1.23前语法同探险家) 1.1
create_explorer <int>

探险家对应的传统

create_explorer = 50 为当前国家创建一个指定传统的探险家,注意与提督的语法不同 1.1
create_conquistador <int>

征服者对应的传统

create_conquistador = 50 为当前国家创建一个指定传统的征服者,注意与将领的语法不同 1.1
create_general tradition = <int>

将领对应的传统

create_general = { tradition = 50 add_fire = 1 culture = greek } 为当前国家创建一个指定传统的将领,可以设置其保底属性和文化(1.23前语法同征服者) 1.1
change_unit_type <type>

The unit type to change to.

change_unit_type = western Change the unit type for the current scope. The unit types correspond the the technology groups found in /Europa Universalis IV/common/technology.txt. 1.1
kill_leader type = <type>

The leader type to kill. name is the specific leader name to target.

kill_leader = {
    type = random
}
kill_leader = {
    type = general
}
kill_leader = {
    type = "John Smith"
}
Kills a leader held by the current scope matching the type used. Possible types:
  • general
  • admiral
  • conquistador
  • explorer
  • random
  • <leader name>
1.1
define_admiral shock = <int>

The shock pips of the leader.
fire = <int>
The fire pips of the leader.
manuever = <int>
The manuever pips of the leader.
siege = <int>
The siege pips of the leader.
name = <string>
Optional. The name of the leader.
female = yes
Optional. Makes the leader female.
trait = <trait>
Optional. A trait automatically assigned to the leader.

define_admiral = {
    shock = 2
    fire = 2
    manuever = 2
    siege = 2
}
Creates an admiral with the defined attributes for the current scope. Leader traits can be found in /Europa Universalis IV/common/leader_personalities/*.txt.

Siege improves Blockade Efficiency for admirals.
The name parameter can accept a saved name variable, see set_saved_name for more context.

1.1
define_explorer shock = <int>

The shock pips of the leader.
fire = <int>
The fire pips of the leader.
manuever = <int>
The manuever pips of the leader.
siege = <int>
The siege pips of the leader.
name = <string>
Optional. The name of the leader.
female = yes
Optional. Makes the leader female.
trait = <trait>
Optional. A trait automatically assigned to the leader.

define_explorer = {
    shock = 2
    fire = 2
    manuever = 2
    siege = 2
}
Creates an explorer with the defined attributes for the current scope. Leader traits can be found in /Europa Universalis IV/common/leader_personalities/*.txt.

Siege improves Blockade Efficiency for explorers.
The name parameter can accept a saved name variable, see set_saved_name for more context.

1.1
define_conquistador shock = <int>

The shock pips of the leader.
fire = <int>
The fire pips of the leader.
manuever = <int>
The manuever pips of the leader.
siege = <int>
The siege pips of the leader.
name = <string>
Optional. The name of the leader.
female = yes
Optional. Makes the leader female.
trait = <trait>
Optional. A trait automatically assigned to the leader.

define_conquistador = {
    shock = 2
    fire = 2
    manuever = 2
    siege = 2
}
Creates a conquistador with the defined attributes for the current scope. Leader traits can be found in /Europa Universalis IV/common/leader_personalities/*.txt.

The name parameter can accept a saved name variable, see set_saved_name for more context.

1.1
define_general shock = <int>

The shock pips of the leader.
fire = <int>
The fire pips of the leader.
manuever = <int>
The manuever pips of the leader.
siege = <int>
The siege pips of the leader.
name = <string>
Optional. The name of the leader.
female = yes
Optional. Makes the leader female.
trait = <trait>
Optional. A trait automatically assigned to the leader.

define_general = {
    shock = 2
    fire = 2
    manuever = 2
    siege = 2
}
Creates a general with the defined attributes for the current scope. Leader traits can be found in /Europa Universalis IV/common/leader_personalities/*.txt.

The name parameter can accept a saved name variable, see set_saved_name for more context.

1.1
artillery <scope>

The province scope in which the artillery spawns.

capital_scope = {
    ROOT = {
        artillery = PREV
    }
}
Spawns an artillery unit for the current scope in the defined province scope. Uses the currently selected artillery unit. 1.1
cavalry <scope>

The province scope in which the cavalry spawns.

capital_scope = {
    ROOT = {
        cavalry = PREV
    }
}
Spawns a cavalry unit for the current scope in the defined province scope. Uses the currently selected cavalry unit. 1.1
infantry <scope>

The province scope in which the infantry spawns.

capital_scope = {
    ROOT = {
        infantry = PREV
    }
}
Spawns a infantry unit for the current scope in the defined province scope. Uses the currently selected infantry unit. 1.1
mercenary_infantry <scope>

The province scope in which the mercenary infantry spawns.

capital_scope = {
    ROOT = {
        mercenary_infantry = PREV
    }
}
Spawns a mercenary infantry unit for the current scope in the defined province scope. Uses the currently selected mercenary infantry unit. 1.1
mercenary_cavalry <scope>

The province scope in which the cavalry spawns.

capital_scope = {
    ROOT = {
        mercenary_cavalry = PREV
    }
}
Spawns a mercenary cavalry unit for the current scope in the defined province scope. Uses the currently selected cavalry unit. 1.1
heavy_ship <scope>

The province scope in which the heavy ship spawns.

random_owned_province = {
    limit = { has_port = yes }
    ROOT = {
        heavy_ship = PREV
    }
}
Spawns a heavy ship unit for the current scope in the defined province scope. Uses the current scope's current heavy ship unit.
Requires the province scope to have a port.
1.1
light_ship <scope>

The province scope in which the light ship spawns.

random_owned_province = {
    limit = { has_port = yes }
    ROOT = {
        light_ship = PREV
    }
}
Spawns a light ship unit for the current scope in the defined province scope. Uses the current scope's current light ship unit.
Requires the province scope to have a port.
1.1
galley <scope>

The province scope in which the galley spawns.

random_owned_province = {
    limit = { has_port = yes }
    ROOT = {
        galley = PREV
    }
}
Spawns a galley unit for the current scope in the defined province scope. Uses the current scope's current galley unit.
Requires the province scope to have a port.
1.1
transport <scope>

The province scope in which the transport spawns.

random_owned_province = {
    limit = { has_port = yes }
    ROOT = {
        transport = PREV
    }
}
Spawns a transport unit for the current scope in the defined province scope. Uses the current scope's current transport unit.
Requires the province scope to have a port.
1.1
<unit name> <scope>

The province scope in which the unit spawns.

random_owned_province = {
    limit = { has_port = yes }
    ROOT = {
        british_redcoat = PREV
    }
}
Spawns a specific unit for the current scope in the defined province scope. Units can be found in /Europa Universalis IV/common/units/*.txt. 1.1

外交

语句 参数 例子 描述 备注 版本
add_historical_friend <scope>

The country to add the friendship to.

add_historical_friend = FRA Makes the defined scope a historical friend of the current scope. 1.12
add_historical_rival <scope>

The country to add the rivalry to.

add_historical_rival = FRA Makes the defined scope a historical rival of the current scope. 1.12
remove_historical_friend <scope>

The country to remove the friendship from.

remove_historical_friend = FRA Removes the historical friendship between the defined scope and the current scope. 1.12
remove_historical_rival <scope>

The country to remove the rivalry from.

remove_historical_rival = FRA Removes the historical rivalry between the defined scope and the current scope. 1.12
add_trust who = <scope>

The country trust will be added with.
value = <int>
The amount of trust to add or subtract.
mutual = yes Optional. Whether to apply the trust change to both countries.

add_trust = {
    who = FRA
    value = 25
    mutual = yes
}
Adds trust with the defined scope for the current scope. Used in conjuction with the Diplomatic Feedback mechanic from The Cossacks DLC. 1.20
add_opinion who = <scope>

The country the opinion modifier is for.
modifier = <modifier>
The opinion modifier to use.
years = <int> Optional. Whether the modifier expires after a set amount of years.

add_opinion = {
    who = FRA
    modifier = renounced_as_heretics
}
Adds an opinion modifier for the current scope held against the defined scope. Opinion modifiers are found in /Europa Universalis IV/common/opinion_modifiers/*.txt 1.1
reverse_add_opinion who = <scope>

The country the opinion modifier is added to.
modifier = <modifier>
The opinion modifier to use.
years = <int> Optional. Whether the modifier expires after a set amount of years.

reverse_add_opinion = {
    who = FRA
    modifier = renounced_as_heretics
}
Adds an opinion modifier for the defined scope held against the current scope. Opinion modifiers are found in /Europa Universalis IV/common/opinion_modifiers/*.txt 1.1
remove_opinion who = <scope>

The country the opinion modifier is held against.
modifier = <modifier>
The opinion modifier to use.

remove_opinion = {
    who = FRA
    modifier = renounced_as_heretics
}
Removes an opinion modifier for the current scope held against the defined scope. Opinion modifiers are found in /Europa Universalis IV/common/opinion_modifiers/*.txt 1.1
reverse_remove_opinion who = <scope>

The country the opinion modifier holds.
modifier = <modifier>
The opinion modifier to use.

reverse_remove_opinion = {
    who = FRA
    modifier = renounced_as_heretics
}
Removes an opinion modifier for the defined scope held against the current scope. Opinion modifiers are found in /Europa Universalis IV/common/opinion_modifiers/*.txt 1.1
create_alliance <scope>

The country to create an alliance with.

create_alliance = FRA Creates an alliance between the current scope and the defined scope. 1.1
create_guarantee <scope>

The country to create an guarantee with.

create_guarantee = FRA Creates an guarantee over the defined scope for the current scope. 1.8
create_marriage <scope>

The country to create an royal marriage with.

create_marriage = FRA Creates a royal marriage between the current scope and the defined scope. 1.1
create_union <scope>

The country to make into the junior partner.创建联统

create_union = FRA Makes the defined scope a junior partner in a personal union with the current scope. 1.1
create_vassal <scope>

The country to make into a vassal.

create_vassal = FRA Makes the defined scope a vassal subject of the current scope. Uses the vassal subject type. 1.22
create_march <scope>

The country to make into a march.

create_march = FRA Makes the defined scope a march subject of the current scope. Uses the march subject type. 1.12
vassalize <scope>

The country to vassalize.

vassalize = FRA Makes the defined scope a vassal subject of the current scope. Uses the vassal subject type.
Exact same effect as create_vassal.
1.1
create_subject subject_type = <type>

The subject type to use.
subject = <scope>
The scope to make the subject.

create_subject = {
    subject_type = tributary_state
    subject = FRA
}
Makes the defined scope into the defined subject type under the current scope.tributary_state可建立朝贡国 Subject types are found in /Europa Universalis IV/common/subject_types/*.txt. 1.20
break_marriage <scope>

The country to break the marriage with.

break_marriage = FRA Breaks the current scope's royal marriage with the defined scope. 1.11
break_union <scope>

The country to break the union with.

break_union = FRA Breaks the current scope's union with the defined scope. 1.1
inherit <scope>

The country to inherit.

inherit = FRA The current scope inherits all of the defined scope's provinces. 1.1
release <scope>

The country to release.

release = FRA The current scope releases all provinces with the defined scope's cores. 1.1
release_all_subjects yes

Boolean.

release_all_subjects = yes The current scope releases all possible subjects from cores. 1.10
grant_independence yes

Boolean.

grant_independence = yes The current scope is granted independence from their overlord. 1.22
declare_war <scope>

The country to declare against.

declare_war = FRA Creates a no casus belli war against the defined scope for the current scope. 1.1
declare_war_with_cb who = <scope>

The country declared against.
casus_belli = <cb>
The casus belli to use.
war_goal_province = <province id>
收复核心必须要加war_goal_province = <province id>.

declare_war_with_cb = {
    who = FRA
    casus_belli = cb_annex
}
对who用type的理由进行宣战.如果收复核心必须要加war_goal_province = <province id> Casus belli are found in /Europa Universalis IV/common/cb_types/*.txt 1.1
add_truce_with <scope>

The country to add a truce against.

add_truce_with = FRA Creates a truce between the defined scope and the current scope. The truce length is the default white peace truce length. 1.1
white_peace <scope>

The country to force white peace against.

white_peace = FRA Forces the defined scope into a white peace truce with the current scope. 1.1
form_coalition_against <scope>

The country to form against.

form_coalition_against = FRA The current scope creates or joins a coalition against the defined scope. 1.1
add_casus_belli target = <scope>

The country to add the casus belli against.添加宣战理由
type = <cb>
The casus belli to add. 宣战的理由查询 宣战理由ID列表
months = <months>
CB有效期,以月份计

add_casus_belli = {
    target = FRA
    type = cb_annex
    month = 60
}
为当前作用域的国家增加一个对目标国家的CB Casus belli are found in /Europa Universalis IV/common/cb_types/*.txt 1.1
reverse_add_casus_belli target = <scope>

The country to that gains the casus belli.
type = <cb>
The casus belli to add.
months = <months>
CB有效期,以月份计

reverse_add_casus_belli = {
    target = FRA
    type = cb_annex
    month = 60
}
为目标国家增加一个以当前作用域国家为目标的CB Casus belli are found in /Europa Universalis IV/common/cb_types/*.txt 1.1
remove_casus_belli target = <scope>

The country the casus belli is against.
type = <cb>
The casus belli to remove.

remove_casus_belli = {
    target = FRA
    type = cb_annex
}
Removes a casus belli held against the defined scope for the current scope. Casus belli are found in /Europa Universalis IV/common/cb_types/*.txt 1.1
reverse_remove_casus_belli target = <scope>

The country that holds the casus belli.
type = <cb>
The casus belli to remove.

reverse_remove_casus_belli = {
    target = FRA
    type = cb_annex
}
Removes a casus belli held by the defined scope against the current scope. Casus belli are found in /Europa Universalis IV/common/cb_types/*.txt 1.1
remove_fow <months>

The number of months to remove fog of war.

random_rival_country = {
    limit = { war_with = ROOT }
    remove_fow = 3
}
Removes the fog of war in the current scope for the previous scope. 1.1
add_spy_network_from who = <scope>

The country to add spy network for.
value = <int>
The amount of spy network to add or subtract.

add_spy_network_from = {
    who = FRA
    value = 10
}
Adds spy network in the current scope for the defined scope. 1.16
add_spy_network_in who = <scope>

The country to add spy network in.
value = <int>
The amount of spy network to add or subtract.

add_spy_network_in = {
    who = FRA
    value = 10
}
Adds spy network for the current scope in the defined scope. 1.16

阶级及派系

语句 参数 例子 描述 备注 版本
create_independent_estate <estate>

The estate to create the independent nation from.

create_independent_estate = estate_cossacks Creates an independent nation from provinces owned by the specified estate within the current scope's owned provinces. Estates are found in /Europa Universalis IV/common/estates/*.txt

The additional parameters for the independent nation are found within an estate's file.

1.14
create_independent_estate_from_religion <estate>

The estate to create the independent nation from.

create_independent_estate = estate_dhimmi Creates an independent nation from provinces owned by the specified estate within the current scope's owned provinces. Estates are found in /Europa Universalis IV/common/estates/*.txt

Created with the religion that the majority of the provinces that the defined estate own holds.
The additional parameters for the independent nation are found within an estate's file.

1.14
add_estate_influence_modifier estate = <estate>

The estate to apply the modifier to.
desc = <string>
The text to display in the Influence tooltip for this modifier.
influence = <int>
The amount of influence to add or subtract.
duration = <days>
The duration for which this modifier is active.

add_estate_influence_modifier = {
    estate = estate_nobles
	desc = EST_VAL_FURTHERED_SPOUSES_FAMILY_NOBLES
    influence = 10
    duration = 7300
}
Adds an influence modifier for the defined estate used by the current scope. Estates are found in /Europa Universalis IV/common/estates/*.txt 1.14
add_estate_loyalty estate = <estate>

The estate to apply the loyalty to.
loyalty = <int>
The amount of loyalty to add or subtract.

add_estate_loyalty = {
    estate = estate_nobles
    loyalty = 10
}
Adds loyalty for the defined estate used by the current scope. Estates are found in /Europa Universalis IV/common/estates/*.txt 1.14
add_estate_loyalty_modifier estate = <estate>

The estate to apply the modifier to.
desc = <string>
The text to display in the Influence tooltip for this modifier.
loyalty = <int>
The amount of loyalty to add or subtract.
duration = <days>
The duration for which this modifier is active.

add_estate_loyalty_modifier = {
    estate = estate_nobles
	desc = EST_VAL_EXAMPLE
    loyalty = 10
    duration = 7300
}
Adds an loyalty modifier for the defined estate used by the current scope. Estates are found in /Europa Universalis IV/common/estates/*.txt 1.14
add_faction <faction>

The faction to add.

add_faction = temples Adds a faction to the current scope. Factions are found in /Europa Universalis IV/common/factions/. 1.1
remove_faction <faction>

The faction to remove.

add_faction = temples Removes a faction from the current scope. Factions are found in /Europa Universalis IV/common/factions/. 1.1
add_faction_influence faction = <faction>

The faction to add influence to.
influence = <int>
The amount of influence to add.

add_faction_influence = {
    faction = temples
    influence = 10
}
Adds influence for the defined faction. Mimics the influence boost from pressing the button in the faction window. 1.1

统治者

语句 参数 例子 描述 备注 版本
change_adm <int>

The amount to add or subtract from the ruler's ADM skill.

change_adm = 1 为当前统治者提高行政能力 1.1
change_dip <int>

The amount to add or subtract from the ruler's DIP skill.

change_dip = 1 为当前统治者提高外交能力 1.1
change_mil <int>

The amount to add or subtract from the ruler's MIL skill.

change_mil = 1 为当前统治者提高军事能力 1.1
add_ruler_personality <personality>

The ruler personality to add.

add_ruler_personality = righteous_personality Adds the defined personality to the current ruler. Ruler personalities are found in /Europa Universalis IV/common/ruler_personalities/00_core.txt 1.18
remove_ruler_personality <personality>

The ruler personality to remove.

remove_ruler_personality = righteous_personality Removes the defined personality from the current ruler. Ruler personalities are found in /Europa Universalis IV/common/ruler_personalities/00_core.txt 1.18
set_ruler_flag <flag>

An unique string to identify the ruler flag with.

set_ruler_flag = my_flag

set_ruler_flag = my_flag@ROOT
set_ruler_flag = my_flag@event_target:name

Defines a ruler flag for the current scope's ruler. Flags can be appended with scopes or event targets 1.7
clr_ruler_flag <flag>

The unique string of the flag to clear.

clr_ruler_flag = my_flag
Clears a ruler flag for the current scope's ruler. 1.7
set_dynasty <string> / <scope> / original_dynasty

The dynasty to set.

set_dynasty = "Smith"

set_dynasty = FRA
set_dynasty = original_dynasty

Sets the dynasty of the current scope's ruler. 1.1
set_ruler_culture <culture>

The culture to change to.

set_ruler_culture = english

set_ruler_culture = CAS
set_ruler_culture = event_target:my_event_target
set_ruler_culture = variable:my_variable

Changes the ruler culture of the current scope. Cultures are found in /Europa Universalis IV/common/cultures/*.txt

Can utilise Event Scope Values.

1.23
set_ruler_religion <religion>

The religion to change to.

set_ruler_religion = catholic

set_ruler_religion = CAS
set_ruler_religion = event_target:my_event_target
set_ruler_religion = variable:my_variable

Changes the ruler religion of the current scope. Religions are found in /Europa Universalis IV/common/religions/*.txt

Can utilise Event Scope Values.

1.23
exile_ruler_as <string>

The unique string to identify the exiled ruler with.

exile_ruler_as = my_exiled_ruler
Removes the current ruler of the current scope, saving them to the unique string. 1.12
set_ruler <string>

The unique string of an exiled ruler.

set_ruler = my_exiled_ruler
Makes the exiled ruler the ruler of the current scope. 1.12
kill_ruler yes

Boolean.

kill_ruler = yes
Kills the ruler of the current scope. 1.1
convert_female_ruler_to_general yes

Boolean.

convert_female_ruler_to_general = yes
Converts a female ruler into a general. 1.15
convert_ruler_to_general yes

Boolean.

convert_ruler_to_general = yes
Converts a male ruler into a general. 1.8
add_ruler_modifier name = <name>

The event modifier to add.
duration = <days>
Optional. The number of days to add the ruler modifier for.
hidden = yes
Optional. Whether the ruler modifier is hidden in the government view.
desc = <string
Optional. The string used to override the automatic duration string.

add_ruler_modifier = { 
    name = mad_and_bad
    duration = -1  
    desc = MAD_AND_BAD_DESC
    hidden = yes
}
Adds an event modifier to the current scope as a ruler modifier. Ruler modifiers are cleared when the ruler dies. 1.1
define_ruler_to_general shock = <int>

The shock pips of the leader.
fire = <int>
The fire pips of the leader.
manuever = <int>
The manuever pips of the leader.
siege = <int>
The siege pips of the leader.

define_ruler_to_general = {
    fire = 3
    shock = 3
    manuever = 3
    siege = 3
}
Creates a general from the ruler for the current scope. 1.8
define_leader_to_ruler type = general / conquistador / admiral / explorer

The leader type to pick a leader from.
name = <string>
The specific leader to use. Used instead of the type parameter.
claim = <int>
Optional. The starting legitimacy of the ruler.
adm = <int>
Optional. The minimum ADM skill roll for the ruler.
dip = <int>
Optional. The minimum DIP skill roll for the ruler.
mil = <int>
Optional. The minimum MIL skill roll for the ruler.
fixed = yes
Optional. Makes the ruler skill roll fixed to the defined minimums.

define_leader_to_ruler = {
    type = general
    adm = 3
    dip = 3
    mil = 3
    fixed = yes
    claim = 100
}
define_leader_to_ruler = {
    name = "John Smith"
}
Creates a ruler from a leader for the current scope. 1.12
define_ruler name = <string>

Optional. The name of the ruler.
dynasty = <string> / <scope> / original_dynasty
Optional. The dynasty of the ruler.
age = <years>
Optional. The age of the ruler.
claim = <int>
Optional. The starting legitimacy of the ruler.
adm = <int>
Optional. The minimum ADM skill roll for the ruler.
dip = <int>
Optional. The minimum DIP skill roll for the ruler.
mil = <int>
Optional. The minimum MIL skill roll for the ruler.
fixed = yes
Optional. Makes the ruler skill roll fixed to the defined minimums.
max_random_adm = <int>
Optional. The maximum ADM skill roll for the ruler.
max_random_dip = <int>
Optional. The maximum DIP skill roll for the ruler.
max_random_mil = <int>
Optional. The maximum MIL skill roll for the ruler.
hide_skills = yes
Optional. Hides the skill values for this ruler. regency = yes
Optional. Makes this ruler as a regent. attach_leader = <string>
Optional. The name of the leader to generate with the ruler.
female = yes
Optional. Forces the ruler to be female.
male = yes
Optional. Forces the ruler to be male.
culture = <culture> / <scope>
Optional. The culture of the ruler.
religion = <religion> / <scope>
Optional. The religion of the ruler.

define_ruler = {
    name = "Ntare I Kivimira"
    dynasty = "Cambarantama"
    adm = 5
    dip = 4
    mil = 4
    age = 20
    claim = 95
}
define_ruler = {
    culture = event_target:first_ruler_alternative_province
    hide_skills = yes
    age = 30
}
define_ruler = {
    dynasty = ROOT
    culture = ROOT
    religion = ROOT
}
define_ruler = {
    dip = 4
    adm = 1
    mil = 1					
    fixed = yes
}
Creates the defined ruler for the current scope. The culture and religion attributes can utilise Event Scope Values.

The name parameter can accept a saved name variable, see set_saved_name for more context.

1.1

配偶

语句 参数 例子 描述 备注 版本
add_queen_personality <personality>

The consort personality to add.

add_queen_personality = righteous_personality Adds the defined personality to the current consort. Ruler personalities are found in /Europa Universalis IV/common/ruler_personalities/00_core.txt 1.18
remove_queen_personality <personality>

The consort personality to remove.

remove_queen_personality = righteous_personality Removes the defined personality from the current consort. Ruler personalities are found in /Europa Universalis IV/common/ruler_personalities/00_core.txt 1.18
set_consort_flag <flag>

An unique string to identify the consort flag with.

set_consort_flag = my_flag

set_consort_flag = my_flag@ROOT
set_consort_flag = my_flag@event_target:name

Defines a consort flag for the current scope's consort. Flags can be appended with scopes or event targets 1.18
clr_consort_flag <flag>

The unique string of the flag to clear.

clr_consort_flag = my_flag
Clears a consort flag for the current scope's consort. 1.18
set_consort_culture <culture>

The culture to change to.

set_consort_culture = english

set_consort_culture = CAS
set_consort_culture = event_target:my_event_target
set_consort_culture = variable:my_variable

Changes the consort culture for the current scope. Cultures are found in /Europa Universalis IV/common/cultures/*.txt

Can utilise Event Scope Values.

1.23
set_consort_religion <religion>

The religion to change to.

set_consort_religion = catholic

set_consort_religion = CAS
set_consort_religion = event_target:my_event_target
set_consort_religion = variable:my_variable

Changes the consort religion for the current scope. Religions are found in /Europa Universalis IV/common/religions/*.txt

Can utilise Event Scope Values.

1.23
change_consort_regent_to_ruler yes

Boolean.

change_consort_regent_to_ruler = yes
Makes a consort regent into the current ruler for the current scope. 1.18
remove_consort yes

Boolean.

remove_consort = yes
Removes the current consort for the current scope. 1.18
define_consort name = <string>

Optional. The name of the consort.
country_of_origin = <scope>
Optional. The origin country of the consort.
dynasty = <string> / <scope> / original_dynasty
Optional. The dynasty of the consort.
age = <years>
Optional. The age of the consort.
adm = <int>
Optional. The ADM skill for the consort.
dip = <int>
Optional. The DIP skill for the consort.
mil = <int>
Optional. The MIL skill for the consort.
hide_skills = yes
Optional. Hides the skill values for this consort. female = yes
Optional. Forces the consort to be female.
male = yes
Optional. Forces the consort to be male.
culture = <culture> / <scope>
Optional. The culture of the consort.
religion = <religion> / <scope>
Optional. The religion of the consort.

define_consort = {
    country_of_origin = ROOT
    religion = ROOT
    culture = ROOT
}
define_consort = {
    name = "Kösem Sultan"
    culture = greek
    adm = 5
    dip = 4
    mil = 5
    female = yes
}
Creates the defined consort for the current scope. The skill values are not rolled for consorts, meaning the values set are the exact values a consort gets.

The culture and religion attributes can utilise Event Scope Values.
The name parameter can accept a saved name variable, see set_saved_name for more context.

1.18

继承人

语句 参数 例子 描述 备注 版本
change_heir_adm <int>

The amount to add or subtract from the heir's ADM skill.

change_heir_adm = 1 为当前继承人提高行政能力 1.14
change_heir_dip <int>

The amount to add or subtract from the heir's DIP skill.

change_heir_dip = 1 为当前继承人提高外交能力 1.14
change_heir_mil <int>

The amount to add or subtract from the heir's MIL skill.

change_heir_mil = 1 为当前继承人提高军事能力 1.14
add_heir_personality <personality>

The heir personality to add.

add_heir_personality = righteous_personality Adds the defined personality to the current heir. Ruler personalities are found in /Europa Universalis IV/common/ruler_personalities/00_core.txt 1.18
remove_heir_personality <personality>

The heir personality to remove.

remove_heir_personality = righteous_personality Removes the defined personality from the current heir. Ruler personalities are found in /Europa Universalis IV/common/ruler_personalities/00_core.txt 1.18
set_heir_flag <flag>

An unique string to identify the heir flag with.

set_heir_flag = my_flag

set_heir_flag = my_flag@ROOT
set_heir_flag = my_flag@event_target:name

Defines a heir flag for the current scope's heir. Flags can be appended with scopes or event targets 1.1
clr_heir_flag <flag>

The unique string of the flag to clear.

clr_heir_flag = my_flag
Clears a heir flag for the current scope's heir. 1.1
add_heir_claim <int>

The amount to add or subtract from the claim.

add_heir_claim = 10 Adds to the current scope's heir claim. 1.1
add_heir_support <int>

The amount of support to add or subtract to the local heir

add_heir_support = 10 Adds to the local heir's support in an Elective Monarchy. 1.7
set_heir_culture <culture>

The culture to change to.

set_heir_culture = english

set_heir_culture = CAS
set_heir_culture = event_target:my_event_target
set_heir_culture = variable:my_variable

Changes the heir culture of the current scope. Cultures are found in /Europa Universalis IV/common/cultures/*.txt

Can utilise Event Scope Values.

1.23
set_heir_religion <religion>

The religion to change to.

set_heir_religion = catholic

set_heir_religion = CAS
set_heir_religion = event_target:my_event_target
set_heir_religion = variable:my_variable

Changes the heir religion of the current scope. Religions are found in /Europa Universalis IV/common/religions/*.txt

Can utilise Event Scope Values.

1.23
exile_heir_as <string>

The unique string to identify the exiled heir with.

exile_heir_as = my_exiled_heir
Removes the current heir of the current scope, saving them to the unique string. 1.12
set_heir <string>

The unique string of an exiled heir.

set_heir = my_exiled_heir
Makes the exiled heir the ruler of the current scope. 1.12
kill_heir yes

Boolean.

kill_heir = yes
Kills the heir of the current scope. Displays heir death message. 1.1
remove_heir yes

Boolean.

remove_heir = yes
Removes the heir of the current scope. Does not display the heir death message. 1.1
convert_female_heir_to_general yes

Boolean.

convert_female_heir_to_general = yes
Converts a female heir into a general. 1.15
convert_heir_to_general yes

Boolean.

convert_heir_to_general = yes
Converts a male heir into a general. 1.8
define_heir_to_general shock = <int>

The shock pips of the leader.
fire = <int>
The fire pips of the leader.
manuever = <int>
The manuever pips of the leader.
siege = <int>
The siege pips of the leader.

define_heir_to_general = {
    fire = 3
    shock = 3
    manuever = 3
    siege = 3
}
Creates a general from the heir of the current scope. 1.8
define_heir name = <string>

Optional. The name of the heir.
dynasty = <string> / <scope> / original_dynasty
Optional. The dynasty of the heir.
age = <years>
Optional. The age of the heir.
birth_date = <date>
Optional. The birth date of the heir. Can be used instead of the age parameter.
claim = <int>
Optional. The starting legitimacy of the heir.
adm = <int>
Optional. The minimum ADM skill roll for the heir.
dip = <int>
Optional. The minimum DIP skill roll for the heir.
mil = <int>
Optional. The minimum MIL skill roll for the heir.
fixed = yes
Optional. Makes the heir skill roll fixed to the defined minimums.
max_random_adm = <int>
Optional. The maximum ADM skill roll for the heir.
max_random_dip = <int>
Optional. The maximum DIP skill roll for the heir.
max_random_mil = <int>
Optional. The maximum MIL skill roll for the heir.
hide_skills = yes
Optional. Hides the skill values for this heir. hidden = yes
Optional. Hides the skill values for this heir. Legacy version of hide_skills. no_consort_with_heir = yes
Optional. Makes the heir a child not of the consort, i.e. a bastard female = yes
Optional. Forces the heir to be female.
male = yes
Optional. Forces the heir to be male.
culture = <culture> / <scope>
Optional. The culture of the heir.
religion = <religion> / <scope>
Optional. The religion of the heir.

define_heir = {
    dynasty = "Kamegere"
    claim = 100		
}
define_heir = {
    male = yes
    dynasty = ROOT
    name = "Viracocha"
    claim = 100
    adm = 6
}
define_heir = {
    dynasty = ROOT
    age = 13
    adm = 3
    dip = 3
    mil = 3
    claim = 50
    female = yes
    no_consort_with_heir = yes
}
Creates the defined heir for the current scope. The culture and religion attributes can utilise Event Scope Values.

The name parameter can accept a saved name variable, see set_saved_name for more context.

1.1

神罗等

语句 参数 例子 描述 备注 版本
add_imperial_influence <int>

The amount of influence to add or subtract.

add_imperial_influence = 10 Adds Imperial Influence for the current scope. No effect if not emperor. 1.1
add_scaled_imperial_influence <int>

The amount of influence to add or subtract.

add_scaled_imperial_influence = 10 Adds Imperial Influence for the current scope, scaled by the current Imperial Authority value. No effect if not emperor. 1.1
elector <scope>

The country to make elector.

elector = FRA Makes the defined scope an elector of the Holy Roman Empire. 1.1
revoke_reform <reform>

The reform to remove.

revoke_reform = reichsreform 移除一项帝国改革 Imperial Reforms are found in /Europa Universalis IV/common/imperial_reforms/00_hre.txt. 1.1
set_in_empire yes

Boolean.

set_in_empire = yes Places the current scope and all owned provinces (if valid) in the empire. 1.12
hre_inheritable yes

Boolean.

hre_inheritable = yes Makes the seat of the Emperor inheritable. 1.1
imperial_ban_allowed yes

Boolean.

imperial_ban_allowed = yes Enables the Imperial Ban casus belli. 1.1
internal_hre_cb no

Boolean.

internal_hre_cb = no Disables casus belli creation for HRE members against one another. 1.1
set_allow_female_emperor yes

Boolean.

set_allow_female_emperor = yes 允许女性君主成为神圣罗马帝国皇帝 1.1
dismantle_hre yes

Boolean.

dismantle_hre = yes Disbands the HRE and removes all members from it. 1.1
enable_hre_leagues yes

Boolean.

enable_hre_leagues = yes Enables the Religious Leagues. 1.8
set_hre_religion <religion>

Which religion to set.

set_hre_religion = catholic 指定一个宗教成为神圣罗马帝国官方宗教 1.8
set_hre_heretic_religion <religion>

Which religion to set.

set_hre_religion = catholic Makes the defined religion the heretic religion of the HRE. 1.8
set_hre_religion_locked yes

Boolean.

set_hre_religion_locked = yes Locks the official and heretic religion assignments, ending the Religious Leagues. 1.8
set_hre_religion_treaty yes

Boolean.

set_hre_religion_treaty = yes Ends the Religious Leagues with no set religions. 1.8
join_league <scope>

Which league to join.

join_league = FRA Makes the current scope join the League that the defined scope belongs to. 1.8
leave_league <scope>

Which league to leave.

leave_league = FRA Makes the current scope leave the League that the defined scope belongs to. 1.8
dismantle_empire_of_china <yes> / <no>

Boolean.

dismantle_empire_of_china = yes Removes the Empire of China and the Mandate system. 1.20
set_emperor_of_china <scope>

Which country to set.

set_emperor_of_china = MNG Sets the current Emperor of China. 1.20
add_mandate <int>

The amount of mandate to add or subtract.

add_mandate = 10 Adds mandate to the current scope. No effect if not the emperor of china. 1.20
set_mandate <int>

The amount of mandate to set.

set_mandate = 10 Sets the mandate value for the current scope. No effect if not the emperor of china. 1.20
set_revolution_target <scope>

The country to set.

set_revolution_target = FRA Makes the defined scope the new revolutionary target. Use --- to remove the target and not re-assign. 1.1

AI

语句 参数 例子 描述 备注 版本
set_ai_personality personality = <type>

The personality to use.
locked = <yes> / <no>
Whether the personality can be re-evaluated and changed.

set_ai_personality = {
    personality = ai_capitalist
    locked = yes
}
Makes the current scope (if AI) the defined personality. AI的特质(个性)定义 AI personalities are found in /Europa Universalis IV/common/ai_personalities/00_ai_personalities.txt. 1.1
set_ai_attitude attitude = <type>

The attitude to use.
who = <scope>
Who the attitude is directed against.
locked = <yes> / <no>
Whether the attitude can be re-evaluated and changed.

set_ai_attitude = {
    attitude = attitude_friendly
    who = FRA
    locked = yes
}
Makes the current scope (if AI) have the defined attitude against the defined scope. AI attitudes are found in /Europa Universalis IV/common/ai_attitudes/00_ai_attitudes.txt. 1.1

作用域:省份

这些指令只能在作用域为省份时使用。

普适

语句 参数 例子 描述 备注 版本
province_event id = <id>

The event id to fire.
days = <days>
Optional. The number of days to wait after the effect is executed to fire the event.
random = <days>
Optional. The max number of additional days that can be added to the days parameter for randomness.
tooltip = <string>
Optional. The tooltip to display in the effect tooltip country_event is used in.

province_event = { 
    id = uprising.1
    days = 30
    random = 15
    tooltip = UPRISING_TOOLTIP
}
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 name = <name>

The event modifier to add.
duration = <days>
Optional. The number of days to add the province modifier for.
hidden = yes
Optional. Whether the province modifier is hidden in the province view.
desc = <string
Optional. The string used to override the automatic duration string.

add_province_modifier = { 
    name = annoyed_people
    duration = -1  
    desc = annoyed_people_tooltip
    hidden = yes
}
Adds an event modifier to the current province scope as a province modifier. Modifiers added with this effect are cleared automatically when the province changes ownership. 1.1
add_permanent_province_modifier name = <name>

The event modifier to add.
duration = <days>
Optional. The number of days to add the province modifier for.
hidden = yes
Optional. Whether the province modifier is hidden in the province view.
desc = <string
Optional. The string used to override the automatic duration string.

add_permanent_province_modifier = { 
    name = annoyed_people
    duration = -1  
    desc = annoyed_people_tooltip
    hidden = yes
}
Adds an event modifier to the current province scope as a province modifier. Modifiers added with this effect persist through ownership changes. 1.1
add_province_triggered_modifier <modifier>

The province triggered modifier to add.

add_province_triggered_modifier = test_modifier
Adds a province triggered modifier to the current province scope. 1.24
extend_province_modifier name = <name>

The event modifier to extend.
duration = <days>

extend_province_modifier = { 
    name = annoyed_people
    duration = 365
}
Extends the duration of an existing province modifier held by the current province scope. Modifiers added with this effect persist through ownership changes. 1.1
remove_province_modifier <modifier>

The event modifier to remove.

remove_province_modifier = annoyed_people Removes an already assigned province modifier from the current province scope. 1.1
set_province_flag <flag>

An unique string to identify the province flag with.

set_province_flag = my_flag

set_province_flag = my_flag@ROOT
set_province_flag = my_flag@event_target:name

Defines a province flag for the current province scope. Flags can be appended with scopes or event targets 1.1
clr_province_flag <flag>

The unique string of a province flag to clear.

clr_province_flag = my_flag Clears a defined province flag for the current province scope. 1.1
change_province_name <string>

The name to change to.

change_province_name = "Paris" Changes the province name of the current province scope to the defined name. 1.1
rename_capital <string>

The name to change to.

rename_capital = "Paris" Changes the capital name of the current province scope to the defined name. The capital name is the second name that appears under the province name within the province window. 1.1
move_capital_effect <string>

省份ID = {move_capital_effect = yes}

151 = {move_capital_effect = yes} 迁都,改变某省份为首都 1.26

发展度

语句 参数 例子 描述 备注 版本
add_base_tax <int>

增加或减少基础税收的数值。

add_base_tax = 1 当前的省份增加税收。 1.1
add_base_production <int>

增加或减少基础生产的数值。

add_base_production = 1 当前的省份增加生产。 1.1
add_base_manpower <int>

增加或减少基础人力的数值。

add_base_manpower = 1 当前的省份增加人力。 1.1
add_prosperity <int>

增加或减少繁荣的数值。

add_prosperity = 1 当前的省份增加繁荣。 1.20
add_devastation <int>

增加或减少荒废度的数值。

add_devastation = 1 当前省份增加荒废度。 1.20
add_local_autonomy <int>

增加或减少当地自治度的数值。

add_local_autonomy = 10 当前省份增加自治度。 1.8
set_local_autonomy <int>

更改当地自治度为目标数值。

set_local_autonomy = 50 更改当前省份自治度。 1.12
change_trade_goods <good>

更改商品。

change_trade_goods = grain 更改当前省份的商品。 可以在这里找到商品 /Europa Universalis IV/common/tradegoods/*.txt. 1.1
add_scaled_local_adm_power <int>

The amount of administrative power to add.

add_scaled_local_adm_power = 10 Adds Administrative power to the owner of the current province scope, scaling with the base tax. 1 power per point of yearly base tax. 1.12
add_scaled_local_dip_power <int>

The amount of diplomatic power to add.

add_scaled_local_dip_power = 10 Adds Diplomatic power to the owner of the current province scope, scaling with the base production. 1 power per point of yearly base production. 1.12
add_scaled_local_mil_power <int>

The amount of military power to add.

add_scaled_local_mil_power = 10 Adds Military power to the owner of the current province scope, scaling with the base manpower. 1 power per point of yearly base manpower. 1.12
cancel_construction yes

布尔值.

cancel_construction = yes 取消省份正在进行的活动。 包括造核,传教,转文化,建筑和运河工程。 1.6
add_great_project <project>

添加运河工程。

add_great_project = kiel_canal 当前省份将开始运河工程。 运河工程在这里 /Europa Universalis IV/common/great_projects/*.txt. 1.6
add_construction_progress <float>

增加或减少省份活动进度数值。

add_construction_progress = 0.05 改变省份活动和运河工程进度。 1.6
add_building <building>

添加建筑

add_building = temple 当前省份添加一个造好的建筑。 Buildings are found in /Europa Universalis IV/common/buildings/*.txt. 1.1
remove_building <building>

移除建筑。

remove_building = temple 当前省份移除一个建筑。 Buildings are found in /Europa Universalis IV/common/buildings/*.txt. 1.1
add_building_construction building = <building>

The building to construct.
speed = <float>
基础速度的百分比。
cost = <float>
基础花费的百分比。

add_building_construction = {
    building = temple
    speed = 0.5
    cost = 0.5
}
当前省份开始建造建筑。 cost and speed are a percentage of the base value, i.e. 0.5 is 50% of the base value. 1.11

社会

语句 参数 例子 描述 备注 版本
create_advisor <advisor>

The advisor to add.

create_advisor = treasurer 添加顾问。 Advisors are found in /Europa Universalis IV/common/advisors/*.txt. 1.1
set_seat_in_parliament yes / no

Boolean.

set_seat_in_parliament = yes 添加议席。 如果该省份所属国家没有 国会则无效。 1.12
back_current_issue yes / no

Boolean.

back_current_issue = yes 如果省份有议席,支持或反对议案。 No effect if the owner of the province does not have a government using has_parliament. 1.12
change_culture <culture>

The culture to change to.

change_culture = english

change_culture = ENG
change_culture = event_target:my_event_target
change_culture = variable:my_variable

改变省份文化。 Cultures are found in /Europa Universalis IV/common/cultures/*.txt.

Can utilise Event Scope Values.

1.1
add_culture_construction yes

Boolean.

add_culture_construction = yes 开始转文化。 1.12
change_religion <religion>

The religion to change to.
<scope>
The religion to change to, derived from the scope.

change_religion = catholic

change_religion = CAS
change_religion = event_target:my_event_target
change_religion = variable:my_variable

改变省份宗教。 Religions are found in /Europa Universalis IV/common/religions/*.txt

Can utilise Event Scope Values.

1.1
change_to_secondary_religion yes

Boolean.

change_to_secondary_religion = yes 改变成副宗教。 1.14
send_missionary yes

Boolean.

send_missionary = yes 开始传教。 1.12
add_cardinal yes

Boolean.

add_cardinal = yes 添加枢机主教。 1.8
remove_cardinal yes

Boolean.

remove_cardinal = yes 移除枢机主教。 1.8
add_reform_center <religion>

The religion to use.

add_reform_center = reformed 添加一个宗教改革中心。 1.8
remove_reform_center <religion>

The religion to use.

remove_reform_center = reformed 移除宗教改革中心。 1.8
set_estate <estate>

Which estate to use.

set_estate = estate_nobles 把省份封给阶级。 会覆盖原来的阶级。 1.1
remove_estate <estate>

Which estate to remove.

remove_estate = estate_nobles 拔掉阶级。 Does not produce a tooltip. 1.1
set_in_empire yes / no

Boolean.

set_in_empire = yes 把省份加进神罗。 1.1
add_institution_embracement which = <institution>

要添加的思潮。
value = <int>
增加或减少的数值。

add_institution_embracement = {
    which = feudalism
    value = 10
}
添加思潮进度。 The defined institution must be enabled for the owner of the province first. 1.18

动荡

语句 参数 例子 描述 备注 版本
add_nationalism <int>

The amount to add or subtract.

add_nationalism = 10 增加分离主义。 1.1
add_unrest <int>

The amount to add or subtract.

add_unrest = 10 增加叛乱。 将会显示在基本上。 1.8
create_native <int>

The size to use.

create_native = 1 Spawns natives in the current province scope. Only spawnable in uncolonized provinces. 1.1
create_pirate <int>

The size to use.

create_pirate = 1 Spawns pirates in the current province scope. Only spawnable in sea zones and land provinces with ports. 1.1
create_revolt <int>

The size to use.

create_revolt = 1 Spawns the most likely rebel type in the current province scope. 1.1
<rebel type> <int>

The size to use.

anti_tax_rebels = 1 Spawns the defined rebel type in the current province scope. Rebel types found in /Europa Universalis IV/common/rebel_types/*.txt. 1.1
spawn_rebels type = <type>

The size type to use.
size = <int>
The size to use.
culture = <culture> / <scope>
Optional. The culture the rebels belong to.
religion = <religion> / <scope>
Optional. The religion the rebels belong to.
unrest = <int>
Optional. Adds this amount of unrest to the province the rebels spawn in.
win = yes
Optional. Changes control of the province the rebels spawn in to the rebels.
friend = <scope>
Optional. Associate a country with the rebels.
leader = <string>
Optional. Assigns the rebel leader a specific name. Can use set_saved_name.
female = yes
Optional. Makes the rebel leader female.
use_heir_as_leader = yes
Optional. Makes the owner's heir the rebel leader. Removes heir.
use_consort_as_leader = yes
Optional. Makes the owner's consort the rebel leader. Removes consort.

spawn_rebels = {
    type = noble_rebels
    size = 1
}
spawn_rebels = {
    type = pretender_rebels
    size = 2
    leader = rebel_preacher
}
spawn_rebels = {
    type = catholic_rebels
    size = 2
    friend = FROM
}
Spawns the defined rebels in the current province scope. Rebel types found in /Europa Universalis IV/common/rebel_types/*.txt. 1.1

Note: the size of revolts follows this formulae:

殖民

语句 参数 例子 描述 备注 版本
create_colony <int>

The initial size of the colony.

random_empty_neighbor_province = {
    create_colony = 200
}
Starts a colony belonging to the owner of the ROOT province scope. 1.1
add_colonysize <int>

The amount of settlers to add.

add_colonysize = 10 Adds settlers to the current province scope if a colony. 1.1
multiply_colonysize <float>

The multiplier to use.

multiply_colonysize = 2 Multiplies the settler count in the current province scope if a colony. 1.1
add_siberian_construction <int>

The initial size of the colony.

add_siberian_construction = 400 Starts a siberian colony in the current province scope. Only works if the ROOT scope is a country that can use Siberian Frontiers. 1.22
change_native_ferocity <int>

The amount to add or subtract.

change_native_ferocity = 5 Adds to the Native Ferocity within an uncolonized province. 1.1
change_native_hostileness <int>

The amount to add or subtract.

change_native_hostileness = 5 Adds to the Native Hostileness within an uncolonized province. 1.1
change_native_size <int>

The amount to add or subtract.

change_native_size = 50 Adds to the amount of natives within an uncolonized province. 1.1
discover_country <scope>

The country that gains vision.

upper_peru_region = {
    discover_country = FRA
}
The defined scope gains vision over the current province scope. Best used within areas, regions, etc to add vision. 1.1
undiscover_country <scope>

The country that loses vision.

upper_peru_region = {
    undiscover_country = FRA
}
The defined scope loses vision over the current province scope. Best used within areas, regions, etc to remove vision. 1.1

外交

语句 参数 例子 描述 备注 版本
add_claim <scope>

The country that gains the claim.

capital_scope = {
    add_claim = FRA
}
定义的范围对当前省获得宣称 1.1
add_core <scope>

The country that gains the core.

capital_scope = {
    add_core = FRA
}
定义的范围对当前省获得核心 1.1
add_core_construction yes

Boolean.

add_core_construction = yes Starts core construction in the current province scope, for the current owner. 1.11
add_permanent_claim <scope>

The country that gains the permanent claim.

capital_scope = {
    add_permanent_claim = FRA
}
对定义的范围获得永久宣称 1.14
add_territorial_core <scope>

The country that gains the territorial core.

capital_scope = {
    add_territorial_core = FRA
}
定义的范围获得自治领地核心 1.18
cede_province <scope>

The country that gains ownership.

capital_scope = {
    cede_province = FRA
}
定义范围获得当前省范围的所有权。 也就是割让土地给定义范围.如果定义范围本身不存在.那么割让的土地独立建国 previous_owner can be used to cede ownership to the last previous owner of a province. 1.1
change_controller <scope>

The country that gains control.

capital_scope = {
    change_controller = FRA
}
The defined scope gains control over the current province scope. Control here means occupation, not ownership. 1.1
remove_claim <scope>

The country that loses their claim.

capital_scope = {
    remove_claim = FRA
}
The defined scope loses their claim on the current province scope. Works for both types of claims. 1.1
remove_core <scope>

The country that loses their core.

capital_scope = {
    remove_core = FRA
}
The defined scope loses their core on the current province scope. 1.1
remove_territorial_core <scope>

The country that loses their territorial core.

capital_scope = {
    remove_territorial_core = FRA
}
The defined scope loses their territorial core on the current province scope. 1.18

军事

语句 参数 例子 描述 备注 版本
artillery <scope>

The country scope the artillery belongs to

capital_scope = {
    artillery = FRA
}
Spawns an artillery unit in the current province scope for the defined country scope. Uses the currently selected artillery unit. 1.1
cavalry <scope>

The country scope the cavalry belongs to

capital_scope = {
    cavalry = FRA
}
Spawns an cavalry unit in the current province scope for the defined country scope. Uses the currently selected cavalry unit. 1.1
infantry <scope>

The country scope the infantry belongs to

capital_scope = {
    infantry = FRA
}
Spawns an infantry unit in the current province scope for the defined country scope. Uses the currently selected infantry unit. 1.1
mercenary_infantry <scope>

The country scope the mercenary infantry belongs to

capital_scope = {
    mercenary_infantry = FRA
}
Spawns an mercenary infantry unit in the current province scope for the defined country scope. Uses the currently selected infantry unit. 1.11
mercenary_cavalry <scope>

The country scope the mercenary cavalry belongs to

capital_scope = {
    mercenary_cavalry = FRA
}
Spawns an mercenary cavalry unit in the current province scope for the defined country scope. Uses the currently selected cavalry unit. 1.11
streltsy_infantry <scope>

The country scope the streltsy infantry belongs to

capital_scope = {
    streltsy_infantry = FRA
}
Spawns an streltsy infantry unit in the current province scope for the defined country scope. Uses the currently selected infantry unit. 1.22
cossack_cavalry <scope>

The country scope the cossack cavalry belongs to

capital_scope = {
    cossack_cavalry = FRA
}
Spawns an cossack cavalry unit in the current province scope for the defined country scope. Uses the currently selected cavalry unit. 1.22
heavy_ship <scope>

The country scope the ship belongs to

random_owned_province = {
    limit = { has_port = yes }
    heavy_ship = FRA
}
Spawns an heavy ship unit in the current province scope for the defined country scope. Uses the defined scope's current heavy ship unit.
Requires the current province scope to have a port.
1.1
light_ship <scope>

The country scope the ship belongs to

random_owned_province = {
    limit = { has_port = yes }
    light_ship = FRA
}
Spawns an light ship unit in the current province scope for the defined country scope. Uses the defined scope's current light ship unit.
Requires the current province scope to have a port.
1.1
galley <scope>

The country scope the ship belongs to

random_owned_province = {
    limit = { has_port = yes }
    galley = FRA
}
Spawns an galley ship unit in the current province scope for the defined country scope. Uses the defined scope's current galley ship unit.
Requires the current province scope to have a port.
1.1
transport <scope>

The country scope the ship belongs to

random_owned_province = {
    limit = { has_port = yes }
    transport = FRA
}
Spawns an transport ship unit in the current province scope for the defined country scope. Uses the defined scope's current transport ship unit.
Requires the current province scope to have a port.
1.1
<unit name> <scope>

The country scope the unit belongs to

capital_scope = {
    british_redcoat = FRA
}
Spawns a specific unit in the current province scope for the defined country scope. Units can be found in /Europa Universalis IV/common/units/*.txt. 1.1
kill_leader <type>

The leader type to kill. name is the specific leader name to target.

kill_leader = general

kill_leader = random
kill_leader = "John Smith

Kills a leader in the current province scope if they match the type used. Only works if the leader is assigned to a unit that is stationed in the current province.

Possible types:

  • general
  • admiral
  • conquistador
  • explorer
  • random
  • <leader name>
1.1
kill_units who = <scope>

Optional. Which country scopes should be affected.
type = <type>
Optional. Which type of units that should be affected.
amount = <int>
Optional. The specific amount to kill.

kill_units = {
    who = enemy
}
kill_units = {
    who = owner
    type = infantry
}
kill_units = {
    who = controller
    type = artillery
    amount = 5
}
Kills units following the defined parameters in the current province scope. In the who parameter, you can use enemy, owner and controller.

When used with no parameters, will kill all units within the current province scope.
Possible types:

  • infantry
  • cavalry
  • artillery
  • heavy_ship
  • light_ship
  • galley
  • transport
  • <unit_name>
1.12
add_unit_construction type = <type>

Which type of unit to build.
amount = <int>
The amount to build.
speed = <float>
The speed percentage of the base unit construction speed to use.
cost = <float>
The cost percentage of the base unit construction cost to use.
mercenary = yes
Optional. Makes the constructed units mercenaries.

add_unit_construction = {
    type = light_ship
    amount = 20
    speed = 0.1
    cost = 0
}
Constructs the defined units in the current province scope. Possible types:
  • infantry
  • cavalry
  • artillery
  • heavy_ship
  • light_ship
  • galley
  • transport
  • <unit_name>
1.1
build_to_forcelimit <type> = <float>

The type is any of the base unit types. The value is the percentage of forcelimit.

build_to_forcelimit = {
    heavy_ship = 0.3
    light_ship = 0.3
    transport = 0.2
}
Builds the defined units as a percentage of the owner's forcelimit in the current province scope. 1 is equal to 100% of the owner's forcelimit.

Possible types:

  • infantry
  • cavalry
  • artillery
  • heavy_ship
  • light_ship
  • galley
  • transport
  • <unit_name>
1.1
remove_loot who = <scope>

The country scope that receives the loot.
amount = <int>
The amount of loot to take.

remove_loot = {
    who = ROOT
    amount = 5
}
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 <int>

The process adjustment to add or subtract.

change_siege = 5 Changes the siege progress in the current province scope. 1.1

贸易

语句 参数 例子 描述 备注 版本
recall_merchant <scope>

The country scope to use.

recall_merchant = FRA Recalls a placed merchant in the current tradenode province scope. Only works when the current province scope is the location of a tradenode center. 1.1
add_trade_node_income <int>

The amount to add or subtract.

add_trade_node_income = 10 Adds income to the current tradenode province scope. Only works when the current province scope is the location of a tradenode center. 1.1
add_trade_modifier who = <scope>

The country scope that receives the modifier.
duration = <days>
The duration of the modifier.
power = <float>
The amount of trade power to add or subtract.
key = <string>
The key to display as the modifier in the tooltip.

add_trade_modifier = {
    who = ROOT
    duration = 5475
    power = 15
    key = STRONG_MERCHANTS
}
Adds a trade modifier for the defined country scope in the current tradenode province scope. Can be added to any province within a tradenode. 1.1
remove_trade_modifier who = <scope>

The country scope that has the trade modifier.
name = <string>
The trade modifier to remove.

remove_trade_modifier = {
    who = ROOT
    key = STRONG_MERCHANTS
}
Removes a trade modifier for the defined country scope in the current tradenode province scope. 1.1

流程控制

有些效果域(effect scopes)用某种方式改变执行流程。强调,这些都是效果域中的流程控制,不能用于触发器条件。

隐藏效果指令

It is possible to hide the automatic tooltip that effect generate, especially if you want the result of the effect to be hidden to the player.

You can do this by using the hidden_effect scope around the effects you wish to hide. The format is as follows:

hidden_effect = {
    <effects>
}

Tooltip

It is possible to display the automatic tooltip that effects generate without actually executing the effects.

You can do this by using the tooltip scope around the effects. The format is as follows:

tooltip = {
    <effects>
}

If, Else if 和 Else

The if, else_if and else scopes are used to introduce effects within an effect scope that hidge on a set of trigger values.

The if scope was introduced in Patch 1.1. The format is as follows:

if = {
    limit = {
        <triggers>
    }
    
    <effects>
}

In Patch 1.23, support for else_if and else was added. The format is as follows:

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>
    }
}

Note that you can nest if scopes, allowing for multiple layers of triggers and effects.

While

The while scope is used to repeat execution of a set of effects whilst a set of trigger values remain true.

Introduced in Patch 1.18, the format is as follows:

while = {
    limit = {
        <triggers>
    }
    
    <effects>
}

Note:

  • A while scope loop will continue for 100,000 loops if the trigger values never become false. After which, it will terminate.
  • 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.

Trigger Switch

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:

trigger_switch = {
    on_trigger = <trigger>
    <trigger value> = { <effect> }
    <trigger value> = { <effect> }
}

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:

trigger_switch = {
    on_trigger = technology_group
    western = { add_stability = 1 }
    eastern = { add_stability = -1 }
}

Random 和 Random Lists

It is possible to randomly execute effects with both the random and random_list scopes.

The random scope is used to add a single random roll to a set of effects. The format is as follows:

random = { 
    chance = 50 

    <effects>
}

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:

random = {
    <chance> = {
        <effects>
    }
    <chance> = {
        <effects>
    }
}

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:

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 }
}

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.

脚本效果

主条目:scripted_effects

脚本效果(Scripted effects)本质上是指令宏,能被用于事件、决议等以便改善代码可读性。通过将混乱的代码保持在脚本效果中,可以更容易地保持可读性。

脚本效果能在这里找到:/Europa Universalis IV/common/scripted_effects/*.txt

这是一个脚本效果,把7行减少到一行:

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
}

在事件中添加如下代码来执行脚本效果:

clear_religious_scholar_modifiers_effect = yes

脚本效果现在接受参数,在1.23 版本中。这意味着你能把数据传递进脚本效果,从而用于更广泛的用途。

要在脚本效果内部定义参数,只需简单地用$符号包围关键字。例如:$DURATION$

这里有一个脚本效果增加或扩展了 any 传递给它修正的省份:

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$ }
	}
}

在事件中添加如下代码来执行脚本效果:

add_or_extend_province_modifier_effect = { MODIFIER = pasha_removed_modifier DURATION = 3650 }

已被移除的效果指令

Effect Example Version Removed
add_province_manpower add_province_manpower = 1 1.12
add_revolt_risk add_revolt_risk = 5 1.8
culture_group_union culture_group_union = ROOT 1.14
create_protectorate create_protectorate = ROOT 1.20