Scripted effect
ep3_frankokratia_remove_pledged_attackers_effect
ep3_frankokratia_remove_pledged_attackers_effect = yesgame/common/scripted_effects/07_frankokratia_scripted_effects.txt, line 198 (105 lines). No parameters.
ep3_frankokratia_remove_pledged_attackers_effect is a scripted effect in Crusader Kings III, written at line 198 of its file. It takes no parameters: ep3_frankokratia_remove_pledged_attackers_effect = yes. The game's script calls it in 1 place, among them great_holy_war.0005 (event). Patch 1.20.1.2, from game/common/scripted_effects/07_frankokratia_scripted_effects.txt.
What it does
global_var:byz_claimant_champion:start_war = { … }If
- scope:byz_claimant: Is a ruler
Then
scope:frankokratia_war:add_attacker = scope:byz_claimant
If
has_pledged_attacker = scope:byz_claimant_champion
Then
unpledge_attacker = scope:byz_claimant_champion
If
has_pledged_attacker = scope:byz_claimant
Then
unpledge_attacker = scope:byz_claimant
- scope:byz_claimant_champion: Event ep3_frankokratia_events.0030
- Every pledged attacker:
faith.great_holy_war = { unpledge_attacker = prev }scope:frankokratia_war:add_attacker = prev
- Event ep3_frankokratia_events.0030
- scope:byz_claimant_champion › One random owned story:
If
global_var:financier_title.holder:None of these
- Any character war:
using_cb = crusading_claim_cb
- Any character war:
Then
scope:frankokratia_war:add_attacker = global_var:financier_title.holder
- Every in list:
- Where:
None of these
- Any character war:
using_cb = crusading_claim_cb
- Any character war:
- Is a ruler
scope:frankokratia_war:add_attacker = prev
- Event ep3_frankokratia_events.0030
- Where:
• 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 (105 lines of game script)
ep3_frankokratia_remove_pledged_attackers_effect = {
global_var:byz_claimant_champion ?= {
#save neeeded scopes
save_scope_as = byz_claimant_champion
random_owned_story = {
type = frankokratia_story
limit = {
exists = var:byz_claimant
}
var:byz_claimant = {
save_scope_as = byz_claimant
}
}
#Start war
start_war = {
casus_belli = crusading_claim_cb
target = title:e_byzantium.holder
claimant = scope:byz_claimant
target_title = title:e_byzantium
}
random_character_war = {
limit = { using_cb = crusading_claim_cb }
save_scope_as = frankokratia_war
}
#Add the claimant if they can join
if = {
limit = {
scope:byz_claimant = { is_ruler = yes }
}
scope:frankokratia_war = {
add_attacker = scope:byz_claimant
}
}
}
#Remove from GHW
if = {
limit = {
has_pledged_attacker = scope:byz_claimant_champion
}
unpledge_attacker = scope:byz_claimant_champion
}
if = {
limit = {
has_pledged_attacker = scope:byz_claimant
}
unpledge_attacker = scope:byz_claimant
}
#Redirected Crusader Fluff event
scope:byz_claimant_champion = {
trigger_event = ep3_frankokratia_events.0030
}
#Do the same for all committed rulers
every_pledged_attacker = {
limit = {
has_character_flag = joining_frankokratia
this != root.faith.religious_head
}
#Unpledge from GHW
faith.great_holy_war = {
unpledge_attacker = prev
}
#ADD TO WAR
scope:frankokratia_war = {
add_attacker = prev
}
#Redirected Crusader Fluff event
trigger_event = ep3_frankokratia_events.0030
}
scope:byz_claimant_champion = {
random_owned_story = {
type = frankokratia_story
if = {
limit = {
global_var:financier_title.holder ?= {
NOT = {
any_character_war = {
using_cb = crusading_claim_cb
}
}
}
}
scope:frankokratia_war = {
add_attacker = global_var:financier_title.holder
}
}
every_in_list = {
variable = frankokratia_leaders
limit = {
NOT = {
any_character_war = {
using_cb = crusading_claim_cb
}
}
is_ruler = yes
is_alive = yes
}
scope:frankokratia_war = {
add_attacker = prev
}
#Redirected Crusader Fluff event
trigger_event = ep3_frankokratia_events.0030
}
}
}
}As written in game/common/scripted_effects/07_frankokratia_scripted_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls ep3_frankokratia_remove_pledged_attackers_effect.
Events (1)
Source: game/common/scripted_effects/07_frankokratia_scripted_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.