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

Scripted trigger

scheme_countermeasure_access_select_best_tier_trigger

scheme_countermeasure_access_select_best_tier_trigger = { COUNTERMEASURE = … TIER = … }

game/common/scripted_triggers/00_scheme_triggers.txt, line 849 (19 lines). Parameters: $COUNTERMEASURE$, $TIER$.

scheme_countermeasure_access_select_best_tier_trigger is a scripted trigger in Crusader Kings III, written at line 849 of its file. A call passes 2 parameters: COUNTERMEASURE and TIER. The game's script calls it in 23 places, among them arbitrary_arrests_t1 (scheme), arbitrary_arrests_t2 (scheme) and arbitrary_arrests_t3 (scheme). Patch 1.20.1.2, from game/common/scripted_triggers/00_scheme_triggers.txt.

The comment above it in the file

This trigger means that a character will only ever have access to the best version of a given countermeasure.
Please note that some tiers may be inaccessible: they're set up so they can be hooked in to stuff, but we haven't assigned them all out straight away.
Use them if you want them but don't feel obligated, basically.

What it checks

  • save_temporary_scope_value_as = { name = checked_tier value = $TIER$ }
  • If

    • scheme_countermeasure_access_t4_$COUNTERMEASURE$_trigger = yes

    Then

    • scope:checked_tier = 4

    Else if

    • scheme_countermeasure_access_t3_$COUNTERMEASURE$_trigger = yes

    Then

    • scope:checked_tier = 3

    Else if

    • scheme_countermeasure_access_t2_$COUNTERMEASURE$_trigger = yes

    Then

    • scope:checked_tier = 2

    Otherwise

    • scope:checked_tier = 1

• 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 (19 lines of game script)
scheme_countermeasure_access_select_best_tier_trigger = {
	save_temporary_scope_value_as = {
		name = checked_tier
		value = $TIER$
	}
	trigger_if = {
		limit = { scheme_countermeasure_access_t4_$COUNTERMEASURE$_trigger = yes }
		scope:checked_tier = 4
	}
	trigger_else_if = {
		limit = { scheme_countermeasure_access_t3_$COUNTERMEASURE$_trigger = yes }
		scope:checked_tier = 3
	}
	trigger_else_if = {
		limit = { scheme_countermeasure_access_t2_$COUNTERMEASURE$_trigger = yes }
		scope:checked_tier = 2
	}
	trigger_else = { scope:checked_tier = 1 }
}

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

Where it is used

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

Schemes (23)

  • arbitrary_arrests_t1
  • arbitrary_arrests_t2
  • arbitrary_arrests_t3
  • arbitrary_arrests_t4
  • bounties_for_whispers_t1
  • bounties_for_whispers_t2
17 more
  • bounties_for_whispers_t3
  • bounties_for_whispers_t4
  • bribe_officials_t1
  • bribe_officials_t2
  • bribe_officials_t3
  • redouble_guards_t1
  • redouble_guards_t2
  • redouble_guards_t3
  • redouble_guards_t4
  • strengthen_sentries_t1
  • strengthen_sentries_t2
  • strengthen_sentries_t3
  • strengthen_sentries_t4
  • withdraw_from_view_t1
  • withdraw_from_view_t2
  • withdraw_from_view_t3
  • withdraw_from_view_t4

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