Scripted effect
add_next_building_tier_effect
add_next_building_tier_effect = { BUILDING = … }game/common/scripted_effects/00_building_effects.txt, line 15 (36 lines). Parameters: $BUILDING$.
add_next_building_tier_effect is a scripted effect in Crusader Kings III, written at line 15 of its file. A call passes 1 parameter: BUILDING. The game's script calls it in 4 places, among them bp2_yearly_1065_add_economical_building_effect (local effect), bp2_yearly_1065_add_martial_building_effect (local effect) and bp2_yearly_1065_add_pious_building_effect (local effect). Patch 1.20.1.2, from game/common/scripted_effects/00_building_effects.txt.
The comment above it in the file
Builds or upgrades the specified building, e.g. outposts
What it does
If
NOT = { has_building_or_higher = $BUILDING$_01 }
Then
add_building = $BUILDING$_01
Else if
has_building = $BUILDING$_01
Then
add_building = $BUILDING$_02
Else if
has_building = $BUILDING$_02
Then
add_building = $BUILDING$_03
Else if
has_building = $BUILDING$_03
Then
add_building = $BUILDING$_04
Else if
has_building = $BUILDING$_04
Then
add_building = $BUILDING$_05
Else if
has_building = $BUILDING$_05
Then
add_building = $BUILDING$_06
Else if
has_building = $BUILDING$_06
Then
add_building = $BUILDING$_07
Else if
has_building = $BUILDING$_07
Then
add_building = $BUILDING$_08
• the game's own tooltip text · ◦ our reading of the script line · code the script where neither exists
“They” is whatever it runs on (the scope it is called in). The scripted triggers and effects it calls link to their own pages; $PARAMETERS$ stay as written: each call fills them in.
The script as written (36 lines of game script)
add_next_building_tier_effect = {
if = {
limit = {
NOT = { has_building_or_higher = $BUILDING$_01 }
}
add_building = $BUILDING$_01
}
else_if = {
limit = { has_building = $BUILDING$_01 }
add_building = $BUILDING$_02
}
else_if = {
limit = { has_building = $BUILDING$_02 }
add_building = $BUILDING$_03
}
else_if = {
limit = { has_building = $BUILDING$_03 }
add_building = $BUILDING$_04
}
else_if = {
limit = { has_building = $BUILDING$_04 }
add_building = $BUILDING$_05
}
else_if = {
limit = { has_building = $BUILDING$_05 }
add_building = $BUILDING$_06
}
else_if = {
limit = { has_building = $BUILDING$_06 }
add_building = $BUILDING$_07
}
else_if = {
limit = { has_building = $BUILDING$_07 }
add_building = $BUILDING$_08
}
}As written in game/common/scripted_effects/00_building_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls add_next_building_tier_effect.
Scripted effects inside an event file (3)
- bp2_yearly_1065_add_economical_building_effect
- bp2_yearly_1065_add_martial_building_effect
- bp2_yearly_1065_add_pious_building_effect
Scripted effects (1)
Source: game/common/scripted_effects/00_building_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.