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

Scripted effect

petition_liege_0101_council_seat_effect

petition_liege_0101_council_seat_effect = { JOB_TAKER = … VAR = … }

game/common/scripted_effects/00_petition_liege_effects.txt, line 184 (94 lines). Parameters: $JOB_TAKER$, $VAR$.

petition_liege_0101_council_seat_effect is a scripted effect in Crusader Kings III, written at line 184 of its file. A call passes 2 parameters: JOB_TAKER and VAR. The game's script calls it in 2 places, among them Petition: Gold (event petition_liege.0101) and petition_type_outcome_effect (scripted effect). Its body carries 4 texts of the game's own for the player. Patch 1.20.1.2, from game/common/scripted_effects/00_petition_liege_effects.txt.

The comment above it in the file

Give most fitting council seat

What it does

  • If

    Then

    • scope:petition_liege:
      • fire_councillor = scope:second_party
    • scope:second_party:
  • scope:petition_liege:
    • If

      • scope:petition_vassal != $JOB_TAKER$

      Then

      • add_courtier = $JOB_TAKER$
    • Depending on $JOB TAKER$.var:$VAR$:
      • When $JOB TAKER$.var:$VAR$ is Chancellor:
        • assign_councillor_type = { type = councillor_chancellor target = $JOB_TAKER$ }
      • When $JOB TAKER$.var:$VAR$ is Marshal:
        • assign_councillor_type = { type = councillor_marshal target = $JOB_TAKER$ }
      • When $JOB TAKER$.var:$VAR$ is Steward:
        • assign_councillor_type = { type = councillor_steward target = $JOB_TAKER$ }
      • When $JOB TAKER$.var:$VAR$ is Spymaster:
        • assign_councillor_type = { type = councillor_spymaster target = $JOB_TAKER$ }
      • When $JOB TAKER$.var:$VAR$ is court chaplain:
        • assign_councillor_type = { type = councillor_court_chaplain target = $JOB_TAKER$ }
  • petition_liege_block_firing_councillor_effect = { COURT_OWNER = scope:petition_liege JOB_TAKER = $JOB_TAKER$ }

• 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 (94 lines of game script)
petition_liege_0101_council_seat_effect = {
	if = {
		limit = {
			exists = scope:second_party
			scope:second_party = { is_councillor = yes }
		}
		scope:petition_liege = { fire_councillor = scope:second_party }
		scope:second_party = {
			progress_towards_rival_effect = {
				CHARACTER = scope:petition_vassal
				REASON = rival_council_seat
				OPINION = 0
			}
			add_opinion = {
				target = scope:petition_vassal
				modifier = annoyed_opinion
				opinion = -10
			}
			add_opinion = {
				target = scope:petition_liege
				modifier = annoyed_opinion
				opinion = -10
			}
		}
	}
	scope:petition_liege = {
		if = {
			limit = { scope:petition_vassal != $JOB_TAKER$ }
			add_courtier = $JOB_TAKER$
		}
		switch = {
			trigger = $JOB_TAKER$.var:$VAR$
			flag:chancellor = {
				assign_councillor_type = { type = councillor_chancellor target = $JOB_TAKER$ }
			}
			flag:marshal = {
				assign_councillor_type = { type = councillor_marshal target = $JOB_TAKER$ }
			}
			flag:steward = {
				assign_councillor_type = { type = councillor_steward target = $JOB_TAKER$ }
			}
			flag:spymaster = {
				assign_councillor_type = { type = councillor_spymaster target = $JOB_TAKER$ }
			}
			flag:court_chaplain = {
				assign_councillor_type = { type = councillor_court_chaplain target = $JOB_TAKER$ }
			}
		}
	}
	petition_liege_block_firing_councillor_effect = {
		COURT_OWNER = scope:petition_liege
		JOB_TAKER = $JOB_TAKER$
	}
	scope:petition_vassal = {
		hidden_effect = {
			send_interface_toast = {
				title = petition_liege.0101.t.council_seat
				left_icon = scope:petition_liege
				right_icon = $JOB_TAKER$
				$JOB_TAKER$ = {
					custom_description = { text = petition_liege_block_firing_councillor_effect_tt }
					custom_tooltip = council_appointment_toast_desc_vassal
				}
				show_as_tooltip = {
					reverse_add_opinion = {
						target = scope:second_party
						modifier = annoyed_opinion
						opinion = -10
					}
				}
			}
		}
	}
	scope:petition_liege = {
		hidden_effect = {
			send_interface_toast = {
				title = petition_liege.0101.t.council_seat
				left_icon = $JOB_TAKER$
				right_icon = scope:second_party
				$JOB_TAKER$ = {
					custom_description = { text = petition_liege_block_firing_councillor_effect_tt }
					custom_tooltip = council_appointment_toast_desc_liege
				}
				show_as_tooltip = {
					reverse_add_opinion = {
						target = scope:second_party
						modifier = annoyed_opinion
						opinion = -10
					}
				}
			}
		}
	}
}

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

Where it is used

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

Events (1)

Scripted effects (1)

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