Scripted effect
ai_diarch_check_to_see_if_should_launch_coup_effect
ai_diarch_check_to_see_if_should_launch_coup_effect = yesgame/common/scripted_effects/00_diarchy_scripted_effects.txt, line 96 (23 lines). No parameters.
ai_diarch_check_to_see_if_should_launch_coup_effect is a scripted effect in Crusader Kings III, written at line 96 of its file. It takes no parameters: ai_diarch_check_to_see_if_should_launch_coup_effect = yes. The game's script calls it in 2 places, among them diarch_swing_scales_currency_interaction (interaction) and Swing the Scales of Power (interaction). Patch 1.20.1.2, from game/common/scripted_effects/00_diarchy_scripted_effects.txt.
What it does
scope:actor:If
- Is played by the AI
is_diarch_of_target = scope:recipientscope:recipient:has_diarchy_active_parameter = regents_can_try_to_overthrow_present_lieges
- Loyalty at most 25
Then
- Event diarchy.9031
• 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 (23 lines of game script)
ai_diarch_check_to_see_if_should_launch_coup_effect = {
scope:actor = {
if = {
limit = {
# Robots only, please.
is_ai = yes
# Check that this is the diarch.
is_diarch_of_target = scope:recipient
# Plus a few checks for scope:recipient.
scope:recipient = {
# Then, we look to see if we've hit that magic number.
has_diarchy_active_parameter = regents_can_try_to_overthrow_present_lieges
# Finally, make sure that scope:recipient doesn't have a sensibility cooldown on 'em.
NOT = { has_character_flag = immune_ai_coups }
}
# Only disloyal diarchs will even consider this. It's really not for casuals.
diarch_loyalty <= diarch_loyalty_visibly_disloyal_threshold
}
# Right, lets try for some treason, then!
trigger_event = diarchy.9031
}
}
}As written in game/common/scripted_effects/00_diarchy_scripted_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls ai_diarch_check_to_see_if_should_launch_coup_effect.
Character interactions (2)
- diarch_swing_scales_currency_interaction
- Swing the Scales of Power
Source: game/common/scripted_effects/00_diarchy_scripted_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.