Scripted effect
set_up_domicile_estate_effect
set_up_domicile_estate_effect = yesgame/common/scripted_effects/00_administrative_effects.txt, line 404 (104 lines). No parameters.
set_up_domicile_estate_effect is a scripted effect in Crusader Kings III, written at line 404 of its file. It takes no parameters: set_up_domicile_estate_effect = yes. The game's script calls it in 4 places, among them on_vassal_change (on action), change_to_administrative_effect (scripted effect) and give_new_noble_family_title_effect (scripted effect). Patch 1.20.1.2, from game/common/scripted_effects/00_administrative_effects.txt.
What it does
If
is_domicile_type = estate
Then
If
NOT = { has_domicile_building_or_higher = estate_main_02 }owner.culture ?= { has_innovation = innovation_city_planning }
Then
add_domicile_building = estate_main_02
If
has_domicile_building = estate_main_02NOT = { has_domicile_building_or_higher = estate_main_03 }owner.culture ?= { has_innovation = innovation_manorialism }
Then
add_domicile_building = estate_main_03
fill_external_estate_building_effect = yes
Else if
is_domicile_type = japanese_manor
Then
If
NOT = { has_domicile_building_or_higher = japanese_manor_main_02 }owner.culture ?= { has_innovation = innovation_city_planning }
Then
add_domicile_building = japanese_manor_main_02
If
has_domicile_building = japanese_manor_main_02NOT = { has_domicile_building_or_higher = japanese_manor_main_03 }owner.culture ?= { has_innovation = innovation_manorialism }
Then
add_domicile_building = japanese_manor_main_03
fill_external_japanese_manor_building_effect = yes
Else if
is_domicile_type = east_asian_estate
Then
If
NOT = { has_domicile_building_or_higher = east_asian_estate_main_02 }owner.culture ?= { has_innovation = innovation_city_planning }
Then
add_domicile_building = east_asian_estate_main_02
If
has_domicile_building = east_asian_estate_main_02NOT = { has_domicile_building_or_higher = east_asian_estate_main_03 }owner.culture ?= { has_innovation = innovation_manorialism }
Then
add_domicile_building = east_asian_estate_main_03
fill_external_east_asian_estate_building_effect = yes
• 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 (104 lines of game script)
set_up_domicile_estate_effect = {
if = {
limit = { is_domicile_type = estate }
# Intentionally one level lower than what you can get
if = {
limit = {
NOT = { has_domicile_building_or_higher = estate_main_02 }
owner.culture ?= { has_innovation = innovation_city_planning }
}
add_domicile_building = estate_main_02
}
if = {
limit = {
has_domicile_building = estate_main_02
NOT = { has_domicile_building_or_higher = estate_main_03 }
owner.culture ?= { has_innovation = innovation_manorialism }
}
add_domicile_building = estate_main_03
}
hidden_effect = {
switch = {
trigger = has_domicile_building
estate_main_03 = {
while = {
count = 2
add_random_internal_estate_building = yes
}
}
estate_main_02 = {
add_random_internal_estate_building = yes
}
}
}
fill_external_estate_building_effect = yes
}
else_if = {
limit = { is_domicile_type = japanese_manor }
# Intentionally one level lower than what you can get
if = {
limit = {
NOT = { has_domicile_building_or_higher = japanese_manor_main_02 }
owner.culture ?= { has_innovation = innovation_city_planning }
}
add_domicile_building = japanese_manor_main_02
}
if = {
limit = {
has_domicile_building = japanese_manor_main_02
NOT = { has_domicile_building_or_higher = japanese_manor_main_03 }
owner.culture ?= { has_innovation = innovation_manorialism }
}
add_domicile_building = japanese_manor_main_03
}
hidden_effect = {
switch = {
trigger = has_domicile_building
japanese_manor_main_03 = {
while = {
count = 2
add_random_internal_japanese_manor_building = yes
}
}
japanese_manor_main_02 = {
add_random_internal_japanese_manor_building = yes
}
}
}
fill_external_japanese_manor_building_effect = yes
}
else_if = {
limit = { is_domicile_type = east_asian_estate }
# Intentionally one level lower than what you can get
if = {
limit = {
NOT = { has_domicile_building_or_higher = east_asian_estate_main_02 }
owner.culture ?= { has_innovation = innovation_city_planning }
}
add_domicile_building = east_asian_estate_main_02
}
if = {
limit = {
has_domicile_building = east_asian_estate_main_02
NOT = { has_domicile_building_or_higher = east_asian_estate_main_03 }
owner.culture ?= { has_innovation = innovation_manorialism }
}
add_domicile_building = east_asian_estate_main_03
}
hidden_effect = {
switch = {
trigger = has_domicile_building
east_asian_estate_main_03 = {
while = {
count = 2
add_random_internal_east_asian_estate_building = yes
}
}
east_asian_estate_main_02 = {
add_random_internal_east_asian_estate_building = yes
}
}
}
fill_external_east_asian_estate_building_effect = yes
}
}As written in game/common/scripted_effects/00_administrative_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls set_up_domicile_estate_effect.
On actions (the game's own hooks) (1)
- on_vassal_change
Source: game/common/scripted_effects/00_administrative_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.