Scripted effect · All Under Heaven files
fill_the_ministry_effect
fill_the_ministry_effect = yesgame/common/scripted_effects/10_dlc_tgp_scripted_effects.txt, line 2136 (219 lines). No parameters.
fill_the_ministry_effect is a scripted effect in Crusader Kings III, in the All Under Heaven files, written at line 2136 of its file. It takes no parameters: fill_the_ministry_effect = yes. The game's script calls it in 2 places, among them on_title_gain (on action) and tgp_claim_mandate_of_heaven_effect (scripted effect). Patch 1.20.1.2, from game/common/scripted_effects/10_dlc_tgp_scripted_effects.txt.
The comment above it in the file
Fill the ministry with valid characters
What it does
If
One of these
NOT = { exists = cp:councillor_chancellor }or
cp:councillor_chancellor: Does not hold Chancellery
Then
- One random vassal:
- Where:
tgp_can_be_a_minister_trigger = { COURT_OWNER = scope:councillor_liege }tgp_is_any_minister = no
got_minister_position_effect = { MINISTER_TITLE = e_minister_chancellor MINISTER_POSITION = councillor_chancellor }
- Where:
If
One of these
NOT = { exists = cp:councillor_spymaster }or
cp:councillor_spymaster: Does not hold Censorate
Then
- One random vassal:
- Where:
tgp_can_be_a_minister_trigger = { COURT_OWNER = scope:councillor_liege }tgp_is_any_minister = no
got_minister_position_effect = { MINISTER_TITLE = e_minister_censor MINISTER_POSITION = councillor_spymaster }
- Where:
If
One of these
NOT = { exists = cp:minister_grand_marshal }or
cp:minister_grand_marshal: Does not hold Commission
Then
- One random vassal:
- Where:
tgp_can_be_a_minister_trigger = { COURT_OWNER = scope:councillor_liege }tgp_is_any_minister = no
got_minister_position_effect = { MINISTER_TITLE = e_minister_grand_marshal MINISTER_POSITION = minister_grand_marshal }
- Where:
If
One of these
NOT = { exists = cp:minister_personnel }or
cp:minister_personnel: Does not hold Ministry of Personnel
Then
- One random vassal:
- Where:
tgp_can_be_a_minister_trigger = { COURT_OWNER = scope:councillor_liege }tgp_is_any_minister = no
got_minister_position_effect = { MINISTER_TITLE = e_minister_of_personnel MINISTER_POSITION = minister_personnel }
- Where:
If
One of these
NOT = { exists = cp:councillor_steward }or
cp:councillor_steward: Does not hold Ministry of Revenue
Then
- One random vassal:
- Where:
tgp_can_be_a_minister_trigger = { COURT_OWNER = scope:councillor_liege }tgp_is_any_minister = no
got_minister_position_effect = { MINISTER_TITLE = e_minister_of_revenue MINISTER_POSITION = councillor_steward }
- Where:
If
Then
- One random vassal:
- Where:
tgp_can_be_a_minister_trigger = { COURT_OWNER = scope:councillor_liege }tgp_is_any_minister = no
got_minister_position_effect = { MINISTER_TITLE = e_minister_of_rites MINISTER_POSITION = councillor_court_chaplain }
- Where:
If
Then
- One random vassal:
- Where:
tgp_can_be_a_minister_trigger = { COURT_OWNER = scope:councillor_liege }tgp_is_any_minister = no
got_minister_position_effect = { MINISTER_TITLE = e_minister_of_war MINISTER_POSITION = councillor_marshal }
- Where:
If
One of these
NOT = { exists = cp:minister_justice }or
cp:minister_justice: Does not hold Ministry of Justice
Then
- One random vassal:
- Where:
tgp_can_be_a_minister_trigger = { COURT_OWNER = scope:councillor_liege }tgp_is_any_minister = no
got_minister_position_effect = { MINISTER_TITLE = e_minister_of_justice MINISTER_POSITION = minister_justice }
- Where:
If
One of these
NOT = { exists = cp:minister_works }or
cp:minister_works: Does not hold Ministry of Works
Then
- One random vassal:
- Where:
tgp_can_be_a_minister_trigger = { COURT_OWNER = scope:councillor_liege }tgp_is_any_minister = no
got_minister_position_effect = { MINISTER_TITLE = e_minister_of_works MINISTER_POSITION = minister_works }
- 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 (120 lines of game script)
fill_the_ministry_effect = {
save_scope_as = councillor_liege
# Assign a grand chancellor
if = {
limit = {
OR = {
NOT = { exists = cp:councillor_chancellor }
cp:councillor_chancellor ?= {
NOT = { has_title = title:e_minister_chancellor }
}
}
}
random_vassal = {
limit = {
tgp_can_be_a_minister_trigger = { COURT_OWNER = scope:councillor_liege }
tgp_is_any_minister = no
}
weight = {
base = 1
modifier = {
add = diplomacy
}
}
got_minister_position_effect = { MINISTER_TITLE = e_minister_chancellor MINISTER_POSITION = councillor_chancellor }
}
}
# Assign an imperial censor
if = {
limit = {
OR = {
NOT = { exists = cp:councillor_spymaster }
cp:councillor_spymaster ?= {
NOT = { has_title = title:e_minister_censor }
}
}
}
random_vassal = {
limit = {
tgp_can_be_a_minister_trigger = { COURT_OWNER = scope:councillor_liege }
tgp_is_any_minister = no
}
weight = {
base = 1
modifier = {
add = intrigue
}
}
got_minister_position_effect = { MINISTER_TITLE = e_minister_censor MINISTER_POSITION = councillor_spymaster }
}
}
# Assign a grand marshal
if = {
limit = {
OR = {
NOT = { exists = cp:minister_grand_marshal }
cp:minister_grand_marshal ?= {
NOT = { has_title = title:e_minister_grand_marshal }
}
}
}
random_vassal = {
limit = {
tgp_can_be_a_minister_trigger = { COURT_OWNER = scope:councillor_liege }
tgp_is_any_minister = no
}
weight = {
base = 1
modifier = {
add = martial
}
}
got_minister_position_effect = { MINISTER_TITLE = e_minister_grand_marshal MINISTER_POSITION = minister_grand_marshal }
}
}
# Assign a minister of personnel
if = {
limit = {
OR = {
NOT = { exists = cp:minister_personnel }
cp:minister_personnel ?= {
NOT = { has_title = title:e_minister_of_personnel }
}
}
}
random_vassal = {
limit = {
tgp_can_be_a_minister_trigger = { COURT_OWNER = scope:councillor_liege }
tgp_is_any_minister = no
}
weight = {
base = 1
modifier = {
add = diplomacy
}
}
got_minister_position_effect = { MINISTER_TITLE = e_minister_of_personnel MINISTER_POSITION = minister_personnel }
}
}
# Assign a minister of revenue
if = {
limit = {
OR = {
NOT = { exists = cp:councillor_steward }
cp:councillor_steward ?= {
NOT = { has_title = title:e_minister_of_revenue }
}
}
}
random_vassal = {
limit = {
tgp_can_be_a_minister_trigger = { COURT_OWNER = scope:councillor_liege }
tgp_is_any_minister = no
}
weight = {
base = 1
modifier = {
add = stewardship
}
}
got_minister_position_effect = { MINISTER_TITLE = e_minister_of_revenue MINISTER_POSITION = councillor_steward }As written in game/common/scripted_effects/10_dlc_tgp_scripted_effects.txt.
The first 120 of its 219 lines; the rest is in game/common/scripted_effects/10_dlc_tgp_scripted_effects.txt from line 2136.
Where it is used
Every place in common/, events/ and history/ that calls fill_the_ministry_effect.
On actions (the game's own hooks) (1)
- on_title_gain
Scripted effects (1)
Source: game/common/scripted_effects/10_dlc_tgp_scripted_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.