Scripted effect
setup_nomadic_leader_effect
setup_nomadic_leader_effect = yesgame/common/scripted_effects/00_faction_effects.txt, line 1698 (89 lines). No parameters.
setup_nomadic_leader_effect is a scripted effect in Crusader Kings III, written at line 1698 of its file. It takes no parameters: setup_nomadic_leader_effect = yes. The game's script calls it in 1 place, among them Nomadic Faction (factions). Patch 1.20.1.2, from game/common/scripted_effects/00_faction_effects.txt.
What it does
create_character = { … }scope:peasant_leader:set_character_rite = scope:peasant_county.rite
create_dynamic_title = { tier = duchy name = FACTION_NOMADIC_REVOLT_TITLE_NAME }scope:new_title:set_capital_county = scope:peasant_countyset_landless_title = yesset_destroy_on_succession = yesset_delete_on_destroy = yesset_no_automatic_claims = yesset_definitive_form = yesset_can_be_named_after_dynasty = no- Gains the … Title (peasant leader)
scope:peasant_leader:scope:new_title:generate_coa = factions
scope:peasant_leader:join_faction_skip_check = scope:faction
set_special_character = scope:peasant_leader
• 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 (89 lines of game script)
setup_nomadic_leader_effect = {
save_scope_as = faction
random_faction_county_member = {
save_scope_as = peasant_county
}
# Create a leader for the nomadic faction.
create_character = {
location = scope:peasant_county.title_province
template = nomadic_faction_leader_template
faith = scope:peasant_county.faith
rite = scope:peasant_county.rite
culture = scope:peasant_county.culture
gender_female_chance = {
if = {
limit = { scope:peasant_county.rite = { rite_has_doctrine = doctrine_gender_male_dominated } }
add = 0
}
else_if = {
limit = { scope:peasant_county.rite = { rite_has_doctrine = doctrine_gender_female_dominated } }
add = 100
}
else = {
add = 50
}
}
save_scope_as = peasant_leader
}
scope:peasant_leader = {
set_character_rite = scope:peasant_county.rite
add_character_flag = peasant_faction_random_peasant
}
# Create a new title for the peasant.
create_dynamic_title = {
tier = duchy
name = FACTION_NOMADIC_REVOLT_TITLE_NAME
}
create_title_and_vassal_change = {
type = created
save_scope_as = change
add_claim_on_loss = no
}
scope:new_title = {
set_capital_county = scope:peasant_county
set_landless_title = yes
set_destroy_on_succession = yes
set_delete_on_destroy = yes
set_no_automatic_claims = yes
set_definitive_form = yes
set_can_be_named_after_dynasty = no
change_title_holder = {
holder = scope:peasant_leader
change = scope:change
}
set_variable = {
name = faction
value = scope:faction
}
}
resolve_title_and_vassal_change = scope:change
scope:peasant_leader = {
set_variable = {
name = peasant_title
value = scope:new_title
}
if = {
limit = {
is_ruler = yes
NOT = {
government_has_flag = government_is_nomadic
}
}
change_government = nomad_government
}
}
scope:new_title = { generate_coa = factions }
# Set the peasant leader as the head of the faction.
scope:peasant_leader = {
set_variable = {
name = rebel_leader_peasants
value = scope:faction
}
join_faction_skip_check = scope:faction
}
set_special_character = scope:peasant_leader
}As written in game/common/scripted_effects/00_faction_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls setup_nomadic_leader_effect.
Factions (1)
- Nomadic Faction
Source: game/common/scripted_effects/00_faction_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.