Scripted effect · Silk and Silver files
gdp_minority_merchant_repopulate_effect
gdp_minority_merchant_repopulate_effect = yesgame/common/scripted_effects/gdp_merchant_scripted_effects.txt, line 3274 (39 lines). No parameters.
gdp_minority_merchant_repopulate_effect is a scripted effect in Crusader Kings III, in the Silk and Silver files, written at line 3274 of its file. It takes no parameters: gdp_minority_merchant_repopulate_effect = yes. The game's script calls it in 1 place, among them gdp_merchant_population_global_pulse (on action). Patch 1.21.0, from game/common/scripted_effects/gdp_merchant_scripted_effects.txt.
What it does
If
- Gdp minority merchant spawn quota more than 0
gdp_merchant_companies_below_cap_trigger = yes
Then
while = { … }
• 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 (39 lines of game script)
gdp_minority_merchant_repopulate_effect = {
if = {
limit = {
global_var:gdp_minority_merchant_spawn_quota > 0
gdp_merchant_companies_below_cap_trigger = yes
}
save_scope_value_as = {
name = minority_merchant_hosts_to_find
value = global_var:gdp_minority_merchant_spawn_quota
}
while = {
count = scope:minority_merchant_hosts_to_find
random_ruler = {
limit = {
gdp_minority_merchant_host_trigger = yes
NOT = { is_in_list = minority_merchant_hosts }
}
weight = {
base = 1
modifier = {
add = 1
highest_held_title_tier >= tier_duchy
}
modifier = {
add = 2
highest_held_title_tier >= tier_kingdom
}
modifier = {
add = 4
highest_held_title_tier >= tier_empire
}
}
add_to_temporary_list = minority_merchant_hosts
trigger_event = gdp_merchant.4003
}
}
}
remove_global_variable = gdp_minority_merchant_spawn_quota
}As written in game/common/scripted_effects/gdp_merchant_scripted_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls gdp_minority_merchant_repopulate_effect.
On actions (the game's own hooks) (1)
- gdp_merchant_population_global_pulse
Source: game/common/scripted_effects/gdp_merchant_scripted_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.21.0.