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_change_side_to_ghibelline_effect

gg_change_side_to_ghibelline_effect = { REASON = … }

game/common/scripted_effects/00_gdp_guelph_ghibelline_scripted_effects.txt, line 477 (106 lines). Parameters: $REASON$.

gg_change_side_to_ghibelline_effect is a scripted effect in Crusader Kings III, in the Silk and Silver files, written at line 477 of its file. A call passes 1 parameter: REASON. The game's script calls it in 7 places, among them Determine Alignment (decision), Join the Guelphs (decision) and Recruit Partisan (interaction). Its body carries 1 text 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 (106 lines of game script)
gg_change_side_to_ghibelline_effect = {
	save_scope_as = affected_character

	if = {
		limit = { $REASON$ = flag:schemed }
		if = {
			limit = { is_guelph_trigger = yes }
			gg_untargeted_catalyst_effect = { CATALYST = catalyst_gg_partisan_poached }
		}
		else_if = {
			limit = { is_gg_undecided_trigger = yes }
			gg_untargeted_catalyst_effect = { CATALYST = catalyst_gg_undecided_aligned }
		}
	}

	remove_variable = guelph_member_override
	remove_variable = undecided_override #Remember to account for force_undecided
	set_variable = ghibelline_member_override
	
	custom_tooltip = {
		text = change_to_ghibelline_tt
		recalculate_participant_group = situation:guelph_ghibelline
	}

	if = {
		limit = { $REASON$ = flag:decision }
		set_variable = {
			name = changed_to_ghibelline
			years = 40
		}
		situation:guelph_ghibelline ?= {
			every_situation_participant = {
				custom = custom.every_guelph_member
				limit = { 
					is_guelph_trigger = yes
					NOT = { this = scope:affected_character }
				}
				add_opinion = {
					target = scope:affected_character
					modifier = joined_ghibellines_opinion
					opinion = -40
				}
			}
			every_situation_participant = {
				custom = custom.every_ghibelline_member
				limit = { 
					is_ghibelline_trigger = yes
					NOT = { this = scope:affected_character }
				}
				add_opinion = {
					target = scope:affected_character
					modifier = joined_ghibellines_opinion
					opinion = 20
				}
			}
			#To make the tooltip more sensible
			every_situation_participant = {
				limit = { 
					is_guelph_trigger = yes
					NOT = { this = scope:affected_character }
				}
				if = {
					limit = { has_relation_potential_rival = scope:affected_character }
					progress_towards_rival_effect = {
						REASON = rival_swapped_to_ghibellines
						CHARACTER = scope:affected_character
						OPINION = 0
					}
				}
			}
		}
	}
	if = {
		limit = { $REASON$ = flag:schemed }
		set_variable = {
			name = schemed_to_ghibelline
			years = 15
		}
		situation:guelph_ghibelline ?= {
			every_situation_participant = {
				custom = custom.every_guelph_member
				limit = { 
					is_guelph_trigger = yes
					NOT = { this = scope:affected_character }
				}
				add_opinion = {
					target = scope:affected_character
					modifier = joined_ghibellines_opinion
					opinion = -20
				}
			}
			every_situation_participant = {
				custom = custom.every_ghibelline_member
				limit = { 
					is_ghibelline_trigger = yes
					NOT = { this = scope:affected_character }
				}
				add_opinion = {
					target = scope:affected_character
					modifier = joined_ghibellines_opinion
					opinion = 10
				}
			}
		}
	}
}

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_change_side_to_ghibelline_effect.

Character interactions (2)

Events (3)

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?