Scripted effect · Silk and Silver files
gdp_merge_company_effect
gdp_merge_company_effect = { MERGER = … SUBSUMED = … }game/common/scripted_effects/gdp_merchant_scripted_effects.txt, line 5551 (185 lines). Parameters: $MERGER$, $SUBSUMED$.
gdp_merge_company_effect is a scripted effect in Crusader Kings III, in the Silk and Silver files, written at line 5551 of its file. A call passes 2 parameters: MERGER and SUBSUMED. The game's script calls it in 2 places, among them Merge Company (interaction) and Merge Company: …-… (event gdp_merchant.0110). Its body carries 3 texts of the game's own for the player. Patch 1.21.0, from game/common/scripted_effects/gdp_merchant_scripted_effects.txt.
What it does
$SUBSUMED$ = { … }scope:subsumed:- If company size more than merger.company size value:
- Due to having a smaller Company Size:
- Depending on has realm law:
- When has realm law is Trade Establishment › scope:merger: Adopts the Trade Establishment Law
- When has realm law is Prominent Company › scope:merger: Adopts the Prominent Company Law
- When has realm law is Trade Empire › scope:merger: Adopts the Trade Empire Law
- All Trade Routes will be dismantled, and … will gain the Dominant Trader in each Trade Market
- Every character artifact:
- Where:
One of these
exists = var:charter_patronor
artifact_type = creatureor
artifact_type = curioor
artifact_type = library_item
set_owner = { … }
- Where:
gdp_merchant_recreate_trade_monopolies_for_new_owner_effect = { NEW_OWNER = scope:merger }- scope:subsumed_patron › scope:subsumed:
destroy_merchant_effect = { MERCHANT = scope:subsumed }
- If company size more than merger.company size value:
scope:merger:- … Merchant Family joins your Company as Associates
If
scope:competitive_pressure_send_option = yes
Then
If
scope:hook = yeshas_strong_usable_hook = scope:subsumed
Then
use_hook = scope:subsumed
If
scope:any_hook = yeshas_usable_hook = scope:subsumed
Then
use_hook = scope:subsumed
- Their house:
add_unity_value = { value = 15 character = scope:merger desc = merchant_unity_merger_gain }
scope:subsumed:If
If
a check the game hides
Then
NOT = { scope:merger.primary_heir ?= primary_heir }
NOT = { is_heirless_and_close_to_trigger = { OTHER = scope:merger } }
Then
- Opinion: Absorbed My Company
- Their house:
If
NOT = { has_house_relation_with = scope:merger.house }
Then
set_house_relation = { target = scope:merger.house level = quarrel description = house_relation_reason_merge_company_desc }
Otherwise
change_house_relation_effect = { … }
• 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)
gdp_merge_company_effect = {
$MERGER$ = { save_temporary_scope_as = merger }
$SUBSUMED$ = {
save_temporary_scope_as = subsumed
suzerain = { save_temporary_scope_as = subsumed_patron }
}
scope:subsumed = {
if = {
limit = { company_size_value > scope:merger.company_size_value }
custom_description_no_bullet = {
text = merge_company_larger_company_tt
subject = scope:actor
object = scope:recipient
}
switch = {
trigger = has_realm_law
company_size_medium = {
scope:merger = { add_realm_law = company_size_medium }
}
company_size_large = {
scope:merger = { add_realm_law = company_size_large }
}
company_size_huge = {
scope:merger = { add_realm_law = company_size_huge }
}
}
}
custom_description = {
text = merge_company_subsumed_trade_market_tt
subject = scope:subsumed
object = scope:merger
every_trade_route = {
# First, we get bonuses
every_trade_market_on_route = {
custom = custom_every_trade_route_subsumed
add_competitiveness_modifier_for_character = {
character = scope:merger
modifier = gdp_merge_company_competitiveness_modifier
years = 10
}
}
# Then wipe the slate
destroy_trade_route = yes
}
}
every_character_artifact = {
limit = {
OR = {
exists = var:charter_patron
artifact_type = creature
artifact_type = curio
artifact_type = library_item
}
}
set_owner = {
target = scope:merger
history = {
type = given
actor = scope:subsumed
recipient = scope:merger
}
}
if = {
limit = { exists = var:charter_house }
set_variable = {
name = charter_house
value = scope:merger.house
}
}
}
gdp_merchant_recreate_trade_monopolies_for_new_owner_effect = { NEW_OWNER = scope:merger }
hidden_effect = {
every_courtier = {
add_to_list = absorbed_associates
set_employer = scope:merger
}
}
# Destroy their company
scope:subsumed_patron = {
send_interface_toast = {
type = event_toast_effect_neutral
title = merge_company_client_title
left_icon = scope:merger
right_icon = scope:subsumed
# Destroy their company
scope:subsumed = {
destroy_merchant_effect = { MERCHANT = scope:subsumed }
}
}
}
hidden_effect = { set_employer = scope:merger }
}
scope:merger = {
custom_tooltip = merge_company_absorb_house_courtiers_tt
if = {
limit = { scope:competitive_pressure_send_option = yes }
spend_merchant_competitive_pressure_merge_company_effect = yes
}
#Strong hook
if = {
limit = {
scope:hook = yes
has_strong_usable_hook = scope:subsumed
}
use_hook = scope:subsumed
}
#Weak Hook
if = {
limit = {
scope:any_hook = yes
has_usable_hook = scope:subsumed
}
use_hook = scope:subsumed
}
#Dread
if = {
limit = { scope:dread = yes }
add_piety = minor_piety_loss
scope:subsumed = {
add_opinion = {As written in game/common/scripted_effects/gdp_merchant_scripted_effects.txt.
The first 120 of its 185 lines; the rest is in game/common/scripted_effects/gdp_merchant_scripted_effects.txt from line 5551.
Where it is used
Every place in common/, events/ and history/ that calls gdp_merge_company_effect.
Character interactions (1)
Events (1)
- Merge Company: …-…
gdp_merchant.0110
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.