Scripted effect
upgrade_guildhall
upgrade_guildhall = yesgame/common/scripted_effects/01_building_upgrade_effects.txt, line 213 (63 lines). No parameters.
upgrade_guildhall is a scripted effect in Crusader Kings III, written at line 213 of its file. It takes no parameters: upgrade_guildhall = yes. The game's script calls it in 1 place, among them Foreign Merchants (event court_yearly.7030). Patch 1.20.1.2, from game/common/scripted_effects/01_building_upgrade_effects.txt.
The comment above it in the file
Upgrades a single guidhall building If such a building does not exist and can be built, it is built. If no slot exists, a slot is added and it is built.
What it does
If
NOT = { has_building_or_higher = guild_halls_01 }free_building_slots = 0
Then
add_province_modifier = extra_building_slotadd_building = guild_halls_01
Else if
NOT = { has_building_or_higher = guild_halls_01 }- Free building slots more than 1
Then
add_building = guild_halls_01
Else if
has_building = guild_halls_01
Then
add_building = guild_halls_02
Else if
has_building = guild_halls_02
Then
add_building = guild_halls_03
Else if
has_building = guild_halls_03
Then
add_building = guild_halls_04
Else if
has_building = guild_halls_04
Then
add_building = guild_halls_05
Else if
has_building = guild_halls_05
Then
add_building = guild_halls_06
Else if
has_building = guild_halls_06
Then
add_building = guild_halls_07
Else if
has_building = guild_halls_07
Then
add_building = guild_halls_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 (63 lines of game script)
upgrade_guildhall = {
if = {
limit = {
NOT = {
has_building_or_higher = guild_halls_01
}
free_building_slots = 0
}
add_province_modifier = extra_building_slot
add_building = guild_halls_01
}
else_if = {
limit = {
NOT = {
has_building_or_higher = guild_halls_01
}
free_building_slots > 1
}
add_building = guild_halls_01
}
else_if = {
limit = {
has_building = guild_halls_01
}
add_building = guild_halls_02
}
else_if = {
limit = {
has_building = guild_halls_02
}
add_building = guild_halls_03
}
else_if = {
limit = {
has_building = guild_halls_03
}
add_building = guild_halls_04
}
else_if = {
limit = {
has_building = guild_halls_04
}
add_building = guild_halls_05
}
else_if = {
limit = {
has_building = guild_halls_05
}
add_building = guild_halls_06
}
else_if = {
limit = {
has_building = guild_halls_06
}
add_building = guild_halls_07
}
else_if = {
limit = {
has_building = guild_halls_07
}
add_building = guild_halls_08
}
}As written in game/common/scripted_effects/01_building_upgrade_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls upgrade_guildhall.
Events (1)
- Foreign Merchants
court_yearly.7030
Source: game/common/scripted_effects/01_building_upgrade_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.