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

Scripted effect · Roads to Power files

ep3_switch_faction_war_sides_effect

ep3_switch_faction_war_sides_effect = yes

game/common/scripted_effects/07_dlc_ep3_scripted_effects.txt, line 12983 (62 lines). No parameters.

ep3_switch_faction_war_sides_effect is a scripted effect in Crusader Kings III, in the Roads to Power files, written at line 12983 of its file. It takes no parameters: ep3_switch_faction_war_sides_effect = yes. The game's script calls it in 2 places, among them Coax to Faction War Side (interaction) and ep3_interactions_events.0810 (event). Its body carries 1 text of the game's own for the player. Patch 1.20.1.2, from game/common/scripted_effects/07_dlc_ep3_scripted_effects.txt.

What it does

  • scope:actor:
    • If

      • scope:hook = yes
      • has_hook = scope:recipient

      Then

      • use_hook = scope:recipient
    • If

      • scope:gold = yes

      Then

      • pay_short_term_gold = { gold = scope:actor.medium_gold_value target = scope:recipient }
  • scope:recipient:
    • Influence +150
    • If

      a check the game hides

      Then

      • leave_faction = joined_faction
    • If

      • target_is_liege_or_above = scope:secondary_recipient

      Then

  • scope:actor › Every character war:
  • scope:recipient: May not swap sides in a Faction War for 10 years

• 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 (62 lines of game script)
ep3_switch_faction_war_sides_effect = {
	scope:actor = {
		if = {
			limit = {
				scope:hook = yes
				has_hook = scope:recipient
			}
			use_hook = scope:recipient
		}
		if = {
			limit = { scope:gold = yes }
			pay_short_term_gold = {
				gold = scope:actor.medium_gold_value
				target = scope:recipient
			}
		}
	}
	scope:recipient = {
		change_influence = 150
		# Remove from existing faction if swapping
		if = {
			limit = { exists = joined_faction }
			leave_faction = joined_faction
		}
		if = {
			limit = { target_is_liege_or_above = scope:secondary_recipient }
			add_faction_cooldown_effect = { YEARS = 5 }
		}
	}
	scope:actor = {
		every_character_war = {
			limit = { ep3_switch_faction_war_sides_war_trigger = yes }
			hidden_effect = { remove_participant = scope:recipient }
			if = {
				limit = { is_defender = scope:actor }
				add_defender = scope:recipient
				hidden_effect = {
					primary_attacker = {
						add_opinion = {
							target = scope:recipient
							modifier = betrayed_me_opinion
							opinion = -25
						}
					}
				}
			}
			else = {
				add_attacker = scope:recipient
				primary_defender = {
					hidden_effect = {
						add_opinion = {
							target = scope:recipient
							modifier = betrayed_me_opinion
							opinion = -25
						}
					}
				}
			}
		}
	}
	scope:recipient = { custom_tooltip = ep3_switch_faction_war_sides_cooldown_effect_tt }
}

As written in game/common/scripted_effects/07_dlc_ep3_scripted_effects.txt.

Where it is used

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

Character interactions (1)

Source: game/common/scripted_effects/07_dlc_ep3_scripted_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?