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

ep3_dynasty_legacy_add_legitimacy_effect

ep3_dynasty_legacy_add_legitimacy_effect = yes

game/common/scripted_effects/07_dlc_ep3_scripted_effects.txt, line 4004 (88 lines). No parameters.

ep3_dynasty_legacy_add_legitimacy_effect is a scripted effect in Crusader Kings III, in the Roads to Power files, written at line 4004 of its file. It takes no parameters: ep3_dynasty_legacy_add_legitimacy_effect = yes. The game's script calls it in 2 places, among them Feast (activity) and Grand Wedding (activity). Patch 1.20.1.2, from game/common/scripted_effects/07_dlc_ep3_scripted_effects.txt.

What it does

  • scope:activity:
    • If

      • scope:host:
        • they has administrative government mechanic
        • One of these

          • Their dynasty: The Dynasty has the House and Home Legacy
          • or

            top_participant_group:dynastic_cycle:
            • participant_group_type = conservative_movement
      • activity_location = { … }

      Then

      • activity_location = { … }
      • scope:host:
        • If

          • primary_title.tier >= tier_empire

          Then

• 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 (88 lines of game script)
ep3_dynasty_legacy_add_legitimacy_effect = {
	scope:activity = {
		if = {
			limit = {
				scope:host = {
					government_has_mechanic = administrative
					OR = {
						dynasty = { has_dynasty_perk = ep3_administrative_legacy_3 }
						top_participant_group:dynastic_cycle ?= {
							participant_group_type = conservative_movement
						}
					}
				}
				# Does the activity location have a domicile owned by a house member
				# Does that domicile have the Reception Hall building
				activity_location = {
					any_province_domicile = {
						owner = { house ?= scope:host.house }
						OR = {
							has_domicile_building_or_higher = reception_hall_01
							has_domicile_building_or_higher = east_asian_estate_reception_hall_01
						}
					}
				}
			}
			activity_location = {
				random_province_domicile = {
					limit = {
						owner = { house ?= scope:host.house }
						OR = {
							has_domicile_building_or_higher = reception_hall_01
							has_domicile_building_or_higher = east_asian_estate_reception_hall_01
						}
					}
					owner = { save_scope_as = reception_hall_owner }
				}
			}
			scope:host = {
				house = {
					if = {
						limit = {
							NOT = {
								has_variable = ep3_legacy_legitimacy_counter
							}
						}
						# Set the initial value
						set_variable = {
							name = ep3_legacy_legitimacy_counter
							value = 10
						}
					}
					else = {
						change_variable = {
							name = ep3_legacy_legitimacy_counter
							add = 10
						}
					}
				}
				if = {
					limit = {
						primary_title.tier >= tier_empire
					}
					send_interface_toast = {
						type = event_toast_effect_good
						title = ep3_dynasty_legacy_gain_legitimacy_effect_title
						left_icon = scope:host
						right_icon = scope:host.primary_title
						add_legitimacy = 10
					}
				}
				else = {
					house = {
						every_house_member = {
							limit = { is_ai = no }
							send_interface_message = {
								type = event_generic_good_text
								title = ep3_dynasty_legacy_add_legitimacy_effect_title
								desc = ep3_dynasty_legacy_add_legitimacy_effect_desc
								left_icon = scope:host
								right_icon = house
							}
						}
					}
				}
			}
		}
	}
}

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

Where it is used

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

Activities (2)

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?