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

Scripted effect

laamp_rewards_apply_criminal_xp_effect

laamp_rewards_apply_criminal_xp_effect = { TRACK = … XP_MAX = … XP_MIN = … }

game/common/scripted_effects/00_laamp_effects.txt, line 602 (32 lines). Parameters: $TRACK$, $XP_MAX$, $XP_MIN$.

laamp_rewards_apply_criminal_xp_effect is a scripted effect in Crusader Kings III, written at line 602 of its file. A call passes 3 parameters: TRACK, XP_MAX and XP_MIN. The game's script calls it in 45 places, among them Execute (interaction), Foment Revolt (interaction) and laamp_base_0041 (contract). Patch 1.20.1.2, from game/common/scripted_effects/00_laamp_effects.txt.

The comment above it in the file

Dish out XP in the gallowsbait trait.

What it does

• 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 (32 lines of game script)
laamp_rewards_apply_criminal_xp_effect = {
	save_scope_as = xp_gainer
	save_scope_value_as = {
		name = xp_change_min
		value = $XP_MIN$
	}
	if = {
		limit = {
			NOT = { has_trait = gallowsbait }
		}
		add_trait = gallowsbait
	}
	add_trait_xp = {
		trait = gallowsbait
		track = $TRACK$
		value = {
			# Always use the gallowsbait_xp_minor_gain and related values for positive gains to ensure proper multipliers are applied!
			integer_range = {
				min = $XP_MIN$
				max = $XP_MAX$
			}
			if = {
				limit = {
					scope:xp_change_min > 0 # Do not multiply reductions
					scope:xp_gainer.domicile ?= { has_domicile_parameter = camp_reduced_criminal_contract_xp_gain }
				}
				multiply = reduced_criminal_contract_xp_gain_value
			}
			floor = yes # Round numbers down when modified
		}
	}
}

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

Where it is used

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

Character interactions (2)

Task contracts (18)

  • laamp_base_0041
  • laamp_base_1001
  • laamp_base_1041
  • laamp_base_2001
  • laamp_base_2011
  • laamp_base_2031
12 more
  • laamp_base_2041
  • laamp_base_3011
  • laamp_base_3021
  • laamp_base_3031
  • laamp_base_3041
  • laamp_base_4041
  • laamp_base_5031
  • laamp_base_5041
  • laamp_base_5051
  • laamp_rid_councillor_contract
  • laamp_steal_artifact_contract
  • Treasure Map

Events (13)

7 more

Scripted effects inside an event file (8)

  • laamp_base_contract_schemes_0781_fail_duel_effect
  • laamp_base_contract_schemes_0781_pay_gold_effect
  • laamp_base_contract_schemes_0791_fail_duel_effect
  • laamp_base_contract_schemes_1782_roll_duel_effect
  • laamp_base_contract_schemes_3661_gallowsbait_give_max_effect
  • laamp_base_contract_schemes_3661_gallowsbait_update_effect
2 more
  • laamp_base_contract_schemes_5901_duel_failure_effect
  • laamp_base_contract_schemes_5901_duel_success_effect

Scripted character templates (4)

  • criminal_brains_character
  • criminal_brawn_character
  • criminal_fingers_character
  • criminal_thief_bandit_character

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