Scripted effect · Silk and Silver files
gdp_hostile_takeover_effect
gdp_hostile_takeover_effect = { SUBSUMED = … TAKEOVER = … }game/common/scripted_effects/gdp_merchant_scripted_effects.txt, line 5844 (150 lines). Parameters: $SUBSUMED$, $TAKEOVER$.
gdp_hostile_takeover_effect is a scripted effect in Crusader Kings III, in the Silk and Silver files, written at line 5844 of its file. A call passes 2 parameters: SUBSUMED and TAKEOVER. The game's script calls it in 3 places, among them Attempt Hostile Takeover (interaction), …: Success (event scheme_critical_moments.8402) and Hostile Takeover: … (event scheme_critical_moments.8404). 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.
What it does
scope:subsumed:- 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:takeover }scope:subsumed_patron:destroy_merchant_effect = { MERCHANT = scope:subsumed }
pay_short_term_gold = { gold = scope:subsumed.gold target = scope:takeover }
scope:takeover:If
has_hook = scope:subsumed
Then
use_hook = scope:subsumed
If
has_hook = scope:subsumed_patron
Then
use_hook = scope:subsumed_patron
- Their house:
add_unity_value = { value = -50 character = scope:takeover desc = merchant_unity_takeover_loss }
scope:subsumed:If
has_relation_best_friend = scope:takeover
Then
remove_relation_best_friend = scope:takeover
Else if
has_relation_friend = scope:takeover
Then
remove_relation_friend = scope:takeover
Else if
can_set_relation_rival_trigger = { CHARACTER = scope:takeover }
Then
set_relation_rival_effect = { TARGET = scope:takeover REASON = hostile_takeover }
- Opinion: Hostile Takeover
- Their house:
If
NOT = { has_house_relation_with = scope:takeover.house }
Then
set_house_relation = { target = scope:takeover.house level = feud description = house_relation_reason_hostile_takeover_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_hostile_takeover_effect = {
$TAKEOVER$ = { save_temporary_scope_as = takeover }
$SUBSUMED$ = { save_temporary_scope_as = subsumed }
scope:subsumed = {
suzerain = { save_scope_as = subsumed_patron }
custom_description = {
text = merge_company_subsumed_trade_market_tt
subject = scope:subsumed
object = scope:takeover
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:takeover
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:takeover
history = {
type = stolen
actor = scope:subsumed
recipient = scope:takeover
}
}
if = {
limit = { exists = var:charter_house }
set_variable = {
name = charter_house
value = scope:takeover.house
}
}
}
gdp_merchant_recreate_trade_monopolies_for_new_owner_effect = { NEW_OWNER = scope:takeover }
hidden_effect = {
every_courtier = {
limit = {
scope:takeover = { has_hook = prev }
}
scope:takeover = { use_hook = this }
hidden_effect = {
add_opinion = {
modifier = hostile_takeover_opinion
target = scope:takeover
opinion = -50
}
move_to_pool = yes
}
}
}
scope:subsumed_patron = {
send_interface_toast = {
type = event_toast_effect_neutral
title = hostile_takeover_client_title
left_icon = scope:takeover
right_icon = scope:subsumed
# Destroy their company
destroy_merchant_effect = { MERCHANT = scope:subsumed }
}
}
hidden_effect = { move_to_pool = yes }
pay_short_term_gold = {
gold = scope:subsumed.gold
target = scope:takeover
}
}
scope:takeover = {
if = {
limit = { has_hook = scope:subsumed }
use_hook = scope:subsumed
}
if = {
limit = { has_hook = scope:subsumed_patron }
use_hook = scope:subsumed_patron
}
house = {
add_unity_value = {
value = -50
character = scope:takeover
desc = merchant_unity_takeover_loss
}
}
}
scope:subsumed = {
if = {
limit = { has_relation_best_friend = scope:takeover }
remove_relation_best_friend = scope:takeover
}
else_if = {
limit = { has_relation_friend = scope:takeover }
remove_relation_friend = scope:takeover
}
if = {
limit = {
can_set_relation_nemesis_trigger = { CHARACTER = scope:takeover }
}
set_relation_nemesis = { reason = hostile_takeover target = scope:takeover }
}
else_if = {
limit = {
can_set_relation_rival_trigger = { CHARACTER = scope:takeover }
}
set_relation_rival_effect = {
TARGET = scope:takeover
REASON = hostile_takeoverAs written in game/common/scripted_effects/gdp_merchant_scripted_effects.txt.
The first 120 of its 150 lines; the rest is in game/common/scripted_effects/gdp_merchant_scripted_effects.txt from line 5844.
Where it is used
Every place in common/, events/ and history/ that calls gdp_hostile_takeover_effect.
Character interactions (1)
Events (2)
- …: Success
scheme_critical_moments.8402 - Hostile Takeover: …
scheme_critical_moments.8404
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.