指令

本页面所适用的版本可能已经过时,最后更新于1.24
这个页面介绍的是改派用到的指令语句,控制台指令(Console commands)请参阅另一页面

效果(effects)指令 用于在特定的作用域(scope)中动态地影响游戏。在早前,这部分被直接称为Effects,现在则是Commands,从而避免与效果作用域混淆。 指令只能用于特定的作用域上下文(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>
game.log中的字符串
log = "myVariable: [Root.myVariable.GetValue]" 执行时在game.log中显示一个字符串。 接受所有本地化命令(即[Root.GetName]等) 1.21
save_event_target_as <string>
用于标识事件目标的独特字符串。
capital_scope = {
    save_event_target_as = my_province
}
将当前范围另存为关键点。一旦执行结束(即事件结束)就清除。 使用event_target:<key>确定范围。 1.8
save_global_event_target_as <string>
用于标识全局事件目标的独特字符串。
random_country = {
    save_global_event_target_as = my_country
}
将当前范围另存为关键点。执行后持续存在,直到通过效果清除。 使用event_target:<key>确定范围。 1.8
clear_global_event_target <string>
用于清除全局事件目标的独特字符串。
clear_global_event_target = my_country 清除特定的全局事件目标。 1.8
clear_global_event_targets yes
布尔值。
clear_global_event_targets = yes 清除所有全局事件目标。 1.8
show_ambient_object <string>
用于显示环境对象的独特字符串。
show_ambient_object = nammi2_hagia_sophia_minarets_entity 显示map/ambient_objects.txt 文件中隐藏的环境对象。 1.19
hide_ambient_object <string>
用于隐藏环境对象的独特字符串。
hide_ambient_object = nammi2_hagia_sophia_minarets_entity map/ambient_objects.txt 文件中隐藏可见的环境对象。 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.1
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.1
remove_country_modifier <modifier>

移除事件修正

remove_country_modifier = the_proper_old_ways 当前国家移除一个事件修正 1.1
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.1
clr_country_flag <flag>
确认一个特殊的标识以清除
clr_country_flag = my_flag 清除一个国家标识 1.1
change_tag <scope>

变更控制的TAG

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

切换控制的TAG

switch_tag = FRA
switch_tag = ROOT
switch_tag = event_target:my_country
切换玩家控制的TAG。原本的国家将变为由AI控制。 1.8
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.1
add_dip_power <int>

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

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

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

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

保留名字的代号。
type = advisor / simple
名称生成类型。Advisor从名称列表中提取,简单地利用name参数。
name = <string>
要保存在代号下的名称。仅与简单类型一起使用。
scope = <scope>
从中提取名单的国家/地区范围。仅与advisor 类型一起使用。

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
}
将名称保存到唯一代号下以用于其他效果。 可与 define_admiral, define_explorer, define_conquistador, define_general, define_ruler, define_consort, define_heir, define_advisor, spawn_rebels

一起使用。

1.23
clear_saved_name <key>

要清除的名称代号。

clear_saved_name = noble_zealot 清除以保存的名称。 在使用保存名称后使用此效果。 1.23

经济

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

增加或减少的收入数字

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

增加或减少的金币数量

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

增加或减少通货膨胀率

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

增加或减少重商主义

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

增加或减少关税税率

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

变更的数值

loan_size = 24 贷款规模 贷款规模与月收入相关,当月中贷款的额度都是相近的。 1.1
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.8

政府

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

专制度变化的数值

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

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

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

共和传统变化的数值

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

The amount of republican tradition to add or subtract.

add_scaled_republican_tradition = 10 为当前作用域变化相应数值的共和传统 共和国家族连任时失去或获得的共和传统,具体用法还不知道,加在选举事件中为-4时减12共和传统,为-8时-24共和传统,为12时+40共和传统,为6时+18点共和传统?(望大佬弄明白后修改这条) 1.30
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.7
change_government <government>

变更为指定的政体

