Scripted effect · Silk and Silver files
gdp_merchant_recreate_trade_monopolies_for_new_owner_effect
gdp_merchant_recreate_trade_monopolies_for_new_owner_effect = { NEW_OWNER = … }game/common/scripted_effects/gdp_merchant_scripted_effects.txt, line 5477 (73 lines). Parameters: $NEW_OWNER$.
gdp_merchant_recreate_trade_monopolies_for_new_owner_effect is a scripted effect in Crusader Kings III, in the Silk and Silver files, written at line 5477 of its file. A call passes 1 parameter: NEW_OWNER. The game's script calls it in 2 places, among them gdp_hostile_takeover_effect (scripted effect) and gdp_merge_company_effect (scripted effect). Its body carries 1 text of the game's own for the player. Patch 1.21.0, from game/common/scripted_effects/gdp_merchant_scripted_effects.txt.
The comment above it in the file
Run in the scope of a merchant whose company is being absorbed. Recreates each of their trade monopolies under $NEW_OWNER$. The old monopoly has to be queued for destruction first, since a market only allows one monopoly per category.
What it does
• 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 (73 lines of game script)
gdp_merchant_recreate_trade_monopolies_for_new_owner_effect = {
if = {
limit = { character_has_trade_monopoly = yes }
custom_description = {
text = merge_company_subsumed_trade_monopolies_tt
subject = this
object = $NEW_OWNER$
$NEW_OWNER$ = {
every_trade_monopoly_for_character = {
add_to_temporary_list = gdp_merchant_new_owner_old_monopolies
}
}
every_trade_monopoly_for_character = {
add_to_temporary_list = gdp_merchant_monopolies_to_recreate
}
every_in_list = {
list = gdp_merchant_monopolies_to_recreate
monopoly_trade_market = { save_temporary_scope_as = recreated_monopoly_market }
destroy_trade_monopoly = yes
if = {
limit = { is_complete_monopoly = yes }
if = {
limit = { monopoly_type = exploitative }
create_trade_monopoly = {
type = exploitative
is_complete = yes
owning_character = $NEW_OWNER$
trade_market = scope:recreated_monopoly_market
}
}
else = {
create_trade_monopoly = {
type = normal
is_complete = yes
owning_character = $NEW_OWNER$
trade_market = scope:recreated_monopoly_market
}
}
}
else = {
monopoly_trade_good_category = { save_temporary_scope_as = recreated_monopoly_category }
if = {
limit = { monopoly_type = exploitative }
create_trade_monopoly = {
type = exploitative
owning_character = $NEW_OWNER$
trade_market = scope:recreated_monopoly_market
trade_good_category = scope:recreated_monopoly_category
}
}
else = {
create_trade_monopoly = {
type = normal
owning_character = $NEW_OWNER$
trade_market = scope:recreated_monopoly_market
trade_good_category = scope:recreated_monopoly_category
}
}
}
}
$NEW_OWNER$ = {
every_trade_monopoly_for_character = {
limit = {
is_complete_monopoly = no
NOT = { is_in_list = gdp_merchant_new_owner_old_monopolies }
}
save_scope_as = new_monopoly_scope
set_trade_monopoly_name = new_good_character_monopoly_name
}
}
}
}
}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_merchant_recreate_trade_monopolies_for_new_owner_effect.
Scripted effects (2)
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.