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

Scripted effect

set_relation_nemesis_effect

set_relation_nemesis_effect = { REASON = … TARGET = … }

game/common/scripted_effects/00_relation_effects.txt, line 1457 (90 lines). Parameters: $REASON$, $TARGET$.

set_relation_nemesis_effect is a scripted effect in Crusader Kings III, written at line 1457 of its file. A call passes 2 parameters: REASON and TARGET. The game's script calls it in 55 places, among them Make Nemesis (interaction), … Betrayal (event mpo_temujin_flavor.0020) and A …'s Heart (event ep2_wedding.1200). Patch 1.21.0, from game/common/scripted_effects/00_relation_effects.txt.

The comment above it in the file

Save these scopes separately before running the effect if you need them for the nemesis reason:
scope:relationship_reason_involved_character
scope:relationship_reason_province

What it does

  • If

    Then

    • If

      • has_relation_rival = scope:target_char

      Then

      • If a check the game hides passes: the same again (1 line)
        Else if a check the game hides passes: the same again (1 line)
        Else if a check the game hides passes: the same again (1 line)

        Otherwise

      Otherwise

      • If a check the game hides passes: the same again (1 line)
        Else if a check the game hides passes: the same again (1 line)
        Else if a check the game hides passes: the same again (1 line)

        Otherwise

    • gg_relation_catalyst_effect = { ACTOR = scope:srne_root_scope RECIPIENT = scope:target_char CATALYST = catalyst_nemesis_hre_pope }

• 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 (90 lines of game script)
set_relation_nemesis_effect = {
	save_scope_as = srne_root_scope
	$TARGET$ = { save_scope_as = target_char }
	if = {
		limit = {
			can_set_relation_nemesis_trigger = { CHARACTER = scope:target_char }
		}
		if = {
			limit = { has_relation_rival = scope:target_char }
			if = {
				limit = {
					exists = scope:relationship_reason_involved_character
					exists = scope:relationship_reason_province
				}
				set_relation_nemesis = {
					reason = $REASON$
					copy_reason = rival
					target = scope:target_char
					involved_character = scope:relationship_reason_involved_character
					province = scope:relationship_reason_province
				}
			}
			else_if = {
				limit = { exists = scope:relationship_reason_province }
				set_relation_nemesis = {
					reason = $REASON$
					copy_reason = rival
					target = scope:target_char
					province = scope:relationship_reason_province
				}
			}
			else_if = {
				limit = { exists = scope:relationship_reason_involved_character }
				set_relation_nemesis = {
					reason = $REASON$
					copy_reason = rival
					target = scope:target_char
					involved_character = scope:relationship_reason_involved_character
				}
			}
			else = {
				set_relation_nemesis = {
					reason = $REASON$
					copy_reason = rival
					target = scope:target_char
				}
			}
		}
		else = {
			if = {
				limit = {
					exists = scope:relationship_reason_involved_character
					exists = scope:relationship_reason_province
				}
				set_relation_nemesis = {
					reason = $REASON$
					target = scope:target_char
					involved_character = scope:relationship_reason_involved_character
					province = scope:relationship_reason_province
				}
			}
			else_if = {
				limit = { exists = scope:relationship_reason_province }
				set_relation_nemesis = {
					reason = $REASON$
					target = scope:target_char
					province = scope:relationship_reason_province
				}
			}
			else_if = {
				limit = { exists = scope:relationship_reason_involved_character }
				set_relation_nemesis = {
					reason = $REASON$
					target = scope:target_char
					involved_character = scope:relationship_reason_involved_character
				}
			}
			else = {
				set_relation_nemesis = {
					reason = $REASON$
					target = scope:target_char
				}
			}
		}
		#Is the GG situation applicable?
		show_as_tooltip = {
			gg_relation_catalyst_effect = { ACTOR = scope:srne_root_scope RECIPIENT = scope:target_char CATALYST = catalyst_nemesis_hre_pope }
		}
	}
}

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

Where it is used

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

Character interactions (2)

  • Make Nemesis
  • Set Relationship

Events (39)

33 more

Scripted effects inside an event file (8)

  • ep3_interactions_events_0601_insult
  • parental_neglect_effect
  • relation_upgrade_0001_rival_effect
  • result_discovered_disbelieve_mandala_effect
  • set_new_rival_effect
  • tax_rivalry_4010_deepen_rivalry_effect
2 more
  • vizierate_0001_assign_best_relation_effect
  • vizierate_1001_disfavoured_party_opinions_effect

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