CK3 DatabaseCrusader Kings III · 1.20.1.2 “Crozier” · unofficial
Silk & Silverout Tue, Nov 17What's free, what needs the DLC, price →

Scripted effect · Roads to Power files

add_random_external_estate_building

add_random_external_estate_building = yes

game/common/scripted_effects/07_dlc_ep3_scripted_effects.txt, line 13311 (174 lines). No parameters.

add_random_external_estate_building is a scripted effect in Crusader Kings III, in the Roads to Power files, written at line 13311 of its file. It takes no parameters: add_random_external_estate_building = yes. The game's script calls it in 1 place, among them fill_external_estate_building_effect (scripted effect). Patch 1.20.1.2, from game/common/scripted_effects/07_dlc_ep3_scripted_effects.txt.

What it does

  • If free external domicile building slots at least 1 › 1 of 14 things will happen:
    • 7%:
      • add_domicile_building = temple_small_01
      • If

        • has_domicile_building = estate_main_03

        Then

        • add_domicile_building = temple_small_02
    • 7%:
      • add_domicile_building = barracks_01
      • If

        • has_domicile_building = estate_main_03

        Then

        • add_domicile_building = barracks_02
    • 7%:
      • add_domicile_building = watchtower_01
      • If

        • has_domicile_building = estate_main_03

        Then

        • add_domicile_building = watchtower_02
    • 7%:
      • add_domicile_building = vineyard_01
      • If

        • has_domicile_building = estate_main_03

        Then

        • add_domicile_building = vineyard_02
    • 7%:
      • add_domicile_building = guardhouse_01
      • If

        • has_domicile_building = estate_main_03

        Then

        • add_domicile_building = guardhouse_02
    • 7%:
      • add_domicile_building = garden_01
      • If

        • has_domicile_building = estate_main_03

        Then

        • add_domicile_building = garden_02
    • 7%:
      • add_domicile_building = storage_01
      • If

        • has_domicile_building = estate_main_03

        Then

        • add_domicile_building = storage_02
    • 7%:
      • add_domicile_building = grain_field_01
      • If

        • has_domicile_building = estate_main_03

        Then

        • add_domicile_building = grain_field_02
    • 7%:
      • add_domicile_building = rice_field_01
      • If

        • has_domicile_building = estate_main_03

        Then

        • add_domicile_building = rice_field_02
    • 7%:
      • add_domicile_building = stable_01
      • If

        • has_domicile_building = estate_main_03

        Then

        • add_domicile_building = stable_02
    • 7%:
      • add_domicile_building = workshop_01
      • If

        • has_domicile_building = estate_main_03

        Then

        • add_domicile_building = workshop_02
    • 7%:
      • add_domicile_building = market_01
      • If

        • has_domicile_building = estate_main_03

        Then

        • add_domicile_building = market_02
    • 7%:
      • add_domicile_building = grazing_land_01
      • If

        • has_domicile_building = estate_main_03

        Then

        • add_domicile_building = grazing_land_02
    • 7%:
      • add_domicile_building = olive_01
      • If

        • has_domicile_building = estate_main_03

        Then

        • add_domicile_building = olive_02

• 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 (120 lines of game script)
add_random_external_estate_building = {
	if = {
		limit = {
			free_external_domicile_building_slots >= 1
		}
		random_list = {
			10 = {
				trigger = {
					NOR = {
						has_domicile_building_or_higher = temple_small_01
						owner = {
							government_has_flag = government_is_celestial
						}
					}
				}
				add_domicile_building = temple_small_01
				if = {
					limit = { has_domicile_building = estate_main_03 }
					add_domicile_building = temple_small_02
				}
			}
			10 = {
				trigger = {
					NOT = { has_domicile_building_or_higher = barracks_01 }
				}
				add_domicile_building = barracks_01
				if = {
					limit = { has_domicile_building = estate_main_03 }
					add_domicile_building = barracks_02
				}
			}
			10 = {
				trigger = {
					NOT = { has_domicile_building_or_higher = watchtower_01 }
				}
				add_domicile_building = watchtower_01
				if = {
					limit = { has_domicile_building = estate_main_03 }
					add_domicile_building = watchtower_02
				}
			}
			10 = {
				trigger = {
					NOR = {
						has_domicile_building_or_higher = vineyard_01
						owner.culture ?= {
							has_innovation = innovation_champa_rice
						}
					}
				}
				add_domicile_building = vineyard_01
				if = {
					limit = { has_domicile_building = estate_main_03 }
					add_domicile_building = vineyard_02
				}
			}
			10 = {
				trigger = {
					NOT = { has_domicile_building_or_higher = guardhouse_01 }
				}
				add_domicile_building = guardhouse_01
				if = {
					limit = { has_domicile_building = estate_main_03 }
					add_domicile_building = guardhouse_02
				}
			}
			10 = {
				trigger = {
					NOT = { has_domicile_building_or_higher = garden_01 }
				}
				add_domicile_building = garden_01
				if = {
					limit = { has_domicile_building = estate_main_03 }
					add_domicile_building = garden_02
				}
			}
			10 = {
				trigger = {
					NOT = { has_domicile_building_or_higher = storage_01 }
				}
				add_domicile_building = storage_01
				if = {
					limit = { has_domicile_building = estate_main_03 }
					add_domicile_building = storage_02
				}
			}
			10 = {
				trigger = {
					NOR = {
						has_domicile_building_or_higher = grain_field_01
						owner.culture ?= {
							has_innovation = innovation_champa_rice
						}
					}
				}
				add_domicile_building = grain_field_01
				if = {
					limit = { has_domicile_building = estate_main_03 }
					add_domicile_building = grain_field_02
				}
			}
			10 = {
				trigger = {
					NOT = {
						has_domicile_building_or_higher = rice_field_01
					}
					owner.culture ?= {
						has_innovation = innovation_champa_rice
					}
				}
				add_domicile_building = rice_field_01
				if = {
					limit = { has_domicile_building = estate_main_03 }
					add_domicile_building = rice_field_02
				}
			}
			10 = {
				trigger = {
					NOT = { has_domicile_building_or_higher = stable_01 }
				}

As written in game/common/scripted_effects/07_dlc_ep3_scripted_effects.txt.

The first 120 of its 174 lines; the rest is in game/common/scripted_effects/07_dlc_ep3_scripted_effects.txt from line 13311.

Where it is used

Every place in common/, events/ and history/ that calls add_random_external_estate_building.

Source: game/common/scripted_effects/07_dlc_ep3_scripted_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.

Spotted a mistake on this page?