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

Scripted effect · Silk and Silver files

setup_burgher_leader_effect

setup_burgher_leader_effect = yes

game/common/scripted_effects/gdp_burgher_scripted_effects.txt, line 119 (87 lines). No parameters.

setup_burgher_leader_effect is a scripted effect in Crusader Kings III, in the Silk and Silver files, written at line 119 of its file. It takes no parameters: setup_burgher_leader_effect = yes. The game's script calls it in 3 places, among them gdp_burgher.0010 (event), burgher_autonomy_demand_self_rule (on action) and burgher_refusal_revolt_effect (scripted effect). Patch 1.21.0, from game/common/scripted_effects/gdp_burgher_scripted_effects.txt.

What it does

  • burgher_resolve_county_effect = { FACTION = this }
  • If

    a check the game hides

    Then

    • burgher_find_or_create_local_burgher_effect = { COUNTY = scope:burgher_county SAVE_AS = burgher_spokesman FLAG = burgher_spawned_leader }
    • If

      a check the game hides

      Then

      • create_dynamic_title = { tier = duchy name = FACTION_BURGHER_TITLE_NAME }
      • scope:new_title:
        • set_capital_county = scope:burgher_county
        • set_landless_title = yes
        • set_destroy_on_succession = yes
        • set_delete_on_destroy = yes
        • set_no_automatic_claims = yes
        • set_definitive_form = yes
        • set_can_be_named_after_dynasty = no
        • set_can_use_nomadic_naming = no
        • Gains the … Title (burgher spokesman)
      • scope:new_title:
        • generate_coa = factions
  • If

    a check the game hides

    Then

    • scope:burgher_spokesman:
      • If

        • One of these

          • NOT = { exists = joined_faction }
          • or

            joined_faction != scope:faction

        Then

        • join_faction_skip_check = scope:faction
    • set_special_character = scope:burgher_spokesman

• 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 (87 lines of game script)
setup_burgher_leader_effect = {
	save_scope_as = faction

	burgher_resolve_county_effect = { FACTION = this }

	if = {
		limit = { exists = special_character }
		special_character = { save_scope_as = burgher_spokesman }
	}

	if = {
		limit = {
			NOT = { exists = scope:burgher_spokesman }
			exists = scope:burgher_county
		}

		burgher_find_or_create_local_burgher_effect = {
			COUNTY = scope:burgher_county
			SAVE_AS = burgher_spokesman
			FLAG = burgher_spawned_leader
		}

		if = {
			limit = { exists = scope:burgher_spokesman }
			create_dynamic_title = {
				tier = duchy
				name = FACTION_BURGHER_TITLE_NAME
			}
			create_title_and_vassal_change = {
				type = created
				save_scope_as = burgher_title_change
				add_claim_on_loss = no
			}
			scope:new_title = {
				set_capital_county = scope:burgher_county
				set_landless_title = yes
				set_destroy_on_succession = yes
				set_delete_on_destroy = yes
				set_no_automatic_claims = yes
				set_definitive_form = yes
				set_can_be_named_after_dynasty = no
				set_can_use_nomadic_naming = no
				change_title_holder = {
					holder = scope:burgher_spokesman
					change = scope:burgher_title_change
				}
				set_variable = {
					name = faction
					value = scope:faction
				}
			}
			resolve_title_and_vassal_change = scope:burgher_title_change
			scope:new_title = { generate_coa = factions }

			scope:burgher_spokesman = {
				set_variable = {
					name = burgher_title
					value = scope:new_title
				}
			}
		}
	}

	if = {
		limit = { exists = scope:burgher_spokesman }

		scope:burgher_spokesman = {
			if = {
				limit = {
					OR = {
						NOT = { exists = joined_faction }
						joined_faction != scope:faction
					}
				}
				join_faction_skip_check = scope:faction
			}
			set_variable = {
				name = burgher_leader_of
				value = scope:faction
			}
		}

		set_special_character = scope:burgher_spokesman

		scope:burgher_spokesman = { save_scope_as = burgher_leader }
	}
}

As written in game/common/scripted_effects/gdp_burgher_scripted_effects.txt.

Where it is used

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

On actions (the game's own hooks) (1)

  • burgher_autonomy_demand_self_rule

Scripted effects (1)

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

Spotted a mistake on this page, or have an idea for the site?