Scripted trigger
task_conversion_valid_county_trigger
task_conversion_valid_county_trigger = yesgame/common/scripted_triggers/00_councillor_triggers.txt, line 1020 (297 lines). No parameters.
task_conversion_valid_county_trigger is a scripted trigger in Crusader Kings III, written at line 1020 of its file. It takes no parameters: task_conversion_valid_county_trigger = yes (or no). The game's script calls it in 1 place, among them Convert Faith in County (council task). Its body carries 5 texts of the game's own for the player. Patch 1.20.1.2, from game/common/scripted_triggers/00_councillor_triggers.txt.
The comment above it in the file
expect scope:councillor_liege, scope:councillor
What it checks
is_landless_type_title = noIf
- scope:councillor_liege: Has “hold court 8120 religion block” (a variable the game's script sets)
Then
- This faith is tolerated by you
- If cannot be converted by value is scope:councillor liege: You have promised to not convert … until …
If
- scope:councillor_liege: Is played by the AI
One of these
- Their faith is the same as that of councillor liege
or
Their faith is the same as that of councillor
Then
None of these
- Their rite: Has “rite grace period” (a variable the game's script sets)
If
- scope:councillor_liege: Is played by the AI
Then
If
- scope:councillor_liege › Their faith: Has a Doctrine or Tenet with Prevents Tribal Rulers from changing Government type · Grants the Unreformed Pagan Combat Advantage
Then
One of these
scope:councillor_liege:has_character_flag = vassal_directive_convert_faithvassal_is_valid_and_follows_directive_trigger = { VASSAL = this LIEGE = liege }
or
scope:councillor_liege: Ai zeal at least 50or
scope:county_check.faith: Has a Doctrine or Tenet with Prevents Tribal Rulers from changing Government type · Grants the Unreformed Pagan Combat Advantageor
scope:county_check › Any county province › Their barony:is_holy_site_of = scope:councillor_liege.faith
If
- scope:councillor_liege › Their faith:
faith_hostility_level = { target = scope:county_check.faith value <= faith_fully_accepted_level }
Then
One of these
scope:councillor_liege:has_character_flag = vassal_directive_convert_faithvassal_is_valid_and_follows_directive_trigger = { VASSAL = this LIEGE = liege }
or
scope:councillor_liege:- Ai zeal at least 100
- Ai rationality at most -50
or
scope:county_check › Any county province › Their barony:is_holy_site_of = scope:councillor_liege.faith
- scope:councillor_liege › Their faith:
If
- scope:councillor_liege › Their faith:
faith_hostility_level = { target = scope:county_check.faith value <= faith_astray_level }
Then
If
scope:councillor_liege:
Then
One of these
scope:councillor_liege:has_character_flag = vassal_directive_convert_faithvassal_is_valid_and_follows_directive_trigger = { VASSAL = this LIEGE = liege }
or
scope:councillor_liege: Ai zeal at least 100or
scope:county_check: Popular Opinion at most -25or
scope:county_check › Any county province › Their barony:is_holy_site_of = scope:councillor_liege.faith
Else if
- scope:councillor_liege › Their rite: Has the Fundamentalist Doctrine
Then
One of these
scope:councillor_liege:has_character_flag = vassal_directive_convert_faithvassal_is_valid_and_follows_directive_trigger = { VASSAL = this LIEGE = liege }
or
scope:councillor_liege: Ai zeal at least 0or
scope:county_check: Popular Opinion at most -10or
scope:county_check › Any county province › Their barony:is_holy_site_of = scope:councillor_liege.faith
Otherwise
One of these
scope:councillor_liege:has_character_flag = vassal_directive_convert_faithvassal_is_valid_and_follows_directive_trigger = { VASSAL = this LIEGE = liege }
or
scope:councillor_liege: Ai zeal at least 25or
scope:county_check: Popular Opinion at most -15or
scope:county_check › Any county province › Their barony:is_holy_site_of = scope:councillor_liege.faith
- scope:councillor_liege › Their faith:
If
scope:councillor_liege:- Their faith is Sunni
- Their capital province: Is in the Iberia region
scope:county_check.rite = rite:maliki
- scope:county_check › Their province: Is in the Iberia region
Then
One of these
scope:councillor_liege:has_character_flag = vassal_directive_convert_faithvassal_is_valid_and_follows_directive_trigger = { VASSAL = this LIEGE = liege }
or
… (more in the script below)
- … (more in the script below)
- … (more in the script below)
• 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 (120 lines of game script)
task_conversion_valid_county_trigger = {
is_landless_type_title = no
save_temporary_scope_as = county_check
# Liege rite when the county will convert into the liege's faith
trigger_if = {
limit = {
OR = {
scope:councillor_liege = {
tgp_has_access_to_ministry_trigger = yes
}
faith = scope:councillor_liege.faith
scope:councillor.faith = scope:councillor_liege.faith
}
}
custom_tooltip = {
text = task_conversion.tt.county_rite_already_matches_liege
rite != scope:councillor_liege.rite
}
}
trigger_else = {
custom_tooltip = {
text = task_conversion.tt.county_rite_already_matches_chaplain
rite != scope:councillor.rite
}
}
trigger_if = {
limit = {
scope:councillor_liege = {
is_alive = yes
has_variable = hold_court_8120_religion_block
}
}
custom_tooltip = {
text = hold_court_8120_conversion_tt
faith != scope:councillor_liege.var:hold_court_8120_religion_block
}
}
custom_description = { # Vassal Contract forbids meddling by liege
text = "is_protected_via_contract_self_or_liege"
subject = holder
# don't "protect" same faith in edge cases
trigger_if = {
limit = {
scope:county_check.holder = { is_vassal_or_below_of = scope:councillor_liege }
scope:councillor_liege.faith != scope:county_check.holder.faith
}
holder = {
NOR = {
vassal_contract_has_flag = religiously_protected
any_liege_or_above = {
is_vassal_or_below_of = scope:councillor_liege
vassal_contract_has_flag = religiously_protected
}
}
}
}
}
trigger_if = {
limit = {
var:cannot_be_converted_by_value ?= scope:councillor_liege
}
custom_tooltip = {
text = promised_to_not_convert_county
NOT = {
var:cannot_be_converted_by_value ?= scope:councillor_liege
}
}
}
trigger_if = {
limit = {
scope:councillor_liege = { is_ai = yes }
OR = {
faith = scope:councillor_liege.faith
faith = scope:councillor.faith
}
}
NOT = {
rite = { has_variable = pam_rite_grace_period }
}
}
trigger_if = {
limit = { scope:councillor_liege = { is_ai = yes } }
# Unreformed Pagans do not tend to even try conversion of non-unreformed faiths unless zealous
trigger_if = {
limit = {
scope:councillor_liege = {
faith = {
has_doctrine_parameter = unreformed
}
}
}
OR = {
scope:councillor_liege = {
has_character_flag = vassal_directive_convert_faith
vassal_is_valid_and_follows_directive_trigger = { VASSAL = this LIEGE = liege }
}
scope:councillor_liege = { ai_zeal >= 50 }
scope:county_check.faith = { has_doctrine_parameter = unreformed }
scope:county_check = { # Always convert holy sites
any_county_province = {
barony = {
is_holy_site_of = scope:councillor_liege.faith
}
}
}
}
}
# Do not convert Righteous faiths, unless disturbingly zealous
trigger_if = {
limit = {
scope:councillor_liege = {
faith = {
faith_hostility_level = {
target = scope:county_check.faith
value <= faith_fully_accepted_level
}
}
}
}As written in game/common/scripted_triggers/00_councillor_triggers.txt.
The first 120 of its 297 lines; the rest is in game/common/scripted_triggers/00_councillor_triggers.txt from line 1020.
Where it is used
Every place in common/, events/ and history/ that calls task_conversion_valid_county_trigger.
Council tasks (1)
- Convert Faith in County
Source: game/common/scripted_triggers/00_councillor_triggers.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.