Scripted effects

本页面所适用的版本可能已经过时,最后更新于1.29
主条目:指令

这是从游戏数据构造的脚本效果指令(Scripted effects)列表。脚本代码位于:/Europa Universalis IV/common/scripted_effects/*.txt

作为修改资料,这个列表专注于快速查找代码,而且有可能随后续游戏版本重新构造。

程序员们可以从汉化包的.yml文件直接提取翻译文本,所以本页面未作翻译。如果确有必要的话,建议写在说明一列,或者在说明左侧插入名称列。

如有需要,请在说明列翻译效果,不要就地翻译实现代码

脚本效果列表

脚本代码位于:/Europa Universalis IV/common/scripted_effects/00_scripted_effects.txt

#Unsorted Scripted effects:
代码 实现 说明
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$ }
}
添加或拓展省份修正

如果存在省份修正$MODIFIER$,拓展省份修正$MODIFIER$,持续时间:$DURATION$,否则,添加省份修正$MODIFIER$,持续时间:$DURATION$。

  • #General effect for extending or adding province modifier
  • #Province Scope
add_loot_from_province_effect
if = {
limit = {
FROM = {
NOT = { development = 18 }
}
}
add_treasury = 115
add_mil_power = 15
}
if = {
limit = {
FROM = {
development = 18
NOT = { development = 21 }
}
}
add_treasury = 135
add_mil_power = 15
}
if = {
limit = {
FROM = {
development = 21
NOT = { development = 24 }
}
}
add_treasury = 155
add_mil_power = 25
}
if = {
limit = {
FROM = {
development = 24
NOT = { development = 27 }
}
}
add_treasury = 180
add_mil_power = 30
}
if = {
limit = {
FROM = {
development = 27
NOT = { development = 30 }
}
}
add_treasury = 210
add_mil_power = 40
}
if = {
limit = {
FROM = {
development = 30
NOT = { development = 33 }
}
}
add_treasury = 230
add_mil_power = 50
}
if = {
limit = {
FROM = {
development = 33
}
}
add_treasury = 250
add_mil_power = 55
}
  • #Used in army professionalism event:
  • #used where FROM is a province and ROOT is a country, ie onaction for provinces fallen
add_loot_from_rich_province_general_effect
add_devastation = 80
if = {
limit = {
NOT = { development = 18 }
}
$LOOTER$ = {
add_treasury = 400
add_mil_power = 15
}
}
if = {
limit = {
development = 18
NOT = { development = 21 }
}
$LOOTER$ = {
add_treasury = 435
add_mil_power = 15
}
}
if = {
limit = {
development = 21
NOT = { development = 24 }
}
$LOOTER$ = {
add_treasury = 455
add_mil_power = 25
}
}
if = {
limit = {
development = 24
NOT = { development = 27 }
}
$LOOTER$ = {
add_treasury = 480
add_mil_power = 30
}
}
if = {
limit = {
development = 27
NOT = { development = 30 }
}
$LOOTER$ = {
add_treasury = 510
add_mil_power = 40
}
}
if = {
limit = {
development = 30
NOT = { development = 33 }
}
$LOOTER$ = {
add_treasury = 530
add_mil_power = 50
}
}
if = {
limit = {
development = 33
}
$LOOTER$ = {
add_treasury = 550
add_mil_power = 55
}
}
  • #Generalized version of the same effect, for use in province scope.
  • #used where ROOT is a province, ie onaction for provinces fallen
  • #$LOOTER$ is the scope of the tag performing the Looting (so for instance owner)
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
  • #Religious Schools:
  • #Country Scope
move_capital_effect
if = {
limit = {
is_part_of_hre = yes
ROOT = {
is_part_of_hre = no
}
}
set_in_empire = no
emperor = {
add_opinion = {
who = ROOT
modifier = hre_province_left
}
}
add_imperial_influence = -1
}
if = {
limit = { has_estate = yes }
remove_estate = yes
}
if = {
limit = { is_capital = no }
ROOT = {
set_capital = PREV
}
}
  • #Move capital along with all that also needs to be done. Used in capital decisions.
  • #THIS = Province Scope, ROOT = Country Scope
prev_move_capital_effect
if = {
limit = {
is_part_of_hre = yes
PREV = {
is_part_of_hre = no
}
}
set_in_empire = no
PREV = {
emperor = {
add_opinion = {
who = PREV
modifier = hre_province_left
}
}
}
add_imperial_influence = -1
}
if = {
limit = { has_estate = yes }
remove_estate = yes
}
if = {
limit = { is_capital = no }
PREV = {
set_capital = PREV
}
}
  • #Same as move_capital_effect, but for when you want to move PREV's rather than ROOT's capital
  • #THIS = Province Scope, PREV = Country Scope
remove_non_electors_emperors_from_empire_effect
if = {
limit = {
is_part_of_hre = yes
is_elector = no
is_emperor = no
}
custom_tooltip = remove_non_electors_emperors_from_empire_effect_tooltip
hidden_effect = {
every_owned_province = {
limit = {
is_part_of_hre = yes
}
set_in_empire = no
}
}
}

如果是神圣罗马帝国成员但不是选帝侯或者皇帝,所有属于神罗的省份都将脱离神罗。

abolish_slavery_effect
custom_tooltip = abolished_slavery_act_tooltip
hidden_effect = {
every_owned_province = {
limit = {
trade_goods = slaves
}
change_trade_goods = unknown
remove_building = tradecompany
}
}

顾问脚本效果列表

脚本代码位于:/Europa Universalis IV/common/scripted_effects/01_scripted_effects_for_advisors.txt

#All are Country Scope unless otherwise stated.
代码 实现 说明
check_if_non_state_advisor_effect
hidden_effect = { * #Variety - Religious Minorities
if = { * #Europe
limit = {
capital_scope = {
continent = europe
}
}
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 }
}
}
else_if = { * #Near East
limit = {
capital_scope = {
OR = {
superregion = near_east_superregion
region = horn_of_africa_region
region = egypt_region
region = maghreb_region
region = sahel_region
region = niger_region
}
}
}
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 = sunni_advisor }
$chance_of_secondary$ = { set_country_flag = shia_advisor }
$chance_of_secondary$ = { set_country_flag = ibadi_advisor }
$chance_of_secondary$ = { set_country_flag = coptic_advisor }
$chance_of_tertiary$ = { set_country_flag = heathen_advisor }
}
}
else_if = { * #India and Persia + Fallback for Muslim and Dharmic Groups
limit = {
capital_scope = {
OR = {
superregion = persia_superregion
superregion = india_superregion
religion_group = muslim
religion_group = dharmic
}
}
}
random_list = { * #India and Persia, Somewhat higher chance of non-state
$chance_of_tertiary$ = { set_country_flag = jewish_advisor }
$chance_of_secondary$ = { set_country_flag = zoroastrian_advisor }
$chance_of_secondary$ = { set_country_flag = sikh_advisor }
$chance_of_secondary$ = { set_country_flag = sunni_advisor }
$chance_of_secondary$ = { set_country_flag = shia_advisor }
$chance_of_tertiary$ = { set_country_flag = ibadi_advisor }
$chance_of_secondary$ = { set_country_flag = hinduism_advisor }
$chance_of_primary$ = { set_country_flag = state_religion_advisor }
$chance_of_tertiary$ = { set_country_flag = heathen_advisor }
}
}
else_if = { * #Sinosphere
limit = {
NOT = { religion_group = christian }
NOT = { religion_group = muslim }
capital_scope = {
continent = asia * #Except the above parts of it
}
}
random_list = { * #East Asia has highest chance of non state.
$chance_of_primary$ = { set_country_flag = state_religion_advisor }
$chance_of_primary$ = { set_country_flag = confucian_advisor }
$chance_of_secondary$ = { set_country_flag = shinto_advisor }
$chance_of_primary$ = { set_country_flag = theravada_advisor }
$chance_of_primary$ = { set_country_flag = mahayana_advisor }
$chance_of_primary$ = { set_country_flag = vajrayana_advisor }
$chance_of_tertiary$ = { set_country_flag = catholic_advisor }
}
}
else_if = {
limit = {
capital_scope = {
continent = new_world * #RNW
}
}
random_list = { * #East Asia has highest chance of non state.
$chance_of_primary$ = { set_country_flag = state_religion_advisor }
$chance_of_tertiary$ = { set_country_flag = norse_advisor }
$chance_of_primary$ = { set_country_flag = totemism_advisor }
$chance_of_secondary$ = { set_country_flag = animism_advisor }
$chance_of_secondary$ = { set_country_flag = mayan_advisor }
$chance_of_secondary$ = { set_country_flag = inca_advisor }
$chance_of_secondary$ = { set_country_flag = nahuatl_advisor }
}
}
else_if = {
limit = {
religion_group = christian * #This one is mostly the same as the Europe one.
}
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 }
$chance_of_tertiary$ = { set_country_flag = zoroastrian_advisor }
}
}
else = {
set_country_flag = state_religion_advisor
}
}
  • #Sets flags to use when generating advisors, must be used in immediate = { } and be followed by erase_advisor_flags_effect in after = {}
  • #Needs these arguments:
  • #chance_of_primary = State religion
  • #chance_of_secondary =
  • #chance_of_tertiary = Remaining Heathen Religions
  • #Note: These are not actual chances, they are just weights, the script then uses them differently depending on what region you are in. There is a higher or lower chance of variety depending on where minorities where big historically.
erase_advisor_flags_effect
trigger_switch = {
on_trigger = has_country_flag
state_religion_advisor = { clr_country_flag = state_religion_advisor }
jewish_advisor = { clr_country_flag = jewish_advisor }
protestant_or_coptic_advisor = { clr_country_flag = protestant_or_coptic_advisor }
reformed_or_orthodox_advisor = { clr_country_flag = reformed_or_orthodox_advisor }
heathen_advisor = { clr_country_flag = heathen_advisor }
zoroastrian_advisor = { clr_country_flag = zoroastrian_advisor }
sikh_advisor = { clr_country_flag = sikh_advisor }
confucian_advisor = { clr_country_flag = confucian_advisor }
shinto_advisor = { clr_country_flag = shinto_advisor }
theravada_advisor = { clr_country_flag = theravada_advisor }
mahayana_advisor = { clr_country_flag = mahayana_advisor }
vajrayana_advisor = { clr_country_flag = vajrayana_advisor }
catholic_advisor = { clr_country_flag = catholic_advisor }
hinduism_advisor = { clr_country_flag = hinduism_advisor }
ibadi_advisor = { clr_country_flag = ibadi_advisor }
shia_advisor = { clr_country_flag = shia_advisor }
sunni_advisor = { clr_country_flag = sunni_advisor }
coptic_advisor = { clr_country_flag = coptic_advisor }
norse_advisor = { clr_country_flag = norse_advisor }
animism_advisor = { clr_country_flag = animism_advisor }
totemism_advisor = { clr_country_flag = totemism_advisor }
inca_advisor = { clr_country_flag = inca_advisor }
nahuatl_advisor = { clr_country_flag = nahuatl_advisor }
mayan_advisor = { clr_country_flag = mayan_advisor }
}
  • #Goes into the after = {} effect after check_if_non_state_advisor_effect
internal_advisor_generation_effect
trigger_switch = {
on_trigger = has_country_flag * #Flags set by check_if_non_state_advisor_effect
state_religion_advisor = {
define_advisor = {
type = $advisor_type$
skill = $skill$
discount = $discount$
}
}
jewish_advisor = {
define_advisor = {
type = $advisor_type_if_not_state$
skill = $skill$
discount = $discount$
religion = jewish
}
}
protestant_or_coptic_advisor = {
if = {
limit = {
OR = {
religion = catholic
religion = reformed
}
is_religion_enabled = protestant
}
define_advisor = {
type = $advisor_type_if_not_state$
skill = $skill$
discount = $discount$
religion = protestant
}
}
else_if = {
limit = {
religion = catholic
NOT = { is_religion_enabled = protestant }
}
define_advisor = {
type = $advisor_type_if_not_state$
skill = $skill$
discount = $discount$
religion = orthodox
}
}
else_if = {
limit = {
religion = protestant
}
define_advisor = {
type = $advisor_type_if_not_state$
skill = $skill$
discount = $discount$
religion = catholic
}
}
else_if = {
limit = {
religion = orthodox
}
define_advisor = {
type = $advisor_type_if_not_state$
skill = $skill$
discount = $discount$
religion = coptic
}
}
else_if = {
limit = {
religion = coptic
}
define_advisor = {
type = $advisor_type_if_not_state$
skill = $skill$
discount = $discount$
religion = jewish
}
}
else = {
define_advisor = {
type = $advisor_type_if_not_state$
skill = $skill$
discount = $discount$
}
}
}
reformed_or_orthodox_advisor = {
if = {
limit = {
OR = {
religion = catholic
religion = protestant
}
is_religion_enabled = reformed
}
define_advisor = {
type = $advisor_type_if_not_state$
skill = $skill$
discount = $discount$
religion = reformed
}
}
else_if = {
limit = {
religion = catholic
NOT = { is_religion_enabled = reformed }
}
define_advisor = {
type = $advisor_type_if_not_state$
skill = $skill$
discount = $discount$
religion = orthodox
}
}
else_if = {
limit = {
religion = reformed
}
define_advisor = {
type = $advisor_type_if_not_state$
skill = $skill$
discount = $discount$
religion = catholic
}
}
else_if = {
limit = {
religion = orthodox
}
define_advisor = {
type = $advisor_type_if_not_state$
skill = $skill$
discount = $discount$
religion = coptic
}
}
else_if = {
limit = {
religion = coptic
}
define_advisor = {
type = $advisor_type_if_not_state$
skill = $skill$
discount = $discount$
religion = orthodox
}
}
else = {
define_advisor = {
type = $advisor_type_if_not_state$
skill = $skill$
discount = $discount$
}
}
}
heathen_advisor = {
if = {
limit = {
religion_group = christian
capital_scope = { continent = europe }
}
define_advisor = {
type = $advisor_type_if_not_state$
skill = $skill$
discount = $discount$
religion = jewish
}
}
else_if = {
limit = {
religion_group = christian
capital_scope = { continent = asia }
}
define_advisor = {
type = $advisor_type_if_not_state$
skill = $skill$
discount = $discount$
religion = sunni
}
}
else_if = {
limit = {
religion_group = christian
capital_scope = { continent = africa }
}
define_advisor = {
type = $advisor_type_if_not_state$
skill = $skill$
discount = $discount$
religion = sunni
}
}
else_if = {
limit = {
religion_group = muslim
continent = europe
}
define_advisor = {
type = $advisor_type_if_not_state$
skill = $skill$
discount = $discount$
religion = catholic
}
}
else_if = {
limit = {
religion_group = muslim
}
define_advisor = {
type = $advisor_type_if_not_state$
skill = $skill$
discount = $discount$
religion = coptic
}
}
else_if = {
limit = {
religion_group = eastern * #Most likely won't come here but could.
}
define_advisor = {
type = $advisor_type_if_not_state$
skill = $skill$
discount = $discount$
religion = animism
}
}
else_if = {
limit = {
religion_group = dharmic * #Most likely won't come here but could.
}
define_advisor = {
type = $advisor_type_if_not_state$
skill = $skill$
discount = $discount$
religion = animism
}
}
else_if = {
limit = {
religion_group = dharmic * #Most likely won't come here but could.
}
define_advisor = {
type = $advisor_type_if_not_state$
skill = $skill$
discount = $discount$
religion = animism
}
}
else = {
define_advisor = {
type = $advisor_type_if_not_state$
skill = $skill$
discount = $discount$
}
}
}
heathen_advisor = {
if = {
limit = { religion_group = christian }
define_advisor = {
type = $advisor_type_if_not_state$
skill = $skill$
discount = $discount$
religion = sunni
}
}
else_if = {
limit = {
religion_group = muslim
capital_scope = {
OR = {
superregion = near_east_superregion
continent = europe
region = horn_of_africa_region
}
}
}
define_advisor = {
type = $advisor_type_if_not_state$
skill = $skill$
discount = $discount$
religion = catholic
}
}
else_if = {
limit = { religion_group = muslim }
define_advisor = {
type = $advisor_type_if_not_state$
skill = $skill$
discount = $discount$
religion = zoroastrian
}
}
else_if = {
limit = { religion_group = dharmic }
define_advisor = {
type = $advisor_type_if_not_state$
skill = $skill$
discount = $discount$
religion = shiite
culture = persian
}
}
else = {
define_advisor = {
type = $advisor_type_if_not_state$
skill = $skill$
discount = $discount$
}
}
}
zoroastrian_advisor = {
if = {
limit = { NOT = { religion = zoroastrian } }
define_advisor = {
type = $advisor_type_if_not_state$
skill = $skill$
religion = zoroastrian
discount = $discount$
}
}
else = {
define_advisor = {
type = $advisor_type_if_not_state$
skill = $skill$
religion = hinduism
discount = $discount$
}
}
}
sikh_advisor = {
if = {
limit = { religion = sikhism }
define_advisor = {
type = $advisor_type_if_not_state$
skill = $skill$
religion = hinduism
discount = $discount$
}
}
else_if = {
limit = { is_religion_enabled = sikhism }
define_advisor = {
type = $advisor_type_if_not_state$
skill = $skill$
religion = sikhism
discount = $discount$
}
}
else_if = {
limit = { religion = hinduism }
define_advisor = {
type = $advisor_type_if_not_state$
skill = $skill$
religion = zoroastrian
discount = $discount$
}
}
else_if = {
limit = { religion_group = muslim }
define_advisor = {
type = $advisor_type_if_not_state$
skill = $skill$
religion = hinduism
discount = $discount$
}
}
else = {
define_advisor = {
type = $advisor_type_if_not_state$
skill = $skill$
discount = $discount$
}
}
}
confucian_advisor = {
define_advisor = {
type = $advisor_type_if_not_state$
skill = $skill$
religion = confucianism
discount = $discount$
}
}
shinto_advisor = {
define_advisor = {
type = $advisor_type_if_not_state$
skill = $skill$
religion = shinto
discount = $discount$
}
}
theravada_advisor = {
define_advisor = {
type = $advisor_type_if_not_state$
skill = $skill$
religion = buddhism
discount = $discount$
}
}
mahayana_advisor = {
define_advisor = {
type = $advisor_type_if_not_state$
skill = $skill$
religion = mahayana
discount = $discount$
}
}
vajrayana_advisor = {
define_advisor = {
type = $advisor_type_if_not_state$
skill = $skill$
religion = vajrayana
discount = $discount$
}
}
catholic_advisor = {
if = {
limit = {
any_province = {
religion = catholic
has_discovered = ROOT
}
}
define_advisor = {
type = $advisor_type_if_not_state$
skill = $skill$
religion = catholic
discount = $discount$
}
}
else = {
define_advisor = {
type = $advisor_type_if_not_state$
skill = $skill$
discount = $discount$
}
}
}
hinduism_advisor = {
if = {
limit = { NOT = { religion = hinduism } }
define_advisor = {
type = $advisor_type_if_not_state$
skill = $skill$
religion = hinduism
discount = $discount$
}
}
else = {
define_advisor = {
type = $advisor_type_if_not_state$
skill = $skill$
religion = sunni
discount = $discount$
}
}
}
ibadi_advisor = {
if = {
limit = { NOT = { religion = ibadi } }
define_advisor = {
type = $advisor_type_if_not_state$
skill = $skill$
religion = ibadi
discount = $discount$
}
}
else = {
define_advisor = {
type = $advisor_type_if_not_state$
skill = $skill$
religion = shiite
discount = $discount$
}
}
}
shia_advisor = {
if = {
limit = { NOT = { religion = shiite } }
define_advisor = {
type = $advisor_type_if_not_state$
skill = $skill$
religion = shiite
discount = $discount$
}
}
else = {
define_advisor = {
type = $advisor_type_if_not_state$
skill = $skill$
religion = ibadi
discount = $discount$
}
}
}
sunni_advisor = {
if = {
limit = { NOT = { religion = sunni } }
define_advisor = {
type = $advisor_type_if_not_state$
skill = $skill$
religion = sunni
discount = $discount$
}
}
else = {
define_advisor = {
type = $advisor_type_if_not_state$
skill = $skill$
religion = shiite
discount = $discount$
}
}
}
coptic_advisor = {
if = {
limit = { NOT = { religion = coptic } }
define_advisor = {
type = $advisor_type_if_not_state$
skill = $skill$
religion = coptic
discount = $discount$
}
}
else = {
define_advisor = {
type = $advisor_type_if_not_state$
skill = $skill$
religion = jewish
discount = $discount$
}
}
}
norse_advisor = {
if = {
limit = { NOT = { religion = norse_pagan_reformed } }
define_advisor = {
type = $advisor_type_if_not_state$
skill = $skill$
religion = norse_pagan_reformed
discount = $discount$
}
}
else = {
define_advisor = {
type = $advisor_type_if_not_state$
skill = $skill$
religion = totemism
discount = $discount$
}
}
}
animism_advisor = {
if = {
limit = { NOT = { religion = animism } }
define_advisor = {
type = $advisor_type_if_not_state$
skill = $skill$
religion = animism
discount = $discount$
}
}
else = {
define_advisor = {
type = $advisor_type_if_not_state$
skill = $skill$
religion = totemism
discount = $discount$
}
}
}
totemism_advisor = {
if = {
limit = { NOT = { religion = totemism } }
define_advisor = {
type = $advisor_type_if_not_state$
skill = $skill$
religion = totemism
discount = $discount$
}
}
else = {
define_advisor = {
type = $advisor_type_if_not_state$
skill = $skill$
religion = animism
discount = $discount$
}
}
}
mayan_advisor = {
if = {
limit = { NOT = { religion = mesoamerican_religion } }
define_advisor = {
type = $advisor_type_if_not_state$
skill = $skill$
religion = mesoamerican_religion
discount = $discount$
}
}
else = {
define_advisor = {
type = $advisor_type_if_not_state$
skill = $skill$
religion = nahuatl
discount = $discount$
}
}
}
nahuatl_advisor = {
if = {
limit = { NOT = { religion = nahuatl } }
define_advisor = {
type = $advisor_type_if_not_state$
skill = $skill$
religion = nahuatl
discount = $discount$
}
}
else = {
define_advisor = {
type = $advisor_type_if_not_state$
skill = $skill$
religion = mesoamerican_religion
discount = $discount$
}
}
}
inca_advisor = {
if = {
limit = { NOT = { religion = inti } }
define_advisor = {
type = $advisor_type_if_not_state$
skill = $skill$
religion = inti
discount = $discount$
}
}
else = {
define_advisor = {
type = $advisor_type_if_not_state$
skill = $skill$
religion = animism
discount = $discount$
}
}
}
}
  • #Only used within generate_advisor_of_type_and_semi_random_religion_effect
  • #Requires check_if_non_state_advisor_effect in immediate as that gives the arguments to generate_advisor_of_type_and_semi_random_religion_effect that then passes it on to this.
  • #$advisor_type$ = Advisor type if state religion.
  • #$advisor_type_if_not_state$ = Advisor type if non-state religion.
  • #$skill$ = Skill Level
  • #$discount$ = yes/no for discount
generate_advisor_of_type_and_semi_random_religion_effect
[[scaled_skill]
if = {
limit = {
NOT = { monthly_income = 15 }
}
internal_advisor_generation_effect = {
advisor_type = $advisor_type$
advisor_type_if_not_state = $advisor_type_if_not_state$
skill = 1
discount = $discount$
}
}
else_if = {
limit = {
NOT = { monthly_income = 25 }
}
internal_advisor_generation_effect = {
advisor_type = $advisor_type$
advisor_type_if_not_state = $advisor_type_if_not_state$
skill = 2
discount = $discount$
}
}
else = {
internal_advisor_generation_effect = {
advisor_type = $advisor_type$
advisor_type_if_not_state = $advisor_type_if_not_state$
skill = 3
discount = $discount$
}
}
]
[[skill]
internal_advisor_generation_effect = {
advisor_type = $advisor_type$
advisor_type_if_not_state = $advisor_type_if_not_state$
skill = $skill$
discount = $discount$
}
]
  • #Actual work is done by internal_advisor_generation_effect above but it goes through this first.
  • #Requires check_if_non_state_advisor_effect in immediate.
  • #$advisor_type$ = Advisor type if state religion.
  • #$advisor_type_if_not_state$ = Advisor type if non-state religion.
  • #$scaled_skill$ = yes/no
  • #$skill$ = Skill Level
  • #$discount$ = yes/no for discount
remove_advisor_adm_effect
if = {
limit = {
advisor = inquisitor
}
remove_advisor = inquisitor
}
if = {
limit = {
advisor = natural_scientist
}
remove_advisor = natural_scientist
}
if = {
limit = {
advisor = master_of_mint
}
remove_advisor = master_of_mint
}
if = {
limit = {
advisor = theologian
}
remove_advisor = theologian
}
if = {
limit = {
advisor = artist
}
remove_advisor = artist
}
if = {
limit = {
advisor = philosopher
}
remove_advisor = philosopher
}
if = {
limit = {
advisor = treasurer
}
remove_advisor = treasurer
}


外交脚本效果列表

脚本代码位于:/Europa Universalis IV/common/scripted_effects/01_scripted_effects_for_diplomacy.txt

#Country scopes unless otherwise stated
代码 实现 说明
add_mutual_opinion_modifier_effect
add_opinion = {
who = $scope_country$
modifier = $opinion_modifier$
}
reverse_add_opinion = {
who = $scope_country$
modifier = $opinion_modifier$
}


中国皇帝脚本效果列表

脚本代码位于:/Europa Universalis IV/common/scripted_effects/01_scripted_effects_for_empire_of_china.txt

#Scripted effects relating to China, with or without DLC.
代码 实现 说明
boost_eunuchs_effect
if = {
limit = {
NOT = { has_dlc = "Mandate of Heaven" }
}
add_faction_influence = {
faction = enuchs
influence = 10
}
}
若DLC 天命 天命激活,则 市舶司 市舶司派系获得 10 影响力
boost_eunuchs_large_effect
if = {
limit = {
NOT = { has_dlc = "Mandate of Heaven" }
}
add_faction_influence = {
faction = enuchs
influence = 15
}
}
若DLC 天命 天命激活,则 市舶司 市舶司派系获得 15 影响力
reduce_eunuchs_effect
if = {
limit = {
NOT = { has_dlc = "Mandate of Heaven" }
}
add_faction_influence = {
faction = enuchs
influence = -10
}
}
reduce_eunuchs_large_effect
if = {
limit = {
NOT = { has_dlc = "Mandate of Heaven" }
}
add_faction_influence = {
faction = enuchs
influence = -15
}
}
boost_bureaucrats_effect
if = {
limit = {
NOT = { has_dlc = "Mandate of Heaven" }
}
add_faction_influence = {
faction = bureaucrats
influence = 10
}
}
若DLC 天命 天命激活,则 内阁大学士 内阁大学士派系获得 10 影响力
boost_bureaucrats_large_effect
if = {
limit = {
NOT = { has_dlc = "Mandate of Heaven" }
}
add_faction_influence = {
faction = bureaucrats
influence = 15
}
}
若DLC 天命 天命激活,则 内阁大学士 内阁大学士派系获得 15 影响力
reduce_bureaucrats_effect
if = {
limit = {
NOT = { has_dlc = "Mandate of Heaven" }
}
add_faction_influence = {
faction = bureaucrats
influence = -10
}
}
boost_temples_effect
if = {
limit = {
NOT = { has_dlc = "Mandate of Heaven" }
}
add_faction_influence = {
faction = temples
influence = 10
}
}
若DLC 天命 天命激活,则 五军都督府 五军都督府派系获得 10 影响力
boost_temples_large_effect
if = {
limit = {
NOT = { has_dlc = "Mandate of Heaven" }
}
add_faction_influence = {
faction = temples
influence = 15
}
}
若DLC 天命 天命激活,则 五军都督府 五军都督府派系获得 15 影响力
reduce_temples_effect
if = {
limit = {
NOT = { has_dlc = "Mandate of Heaven" }
}
add_faction_influence = {
faction = temples
influence = -10
}
}
reduce_temples_large_effect
if = {
limit = {
NOT = { has_dlc = "Mandate of Heaven" }
}
add_faction_influence = {
faction = temples
influence = -15
}
}
add_mandate_effect
if = {
limit = {
has_dlc = "Mandate of Heaven"
is_emperor_of_china = yes
}
add_mandate = 5
}
若该国是中国皇帝
  • 则获得 Mandate.png 5 天命值
add_mandate_large_effect
if = {
limit = {
has_dlc = "Mandate of Heaven"
is_emperor_of_china = yes
}
add_mandate = 10
}
若该国是中国皇帝
  • 则获得 Mandate.png 10 天命值
reduce_mandate_effect
if = {
limit = {
has_dlc = "Mandate of Heaven"
is_emperor_of_china = yes
}
add_mandate = -5
}
若该国是中国皇帝
  • 则失去 Mandate.png 5 天命值
reduce_mandate_large_effect
if = {
limit = {
has_dlc = "Mandate of Heaven"
is_emperor_of_china = yes
}
add_mandate = -10
}
若该国是中国皇帝
  • 则失去 Mandate.png 10 天命值
add_meritocracy_effect
if = {
limit = {
has_dlc = "Mandate of Heaven"
is_emperor_of_china = yes
}
add_meritocracy = 5
}
若该国是中国皇帝
  • 则获得 Meritocracy.png 5 贤能值
reduce_meritocracy_effect
if = {
limit = {
has_dlc = "Mandate of Heaven"
is_emperor_of_china = yes
}
add_meritocracy = -5
}
若该国是中国皇帝
  • 则失去 Meritocracy.png 5 贤能值
reduce_meritocracy_large_effect
if = {
limit = {
has_dlc = "Mandate of Heaven"
is_emperor_of_china = yes
}
add_meritocracy = -15
}
若该国是中国皇帝
  • 则失去 Meritocracy.png 15 贤能值
add_meritocracy_large_effect
if = {
limit = {
has_dlc = "Mandate of Heaven"
is_emperor_of_china = yes
}
add_meritocracy = 15
}
若该国是中国皇帝
  • 则获得 Meritocracy.png 15 贤能值

阶层脚本效果列表

脚本代码位于:/Europa Universalis IV/common/scripted_effects/01_scripted_effects_for_estates.txt

#Scripted effects for estates
代码 实现 说明
add_estate_church_loyalty_effect
if = {
limit = {
has_estate = estate_church
}
add_estate_loyalty = {
estate = estate_church
loyalty = 10
}
}
else_if = {
limit = {
religion = hinduism
has_estate = estate_brahmins
}
add_estate_loyalty = {
estate = estate_brahmins
loyalty = 10
}
}
  • #Clergy

若存在教士阶层 教士阶层

  • 教士阶层 教士阶层获得 阶层忠诚度 10 忠诚度
reduce_estate_church_loyalty_effect
if = {
limit = {
has_estate = estate_church
}
add_estate_loyalty = {
estate = estate_church
loyalty = -10
}
}
else_if = {
limit = {
religion = hinduism
has_estate = estate_brahmins
}
add_estate_loyalty = {
estate = estate_brahmins
loyalty = -10
}
}

若存在教士阶层 教士阶层

  • 教士阶层 教士阶层失去 阶层忠诚度 10 忠诚度
add_estate_dhimmi_loyalty_effect
if = {
limit = {
has_estate = estate_dhimmi
}
add_estate_loyalty = {
estate = estate_dhimmi
loyalty = 10
}
}
else_if = {
limit = {
religion_group = muslim
has_estate = estate_brahmins
}
add_estate_loyalty = {
estate = estate_brahmins
loyalty = 10
}
}
  • #Dhimmi

若存在齐米阶层 齐米阶层

  • 齐米阶层 齐米阶层获得 阶层忠诚度 10 忠诚度
reduce_estate_dhimmi_loyalty_effect
if = {
limit = {
has_estate = estate_dhimmi
}
add_estate_loyalty = {
estate = estate_dhimmi
loyalty = -10
}
}
else_if = {
limit = {
religion_group = muslim
has_estate = estate_brahmins
}
add_estate_loyalty = {
estate = estate_brahmins
loyalty = -10
}
}

若存在齐米阶层 齐米阶层

  • 齐米阶层 齐米阶层失去 阶层忠诚度 10 忠诚度
add_estate_nobles_loyalty_effect
if = {
limit = {
has_estate = estate_nobles
}
add_estate_loyalty = {
estate = estate_nobles
loyalty = 10
}
}
else_if = {
limit = {
has_estate = estate_rajput
}
add_estate_loyalty = {
estate = estate_rajput
loyalty = 10
}
}
else_if = {
limit = {
has_estate = estate_maratha
}
add_estate_loyalty = {
estate = estate_maratha
loyalty = 10
}
}
  • #Nobles

若存在贵族阶层 贵族阶层

  • 贵族阶层 贵族阶层获得 阶层忠诚度 10 忠诚度
reduce_estate_nobles_loyalty_effect
if = {
limit = {
has_estate = estate_nobles
}
add_estate_loyalty = {
estate = estate_nobles
loyalty = -10
}
}
else_if = {
limit = {
has_estate = estate_rajput
}
add_estate_loyalty = {
estate = estate_rajput
loyalty = -10
}
}
else_if = {
limit = {
has_estate = estate_maratha
}
add_estate_loyalty = {
estate = estate_maratha
loyalty = -10
}
}

若存在贵族阶层 贵族阶层

  • 贵族阶层 贵族阶层失去 阶层忠诚度 10 忠诚度
add_estate_burghers_loyalty_effect
if = {
limit = {
has_estate = estate_burghers
}
add_estate_loyalty = {
estate = estate_burghers
loyalty = 10
}
}
else_if = {
limit = {
has_estate = estate_vaisyas
}
add_estate_loyalty = {
estate = estate_vaisyas
loyalty = 10
}
}
else_if = {
limit = {
has_estate = estate_jains
}
add_estate_loyalty = {
estate = estate_jains
loyalty = 10
}
}
  • #Burghers

若存在市民阶层 商人阶层

  • 市民阶层 商人阶层获得 阶层忠诚度 10 忠诚度
reduce_estate_burghers_loyalty_effect
if = {
limit = {
has_estate = estate_burghers
}
add_estate_loyalty = {
estate = estate_burghers
loyalty = -10
}
}
else_if = {
limit = {
has_estate = estate_vaisyas
}
add_estate_loyalty = {
estate = estate_vaisyas
loyalty = -10
}
}
else_if = {
limit = {
has_estate = estate_jains
}
add_estate_loyalty = {
estate = estate_jains
loyalty = -10
}
}

若存在市民阶层 商人阶层

  • 市民阶层 商人阶层失去 阶层忠诚度 10 忠诚度
add_estate_cossacks_loyalty_effect
if = {
limit = {
has_estate = estate_cossacks
}
add_estate_loyalty = {
estate = estate_cossacks
loyalty = 10
}
}
  • #Cossacks

若存在哥萨克阶层 哥萨克阶层

  • 哥萨克阶层 哥萨克阶层获得 阶层忠诚度 10 忠诚度
reduce_estate_cossacks_loyalty_effect
if = {
limit = {
has_estate = estate_cossacks
}
add_estate_loyalty = {
estate = estate_cossacks
loyalty = -10
}
}

若存在哥萨克阶层 哥萨克阶层

  • 哥萨克阶层 哥萨克阶层失去 阶层忠诚度 10 忠诚度
add_estate_jains_loyalty_effect
if = {
limit = {
has_estate = estate_jains
}
add_estate_loyalty = {
estate = estate_jains
loyalty = 10
}
}
  • #Jains

若存在耆那教徒 耆那教徒阶层

  • 耆那教徒 耆那教徒阶层获得 阶层忠诚度 10 忠诚度
reduce_estate_jains_loyalty_effect
if = {
limit = {
has_estate = estate_jains
}
add_estate_loyalty = {
estate = estate_jains
loyalty = -10
}
}

若存在耆那教徒 耆那教徒阶层

  • 耆那教徒 耆那教徒阶层失去 阶层忠诚度 10 忠诚度
add_estate_rajput_loyalty_effect
if = {
limit = {
has_estate = estate_rajput
}
add_estate_loyalty = {
estate = estate_rajput
loyalty = 10
}
}
  • #Rajput

若存在拉杰普特 拉杰普特阶层

  • 拉杰普特 拉杰普特阶层获得 阶层忠诚度 10 忠诚度
reduce_estate_rajput_loyalty_effect
if = {
limit = {
has_estate = estate_rajput
}
add_estate_loyalty = {
estate = estate_rajput
loyalty = -10
}
}

若存在拉杰普特 拉杰普特阶层

  • 拉杰普特 拉杰普特阶层失去 阶层忠诚度 10 忠诚度

历史脚本效果列表

脚本代码位于:/Europa Universalis IV/common/scripted_effects/01_scripted_effects_for_history.txt

#All are Country Scope unless otherwise stated.
代码 实现 说明
add_rajputs_or_marathas_or_nobles_effect
if = {
limit = {
owner = { has_estate = estate_rajput }
}
set_estate = estate_rajput
}
else_if = {
limit = {
owner = { has_estate = estate_maratha }
}
set_estate = estate_maratha
}
else_if = {
limit = { owner = { has_estate = estate_dhimmi } }
set_estate = estate_dhimmi
}
else = {
set_estate = estate_nobles
}
  • #Add Nobility or Rajputs or Marathas
  • #Province Scope
add_vaisyas_or_burghers_effect
if = {
limit = {
owner = { has_estate = estate_vaisyas }
}
set_estate = estate_vaisyas
}
else = {
set_estate = estate_burghers
}
  • #Add Burghers or Vaisyas
  • #Province Scope
add_jains_or_burghers_effect
if = {
limit = {
owner = { has_estate = estate_jains }
}
set_estate = estate_jains
}
else = {
set_estate = estate_burghers
}
  • #Add Burghers or Jains
  • #Province Scope
add_brahmins_or_church_effect
if = {
limit = {
owner = { has_estate = estate_brahmins }
}
set_estate = estate_brahmins
}
else = {
set_estate = estate_church
}
  • #Add Clergy or Brahmins
  • #Province Scope


行动脚本效果列表

脚本代码位于:/Europa Universalis IV/common/scripted_effects/01_scripted_effects_for_on_actions.txt


代码 实现 说明
initialize_schools_effect
if = {
limit = { NOT = { has_global_flag = schools_initiated } }
set_global_flag = schools_initiated
random_country = { * #Ismailis are disliked by all Sunnis at start.
limit = {
religious_school = {
group = muslim
school = ismaili_school
}
}
random_country = {
limit = {
religious_school = {
group = muslim
school = hanafi_school
}
}
set_school_opinion = {
who = PREV
opinion = -1
}
}
random_country = {
limit = {
religious_school = {
group = muslim
school = hanbali_school
}
}
set_school_opinion = {
who = PREV
opinion = -1
}
}
random_country = {
limit = {
religious_school = {
group = muslim
school = shafii_school
}
}
set_school_opinion = {
who = PREV
opinion = -1
}
}
random_country = {
limit = {
religious_school = {
group = muslim
school = maliki_school
}
}
set_school_opinion = {
who = PREV
opinion = -1
}
}
}
random_country = { * #Jafaris are disliked by all Sunnis at start.
limit = {
religious_school = {
group = muslim
school = jafari_school
}
}
random_country = {
limit = {
religious_school = {
group = muslim
school = hanafi_school
}
}
set_school_opinion = {
who = PREV
opinion = -1
}
}
random_country = {
limit = {
religious_school = {
group = muslim
school = hanbali_school
}
}
set_school_opinion = {
who = PREV
opinion = -1
}
}
random_country = {
limit = {
religious_school = {
group = muslim
school = shafii_school
}
}
set_school_opinion = {
who = PREV
opinion = -1
}
}
random_country = {
limit = {
religious_school = {
group = muslim
school = maliki_school
}
}
set_school_opinion = {
who = PREV
opinion = -1
}
}
}
random_country = { * #Zaidis are disliked by all Sunnis at start.
limit = {
religious_school = {
group = muslim
school = zaidi_school
}
}
random_country = {
limit = {
religious_school = {
group = muslim
school = hanafi_school
}
}
set_school_opinion = {
who = PREV
opinion = -1
}
}
random_country = {
limit = {
religious_school = {
group = muslim
school = hanbali_school
}
}
set_school_opinion = {
who = PREV
opinion = -1
}
}
random_country = {
limit = {
religious_school = {
group = muslim
school = shafii_school
}
}
set_school_opinion = {
who = PREV
opinion = -1
}
}
random_country = {
limit = {
religious_school = {
group = muslim
school = maliki_school
}
}
set_school_opinion = {
who = PREV
opinion = -1
}
}
}
}
  • #Used in on_startup on_action
battle_cult_spreading_effect
  • #Yemoya
if = {
limit = {
ROOT = {
religion = shamanism
NOT = { has_unlocked_cult = yemoja_cult }
}
FROM = {
religion = shamanism
has_unlocked_cult = yemoja_cult
}
}
ROOT = { country_event = { id = fetishist_flavor.1 } }
}
if = {
limit = {
FROM = {
religion = shamanism
NOT = { has_unlocked_cult = yemoja_cult }
}
ROOT = {
religion = shamanism
has_unlocked_cult = yemoja_cult
}
}
FROM = { country_event = { id = fetishist_flavor.1 } }
}
  • #Roog
if = {
limit = {
ROOT = {
religion = shamanism
NOT = { has_unlocked_cult = roog_cult }
}
FROM = {
religion = shamanism
has_unlocked_cult = roog_cult
}
}
ROOT = { country_event = { id = fetishist_flavor.2 } }
}
if = {
limit = {
FROM = {
religion = shamanism
NOT = { has_unlocked_cult = roog_cult }
}
ROOT = {
religion = shamanism
has_unlocked_cult = roog_cult
}
}
FROM = { country_event = { id = fetishist_flavor.2 } }
}
  • #Nyame
if = {
limit = {
ROOT = {
religion = shamanism
NOT = { has_unlocked_cult = nyame_cult }
}
FROM = {
religion = shamanism
has_unlocked_cult = nyame_cult
}
}
ROOT = { country_event = { id = fetishist_flavor.3 } }
}
if = {
limit = {
FROM = {
religion = shamanism
NOT = { has_unlocked_cult = nyame_cult }
}
ROOT = {
religion = shamanism
has_unlocked_cult = nyame_cult
}
}
FROM = { country_event = { id = fetishist_flavor.3 } }
}
  • #Cwezi / Swezi / Kubandwa
if = {
limit = {
ROOT = {
religion = shamanism
NOT = { has_unlocked_cult = cwezi_cult }
}
FROM = {
religion = shamanism
has_unlocked_cult = cwezi_cult
}
}
ROOT = { country_event = { id = fetishist_flavor.101 } }
}
if = {
limit = {
FROM = {
religion = shamanism
NOT = { has_unlocked_cult = cwezi_cult }
}
ROOT = {
religion = shamanism
has_unlocked_cult = cwezi_cult
}
}
FROM = { country_event = { id = fetishist_flavor.101 } }
}
  • #Mlira and other Nature Spirits and/or ancestral cults of Central Africa
if = {
limit = {
ROOT = {
religion = shamanism
NOT = { has_unlocked_cult = central_african_ancestor_cult }
}
FROM = {
religion = shamanism
has_unlocked_cult = central_african_ancestor_cult
}
}
ROOT = { country_event = { id = fetishist_flavor.102 } }
}
if = {
limit = {
FROM = {
religion = shamanism
NOT = { has_unlocked_cult = central_african_ancestor_cult }
}
ROOT = {
religion = shamanism
has_unlocked_cult = central_african_ancestor_cult
}
}
FROM = { country_event = { id = fetishist_flavor.102 } }
}
  • #Mwari
if = {
limit = {
ROOT = {
religion = shamanism
NOT = { has_unlocked_cult = mwari_cult }
}
FROM = {
religion = shamanism
has_unlocked_cult = mwari_cult
}
}
ROOT = { country_event = { id = fetishist_flavor.103 } }
}
if = {
limit = {
FROM = {
religion = shamanism
NOT = { has_unlocked_cult = mwari_cult }
}
ROOT = {
religion = shamanism
has_unlocked_cult = mwari_cult
}
}
FROM = { country_event = { id = fetishist_flavor.103 } }
}
  • #Enkai
if = {
limit = {
ROOT = {
NOT = { has_unlocked_cult = enkai_cult }
religion = shamanism * #Fetishism
}
FROM = {
religion = shamanism
has_unlocked_cult = enkai_cult
}
}
ROOT = { country_event = { id = fetishist_flavor.201 } }
}
if = {
limit = {
FROM = {
NOT = { has_unlocked_cult = enkai_cult }
religion = shamanism * #Fetishism
}
ROOT = {
religion = shamanism
has_unlocked_cult = enkai_cult
}
}
FROM = { country_event = { id = fetishist_flavor.201 } }
}
  • #Waaq
if = {
limit = {
ROOT = {
NOT = { has_unlocked_cult = waaq_cult }
religion = shamanism * #Fetishism
}
FROM = {
religion = shamanism
has_unlocked_cult = waaq_cult
}
}
ROOT = { country_event = { id = fetishist_flavor.202 } }
}
if = {
limit = {
FROM = {
NOT = { has_unlocked_cult = waaq_cult }
religion = shamanism * #Fetishism
}
ROOT = {
religion = shamanism
has_unlocked_cult = waaq_cult
}
}
FROM = { country_event = { id = fetishist_flavor.202 } }
}
  • #Zanahary
if = {
limit = {
ROOT = {
NOT = { has_unlocked_cult = zanahary_cult }
religion = shamanism * #Fetishism
}
FROM = {
religion = shamanism
has_unlocked_cult = zanahary_cult
}
}
ROOT = { country_event = { id = fetishist_flavor.203 } }
}
if = {
limit = {
FROM = {
NOT = { has_unlocked_cult = zanahary_cult }
religion = shamanism * #Fetishism
}
ROOT = {
religion = shamanism
has_unlocked_cult = zanahary_cult
}
}
FROM = { country_event = { id = fetishist_flavor.203 } }
}
  • #Christianity
if = {
limit = {
ROOT = {
NOT = { has_unlocked_cult = christianity_cult }
religion = shamanism * #Fetishism
}
FROM = {
OR = {
religion_group = christian
has_unlocked_cult = christianity_cult
}
}
}
ROOT = { country_event = { id = fetishist_flavor.400 } }
}
if = {
limit = {
FROM = {
NOT = { has_unlocked_cult = christianity_cult }
religion = shamanism * #Fetishism
}
ROOT = {
OR = {
has_unlocked_cult = christianity_cult
religion_group = christian
}
}
}
FROM = { country_event = { id = fetishist_flavor.400 } }
}
  • #Islam
if = {
limit = {
ROOT = {
NOT = { has_unlocked_cult = islam_cult }
religion = shamanism * #Fetishism
}
FROM = {
OR = {
religion_group = muslim
has_unlocked_cult = islam_cult
}
}
}
ROOT = { country_event = { id = fetishist_flavor.401 } }
}
if = {
limit = {
FROM = {
NOT = { has_unlocked_cult = islam_cult }
religion = shamanism * #Fetishism
}
ROOT = {
OR = {
has_unlocked_cult = islam_cult
religion_group = muslim
}
}
}
FROM = { country_event = { id = fetishist_flavor.401 } }
}
  • #Buddhism
if = {
limit = {
ROOT = {
NOT = { has_unlocked_cult = buddhism_cult }
religion = shamanism * #Fetishism
}
FROM = {
OR = {
religion_group = eastern
has_unlocked_cult = buddhism_cult
}
}
}
ROOT = { country_event = { id = fetishist_flavor.402 } }
}
if = {
limit = {
FROM = {
NOT = { has_unlocked_cult = buddhism_cult }
religion = shamanism * #Fetishism
}
ROOT = {
OR = {
has_unlocked_cult = buddhism_cult
religion_group = eastern
}
}
}
FROM = { country_event = { id = fetishist_flavor.402 } }
}
  • #Dharmic Cult
if = {
limit = {
ROOT = {
NOT = { has_unlocked_cult = dharmic_cult }
religion = shamanism * #Fetishism
}
FROM = {
OR = {
religion_group = dharmic
has_unlocked_cult = dharmic_cult
}
}
}
ROOT = { country_event = { id = fetishist_flavor.403 } }
}
if = {
limit = {
FROM = {
NOT = { has_unlocked_cult = dharmic_cult }
religion = shamanism * #Fetishism
}
ROOT = {
OR = {
has_unlocked_cult = dharmic_cult
religion_group = dharmic
}
}
}
FROM = { country_event = { id = fetishist_flavor.403 } }
}
  • #Teotl Cult
if = {
limit = {
ROOT = {
NOT = { has_unlocked_cult = south_central_american_cult }
religion = shamanism * #Fetishism
}
FROM = {
OR = {
religion = nahuatl
religion = inti
religion = mesoamerican_religion
has_unlocked_cult = south_central_american_cult
}
}
}
ROOT = { country_event = { id = fetishist_flavor.404 } }
}
if = {
limit = {
FROM = {
NOT = { has_unlocked_cult = south_central_american_cult }
religion = shamanism * #Fetishism
}
ROOT = {
OR = {
has_unlocked_cult = south_central_american_cult
religion = nahuatl
religion = mesoamerican_religion
}
}
}
FROM = { country_event = { id = fetishist_flavor.404 } }
}
  • #Norse Cult
if = {
limit = {
ROOT = {
NOT = { has_unlocked_cult = norse_cult }
religion = shamanism * #Fetishism
}
FROM = {
OR = {
religion = norse_pagan_reformed
has_unlocked_cult = norse_cult
}
}
}
ROOT = { country_event = { id = fetishist_flavor.405 } }
}
if = {
limit = {
FROM = {
NOT = { has_unlocked_cult = norse_cult }
religion = shamanism * #Fetishism
}
ROOT = {
OR = {
has_unlocked_cult = norse_cult
religion = norse_pagan_reformed
}
}
}
FROM = { country_event = { id = fetishist_flavor.405 } }
}
  • #Jewish Cult
if = {
limit = {
ROOT = {
NOT = { has_unlocked_cult = jewish_cult }
religion = shamanism * #Fetishism
}
FROM = {
OR = {
religion = jewish
has_unlocked_cult = jewish_cult
}
}
}
ROOT = { country_event = { id = fetishist_flavor.406 } }
}
if = {
limit = {
FROM = {
NOT = { has_unlocked_cult = jewish_cult }
religion = shamanism * #Fetishism
}
ROOT = {
OR = {
has_unlocked_cult = jewish_cult
religion = jewish
}
}
}
FROM = { country_event = { id = fetishist_flavor.406 } }
}
  • #Zoroastrian Cult
if = {
limit = {
ROOT = {
NOT = { has_unlocked_cult = zoroastrian_cult }
religion = shamanism * #Fetishism
}
FROM = {
OR = {
religion = zoroastrian
has_unlocked_cult = zoroastrian_cult
}
}
}
ROOT = { country_event = { id = fetishist_flavor.407 } }
}
if = {
limit = {
FROM = {
NOT = { has_unlocked_cult = zoroastrian_cult }
religion = shamanism * #Fetishism
}
ROOT = {
OR = {
has_unlocked_cult = zoroastrian_cult
religion = zoroastrian
}
}
}
FROM = { country_event = { id = fetishist_flavor.407 } }
}
crimean_succession_effect
if = {
limit = {
tag = CRI
NOT = { has_global_flag = death_of_haji_giray } * #Also set in history.
exists = TUR
is_subject = no
TUR = {
num_of_cities = ROOT
is_subject = no
num_of_ports = 1
}
}
country_event = { id = flavor_cri.1 } * #Death of Haji Giray
}
if = {
limit = {
tag = CRI
NOT = { has_global_flag = death_of_haji_giray } * #Also set in history.
OR = {
NOT = { exists = TUR }
is_subject = yes
TUR = { NOT = { num_of_cities = ROOT } }
TUR = { is_subject = yes }
TUR = { NOT = { num_of_ports = 1 } }
}
}
set_global_flag = death_of_haji_giray
}
slesvig_question_effect
if = {
limit = {
tag = SHL
NOT = { has_global_flag = death_of_adolf_of_slesvig } * #
is_subject_of = DAN
ai = yes
}
DAN = { country_event = { id = flavor_dan.4 } } * # Death of Adolf VIII
set_global_flag = death_of_adolf_of_slesvig
}
succession_culture_religion_effect
if = {
limit = {
NOT = { has_reform = elective_monarchy }
has_regency = no
NOT = { has_ruler_flag = had_culture_religion_reaction_event_flag }
NOT = { has_reform = mamluk_government }
OR = {
NOT = { ruler_culture = ROOT }
NOT = { ruler_religion = ROOT }
}
}
set_country_flag = had_culture_religion_reaction_event_flag
country_event = { id = culture_religion_events.2 days = 75 random = 7 }
}
  • #Note: Cleared in the event below, all future effects from ruler culture/religion are gated behind this flag being cleared.
sheik_ul_islam_effect
if = {
limit = {
has_dlc = "Cradle of Civilization"
NOT = { has_country_flag = had_sheikh_ul_islam_event }
uses_piety = yes
num_of_cities = 20
government_rank = 2
has_religious_school = yes
government = monarchy
NOT = { has_reform = steppe_horde }
}
set_country_flag = had_sheikh_ul_islam_event
country_event = { id = muslim_school_events.2 days = 45 random = 7 }
}
  • #Cleared by the event itself. Avoids event spam if multiple quick successions
  • #New Grand Mufti/Sheik-ul-Islam
ambrosian_republic_effect
if = {
limit = {
tag = MLO
}
country_event = { id = flavor_mlo.1 days = 3 } * # The Ambrosian Republic
}


宫廷脚本效果列表

脚本代码位于:/Europa Universalis IV/common/scripted_effects/01_scripted_effects_for_rulers_heirs_consorts.txt

#All are Country Scope unless otherwise stated.
代码 实现 说明
create_new_internal_consort_effect
if = {
limit = {
has_dlc = "Rights of Man"
has_consort = no
}
define_consort = {
country_of_origin = ROOT
}
}
#Consorts
  • #Don't use if you want more options with different random consorts.
divorce_consort_effect
  • #Foreign consort family expresses anger
if = {
limit = {
OR = {
NOT = { religion = catholic }
AND = {
religion = catholic
NOT = { exists = PAP }
}
}
has_foreign_consort = yes
}
random_country = {
limit = { is_origin_of_consort = ROOT }
hidden_effect = { country_event = { id = consort_events.205 days = 1 } }
tooltip = {
add_opinion = {
who = ROOT
modifier = offended_by_divorce:
}
add_casus_belli = {
target = ROOT
type = cb_insult
months = 60
}
}
}
}
  • #Local consort family expresses anger
if = {
limit = {
OR = {
NOT = { religion = catholic }
AND = {
religion = catholic
NOT = { exists = PAP }
}
}
has_foreign_consort = no
any_owned_province = {
has_province_modifier = domain_of_spouses_family
}
}
every_owned_province = {
limit = { has_province_modifier = domain_of_spouses_family }
add_or_extend_province_modifier_effect = {
MODIFIER = angered_nobles
DURATION = 7300
}
}
}
  • #Set aside first wife and select another
if = {
limit = { NOT = { religion_group = christian } }
custom_tooltip = divorce.a.tt
hidden_effect = {:
if = {
limit = { NOT = { any_country = { is_origin_of_consort = ROOT } } }
remove_consort = yes
country_event = { id = consort_events.206 }
}
}
define_consort = { }
}
  • #Divorce
if = {
limit = {
OR = {
AND = {
religion_group = christian
NOT = { religion = catholic }
}
AND = {
religion = catholic
NOT = { exists = PAP }
}
}
}
custom_tooltip = divorce.b.tt
hidden_effect = {:
if = {
limit = { NOT = { any_country = { is_origin_of_consort = ROOT } } }
remove_consort = yes
country_event = { id = consort_events.206 }
}
}
}
  • #Papal dispensation
if = {
limit = {
religion = catholic
exists = PAP
}
  • #How much influence will you spend?
country_event = { id = consort_events.201 }
}
  • #Prestige hit
if = {
limit = {
OR = {
NOT = { religion = catholic }
AND = {
NOT = { exists = PAP }
religion = catholic
}
}
}
add_prestige = -15
}
save_origin_of_consort_effect
if = { * # finds and saves foreign country as origin
limit = {
has_foreign_consort = yes
any_country = { has_given_consort_to = ROOT }
}
random_country = {
limit = { has_given_consort_to = ROOT }
save_event_target_as = origin_of_consort
}
}
if = { * # finds and saves local province as origin
limit = {
has_foreign_consort = no
any_owned_province = { has_province_modifier = domain_of_spouses_family }
}
random_owned_province = {
limit = { has_province_modifier = domain_of_spouses_family }
save_event_target_as = origin_of_consort
}
}
if = { * # finds and saves local province as origin
limit = {
has_foreign_consort = no
has_ruler_flag = has_lowborn_consort
any_owned_province = { has_province_modifier = home_of_consort }
}
random_owned_province = {
limit = { has_province_modifier = home_of_consort }
save_event_target_as = origin_of_consort
}
}
if = { * # if all else fails: use this consort_flag to set a triggered desc
limit = {
NOT = { has_saved_event_target = origin_of_consort }
}
set_consort_flag = home_province_lost
}
  • #Used for all internal consorts.
increase_heir_dip_effect
if = {
limit = { NOT = { heir_dip = 6 } }
change_heir_dip = 1
ELSE = {
add_dip_power = 50
}
}
  • #Heirs
increase_heir_adm_effect
if = {
limit = { NOT = { heir_adm = 6 } }
change_heir_adm = 1
ELSE = {
add_adm_power = 50
}
}
increase_heir_mil_effect
if = {
limit = { NOT = { heir_mil = 6 } }
change_heir_mil = 1
ELSE = {
add_mil_power = 50
}
}
  • #Rulers


简单奖惩脚本效果列表

脚本代码位于:/Europa Universalis IV/common/scripted_effects/01_scripted_effects_for_simple_bonuses_penalties.txt

#All are Country Scope unless otherwise stated.
代码 实现 说明
add_stability_or_adm_power
if = {
limit = {
stability = 3
}
add_adm_power = 50
}
if = {
limit = {
NOT = { stability = 3 }
}
add_stability = 1
}
  • #Stability
  • #Country Scope

若该国的稳定度小于 +3

  • 则获得 Icon stability.png 1 稳定度
  • 否则获得 Administrative power.png 50 行政点数
increase_legitimacy_small_effect
add_legitimacy = 5
add_horde_unity = 5
add_devotion = 5
add_republican_tradition = 2.5
  • #Legitimacy
  • #Country Scope
  • #No IFs as the game hides these itself when incorrect.

视情况获得 Legitimacy.png 5 正统性、游牧团结 5 游牧团结、Devotion.png 5 奉献度或 Republican tradition.png 2.5 共和传统

increase_legitimacy_medium_effect
add_legitimacy = 10
add_horde_unity = 10
add_devotion = 10
add_republican_tradition = 5
  • #No IFs as the game hides these itself when incorrect.

视情况获得 Legitimacy.png 10 正统性、游牧团结 10 游牧团结、Devotion.png 10 奉献度或 Republican tradition.png 5 共和传统

reduce_legitimacy_small_effect
add_legitimacy = -5
add_horde_unity = -5
add_devotion = -5
add_republican_tradition = -2.5
  • #No IFs as the game hides these itself when incorrect.

视情况失去 Legitimacy.png 5 正统性、游牧团结 5 游牧团结、Devotion.png 5 奉献度或 Republican tradition.png 2.5 共和传统

reduce_legitimacy_medium_effect
add_legitimacy = -10
add_horde_unity = -10
add_devotion = -10
add_republican_tradition = -5
  • #No IFs as the game hides these itself when incorrect.

视情况失去 Legitimacy.png 10 正统性、游牧团结 10 游牧团结、Devotion.png 10 奉献度或 Republican tradition.png 5 共和传统

increase_religious_currency_effect
add_church_power = 15
add_fervor = 15
add_patriarch_authority = 0.10
add_karma = 10
add_authority = 5
add_papal_influence = 2
  • #Religious Currencies
  • #Country Scope
reduce_religious_currency_effect
add_church_power = -15
add_fervor = -15
add_patriarch_authority = -0.10
add_karma = -10
add_papal_influence = -2
add_authority = -5
add_innovativeness_small_effect
if = {
limit = { has_dlc = "Rule Britannia" }
change_innovativeness = 1
}
  • #Innovativeness

获得 Innovativeness.png 1 创新度

add_innovativeness_big_effect
if = {
limit = { has_dlc = "Rule Britannia" }
change_innovativeness = 3
}

获得 Innovativeness.png 3 创新度

reduce_innovativeness_small_effect
if = {
limit = { has_dlc = "Rule Britannia" }
change_innovativeness = -1
}

失去 Innovativeness.png 1 创新度

reduce_innovativeness_big_effect
if = {
limit = { has_dlc = "Rule Britannia" }
change_innovativeness = -3
}

失去 Innovativeness.png 3 创新度

add_territorial_core_effect
if = {
limit = { is_core = ROOT }
add_local_autonomy = -10
}
else = {
add_territorial_core = ROOT
}
  • #Gives territorial core or reduces autonomy.
  • #Province Scope
  • #Mission Reward
add_reform_progress_small_effect
if = {
limit = { has_dlc = "Dharma" }
change_government_reform_progress = 15
}

获得 15 改革进度

add_reform_progress_medium_effect
if = {
limit = { has_dlc = "Dharma" }
change_government_reform_progress = 25
}

获得 25 改革进度

change_reform_progress_effect
set_country_flag = __$STRENGTH$
if = {
limit = { has_country_flag = __small }
change_government_reform_progress = $SIGN$5
}
else_if = {
limit = { has_country_flag = __medium }
change_government_reform_progress = $SIGN$10
}
else_if = {
limit = { has_country_flag = __big }
change_government_reform_progress = $SIGN$15
}
else = { log = "change_reform_progress_effect failed!" }
clr_country_flag = __$STRENGTH$
  • #STRENGTH = small/medium/big
  • #SIGN = + or -
add_reform_progress_big_effect
if = {
limit = { has_dlc = "Dharma" }
change_government_reform_progress = 50
}

获得 50 改革进度

reduce_reform_progress_small_effect
if = {
limit = { has_dlc = "Dharma" }
change_government_reform_progress = -25
}

失去 25 改革进度

reduce_reform_progress_medium_effect
if = {
limit = { has_dlc = "Dharma" }
change_government_reform_progress = -50
}

失去 50 改革进度

reduce_reform_progress_big_effect
if = {
limit = { has_dlc = "Dharma" }
change_government_reform_progress = -75
}

失去 75 改革进度

参考资料