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

Scripted trigger

get_potential_enemies_effect

get_potential_enemies_effect = { CHARACTER = … LISTNAME = … }

game/common/scripted_triggers/00_relation_triggers.txt, line 1033 (102 lines). Parameters: $CHARACTER$, $LISTNAME$.

get_potential_enemies_effect is a scripted trigger in Crusader Kings III, written at line 1033 of its file. A call passes 2 parameters: CHARACTER and LISTNAME. No file of common/, events/ or history/ calls it. Patch 1.20.1.2, from game/common/scripted_triggers/00_relation_triggers.txt.

The comment above it in the file

Makes a list of characters who are classified as potential enemies
Parameters
CHARACTER - The character whose enemies are being found
LISTNAME - The name of the list

What it checks

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

The script as written (102 lines of game script)
get_potential_enemies_effect = {
	$CHARACTER$ = {
		trigger_if = {
			limit = {
				any_vassal = {
					always = yes
				}
			}
			any_vassal = {
				count = all
				add_to_temporary_list = temp_$LISTNAME$
			}
		}
		trigger_if = {
			limit = {
				any_relation = {
					type = rival
					always = yes
				}
			}
			any_relation = {
				type = rival
				count = all
				add_to_temporary_list = temp_$LISTNAME$
			}
		}
		trigger_if = {
			limit = {
				top_liege != this
			}
			liege = {
				add_to_temporary_list = temp_$LISTNAME$
			}
		}
		trigger_if = {
			limit = {
				top_liege = this
				any_neighboring_top_liege_realm_owner = {
					always = yes
				}
			}
			any_neighboring_top_liege_realm_owner = {
				count = all
				add_to_temporary_list = temp_$LISTNAME$
			}
		}
		#Potential Heirs that do not like you
		#A Religious Head that dislikes you and you are powerful enough

		any_in_list = {
			count = all
			trigger_if = {
				limit = {
					NOT = { is_in_list = $LISTNAME$ }
					OR = {
						#Vassal enemies
						AND = {
							is_vassal_of = $CHARACTER$
							is_powerful = yes
							opinion = {
								target = $CHARACTER$
								value <= 0
							}
						}
						#Rivals
						has_relation_rival = $CHARACTER$
						#Lieges
						AND = {
							$CHARACTER$ = { top_liege != this }
							this = $CHARACTER$.liege
							opinion = {
								target = $CHARACTER$
								value <= 0
							}
						}
						#Neighboring independent rulers
						AND = {
							any_neighboring_top_liege_realm_owner = {
								this = $CHARACTER$
							}
							NOT = { is_allied_to = $CHARACTER$ }
							OR = {
								opinion = {
									target = $CHARACTER$
									value <= 20
								}
								AND = {
									opinion = {
										target = $CHARACTER$
										value <= 50
									}
									has_any_cb_on = $CHARACTER$
								}
							}
						}
					}
				}
				add_to_temporary_list = $LISTNAME$
			}
		}
	}
}

As written in game/common/scripted_triggers/00_relation_triggers.txt.

Where it is used

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

Source: game/common/scripted_triggers/00_relation_triggers.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?