Scripted effect · Silk and Silver files
gdp_usury_repudiate_loan_effect
gdp_usury_repudiate_loan_effect = yesgame/common/scripted_effects/gdp_merchant_scripted_effects.txt, line 389 (90 lines). No parameters.
gdp_usury_repudiate_loan_effect is a scripted effect in Crusader Kings III, in the Silk and Silver files, written at line 389 of its file. It takes no parameters: gdp_usury_repudiate_loan_effect = yes. The game's script calls it in 3 places, among them Denounce a Usurious Loan (decision), gdp_merchant.5040 (event) and The Fine Print (event gdp_merchant.5010). Its body carries 2 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
story_owner = { save_temporary_scope_as = repudiating_borrower custom_tooltip = repudiate_loan_tt }scope:repudiated_lender:If
a check the game hides
Then
If
has_hook_of_type = { target = scope:repudiating_borrower type = strong_indebted_hook }
Then
remove_hook = { target = scope:repudiating_borrower type = strong_indebted_hook }
Else if
has_hook_of_type = { target = scope:repudiating_borrower type = indebted_hook }
Then
remove_hook = { target = scope:repudiating_borrower type = indebted_hook }
- If played by the AI: Opinion: Repudiated My Loan
Otherwise
If
has_hook_of_type = { target = scope:repudiating_borrower type = strong_indebted_hook }
Then
remove_hook = { target = scope:repudiating_borrower type = strong_indebted_hook }
Else if
has_hook_of_type = { target = scope:repudiating_borrower type = indebted_hook }
Then
remove_hook = { target = scope:repudiating_borrower type = indebted_hook }
story_owner = { … }end_story = yes
• 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 (90 lines of game script)
gdp_usury_repudiate_loan_effect = {
var:lender ?= { save_temporary_scope_as = repudiated_lender }
story_owner = {
save_temporary_scope_as = repudiating_borrower
custom_tooltip = repudiate_loan_tt
}
scope:repudiated_lender = {
if = {
limit = { NOT = { exists = scope:usury_skip_repudiate_toast } }
send_interface_toast = {
title = gdp_usury_loan_repudiated_notification
type = event_toast_effect_bad
left_icon = scope:gdp_repudiated_lender
right_icon = scope:gdp_repudiating_borrower
if = {
limit = {
has_hook_of_type = {
target = scope:repudiating_borrower
type = strong_indebted_hook
}
}
remove_hook = {
target = scope:repudiating_borrower
type = strong_indebted_hook
}
}
else_if = {
limit = {
has_hook_of_type = {
target = scope:repudiating_borrower
type = indebted_hook
}
}
remove_hook = {
target = scope:repudiating_borrower
type = indebted_hook
}
}
if = {
limit = { is_ai = yes }
add_opinion = {
target = scope:repudiating_borrower
modifier = gdp_repudiated_my_loan_opinion
}
}
}
}
else = {
if = {
limit = {
has_hook_of_type = {
target = scope:repudiating_borrower
type = strong_indebted_hook
}
}
remove_hook = {
target = scope:repudiating_borrower
type = strong_indebted_hook
}
}
else_if = {
limit = {
has_hook_of_type = {
target = scope:repudiating_borrower
type = indebted_hook
}
}
remove_hook = {
target = scope:repudiating_borrower
type = indebted_hook
}
}
}
}
story_owner = {
if = {
limit = {
culture = { has_cultural_parameter = binding_oaths_harsh_break_penalties }
}
gdp_binding_oaths_broke_word_effect = yes
add_prestige = medium_prestige_loss
}
custom_tooltip = gdp_repudiate_usurious_loan_credit_tt
add_character_flag = {
flag = gdp_debt_repudiator
years = 10
}
}
end_story = yes
}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_usury_repudiate_loan_effect.
Decisions (1)
Events (2)
- gdp_merchant.5040
- The Fine Print
gdp_merchant.5010
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.