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

Scripted effect

progress_towards_rival_effect

progress_towards_rival_effect = { CHARACTER = … OPINION = … REASON = … }

game/common/scripted_effects/00_relation_effects.txt, line 207 (225 lines). Parameters: $CHARACTER$, $OPINION$, $REASON$.

progress_towards_rival_effect is a scripted effect in Crusader Kings III, written at line 207 of its file. A call passes 3 parameters: CHARACTER, OPINION and REASON. The game's script calls it in 462 places, among them Restore Temporal Rule (decision), Seize Mandala Temple Complex (decision) and Claim House Bloc Leadership (interaction). Patch 1.20.1.2, from game/common/scripted_effects/00_relation_effects.txt.

The comment above it in the file

Sets potential rival + opinion or upgrades potential rival to full rival

What it does

  • If

    • scope:target_char: Highest held Title is more than Barony Rank
    • One of these

      • Highest held Title is at most Barony Rank
      • or

        highest_held_title_tier <= { value = scope:target_char.highest_held_title_tier subtract = 3 }
    • None of these

      • is_close_or_extended_family_of = scope:target_char
      • is_consort_of = scope:target_char
      • Any heir title:
        • tier >= { value = scope:target_char.highest_held_title_tier subtract = 2 }

    Then

    • If

      • NOT = { has_relation_grudge = 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

      • Opinion: Grudge Exacerbated (-20)

    Else if

    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

      Then

      • set_relation_potential_rival = scope:target_char
    • If

      • NOT = { scope:rival_opinion = 0 }

      Then

      • If

        • scope:target_char: Is played by the AI

        Then

        • reverse_add_opinion = { target = scope:target_char modifier = hate_opinion opinion = scope:rival_opinion }
      • Opinion: Hatred

• 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 (120 lines of game script)
progress_towards_rival_effect = {
	$CHARACTER$ = { save_scope_as = target_char }
	# Do we merit an actual rivalry?
	if = {
		limit = {
			# We don't care between low-tier chars.
			scope:target_char = { highest_held_title_tier > tier_barony }
			# Are they low-tier themselves or more than two tiers below the target?
			OR = {
				highest_held_title_tier <= tier_barony
				highest_held_title_tier <= {
					value = scope:target_char.highest_held_title_tier
					subtract = 3
				}
			}
			# If they are then they must...
			NOR = {
				# ... be related to the target...
				is_close_or_extended_family_of = scope:target_char
				is_consort_of = scope:target_char
				# ... or be heir to someone within social spitting distance of the target.
				any_heir_title = {
					tier >= {
						value = scope:target_char.highest_held_title_tier
						# So if they're feuding with an emperor, then they must be heir to at least a duchy.
						subtract = 2
					}
				}
			}
		}
		# Now, set grudge if we could already set it.
		if = {
			limit = {
				NOT = { has_relation_grudge = scope:target_char }
			}
			if = {
				limit = {
					exists = scope:relationship_reason_involved_character
					exists = scope:relationship_reason_province
				}
				set_relation_grudge = {
					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_grudge = {
					reason = $REASON$
					target = scope:target_char
					province = scope:relationship_reason_province
				}
			}
			else_if = {
				limit = {
					exists = scope:relationship_reason_involved_character
				}
				set_relation_grudge = {
					reason = $REASON$
					target = scope:target_char
					involved_character = scope:relationship_reason_involved_character
				}
			}
			else = {
				set_relation_grudge = {
					reason = $REASON$
					target = scope:target_char
				}
			}
		}
		# Otherwise, increment raw opinion.
		else = {
			add_opinion = {
				target = scope:target_char
				modifier = grudge_opinion
				opinion = -20
			}
		}
	}
	#If potential rival, set rival!
	else_if = {
		limit = {
			has_relation_potential_rival = scope:target_char
			can_set_relation_rival_trigger = { CHARACTER = scope:target_char }
		}
		if = {
			limit = {
				exists = scope:relationship_reason_involved_character
				exists = scope:relationship_reason_province
			}
			set_relation_rival = { 
				reason = $REASON$ 
				target = scope:target_char 
				involved_character = scope:relationship_reason_involved_character 
				province = scope:relationship_reason_province 
			}
			if = {
				limit = {
					this.involved_activity ?= {
						has_activity_type = activity_playdate
					}
				}
				this.involved_activity ?= {
					add_activity_log_entry = {
						key = activity_generic_rival_log
						tags = { bad }
						score = 10
						character = prev
						target = scope:target_char
					}
				}
			}
		}
		else_if = {
			limit = {
				exists = scope:relationship_reason_province

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

The first 120 of its 225 lines; the rest is in game/common/scripted_effects/00_relation_effects.txt from line 207.

Where it is used

Every place in common/, events/ and history/ that calls progress_towards_rival_effect — the first 120 of 462.

Activity pulse actions (3)

  • apa_debate_entrant_disagreement
  • apa_entrant_disagreement
  • apa_student_disagreement

Casus belli (1)

Court position tasks (1)

  • Encourage Competition

Task contracts (1)

  • Treasure Map

Events (100)

94 more

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