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

Scripted effect

add_clan_unity_interaction_effect

add_clan_unity_interaction_effect = { CHARACTER = … DESC = … REVERSE_NON_HOUSE_TARGET = … TARGET = … VALUE = … }

game/common/scripted_effects/00_interaction_effects.txt, line 5157 (51 lines). Parameters: $CHARACTER$, $DESC$, $REVERSE_NON_HOUSE_TARGET$, $TARGET$, $VALUE$.

add_clan_unity_interaction_effect is a scripted effect in Crusader Kings III, written at line 5157 of its file. A call passes 5 parameters: CHARACTER, DESC, REVERSE_NON_HOUSE_TARGET, TARGET and VALUE. The game's script calls it in 165 places, among them Abandon Hook (interaction), Accuse of Decadence (interaction) and Accuse of Violating Sumptuary Law (interaction). Patch 1.20.1.2, from game/common/scripted_effects/00_interaction_effects.txt.

What it does

  • If

    • $CHARACTER$ = { government_has_flag = government_is_clan }
    • $TARGET$ = { government_has_flag = government_is_clan }
    • $CHARACTER$.house = $TARGET$.house
    • If

      • scope:actor != scope:recipient

      Then

      • NOT = { $CHARACTER$ = $TARGET$ }

    Then

    Else if

    • $REVERSE_NON_HOUSE_TARGET$ = yes
    • $CHARACTER$ = { government_has_flag = government_is_clan }
    • $CHARACTER$.house ?= { house_head = $CHARACTER$ }
    • One of these

      • All of these

        • exists = $TARGET$.house
        • NOT = { $CHARACTER$.house = $TARGET$.house }
      • or

        $TARGET$ = { is_lowborn = yes }

    Then

• 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 (51 lines of game script)
add_clan_unity_interaction_effect = {
	if = {
		limit = { # Check if unity is relevant
			$CHARACTER$ = { government_has_flag = government_is_clan }
			$TARGET$ = { government_has_flag = government_is_clan }
			exists = $CHARACTER$.house
			exists = $TARGET$.house
			$CHARACTER$.house = $TARGET$.house
			trigger_if = {
				limit = {
					exists = scope:actor
					exists = scope:recipient
					scope:actor != scope:recipient
				}
				NOT = { $CHARACTER$ = $TARGET$ } # As a safety, let's make sure that we are not interacting with ourselves
			}
		}

		apply_clan_unity_interaction_effect = {
			CHARACTER = $CHARACTER$
			TARGET = $TARGET$
			DESC = $DESC$
			VALUE = $VALUE$
			VALUE_REVERSED = no
		}
	}
	else_if = {
		limit = { # Only apply reversed effect for the house head to keep the gauge in check
			$REVERSE_NON_HOUSE_TARGET$ = yes

			$CHARACTER$ = { government_has_flag = government_is_clan }
			$CHARACTER$.house ?= {
				house_head = $CHARACTER$
			}
			OR = {
				AND = {
					exists = $TARGET$.house
					NOT = { $CHARACTER$.house = $TARGET$.house }
				}
				$TARGET$ = { is_lowborn = yes }
			}
		}
		apply_clan_unity_interaction_effect = {
			CHARACTER = $CHARACTER$
			TARGET = $TARGET$
			DESC = $DESC$
			VALUE = $VALUE$
			VALUE_REVERSED = yes
		}
	}
}

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

Where it is used

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

Character interactions (102)

96 more

Events (18)

12 more

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