指令

(重定向自Effects
这个页面介绍的是改派用到的指令语句,控制台指令(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_power_projection <int>

要增加的数值 type
力量投射的来源类型

add_power_projection = {

type = mission_rewards_power_projection amount = 10 }

获得力量投射 常用的type有:

mission_rewards_power_projection 任务和事件奖励 zim_african_great_power 后者是不会随时间衰减的。 每个类型的力量投射分别计算年度衰减

1.31
change_innovativeness <int>
创新度增加的数值
change_innovativeness = 3 为当前作用域增加(减少)创新度 数值范围[-100.0, 100.0]

创新度的上限与下限[0.0, 100.0]

1.25
complete_mission <key>

:任务的标识符

complete_mission = expand_country_mission 完成一个任务 使用此效果时不给予任务奖励。 相反,任务被简单地标记为完成。 它将计入任何需要它的任务,并将在mission_completed 触发器中计为已完成。 1.25
swap_non_generic_missions yes

布尔值

swap_non_generic_missions = yes 刷新非通用任务树
adm_power_cost <int>

The amount of power to scale and then subtract.

adm_power_cost = 100 Scales the amount with the power cost modifier, then takes 行政力量点数 from the current scope. 1.27
dip_power_cost <int>

The amount of power to scale and then subtract.

dip_power_cost = 100 Scales the amount with the power cost modifier, then takes 外交力量点数 from the current scope. 1.27
mil_power_cost <int>

The amount of power to scale and then subtract.

mil_power_cost = 100 Scales the amount with the power cost modifier, then takes 军事力量点数 from the current scope. 1.27
override_country_name <string>

变更为指定作用域的国家本地化名称

override_country_name = KINGDOM_OF_GOD 变更指定作用域的国家名称为<string>。 1.30
restore_country_name <yes>

布尔值

restore_country_name = yes 恢复指定作用域的国家名称为最初的名称。 1.30

经济

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

贷款的月份数 interest_modifier = <value>
活跃的利率修正 fixed_interest = <boolean>
如果为yes则利率被锁定(不随国家利率变化而变化)

add_loan = {
    fixed_interest = 1
    duration = 60
    estate_loan = yes
}
获得一笔贷款 fixed_interest 锁定利息利率 这是可选的

duration 确定了贷款自然到期的月份数 estate_loan = yes 规定了是否债权人为阶级 *但是不能确定具体的阶级 *目前债权人只能为阶级或银行

1.26
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
raise_war_taxes yes:布尔值
raise_war_taxes = yes
可不使用军事点数征收战争税 1.26
add_years_of_owned_provinces_production_income years = <value>

:给予相当于多少年生产收入总额的钱 trigger = <scope> :计算的范围(包含的省份) custom_tooltip = <string> :显示的文本提示

add_years_of_owned_provinces_production_income = {
    years = 8
    trigger = {
        OR = {
            trade_goods = cloth
            trade_goods = silk
        }
    }
    custom_tooltip = MONOPOLY_INCOME_CLOTH_DESC
}
计算指定的范围,给予相当于多少年生产收入总额的钱 1.30
set_bankruptcy <scope>

使特定国家破产

set_bankruptcy = FRA
使特定国家破产 1.34
native_policy 变更为指定的原住民政策
native_policy = native_policy_coexist
改变原住民政策 1.28

政府

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

添加共和传统

add_scaled_republican_tradition = 10 为当前作用域添加共和传统 数值与任期有关,任期为4年时添加的共和传统数值与该值相同 1.7
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_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
change_government_reform_progress <int>

要改变的政府改革点数的数值

change_government_reform_progress = 250 为当前作用域增加(或减少)政府改革点数 正数获得政府改革点数,负数则失去

无法降低至0以下

1.26
adopt_reform_progress <country scope>

获得与目标作用域相同的政府改革进程

adopt_reform_progress = FROM 获得与目标作用域相同的政府改革进程。 可用于教皇国被释放的情况下。
set_legacy_government government = <government>

使政府变为达摩DLC以前的样子。

set_legacy_government = despotic_monarchy 切换为指定的政府 若达摩 达摩DLC生效则无效。 1.26
add_government_reform <reform>

实行指定的政府改革项

add_government_reform = revolutionary_empire_reform

实行指定的政府改革项

若达摩达摩DLC为未用状态,该语句不生效。(这在1.36.2以前可能是正确的,未测试)

无论达摩达摩DLC是否启用皆生效(1.36.2编辑,已测试)

1.26
remove_government_reform <reform>

移除指定的政府改革项

remove_government_reform = revolutionary_empire_reform

移除指定的政府改革项

若达摩达摩DLC为未用状态,该语句不生效。(这在1.36.2以前可能是正确的,未测试)

无论达摩达摩DLC是否启用皆生效(1.36.2编辑,已测试)

1.26
add_revolutionary_zeal <int>

增加革命热情

add_revolutionary_zeal = 10 增加革命热情 若当前作用域政府无 革命热情 机制则无效。 1.30
add_years_of_manpower_scaled_to_seats <int>

从议会省份获得人力

add_years_of_manpower_scaled_to_seats = 10 从议会省份获得人力 若当前作用域无 议会省份 则无效。 1.26
add_years_of_sailors_scaled_to_seats <int>

从议会省份获得水手

add_years_of_sailors_scaled_to_seats = 10 从议会省份获得水手 若当前作用域无 议会省份 则无效。 1.26
add_years_of_tax_scaled_to_seats <int>

从议会省份获得税收

add_years_of_tax_scaled_to_seats = 10 从议会省份获得税收 若当前作用域无 议会省份 则无效。 1.26
add_prestige_scaled_to_seats <int>

从议会省份获得威望

add_prestige_scaled_to_seats = 10 从议会省份获得威望 若当前作用域无 议会省份 则无效。 1.26

文化

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

目标宗教组
school = <school>
目标学派

set_religious_school = {
    group = muslim
    school = hanafi_school
}
变更当前作用域的学派 学派可以在/Europa Universalis IV/common/religions/00_religions.txt找到。 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_curia_treasury <float>

增加或减少教廷金库的金钱。

add_curia_treasury = 100
增加或减少教廷金库的金钱。 1.30
change_cult <cult>

变更崇拜物

change_cult = yemoja_cult
Changes the current cult for the current scope. 崇拜物可以在/Europa Universalis IV/common/fetishist_cults/*.txt找到。

非拜物教则指令无效

1.32
set_defender_of_the_faith 成为信仰守护者who = <scope>

目标作用域
religion = <religion>
指定宗教

set_defender_of_the_faith = {
			who = ROOT  #指定国家
			religion = ROOT  #指定宗教
}
设置目标作用域成为指定宗教的信仰守护者。 1.32
transfer_papal_controller <scope>

转移教监到目标作用域。

transfer_papal_controller = FRA
转移教监,它将更改教廷监护控制者而不杀死当前教皇。 1.36

科技

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

增加威望(滥出威望可转化成君主点数) <scope>

add_prestige_or_monarch_power = { amount = 50 } 增加威望。 所有溢出的威望将转化成三类君主点数 1.34
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
可选项。顾问价格是否打折,与cost_multiplier互斥。
cost_multiplier = 0.5
可选项。顾问价格打折比例,与discount互斥。
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
change_national_focus 焦点的力量点数
<ADM>
<DIP>
<MIL>
change_national_focus = ADM
变更指定作用域范围内的国家焦点。 1.32
extend_regency 延长摄政年限
extend_regency = 5
延长指定作用域范围内的摄政统治年限。 1.31
regency 设置摄政的主导阶层
regency = { estate = xxxx }
设置指定作用域范围内的摄政主导阶层。 1.31
set_estate_led_regency_privilege 授予摄政阶层指定特权;random为随机
set_estate_led_regency_privilege = random
授予指定作用域范围内的摄政阶层特权。 1.31
extend_golden_age <int>

延长当前黄金时代(月数)

extend_golden_age = 12 延长当前黄金时代。 1.34
reset_golden_age 布尔值

重置黄金时代

reset_golden_age = yes 重置当前或过往黄金时代,并重新开始。 1.34

稳定

语句 参数 例子 描述 备注 版本
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 = 1000 将水手添加到当前范围。 1000等于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.32
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_rival <scope>

为当前国家添加宿敌

add_rival = FRA 使指定的作用域成为当前作用域的宿敌 1.30
remove_rival <scope>

移除当前国家的宿敌

remove_rival = FRA 移除的作用域成为当前作用域的宿敌 1.30
add_historical_rival <scope>

为当前国家添加历史宿敌

add_historical_rival = FRA 使指定的作用域成为当前作用域的历史宿敌 1.12
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 Ae 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
join_all_offensive_wars_of <scope>加入目标作用域的进攻战争 join_all_offensive_wars_of = TUR 使当前作用域加入指定作用域的所有进攻战争。 1.30
join_all_defensive_wars_of <scope>加入目标作用域的防御战争 join_all_defensive_wars_of = BYZ 使当前作用域加入指定作用域的所有防御战争。 1.30
transfer_trade_power <scope>转移贸易竞争力给目标作用域 transfer_trade_power = BYZ 使当前作用域转移贸易竞争力给指定作用域。 1.30
join_trade_league <scope>加入目标作用域的贸易联盟 join_trade_league = BYZ 使当前作用域加入指定作用域的贸易联盟。 1.30
support_independence_of <scope>支持目标作用域的独立 support_independence_of = BYZ 使当前作用域支持指定作用域独立。 1.30
add_favors who = <scope>

目标作用域
amount = <int>
亏欠人情变化

add_favors = {
    who = FRA
    amount = 10
}
改变当前作用域在目标作用域的亏欠人情 1.32
remove_hegemon yes
失去霸权
remove_hegemon = yes 使当前作用域失去霸权 1.34
break_alliance <scope>

断盟的作用域

break_alliance = FRA 使指定作用域强制断盟 1.34
add_aggressive_expansion 对指定国家获得侵略扩张who = <scope>

目标作用域
value = <int>
侵略扩张变化
apply_calc = <yes>
计算文化和宗教的修正影响

add_aggressive_expansion = {
			who = FRA
			value = 50
			apply_calc = yes
		}
增加当前作用域对目标作用域的侵略扩张 1.34
reverse_add_aggressive_expansion 对指定国家获得失去扩张who = <scope>

目标作用域
value = <int>
侵略扩张变化
apply_calc = <yes>
计算文化和宗教的修正影响

reverse_add_aggressive_expansion = {
			who = FRA
			value = -50
			apply_calc = yes
		}
减少当前作用域对目标作用域的侵略扩张 1.34

阶级及派系

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

成立独立国家的阶层

create_independent_estate = { estate = estate_cossacks #阶层

government = republic #政体

government_reform = cossacks_reform #政府改革

custom_national_ideas = cossack_ideas #采用的理念

play_as = no #是否扮演该国家

}

当前作用域拥有的省份中,在该阶层所拥有(由阶层文件中所定义的“省份独立权重”来决定)的省份上创建独立国家.

新生国家的宗教与这些省份中绝大多数省份的宗教一致(不知指的是省份数量还是总发展度)

阶层文件位于 /Europa Universalis IV/common/estates/*.txt 1.14
add_estate_influence_modifier estate = <estate>

目标阶层
desc = <string>
在游戏中显示的此影响力变化的名称
influence = <int>
增加或减少的影响力值(1%)
duration = <days>
持续时长

add_estate_influence_modifier = {
    estate = estate_nobles
	desc = EST_VAL_FURTHERED_SPOUSES_FAMILY_NOBLES
    influence = 10
    duration = 7300
}
对指定阶层增加指定数值的影响力,influence为增加值,duration为时间长度(-1为永久) 阶层文件位于 /Europa Universalis IV/common/estates/*.txt 1.14
add_estate_loyalty estate = <estate>

目标阶层
loyalty = <int>
增加或减少的忠诚度值(1%)

add_estate_loyalty = {
    estate = estate_nobles
    loyalty = 10
}
对指定阶层增加指定数值的忠诚度 阶层文件位于 /Europa Universalis IV/common/estates/*.txt 1.14
add_estate_loyalty_modifier estate = <estate>

目标阶层
desc = <string>
在游戏中显示的此忠诚度均衡值变化的名称
loyalty = <int>
增加或减少的忠诚度均衡值(1%)
duration = <days>
持续时长

add_estate_loyalty_modifier = {
    estate = estate_nobles
	desc = EST_VAL_EXAMPLE
    loyalty = 10
    duration = 7300
}
对指定阶层增加指定数值的忠诚度均衡值

例如:

原始均衡值为50,增加10后变为60,忠诚值会缓慢从50向60变化

阶层文件位于 /Europa Universalis IV/common/estates/*.txt 1.14
add_faction <faction>
要添加的派系
add_faction = temples Adds a faction to the current scope.

添加一个派系到当前作用域

派系文件位于 /Europa Universalis IV/common/factions/. 1.1
remove_faction <faction>
要删除的派系
remove_faction = temples Removes a faction from the current scope.

删除当前作用域的一个派系

派系文件位于 /Europa Universalis IV/common/factions/. 1.1
add_faction_influence faction = <faction>
要增加影响力的派系


influence = <int>

派系影响力增加的数值

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_estate_land_share estate = <estate>
要增加领地的阶层


share = <int>

阶层领地增加的数值

change_estate_land_share = {
    estate = estate_burghers
    share = 5
}
Adds percentage of land share to defined estate.

对指定阶层增加指定数值的领地

阶层文件位于 /Europa Universalis IV/common/estates/*.txt
remove_estate_privilege 移除阶级特权 remove_estate_privilege = estate_church_land_rights 移除指定的阶级特权 阶层特权文件位于 /Europa Universalis IV/common/estate_privileges/*.txt
set_estate_privilege 添加阶级特权 set_estate_privilege = estate_church_land_rights 添加指定的阶级特权 阶层特权文件位于 /Europa Universalis IV/common/estate_privileges/*.txt

统治者

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

需要增加的统治者特质。

add_ruler_personality = righteous_personality 为当前统治者添加特定特质 统治者特质文件位于 /Europa Universalis IV/common/ruler_personalities/00_core.txt 1.18
remove_ruler_personality <personality>
remove_ruler_personality = righteous_personality 为当前统治者移除特定特质 统治者特质文件位于/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

为当前作用域的统治者定义一个属于统治者的标志 Flags can be appended with scopes or event targets 1.7
clr_ruler_flag <flag>特定标志的字符串 clr_ruler_flag = my_flag
为当前作用域的统治者移除一个属于统治者的标志 1.7
set_dynasty <string> / <scope> / original_dynasty

王朝名

set_dynasty = "Smith"

set_dynasty = FRA
set_dynasty = original_dynasty

改变当前统治者的王朝 1.1
set_ruler_culture <culture>
统治者将被改为的文化
set_ruler_culture = english

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

改变当前作用域的统治者的文化 Cultures are found in /Europa Universalis IV/common/cultures/*.txt

Can utilise Event Scope Values.

1.23
set_ruler_religion <religion>
统治者将被改为的宗教
set_ruler_religion = catholic

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

改变当前作用域的统治者的宗教 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
将当前作用域目前的统治者流放,并将其保存为一个独特的字符串。 1.12
set_ruler <string>
属于被流放统治者的独特字符串
set_ruler = my_exiled_ruler
让一个被流放的统治者成为当前作用域的统治者 1.12
kill_ruler yes

布尔值

kill_ruler = yes
杀死当前作用域的统治者 1.1
convert_female_ruler_to_general yes

布尔值

convert_female_ruler_to_general = yes
将女统治者变为将军 1.15
convert_ruler_to_general yes

布尔值

convert_ruler_to_general = yes
将统治者变为将军 1.8
add_ruler_modifier name = <name>

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
}
为当前统治者添加一个统治者修正 统治者死亡后,属于他的统治者修正会被清除。 1.1
define_ruler_to_general shock = <int>
将军的冲击能力


fire = <int>
将军的火力能力


manuever = <int>
将军的机动能力


siege = <int>
将军的围城能力


name = <name>
(可选)

define_ruler_to_general = {
    fire = 3
    shock = 3
    manuever = 3
    siege = 3
}
将当前统治者变成一位将军 1.8
define_leader_to_ruler type = general / conquistador / admiral / explorer
被选取的将领的种类(将军/征服者/提督/探险家)


name = <string>
被选取的将领的姓名

可以替代type参数


claim = <int>
(可选)统治者的宣称


adm = <int>
(可选)统治者的最低行政能力


dip = <int>
(可选)统治者的最低外交能力


mil = <int>
(可选)统治者的最低军事能力


fixed = yes
(可选)是否使统治者的君主能力固定不变

define_leader_to_ruler = {
    type = general
    adm = 3
    dip = 3
    mil = 3
    fixed = yes
    claim = 100
}
define_leader_to_ruler = {
    name = "John Smith"
}
在当前作用域内将一位将领变成统治者 1.12
define_ruler name = <string>
(可选)统治者的名字


dynasty = <string> / <scope> / original_dynasty

(可选)统治者的王朝


age = <years>
(可选)统治者的年龄


claim = <int>
(可选)统治者的起始正统性


adm = <int>
(可选)统治者的最低行政能力


dip = <int>
(可选)统治者的最低外交能力


mil = <int>
(可选)统治者的最低军事能力


fixed = yes
(可选)统治者的君主能力是否固定不变


max_random_adm = <int>
(可选)统治者的最高行政能力


max_random_dip = <int>
(可选)统治者的最高外交能力


max_random_mil = <int>
(可选)统治者的最高军事能力


hide_skills = yes
(可选)统治者的君主能力是否隐藏


regency = yes
(可选)该统治者是否是摄政王


attach_leader = <string>
(可选)统治者产生的将领的名字


female = yes
(可选)强制统治者为女性


male = yes
(可选)强制统治者为男性


culture = <culture> / <scope>
(可选)统治者的文化


religion = <religion> / <scope>
(可选)统治者的宗教信仰

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
}
为当前作用域创建一个统治者 文化和宗教信仰的属性可以使用Event Scope Values.

name参数允许使用一个保存的变量,你可以在set_saved_name里看到具体信息

1.1

配偶

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

增加或减少的配偶的行政能力的值

change_consort_adm = 1 为当前配偶提高行政能力 1.18
change_consort_dip <int>

增加或减少的配偶的外交能力的值

change_consort_dip = 1 为当前配偶提高外交能力 1.18
change_consort_mil <int>
增加或减少的配偶的军事能力的值
change_consort_mil = 1 为当前配偶提高军事能力 1.18
add_queen_personality <personality>
需要添加的特质
add_queen_personality = righteous_personality 为当前作用域的配偶添加一个特质 统治者特质文件位于/Europa Universalis IV/common/ruler_personalities/00_core.txt 1.18
remove_queen_personality <personality>
需要移除的特质
remove_queen_personality = righteous_personality 为当前作用域的配偶移除一个特质 统治者特质文件位于/Europa Universalis IV/common/ruler_personalities/00_core.txt 1.18
set_consort_flag <flag>
标志的名字
set_consort_flag = my_flag

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

为当前作用域的配偶定义一个配偶的标志 Flags can be appended with scopes or event targets 1.18
clr_consort_flag <flag>

标志的名字

clr_consort_flag = my_flag
为当前作用域的配偶移除一个配偶的标志 1.18
set_consort_culture <culture>
将要改变成的文化
set_consort_culture = english

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

改变当前作用域配偶的文化 Cultures are found in /Europa Universalis IV/common/cultures/*.txt

Can utilise Event Scope Values.

1.23
set_consort_religion <religion>
将要改变成的宗教
set_consort_religion = catholic

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

改变当前作用域配偶的宗教信仰 Religions are found in /Europa Universalis IV/common/religions/*.txt

Can utilise Event Scope Values.

1.23
change_consort_regent_to_ruler yes
布尔值
change_consort_regent_to_ruler = yes
Makes a consort regent into the current ruler for the current scope. 1.18
kill_consort yes
布尔值
kill_consort = yes
杀死当前作用域的配偶 1.18
remove_consort yes
布尔值
remove_consort = yes
移除当前作用域的配偶 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
}
为当前作用域创建一个配偶 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
exile_consort_as <string>
exile_consort_as = my_exiled_consort
将当前作用域目前的配偶流放,并将其保存为一个独特的字符串。 1.33
set_consort <string>
属于被流放配偶的独特字符串
set_consort = my_exiled_consort
让一个被流放的配偶成为当前作用域的配偶 1.33

继承人

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

增加或减少的继承人的行政能力的值

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

增加或减少的继承人的外交能力的值

change_heir_dip = 1 为当前继承人提高外交能力 1.14
change_heir_mil <int>
增加或减少的继承人的军事能力的值
change_heir_mil = 1 为当前继承人提高军事能力 1.14
add_heir_personality <personality>
需要添加的特质
add_heir_personality = righteous_personality 为当前继承人添加特定特质 统治者特质文件位于/Europa Universalis IV/common/ruler_personalities/00_core.txt 1.18
remove_heir_personality <personality>
需要移除的特质
remove_heir_personality = righteous_personality 为当前继承人移除特定特质 统治者特质文件位于/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

为当前作用域的继承人定义一个属于统治者的标志 Flags can be appended with scopes or event targets 1.1
clr_heir_flag <flag>

特定标志的字符串

clr_heir_flag = my_flag
为当前作用域的继承人移除定义一个属于统治者的标志 1.1
add_heir_claim <int>

增加或减少继承人的宣称

add_heir_claim = 10 增加当前作用域继承人的宣称 1.1
add_heir_support <int>

增加或减少继承人的支持度

add_heir_support = 10 增加当前作用域继承人的选举支持度 选举支持度是波兰的选举君主制特有的 1.7
set_heir_culture <culture>

需要转变的文化。

set_heir_culture = english

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

为当前作用域的继承人转变文化。 Cultures are found in /Europa Universalis IV/common/cultures/*.txt

Can utilise Event Scope Values.

1.23
set_heir_religion <religion>

需要转变的宗教信仰

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 allow_new_heir = no

kill_heir ={}

kill_heir = { allow_new_heir = no }
kill_heir = { }
杀死当前作用域的继承人。 显示继承人的死亡信息。

1.32 取消布尔值 变更写法

1.1
remove_heir remove_heir = {}
移除当前作用域的继承者。 不显示继承人死亡信息。

1.32 取消布尔值

1.32
convert_female_heir_to_general yes

布尔值

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

布尔值

convert_heir_to_general = yes
Converts a male heir into a general. 1.8
define_heir_to_general shock = <int>
将军的冲击点数
fire = <int>
将军的火力点数
manuever = <int>
将军的机动点数
siege = <int>
将军的围城点数
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
}
为当前作用域创建一个继承人 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
set_emperor <yes>

获得神罗皇帝地位

set_emperor = yes 获得神罗皇帝地位 1.32
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>
使用的特质


locked = <yes> / <no>
特质是否能被改变

set_ai_personality = {
    personality = ai_capitalist
    locked = yes
}
改变当前作用域的特质(如果是AI) AI的特质位于 /Europa Universalis IV/common/ai_personalities/00_ai_personalities.txt.


这个特质指的是AI的个性,而不是统治者、继承人和配偶的特性

1.1
set_ai_attitude attitude = <type>
使用的态度


who = <scope>
改变对谁的态度
locked = <yes> / <no>
态度是否可以被改变

set_ai_attitude = {
    attitude = attitude_friendly
    who = FRA
    locked = yes
}
转变当前作用域对目标作用域的态度 AI的态度位于 /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>
要添加的省份修正

duration = <days>
可选的,修正持续天数,该值为-1或留空则持续到游戏结束。
hidden = yes
可选的,该修正是否隐藏。
desc = <string>
可选的,对该修正的描述。

add_province_modifier = { 
    name = annoyed_people
    duration = -1  
    desc = annoyed_people_tooltip
    hidden = yes
}
为当前作用域添加省份修正 当省份拥有者变更时,该省份修正将会消失。


省份修正位于根目录下的common\event_modifiers\*.txt中

1.1
add_permanent_province_modifier name = <name>
要添加的省份修正

duration = <days>
可选的,修正持续天数,该值为-1或留空则持续到游戏结束。
hidden = yes
可选的,该修正是否隐藏。
desc = <string>
可选的,对该修正的描述。

add_permanent_province_modifier = { 
    name = annoyed_people
    duration = -1  
    desc = annoyed_people_tooltip
    hidden = yes
}
为当前作用域添加省份修正 与add_province_modifier不同,当省份拥有者变更时,该省份修正不会消失.


省份修正位于根目录下的common\event_modifiers\*.txt中

1.1
add_province_triggered_modifier <modifier>
添加省份触发修正
add_province_triggered_modifier = test_modifier
给当前作用域添加一个省份触发修正 这个指令不会显示在效果中,建议使用指令custom_tooltip来对效果进行描述。


省份触发修正位于根目录下的common\province_triggered_modifiers\*.txt中

1.24
extend_province_modifier name = <name>
被延长时间的省份修正名


duration = <days>
需要延长的时间(天)

extend_province_modifier = { 
    name = annoyed_people
    duration = 365
}
为当前作用域内存在的省份修正延长一段时间 Modifiers added with this effect persist through ownership changes. 1.1
remove_province_modifier <modifier>
需要移除的省份修正名
remove_province_modifier = annoyed_people 从当前省份范围内移除一个存在的省份修正 1.1
set_province_flag <flag>

需要添加的省份标志

set_province_flag = my_flag

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

为当前省份范围添加一个省份标志 标志可以作为条件使用 1.1
clr_province_flag <flag>

需要移除的省份标志

clr_province_flag = my_flag 为当前省份范围移除一个已存在的省份标志 1.1
change_province_name <string>

要更改的名称

change_province_name = "Paris" 更改当前作用域的省份名称 省份名称为省份界面左上角的第一个名称 1.1
rename_capital <string>

要更改的名称

rename_capital = "Paris" 更改当前作用域的省会名称 省会名称为省份界面左上角的第二个名称 1.1
move_capital_effect <string>

省份ID

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
set_base_tax <int>

更改基础税收为目标数值。

set_base_tax = 1 更改当前省份税收。 1.27
set_base_production <int>

更改基础生产为目标数值。

set_base_production = 1 更改当前省份生产。 1.27
set_base_manpower <int>

更改基础人力为目标数值。

set_base_manpower = 1 更改当前省份人力。 1.27
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>

获得行政点数

add_scaled_local_adm_power = 10 添加数值为该值与当前作用域省份基础税收的乘积的行政点数。 1.12
add_scaled_local_dip_power <int>

获得外交点数

add_scaled_local_dip_power = 10 添加数值为该值与当前作用域省份基础生产的乘积的外交点数。 1.12
add_scaled_local_mil_power <int>

获得军事点数

add_scaled_local_mil_power = 10 添加数值为该值与当前作用域省份基础人力的乘积的军事点数。 1.12
cancel_construction yes

布尔值.

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

开始修建指定伟大工程。

add_great_project = {

type = kiel_canal instant = no }

当前省份开始修建指定伟大工程。 伟大工程在这里 /Europa Universalis IV/common/great_projects/*.txt. 1.32
add_great_project_tier 分句

建造伟大工程。

add_great_project_tier = {

type = temple_of_confucius tier = 1 }

当前省份建造指定伟大工程。 伟大工程在这里 /Europa Universalis IV/common/great_projects/*.txt. 1.31
move_great_project 分句

搬迁指定伟大工程。

move_great_project = {

type = alhambra province = 370 instant = yes }

搬迁指定伟大工程。 伟大工程在这里 /Europa Universalis IV/common/great_projects/*.txt. 1.32
destroy_great_project 分句

摧毁指定伟大工程。

destroy_great_project = {

type = chichen_itza }

摧毁指定伟大工程。 伟大工程在这里 /Europa Universalis IV/common/great_projects/*.txt. 1.32
add_construction_progress <float>

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

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

添加建筑

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

移除建筑。

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

建筑种类


speed = <float>
基础速度的百分比。


cost = <float>
基础花费的百分比。

add_building_construction = {
    building = temple
    speed = 0.5
    cost = 0.5
}
当前省份开始建造建筑。 花费(cost)和速度(speed)的值是基础值的百分比,也就是说0.5是基础值的一半。 1.11
add_center_of_trade_level <int>

要更改的贸易中心的等级数值

add_center_of_trade_level = 1 增加(或减少)贸易中心的等级 数值为正则增加、为负则减少 1.27
center_of_trade <int>

要创建的贸易公司的等级数

center_of_trade = 2 在该省份创造一个贸易中心节点 似乎只有在该省份不是贸易中心时此语句有效,不能在原有基础上增加。

若版本允许推荐使用下方的语句:

create_or_add_center_of_trade_level

1.27
create_or_add_center_of_trade_level <int>

要更改的贸易中心的等级数值

create_or_add_center_of_trade_level = 1 建立或增加一个贸易中心等级
add_to_trade_company <int>

添加省份贸易公司区域

add_to_trade_company = ROOT 添加省份贸易公司区域 1.26
add_trade_company_investment <int>

进行贸易公司建筑投资

add_trade_company_investment = {

investor = ROOT investment = company_warehouse }

1.26

社会

语句 参数 例子 描述 备注 版本
create_advisor <advisor>
顾问种类
create_advisor = treasurer 添加顾问。 顾问在这里 /Europa Universalis IV/common/advisors/*.txt. 1.1
set_seat_in_parliament yes / no
布尔值
set_seat_in_parliament = yes 添加议席。 如果该省份所属国家没有 国会则无效。 1.12
back_current_issue yes / no
布尔值
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>

将要变成的文化

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
布尔值
add_culture_construction = yes 开始转文化。 1.12
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

可以y事件范围值

1.1
change_to_secondary_religion yes
布尔值
change_to_secondary_religion = yes 改变成副宗教。 1.14
send_missionary yes
布尔值
send_missionary = yes 开始传教。 1.12
add_cardinal yes
布尔值
add_cardinal = yes 添加枢机主教。 1.8
remove_cardinal yes

布尔值

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

宗教名

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

宗教名

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

阶层名

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

阶层名

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

布尔值

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>

增加或减少的值

add_nationalism = 10 增加当前省份的分离主义。 1.1
add_unrest <int>

增加或减少的值

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

叛乱的规模

create_native = 1 在当前省份产生原住民叛乱 只能对没有被殖民完成的省份产生效果 1.1
create_pirate <int>

海盗的规模

create_pirate = 1 在当前省份产生海盗 只能对海上省份和有港口的省份产生效果 1.1
create_revolt <int>

叛乱的规模

create_revolt = 1 在当前省份激发最可能的叛乱 1.1
<rebel type> <rebel type>叛军种类


<int> 叛乱的规模

anti_tax_rebels = 1 在当前省份激发一定规模特定叛乱 叛军种类在这里/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_monarch_as_leader = yes
Optional. Makes the owner's monarch the rebel leader. Removes monarch.
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]\displaystyle{ { \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
}
在当前省份建立殖民地,归属于ROOT省份作用域的拥有者。 1.1
add_colonysize <int>

增加定居者的数量

add_colonysize = 10 在当前被殖民省份增加一定数量的定居者。 1.1
multiply_colonysize <float>

The multiplier to use.

multiply_colonysize = 2 在当前被殖民省份将定居者数量乘以一定倍率。 1.1
add_siberian_construction <int>

The initial size of the colony.

add_siberian_construction = 400 在当前省份建立一个西伯利亚拓荒区。 1.22
change_native_ferocity <int>

The amount to add or subtract.

change_native_ferocity = 5 在一个未殖民省份增加土著野蛮度。 1.1
change_native_hostileness <int>

The amount to add or subtract.

change_native_hostileness = 5 在一个未殖民省份增加土著侵略性。 1.1
change_native_size <int>

The amount to add or subtract.

change_native_size = 50 在一个未殖民省份增加土著数量。 1.1
discover_country <scope>

The country that gains vision.

upper_peru_region = {
    discover_country = FRA
}
指定作用域(国家)获得当前省份的视野。 最好对区域、地区等作用域使用该指令。 1.1
undiscover_country <scope>

The country that loses vision.

upper_peru_region = {
    undiscover_country = FRA
}
指定作用域(国家)失去当前省份的视野。 最好对区域、地区等作用域使用该指令。 1.1

外交

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

获得宣称的国家。

capital_scope = {
    add_claim = FRA
}
定义的范围对当前省获得宣称。 1.1
add_core <scope>
获得核心的国家。
capital_scope = {
    add_core = FRA
}
定义的范围对当前省获得核心。 1.1
add_core_construction yes

Boolean.

add_core_construction = yes 为当前所有者在当前省范围内开始核心建设。 1.11
add_permanent_claim <scope>

获得永久性宣称的国家。

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

获得领土核心的国家。

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

获得所有权的国家。

capital_scope = {
    cede_province = FRA
}
定义范围获得当前省范围的所有权。 也就是割让土地给定义范围。如果定义范围本身不存在,那么割让的土地独立建国。 先前的所有者可以用来将所有权让给某个省份的最后一个先前的所有者。 1.1
change_controller <scope>

获得控制的国家。

capital_scope = {
    change_controller = FRA
}
定义的范围将获得对当前省范围的控制。 这里的控制意味着占有,而不是所有权。 1.1
change_tribal_land <scope>
获得所有权的国家。
any_tribal_land = {
    change_tribal_land = FRA
}
定义范围获得当前部落领地省范围的所有权。 1.31
remove_claim <scope>

失去宣称的国家。

capital_scope = {
    remove_claim = FRA
}
定义的范围将失去对当前范围的宣称。 适用于这两种类型的宣称。 1.1
remove_core <scope>

失去核心的国家。

capital_scope = {
    remove_core = FRA
}
定义的范围在当前省份范围上失去其核心。 1.1
remove_territorial_core <scope>
失去领土核心的国家。
capital_scope = {
    remove_territorial_core = FRA
}
定义的范围在当前省份范围上失去了其领土核心。 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
}
在当前省份生成一支隶属于指定国家的特定单位。 单位名称可参考/Europa Universalis IV/common/units/*.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.32
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
}
杀死当前省份符合设定参数的单位 你可以用敌人(enemy), 拥有者(owner)和控制者(controller)作为who的参数

当没有who参数时,该指令会杀死当前省份作用域内的所有单位。
类型(type)的可用参数:

  • 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
}
在当前省份开始招募(建造)指定的单位。 类型(type)的可用参数:
  • 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
}
在当前省份按指定百分比建造指定的单位直到达到该省份拥有者的陆军或海军规模上限 1相当于100%的陆军或海军规模上限
类型(type)的可用参数:
  • 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 在当前省份改变围城进程 1.1
clear_rebels yes

布尔值

clear_rebels = yes 清除当前作用域省份的所有叛军 1.29

贸易

语句 参数 例子 描述 备注 版本
recall_merchant <scope>
国家作用域
recall_merchant = FRA 召回当前贸易节点本埠省份内属于某国家的商人 只有当前省份作用域是一个贸易节点本埠时才有效果 1.1
add_trade_node_income <int>

增加或减少数量

add_trade_node_income = 10 将收入加入到当前交易节点 仅当当前省范围是贸易节点本埠的位置时有效。 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>
拥有该贸易修正的国家作用域。

name = <string>
应被去除的修正的键值。

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.

1.1 版本开始支持if的使用,格式如下:

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

1.23 版本开始支持else_if和else的使用,格式如下:

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语句)

while语句被用作当一系列条件被满足时重复执行一系列效果。

1.18版本开始支持while的使用,格式如下:

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

Note:

  • 一个永远满足条件的while语句会进行100,000轮循环,之后便会终止。
  • A while scope will produce no tooltip.

Due to the nature of execution flow in game, you ideally need to add effects within the while scope effect section that make the trigger values false. There is no way to reduce the execution rate, so the effects will be triggered multiple times a second otherwise.

触发开关

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

使用randomrandom_list语句可以随机产生效果。

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 }

已被移除的效果指令

指令 示例 移除版本
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
set_estate set_estate = estate_nobles 1.30
remove_estate remove_estate = estate_nobles 1.30