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

Scripted effect

gain_trait_or_experience_effect

gain_trait_or_experience_effect = { AMOUNT = … TRAIT = … }

game/common/scripted_effects/00_experience_effects.txt, line 1 (12 lines). Parameters: $AMOUNT$, $TRAIT$.

gain_trait_or_experience_effect is a scripted effect in Crusader Kings III, written at line 1 of its file. A call passes 2 parameters: AMOUNT and TRAIT. The game's script calls it in 2 places, among them Wild Goose Chase (decision) and Jade or Stone (event chinese_students.0031). Patch 1.20.1.2, from game/common/scripted_effects/00_experience_effects.txt.

What it does

  • If has the Trait: …: $TRAIT$ experience changes
  • Otherwise: Gains the Trait …

• 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 (12 lines of game script)
gain_trait_or_experience_effect = {
	if = {
		limit = { has_trait = $TRAIT$ }
		add_trait_xp = {
			trait = $TRAIT$
			value = $AMOUNT$
		}
	}
	else = {
		add_trait = $TRAIT$
	}
}

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

Where it is used

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

Decisions (1)

  • Wild Goose Chase

Events (1)

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