Scripted effect
add_random_fortification_building_effect
add_random_fortification_building_effect = yesgame/common/scripted_effects/00_building_effects.txt, line 2797 (43 lines). No parameters.
add_random_fortification_building_effect is a scripted effect in Crusader Kings III, written at line 2797 of its file. It takes no parameters: add_random_fortification_building_effect = yes. The game's script calls it in 5 places, among them Motte (building), Shrine (building) and Village Center (building). Its body carries 1 text of the game's own for the player. Patch 1.20.1.2, from game/common/scripted_effects/00_building_effects.txt.
What it does
- If free building slots more than 0: Holding of … gains a random Fortification Building
• 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 (43 lines of game script)
add_random_fortification_building_effect = {
if = {
limit = { free_building_slots > 0 }
save_scope_as = building_scope
custom_tooltip = random_fortification_building_tt
hidden_effect = {
random_list = {
10 = { # Ramparts
trigger = {
NOT = { has_building_or_higher = ramparts_01 }
building_ramparts_requirement_terrain = yes
building_requirement_castle_city_church = { LEVEL = 01 }
}
add_building = ramparts_01
}
10 = { # Curtain Walls
trigger = {
NOT = { has_building_or_higher = curtain_walls_01 }
building_curtain_walls_requirement_terrain = yes
building_requirement_castle_city_church = { LEVEL = 01 }
}
add_building = curtain_walls_01
}
10 = { # Watchtowers
trigger = {
NOT = { has_building_or_higher = watchtowers_01 }
building_watchtowers_requirement_terrain = yes
building_requirement_castle_city_church = { LEVEL = 01 }
}
add_building = watchtowers_01
}
10 = { # Hill Forts
trigger = {
NOT = { has_building_or_higher = hill_forts_01 }
building_hill_forts_requirement_terrain = yes
building_requirement_castle_city_church = { LEVEL = 01 }
}
add_building = hill_forts_01
}
}
}
}
}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_random_fortification_building_effect.
Buildings (4)
On actions (the game's own hooks) (1)
- on_building_completed
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.