Scripted trigger
should_ai_take_preemptive_countermeasures_trigger
should_ai_take_preemptive_countermeasures_trigger = yesgame/common/scripted_triggers/00_scheme_triggers.txt, line 829 (13 lines). No parameters.
should_ai_take_preemptive_countermeasures_trigger is a scripted trigger in Crusader Kings III, written at line 829 of its file. It takes no parameters: should_ai_take_preemptive_countermeasures_trigger = yes (or no). The game's script calls it in 2 places, among them ai_will_do_arbitrary_arrests_value (script value) and ai_will_do_bounties_for_whispers_value (script value). Patch 1.20.1.2, from game/common/scripted_triggers/00_scheme_triggers.txt.
The comment above it in the file
Used in scripted modifiers to determine if the AI should be deploying countermeasures that reduce secrecy or generally affect success chance.
What it checks
NOT = { has_scheme_countermeasure_parameter = has_any_countermeasure_active }- Any targeting scheme:
- Has “apply countermeasures” (a variable the game's script sets)
is_scheme_exposed = no- Has “secrecy grace period” (a variable the game's script sets)
- Secrecy grace period at most 0
• 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 (13 lines of game script)
should_ai_take_preemptive_countermeasures_trigger = {
# Don't do this if we've already deployed countermeasures.
NOT = { has_scheme_countermeasure_parameter = has_any_countermeasure_active }
any_targeting_scheme = {
# Make sure we'd need to do this at all.
has_variable = apply_countermeasures
# And we don't want to face schemes that're already at a later stage.
is_scheme_exposed = no
# Buuuut also give them their grace period to get started.
has_variable = secrecy_grace_period
var:secrecy_grace_period <= 0
}
}As written in game/common/scripted_triggers/00_scheme_triggers.txt.
Where it is used
Every place in common/, events/ and history/ that calls should_ai_take_preemptive_countermeasures_trigger.
Script values (2)
- ai_will_do_arbitrary_arrests_value
- ai_will_do_bounties_for_whispers_value
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.