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

Scripted effect

set_random_rivalry_reason

set_random_rivalry_reason = { RELATION = … TARGET = … }

game/common/scripted_effects/00_relation_effects.txt, line 1046 (96 lines). Parameters: $RELATION$, $TARGET$.

set_random_rivalry_reason is a scripted effect in Crusader Kings III, written at line 1046 of its file. A call passes 2 parameters: RELATION and TARGET. The game's script calls it in 4 places, among them Camp Gossip: Hidden Feud (event ep3_laamp_flavour_ewan.2016), courtier_guest_management.3001 (event) and ep3_laamp_decision_event.1300 (event). Patch 1.20.1.2, from game/common/scripted_effects/00_relation_effects.txt.

What it does

Every line of it is script with no tooltip text: the script is below.

The script as written (96 lines of game script)
set_random_rivalry_reason = { # Use for adults, primarily
	show_as_tooltip = {
		set_relation_$RELATION$ = $TARGET$
	}
	if = {
		limit = {
			NOT = {
				has_relation_$RELATION$ = $TARGET$
			}
		}
		hidden_effect = {
			random_list = {
				10 = {
					trigger = {
						exists = location
						NOT = { exists = liege }
					}
					set_relation_$RELATION$ = { reason = rival_random_1 target = $TARGET$ province = location }
				}
				10 = {
					trigger = {
						exists = location
						NOT = { exists = liege }
					}
					set_relation_$RELATION$ = { reason = rival_random_2 target = $TARGET$ province = location }
				}
				10 = {
					trigger = {
						exists = location
						NOT = { exists = liege }
					}
					set_relation_$RELATION$ = { reason = rival_random_3 target = $TARGET$ province = location }
				}
				10 = {
					trigger = {
						exists = location
						NOT = { exists = liege }
					}
					set_relation_$RELATION$ = { reason = rival_random_4 target = $TARGET$ province = location }
				}
				10 = {
					trigger = {
						exists = location
						NOT = { exists = liege }
					}
					set_relation_$RELATION$ = { reason = rival_random_5 target = $TARGET$ province = location }
				}
				10 = {
					trigger = {
						exists = liege
					}
					set_relation_$RELATION$ = { reason = rival_random_6 target = $TARGET$ involved_character = liege }
				}
				10 = {
					trigger = {
						exists = liege
					}
					set_relation_$RELATION$ = { reason = rival_random_7 target = $TARGET$ involved_character = liege }
				}
				10 = {
					trigger = {
						exists = liege
					}
					set_relation_$RELATION$ = { reason = rival_random_8 target = $TARGET$ involved_character = liege }
				}
				10 = {
					trigger = {
						exists = liege.capital_province
					}
					set_relation_$RELATION$ = { reason = rival_random_9 target = $TARGET$ involved_character = liege province = liege.capital_province }
				}
				10 = {
					trigger = {
						exists = liege.capital_province
					}
					set_relation_$RELATION$ = { reason = rival_random_10 target = $TARGET$ involved_character = liege province = liege.capital_province }
				}
				10 = {
					trigger = {
						exists = liege
					}
					set_relation_$RELATION$ = { reason = rivalry_at_court target = $TARGET$ involved_character = liege }
				}
				10 = {
					trigger = {
						NOR ={
							exists = location
							exists = liege
						}
					}
					set_relation_$RELATION$ = { reason = rival_random_fallback target = $TARGET$ }
				}
			}
		}
	}
}

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_random_rivalry_reason.

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?