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

Scripted effect · The Royal Court files

replace_existing_position_with_character_in_current_scope_court_effect

replace_existing_position_with_character_in_current_scope_court_effect = { CHARACTER = … POSITION = … }

game/common/scripted_effects/00_ep1_hold_court_effects.txt, line 1524 (34 lines). Parameters: $CHARACTER$, $POSITION$.

replace_existing_position_with_character_in_current_scope_court_effect is a scripted effect in Crusader Kings III, in the The Royal Court files, written at line 1524 of its file. A call passes 2 parameters: CHARACTER and POSITION. No file of common/, events/ or history/ calls it. Patch 1.20.1.2, from game/common/scripted_effects/00_ep1_hold_court_effects.txt.

What it does

  • If

    Then

    • If

      • Any courtier:
        • has_court_position = $POSITION$

      Then

      • Random Courtier:
        • Where:
          • has_court_position = $POSITION$
        • replace_court_position = { recipient = $CHARACTER$ holder = PREV court_position = $POSITION$ }

      Otherwise

      • appoint_court_position = { recipient = $CHARACTER$ court_position = $POSITION$ }

• 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 (34 lines of game script)
replace_existing_position_with_character_in_current_scope_court_effect = {
	if = {
		limit = {
			can_appoint_char_to_court_position = {
				CHAR = $CHARACTER$
				COURT_POS = $POSITION$
			}
		}

		if = {
			limit = {
				any_courtier = {
					has_court_position = $POSITION$
				}
			}
			random_courtier = {
				limit = {
					has_court_position = $POSITION$
				}
				replace_court_position = {
					recipient = $CHARACTER$
					holder = PREV
					court_position = $POSITION$
				}
			}
		}
		else = {
			appoint_court_position = {
				recipient = $CHARACTER$
				court_position = $POSITION$
			}
		}
	}
}

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

Where it is used

No file of common/, events/ or history/ calls it.

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