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

gg_become_new_leader_effect

gg_become_new_leader_effect = { VIA_SCHEME = … }

game/common/scripted_effects/00_gdp_guelph_ghibelline_scripted_effects.txt, line 252 (120 lines). Parameters: $VIA_SCHEME$.

gg_become_new_leader_effect is a scripted effect in Crusader Kings III, in the Silk and Silver files, written at line 252 of its file. A call passes 1 parameter: VIA_SCHEME. The game's script calls it in 2 places, among them Seize Ghibelline Leadership (decision) and …: Success (event scheme_critical_moments.1272). Its body carries 4 texts of the game's own for the player. Patch 1.21.0, from game/common/scripted_effects/00_gdp_guelph_ghibelline_scripted_effects.txt.

What it does

• 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)
gg_become_new_leader_effect = {
	save_scope_as = root_scope
	save_scope_value_as = {
		name = gg_leadership_change_source
		value = $VIA_SCHEME$
	}
	if = {
		limit = { is_guelph_trigger = yes  }
		situation:guelph_ghibelline ?= {
			every_situation_participant = {
				limit = { is_guelph_leader_trigger = yes  }
				gg_gather_claim_leadership_schemes_effect = yes
				if = {
					limit = {
						NOR = {
							has_relation_friend = scope:root_scope
							opinion = {
								target = scope:root_scope
								value >= 80
							}
						}
					}
					progress_towards_rival_effect = {
						REASON = rival_overthrown_guelph_leader
						CHARACTER = scope:root_scope
						OPINION = 0
					}
					add_opinion = {
						target = scope:root_scope
						modifier = seized_guelph_leadership_opinion
						opinion = -40
					}
				}
				remove_variable = guelph_leader
				save_scope_as = affected_character #For the tooltip
				create_character_memory = {
					type = lost_guelph_leadership_memory
					participants = { usurper = scope:root_scope }
				}
				if = {
					limit = { scope:gg_leadership_change_source = flag:scheme }
					scope:new_memory = { set_variable = via_scheme }
				}
				custom_tooltip = {
					text = change_to_guelph_tt
					recalculate_participant_group = situation:guelph_ghibelline
				}
				set_variable = {
					name = recently_overthrown_gg_leader
					years = 5
				}
			}
		}
		custom_tooltip = {
			text = become_new_guelph_leader_tt
			set_variable = guelph_leader
			recalculate_participant_group = situation:guelph_ghibelline
		}
		create_character_memory = { type = became_guelph_leader_memory }
	}
	else = {
		situation:guelph_ghibelline ?= {
			every_situation_participant = {
				limit = { is_ghibelline_leader_trigger = yes }
				gg_gather_claim_leadership_schemes_effect = yes
				if = {
					limit = {
						NOR = {
							has_relation_friend = scope:root_scope
							opinion = {
								target = scope:root_scope
								value >= 80
							}
						}
					}
					progress_towards_rival_effect = {
						REASON = rival_overthrown_ghibelline_leader
						CHARACTER = scope:root_scope
						OPINION = 0
					}
					add_opinion = {
						target = scope:root_scope
						modifier = seized_ghibelline_leadership_opinion
						opinion = -40
					}
				}
				remove_variable = ghibelline_leader
				save_scope_as = affected_character #For the tooltip
				create_character_memory = {
					type = lost_ghibelline_leadership_memory
					participants = { usurper = scope:root_scope }
				}
				if = {
					limit = { scope:gg_leadership_change_source = flag:scheme }
					scope:new_memory = { set_variable = via_scheme }
				}
				custom_tooltip = {
					text = change_to_ghibelline_tt
					recalculate_participant_group = situation:guelph_ghibelline
				}
				set_variable = {
					name = recently_overthrown_gg_leader
					years = 5
				}
			}
		}
		custom_tooltip = {
			text = become_new_ghibelline_leader_tt
			set_variable = ghibelline_leader
			recalculate_participant_group = situation:guelph_ghibelline
		}
		create_character_memory = { type = became_ghibelline_leader_memory }
	}
	hidden_effect = {
		every_in_list = {
			list = gg_claim_leadership_schemes_to_invalidate
			invalidate_scheme = yes
		}
	}
}

As written in game/common/scripted_effects/00_gdp_guelph_ghibelline_scripted_effects.txt.

Where it is used

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

Events (1)

Source: game/common/scripted_effects/00_gdp_guelph_ghibelline_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?