change_government = dictatorship 变更为指定的政体类型 政体类型可以在/Europa Universalis IV/common/governments/*.txt搜索到 1.1
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.1
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.1
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.1

宗教

语句 参数 例子 描述 备注 版本
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>

获得一个理念

add_idea = military_traditions 为当前作用域添加”军事传统(military_traditions)“理念 理念可以在 /Europa Universalis IV/common/ideas/*.txt找到。

若该理念无法在理念组中被找到,则无法起效。

1.6
add_idea_group <ideagroup>

获得一个理念组

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

若当前国家无可用的理念槽,则无法起效。

1.6
add_active_policy <policy>

获得一个理念政策

add_active_policy = the_statute_of_monopolies 为当前作用域添加”垄断法令“理念政策 政策可以在/Europa Universalis IV/common/policies/*.txt找到。

若当前国家不符合政策的启用条件,或者无可用地政策槽,则无法起效。

1.21
change_technology_group <technology group>

转变科技组

change_technology_group = western 为当前作用域添转变为西方科技组 科技组可以在 /Europa Universalis IV/common/technology.txt找到。

请注意:该指令并不会造成兵种组的改变,改变兵种组请寻找”change_unit_type“指令。

1.1
remove_idea <idea>

移除理念

remove_idea = military_traditions 为当前作用域移除”军事传统(military_traditions)“理念 理念可以在/Europa Universalis IV/common/ideas/*.txt找到。

若未开启指定的理念,则无法起效。

1.6
remove_idea_group <ideagroup>

移除一个理念组

remove_idea_group = military_traditions 为当前作用域移除”贵族理念“理念组 理念组可以在/Europa Universalis IV/common/ideas/*.txt找到。

若未开启指定的理念组,则无法起效。

1.6
set_primitive <yes><no>

布尔值

set_primitive = no 为当前作用域设定是否为原始土著国家 原始土著国家无法建造船只,只能建造原始建筑,还有宗教改革。 1.18
swap_free_idea_group <yes>

布尔值

swap_free_idea_group = yes 为当前作用域检测国家理念是否相符,若不符则重置为正确的国家理念。 用于转变国家后检测国家理念的变更。 1.1
add_next_institution_embracement <int>

增加未接纳思潮的进程

add_next_institution_embracement = 10 为当前作用域增加未接纳思潮的进程10% 思潮可以在/Europa Universalis IV/common/institutions/*.txt找到。
1.21
add_adm_tech <int>

提升行政科技等级

add_adm_tech = 1 为当前作用域提升“行政”科技等级。 请注意:该指令无法降低科技。 1.21
add_dip_tech <int>

提升外交科技等级

add_dip_tech = 1 为当前作用域提升“外交”科技等级。 请注意:该指令无法降低科技。 1.21
add_mil_tech <int>

提升军事科技等级

add_mil_tech = 1 为当前作用域提升“军事”科技等级。 请注意:该指令无法降低科技。 1.21

宫廷

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

增加或减少威望 <scope>
可指向作用域,加减数值

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

增加或减少腐败

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

增加或减少辉煌值

add_splendor = 2 增加辉煌值。 辉煌值可用来获得时代能力 1.20
create_advisor <advisor>

生成顾问

create_advisor = philosopher 生成顾问。 该指令生成的顾问默认诞生在首都,文化与宗教默认为当前作用域的国教与主流文化 1.1
kill_advisor <random>

随机杀死一名本国顾问。
<advisor>
杀死指定类型的顾问。
<advisor id>
杀死指定ID的顾问。

kill_advisor = philosopher

kill_advisor = random
kill_advisor = 30

杀死作用域中已雇佣的顾问。 顾问类型可以在/Europa Universalis IV/common/advisortypes/*.txt找到。

执行该指令后会显示已雇佣顾问的死亡提示框。
请注意:该指令仅可作用于已雇佣的顾问。

1.1
remove_advisor <random>

随机移除一名顾问 <advisor>
移除指定类型的顾问。
<advisor id>
移除指定ID的顾问。

remove_advisor = philosopher

remove_advisor = random
remove_advisor = 30

移除作用域中已雇佣的顾问。 顾问类型可以在/Europa Universalis IV/common/advisortypes/*.txt找到。

执行该指令后不会显示已雇佣顾问的死亡提示框。
请注意:该指令仅可作用于已雇佣的顾问。

1.1
remove_advisor_by_category <type>

按指定类型移除顾问,类型划分: ADM(行政), DIP(外交)或 MIL(军事).

remove_advisor_by_category = ADM 按指定类型移除当前作用域的顾问 请注意:该指令仅可作用于已雇佣的顾问。 1.20
define_advisor type = <type>

要生成的顾问类型
skill = <int>
要生成的顾问等级。原版游戏最高为5级。
name = <string>
可选项。顾问姓名。
location = <province id>
可选项。顾问出生地。
discount = yes
可选项。顾问价格是否打折。
female = yes
可选项。顾问性别是否为女性
culture = <culture> / <scope>
可选项。顾问的文化。
religion = <religion> / <scope>
可选项。顾问的宗教

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
}
获得自定义顾问到当前作用域 顾问类型可以在/Europa Universalis IV/common/advisortypes/*.txt找到。

可以使用事件域值设定顾问的文化宗教
顾问名称也可以参考set_saved_name 作为设定。

1.1

稳定

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

增加或者减少稳定。

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

增加或者减少厌战。

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

增加或者减少独立倾向。

add_liberty_desire = 10 增加独立倾向。 该命令用于增加或者减少附庸国对宗主国的独立倾向。 1.4
disband_rebels <type>

消灭指定类型的叛军。

disband_rebels = anti_tax_rebels 为当前作用域中所有省份去除指定类型的叛军。 叛军类型可以在/Europa Universalis IV/common/rebel_types/*.txt找到。 1.1
collapse_nation yes

布尔值

collapse_nation = yes 使当前作用域释放所其有他国家核心的省份,不存在的国家也将获得独立, 国家崩溃指令,国家将被削弱至10个省份 1.10
add_disaster_modifier name = <modifier>

获得的事件修正。
disaster = <disaster>
获得的灾难。
duration = <days>
持续时间。

add_disaster_modifier = {
    name = "restrict_serfdom"
    duration = -1
    disaster = internal_conflicts
}
为当前作用域添加一个事件修正,此修正会在灾难读条完成后或者在灾难结束后移除。 灾难可以在/Europa Universalis IV/common/disasters/*.txt找到。 1.10
add_disaster_progress disaster = <disaster>

需要调整的灾难
value = <int>
需要调整的灾难进程值

add_disaster_progress = {
    disaster = internal_conflicts
    value = 10
}
为当前作用域中已经触发的灾难调整灾难进程。 灾难可以在/Europa Universalis IV/common/disasters/*.txt找到。 1.16
end_disaster <disaster>

结束灾难

end_disaster = internal_conflicts 使当前作用域中已经触发的灾难结束 灾难可以在/Europa Universalis IV/common/disasters/*.txt找到。 1.9

军事

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

增加或减少指定数量的陆军传统

add_army_tradition = 10 将陆军传统添加到当前范围。 1.1
add_navy_tradition <int>

增加或减少指定数量的海军传统

add_navy_tradition = 10 将海军传统添加到当前范围。 1.1
add_army_professionalism <float>

增加或减少指定数量的陆军职业度

add_army_professionalism = 0.05 将陆军职业度添加到当前范围。 1.23
add_manpower <float>
增加或减少指定数量的人力
add_manpower = 1 将人力添加到当前范围。 1等于1000人力。 1.1
add_sailors <int>

增加或减少指定数量的水手

add_sailors = 10 将水手添加到当前范围。 1等于1000水手。 1.16
add_yearly_manpower <float>

增加或减少指定百分比的全年总人力

add_yearly_manpower = 0.5 以每年总人力的百分比形式,添加人力到当前范围。 1等于每年总人力的100%。 1.4
add_yearly_sailors <float>

增加或减少指定百分比的全年总水手

add_yearly_sailors = 10 以每年总水手的百分比形式,添加人力到当前范围。 1等于每年总水手的100%。 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>

将兵种组改为指定类型

change_unit_type = western 更改当前范围的兵种组。 兵种组对应于科技组/Europa Universalis IV/common/technology.txt. 1.1
kill_leader type = <type>

杀死某一类的将领,或使用名字来指定杀死某一特定将领。

kill_leader = {
    type = random
}
kill_leader = {
    type = general
}
kill_leader = {
    type = "John Smith"
}
杀死当前范围内所匹配的将领 类型:
  • general:陆军将领
  • admiral:海军提督
  • conquistador:陆军征服者
  • explorer:海军探险家
  • random:随机
  • <leader name>指定将领名字
1.1
define_admiral shock = <int>

海军提督冲击属性。
fire = <int>
海军提督火力属性。
manuever = <int>
海军提督机动属性。
siege = <int>
海军提督围城属性。
name = <string>
可选的,提督的名字。
female = yes
可选的,使提督成为女性。
trait = <trait>
可选的,提督的特质。

define_admiral = {
    shock = 2
    fire = 2
    manuever = 2
    siege = 2
}
在当前范围创建具有已定义属性的海军提督。 将领特质可以在/Europa Universalis IV/common/leader_personalities/*.txt.
找到。

攻城属性提高了海军提督的封锁效率。
姓名参数接受一个已经保存的预定参数,可见于set_saved_name 栏目。

1.1
define_explorer shock = <int>

海军探险家冲击属性。
fire = <int>
海军探险家火力属性。
manuever = <int>
海军探险家机动属性。
siege = <int>
海军探险家围城属性。
name = <string>
可选的,探险家的名字。
female = yes
可选的,使探险家成为女性。
trait = <trait>
可选的,探险家的特质。

define_explorer = {
    shock = 2
    fire = 2
    manuever = 2
    siege = 2
}
在当前范围创建具有已定义属性的海军探险家。 将领特质可以在/Europa Universalis IV/common/leader_personalities/*.txt.
找到。

攻城属性提高了海军探险家的封锁效率。
姓名参数接受一个已经保存的预定参数,可见于set_saved_name 栏目。

1.1
define_conquistador shock = <int>

陆军征服者冲击属性。
fire = <int>
陆军征服者火力属性。
manuever = <int>
陆军征服者机动属性。
siege = <int>
陆军征服者围城属性。
name = <string>
可选的,征服者的名字。
female = yes
可选的,使征服者成为女性。
trait = <trait>
可选的,征服者的特质。

define_conquistador = {
    shock = 2
    fire = 2
    manuever = 2
    siege = 2
}
在当前范围创建具有已定义属性的陆军征服者。 将领特质可以在/Europa Universalis IV/common/leader_personalities/*.txt.
找到。
姓名参数接受一个已经保存的预定参数,可见于set_saved_name 栏目。
1.1
define_general shock = <int>

陆军将军冲击属性。
fire = <int>
陆军将军火力属性。
manuever = <int>
陆军将军机动属性。
siege = <int>
陆军将军围城属性。
name = <string>
可选的,将军的名字。
female = yes
可选的,使将军成为女性。
trait = <trait>
可选的,将军的特质。

define_general = {
    shock = 2
    fire = 2
    manuever = 2
    siege = 2
}
在当前范围创建具有已定义属性的陆军将军。 将领特质可以在/Europa Universalis IV/common/leader_personalities/*.txt.
找到。
姓名参数接受一个已经保存的预定参数,可见于set_saved_name 栏目。
1.1
artillery <scope>

炮兵产生的省份及范围。

capital_scope = {
    ROOT = {
        artillery = PREV
    }
}
在目标省份为当前范围生成一支炮兵部队。 使用当前选择的炮兵单位。 1.1
cavalry <scope>
骑兵产生的省份及范围。
capital_scope = {
    ROOT = {
        cavalry = PREV
    }
}
在目标省份为当前范围生成一支骑兵部队。 使用当前选择的骑兵单位。 1.1
infantry <scope>
步兵产生的省份及范围。
capital_scope = {
    ROOT = {
        infantry = PREV
    }
}
在目标省份为当前范围生成一支步兵部队。 使用当前选择的步兵单位。 1.1
mercenary_infantry <scope>
雇佣步兵产生的省份及范围。
capital_scope = {
    ROOT = {
        mercenary_infantry = PREV
    }
}
在目标省份为当前范围生成一支雇佣步兵部队。 使用当前选择的步兵单位。 1.1
mercenary_cavalry <scope>
雇佣骑兵产生的省份及范围。
capital_scope = {
    ROOT = {
        mercenary_cavalry = PREV
    }
}
在目标省份为当前范围生成一支雇佣骑兵部队。 使用当前选择的骑兵单位。 1.1
heavy_ship <scope>

重型船产生的省份及范围。

random_owned_province = {
    limit = { has_port = yes }
    ROOT = {
        heavy_ship = PREV
    }
}
在已定义的省范围内为当前范围生成重型船单位。 使用当前范围的当前重型船单位。

要求省范围有一个港口。

1.1
light_ship <scope>
轻型船产生的省份及范围。
random_owned_province = {
    limit = { has_port = yes }
    ROOT = {
        light_ship = PREV
    }
}
在已定义的省范围内为当前范围生成轻型船单位。 使用当前范围的当前轻型船单位。

要求省范围有一个港口。

1.1
galley <scope>
中型船产生的省份及范围。
random_owned_province = {
    limit = { has_port = yes }
    ROOT = {
        galley = PREV
    }
}
在定义的省范围内为当前范围生成一个中型船单位。 使用当前范围的当前中型船单位。

要求省范围有一个港口。

1.1
transport <scope>
运输船产生的省份及范围。
random_owned_province = {
    limit = { has_port = yes }
    ROOT = {
        transport = PREV
    }
}
在定义的省范围内为当前范围生成一个运输船单位。 使用当前范围的当前运输船单位。

要求省范围有一个港口。

1.1
<unit name> <scope>

单位产生的省范围。

random_owned_province = {
    limit = { has_port = yes }
    ROOT = {
        british_redcoat = PREV
    }
}
在定义的省范围内为当前范围生成一个特定单位。 单位可在 /Europa Universalis IV/common/units/*.txt找到 1.1

外交

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

为当前国家添加历史友邦

add_historical_friend = FRA 使指定的作用域成为当前作用域的历史友邦 1.12
add_historical_rival <scope>

为当前国家添加历史宿敌

add_historical_rival = FRA 使指定的作用域成为当前作用域的历史宿敌 1.12
remove_historical_friend <scope>

为当前国家移除历史友邦

remove_historical_friend = FRA 移除指定的作用域与当前作用域的历史友邦关系 1.12
remove_historical_rival <scope>

为当前国家移除历史宿敌

remove_historical_rival = FRA 移除指定的作用域与当前作用域的历史宿敌关系 1.12
add_trust who = <scope>

增加信任值的作用域
value = <int>
信任变化的数值
mutual = yes 可选项。是否同时为双方增加信任值

add_trust = {
    who = FRA
    value = 25
    mutual = yes
}
指定作用域获得当前作用域的信任值 需要DLC哥萨克 哥萨克 1.20
add_opinion who = <scope>

添加该关系修正的作用域
modifier = <modifier>
使用何种关系修正
years = <int> 可选项。改关系修正将岁时间(年)衰减

add_opinion = {
    who = FRA
    modifier = renounced_as_heretics
}
指定作用域获得对当前作用域的关系修正 关系修正的内容可见: /Europa Universalis IV/common/opinion_modifiers/*.txt 1.1
reverse_add_opinion who = <scope>

添加该关系修正的作用域国家
modifier = <modifier>
使用哪一种关系修正
years = <int> 可选性,关系修正会在多少年后过期

reverse_add_opinion = {
    who = FRA
    modifier = renounced_as_heretics
}
当前作用域国家获得对指定作用域国家的关系修正 存在关系修正内容的文件位于文件夹:/Europa Universalis IV/common/opinion_modifiers/*.txt 1.30.4
remove_opinion who = <scope>

移除该关系修正的作用域国家
modifier = <modifier>
移除哪一种关系修正

remove_opinion = {
    who = FRA
    modifier = renounced_as_heretics
}
指定作用域国家失去对当前作用域国家的关系修正 存在关系修正内容的文件位于文件夹:/Europa Universalis IV/common/opinion_modifiers/*.txt 1.30.4
reverse_remove_opinion who = <scope>

移除该关系修正的作用域国家
modifier = <modifier>
移除哪一种关系修正

reverse_remove_opinion = {
    who = FRA
    modifier = renounced_as_heretics
}
当前作用域国家失去对指定作用域国家的关系修正。 存在关系修正内容的文件位于文件夹:/Europa Universalis IV/common/opinion_modifiers/*.txt 1.30.4
create_alliance <scope>

与指定国家同盟

create_alliance = FRA 当前作用域国家与指定作用域国家达成同盟 1.1
create_guarantee <scope>

给予保障独立的国家

create_guarantee = FRA 当前作用域国家给予指定作用域国家保障独立 1.30.4
create_marriage <scope>

与指定国家联姻

create_marriage = FRA 建立对当前作用域国家的王室联姻 1.1
create_union <scope>

对指定国家进行联合统治

create_union = FRA 建立对当前作用域国家的联合统治 1.1
create_vassal <scope>

将指定国家设置为附庸国

create_vassal = FRA 创建指定作用域的国家,设置为当前作用域国家的附庸国 附属国类型为:附庸国 1.22
create_march <scope>

将指定国家设置为卫戍国

create_march = FRA 创建指定作用域的国家,设置为当前作用域国家的卫戍国 附属国类型为:卫戍国 1.12
vassalize <scope>

使当前国家成为附庸国

vassalize = FRA 将指定作用域的国家设置为当前作用域国家的附庸国 附属国类型为:附属国
请注意:该语句的效果与create_vassal一致
1.1
create_subject subject_type = <type>

附属国类型
subject = <scope>
指定的范围(国家)

create_subject = {
    subject_type = tributary_state
    subject = FRA
}

tributary_state是朝贡国;

将指定作用域的国家设置为当前作用域国家的附属国 附属国类型请参照文件 /Europa Universalis IV/common/subject_types/*.txt 1.20
break_marriage <scope>

与指定国家取消王室联姻

break_marriage = FRA 取消与当前作用域国家的王室联姻 1.11
break_union <scope>

与指定国家取消联合统治

break_union = FRA 取消与当前作用域国家的联合统治 1.1
inherit <scope>

继承指定的国家

inherit = FRA 继承指定作用域的全部省份 1.1
release <scope>

释放指定国家

release = FRA 将当前作用域所拥有的指定作用域国家的核心全部释放 1.1
release_all_subjects yes

布尔值

release_all_subjects = yes 将当前作用域所拥有的他国核心全部释放 1.10
grant_independence yes

布尔值

grant_independence = yes 使当前作用域独立于他的宗主国 1.22
declare_war <scope>

对指定国家宣战

declare_war = FRA 使当前作用域对指定作用域发起一场无理由战争 若发动无理由宣战,国家将受到 +30 Aggressive expansion impact.png 侵略扩张和 −2 Icon stability.png 稳定度的惩罚 1.1
declare_war_with_cb who = <scope>

对指定国家宣战
casus_belli = <cb> 使用的战争借口(CB)
war_goal_province = <province id>
战争借口的目标省份

declare_war_with_cb = {
    who = FRA
    casus_belli = cb_annex
}
对指定的国家使用指定的战争借口宣战。若是战争借口需要目标省份的,则需添加“war_goal_province = <province id>” 战争理由可以在/Europa Universalis IV/common/cb_types/*.txt中找到。 1.1
add_truce_with <scope>

与指定国家签订一个和平条约

add_truce_with = FRA 当前作用域与指定作用域之间添加一个和平条约 休战时间默认为达成无条件和平的停战时间 1.1
white_peace <scope>

需达成和平的作用域

white_peace = FRA 与指定作用域强制达成无条件和平 1.30.4
form_coalition_against <scope>

在指定作用域国家创建或加入一个包围网联盟

form_coalition_against = FRA 当前作用域国家加入一个对抗指定作用域国家的包围网联盟 包围网相关 1.30.4
add_casus_belli target = <scope>

战争借口的目标作用域
type = <cb>
战争借口
months = <months>
战争借口的有效期,以月份计

add_casus_belli = {
    target = FRA
    type = cb_annex
    month = 60
}
为当前作用域的国家增加对目标国家的战争借口(CB) 战争理由(借口)可以在 /Europa Universalis IV/common/cb_types/*.txt中找到 1.1
reverse_add_casus_belli target = <scope>

拥有战争借口的作用域
type = <cb>
战争借口
months = <months>
战争借口的有效期,以月份计

reverse_add_casus_belli = {
    target = FRA
    type = cb_annex
    month = 60
}
为目标国家增加以当前作用域国家为目标的战争借口(CB) 战争理由(借口)可以在 /Europa Universalis IV/common/cb_types/*.txt中找到 1.1
remove_casus_belli target = <scope>

移除战争借口的目标作用域
type = <cb>
战争借口

remove_casus_belli = {
    target = FRA
    type = cb_annex
}
为当前作用域的国家移除对目标国家的战争借口(CB) 战争理由(借口)可以在 /Europa Universalis IV/common/cb_types/*.txt中找到 1.1
reverse_remove_casus_belli target = <scope>

拥有战争借口的作用域
type = <cb>
战争借口

reverse_remove_casus_belli = {
    target = FRA
    type = cb_annex
}
为目标域国家移除以当前作用域国家为目标的战争借口(CB) 战争理由(借口)可以在 /Europa Universalis IV/common/cb_types/*.txt中找到 1.1
remove_fow <months>

移除多久的战争迷雾

random_rival_country = {
    limit = { war_with = ROOT }
    remove_fow = 3
}
为作用域范围内的省份移除战争迷雾 1.1
add_spy_network_from who = <scope>

目标作用域
value = <int>
间谍网进度变化

add_spy_network_from = {
    who = FRA
    value = 10
}
改变指定作用域在当前作用域的间谍网进程 1.16
add_spy_network_in who = <scope>

目标作用域
value = <int>
间谍网进度变化

add_spy_network_in = {
    who = FRA
    value = 10
}
改变当前作用域在指定作用域的间谍网进程 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.

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

增加或减少的帝国权威值

add_imperial_influence = 10 改变当前的帝国威望 请注意:帝国威望只有神罗皇帝能用 1.1
add_scaled_imperial_influence <int>

增加或减少的帝国权威值

add_scaled_imperial_influence = 10 改变当前的帝国威望 请注意:帝国威望只有神罗皇帝能用 1.1
elector <bool>

授予或取消选帝侯地位

elector = yes 当前作用域获得或失去神罗选帝侯地位 1.1
revoke_reform <reform>

要移除的帝国改革项目

revoke_reform = reichsreform 移除一项帝国改革 帝国改革可以在/Europa Universalis IV/common/imperial_reforms/00_hre.txt中找到 1.1
set_in_empire yes

布尔值

set_in_empire = yes 使当前作用域的全部省份加入帝国领土 1.12
hre_inheritable yes

布尔值

hre_inheritable = yes 允许神罗皇帝可以世袭 1.1
imperial_ban_allowed yes

布尔值

imperial_ban_allowed = yes 允许“夺回帝国领土”成为战争借口 1.1
internal_hre_cb no

布尔值

internal_hre_cb = no 帝国成员之间不允许创建新的战争借口 1.1
set_allow_female_emperor yes

布尔值

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

布尔值

dismantle_hre = yes 解散神圣罗马帝国 1.30
enable_hre_leagues yes

布尔值

enable_hre_leagues = yes 允许组建的宗教战争同盟. 1.30
set_hre_religion <religion>

选择一个宗教

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

选择一个宗教

set_hre_religion = catholic 指定一个宗教成为神圣罗马帝国的异端宗教 1.8
set_hre_religion_locked yes

布尔值

set_hre_religion_locked = yes 锁定神圣罗马帝国的官方宗教,并取缔异教,结束宗教战争 1.8
set_hre_religion_treaty yes

布尔值

set_hre_religion_treaty = yes 结束宗教战争,但不设置官方宗教 1.8
join_league <scope>

加入指定的宗教联盟

join_league = FRA 使得当前作用域加入指定的宗教联盟 1.8
leave_league <scope>

离开指定的宗教联盟

leave_league = FRA 使得当前作用域离开指定的宗教联盟 1.8
dismantle_empire_of_china <yes> / <no>

布尔值

dismantle_empire_of_china = yes 关闭天命系统,移除中国皇帝地位 1.20
set_emperor_of_china <scope>

获得中国皇帝地位的国家

set_emperor_of_china = MNG 开启天命系统,确立中国皇帝地位 1.20
add_mandate <int>

变更天命的数值

add_mandate = 10 获得或减少天命值 请注意:天命值只有中国皇帝可以使用 1.20
set_mandate <int>

变更天命的数值

set_mandate = 10 设定当前天命的数值 请注意:天命值只有中国皇帝可以使用 1.20
set_revolution_target <scope>

获得革命标记的国家

set_revolution_target = FRA 使得当前作用域成为革命目标 革命目标消失后不会重新出现 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:

[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]

殖民

语句 参数 例子 描述 备注 版本
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>

炮兵所属国家

capital_scope = {
    artillery = FRA
}
在当前省份范围生成一队指定国家的炮兵。 使用当前选定的炮兵单位。 1.1
cavalry <scope>

骑兵所属国家

capital_scope = {
    cavalry = FRA
}
在当前省份范围生成一队指定国家的骑兵。 使用当前选定的骑兵单位。 1.1
infantry <scope>

步兵所属国家

capital_scope = {
    infantry = FRA
}
在当前省份范围生成一队指定国家的步兵。 使用当前选定的步兵单位。 1.1
mercenary_infantry <scope>

步兵(雇佣兵)所属国家

capital_scope = {
    mercenary_infantry = FRA
}
在当前省份范围生成一队指定国家的步兵(雇佣兵)。 使用当前选定的步兵单位。 1.11
mercenary_cavalry <scope>

骑兵(雇佣兵)所属国家

capital_scope = {
    mercenary_cavalry = FRA
}
在当前省份范围生成一队指定国家的骑兵(雇佣兵)。 使用当前选定的骑兵单位。 1.11
streltsy_infantry <scope>

射击军所属国家

capital_scope = {
    streltsy_infantry = FRA
}
在当前省份范围生成一队指定国家的射击军。 使用当前选定的步兵单位。 1.22
cossack_cavalry <scope>

哥萨克所属国家

capital_scope = {
    cossack_cavalry = FRA
}
在当前省份范围生成一队指定国家的哥萨克。 使用当前选定的骑兵单位。 1.22
heavy_ship <scope>

重型战舰

random_owned_province = {
    limit = { has_port = yes }
    heavy_ship = FRA
}
在当前省份范围生成一队指定国家的重型战舰。 使用当前选定的海军单位。
当前省份要有港口
1.1
light_ship <scope>

小型战舰所属国家

random_owned_province = {
    limit = { has_port = yes }
    light_ship = FRA
}
在当前省份范围生成一队指定国家的小型战舰。 使用当前选定的海军单位。
当前省份要有港口
1.1
galley <scope>

桨帆所属国家

random_owned_province = {
    limit = { has_port = yes }
    galley = FRA
}
在当前省份范围生成一队指定国家的桨帆战舰。 使用当前选定的海军单位。
当前省份要有港口
1.1
transport <scope>

运输船所属国家

random_owned_province = {
    limit = { has_port = yes }
    transport = FRA
}
在当前省份范围生成一队指定国家的运输船。 使用当前选定的海军单位。
当前省份要有港口
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>

接受修正的国家作用域
duration = <days>
修正的持续时间
power = <float>
要增加或减少的贸易力量
key = <string>
在提示中显示文字对应的键值(需要本地化)

add_trade_modifier = {
    who = ROOT
    duration = 5475
    power = 15
    key = STRONG_MERCHANTS
}
在当前贸易点省份作用域内,对制定的国家作用域增加一个贸易修正。 可以在贸易点中任何一个省份增加。 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)用某种方式改变执行流程。强调,这些都是效果域中的流程控制,不能用于触发器条件。

隐藏效果

隐藏效果是指可以隐藏游戏中指令的提示文本,特别是如果你希望对玩家隐藏相关指令的效果。

你可以在需要的指令外层使用hidden_effect 语句来达到隐藏指令的效果。用法如下:

hidden_effect = {
    <指令效果>
}

文本提示

提示文本是指可以在指令未生效的情况下以文本形式查看到当前指令的效果。

你可以在需要的指令外层使用 tooltip 语句来达到文本提示指令的效果。用法如下:

tooltip = {
    <指令效果>
}

如果, 否则和另外(IF语句)

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.

触发开关

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的用法)

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