Scripted effect
repay_and_end_loan_story_effect
repay_and_end_loan_story_effect = yesgame/common/scripted_effects/00_scripted_effects.txt, line 697 (36 lines). No parameters.
repay_and_end_loan_story_effect is a scripted effect in Crusader Kings III, written at line 697 of its file. It takes no parameters: repay_and_end_loan_story_effect = yes. The game's script calls it in 6 places, among them Repay Loan (decision), Demand Repayment (interaction) and holy_order.0202 (event). Patch 1.21.0, from game/common/scripted_effects/00_scripted_effects.txt.
What it does
scope:lender_temp:scope:debtor_temp:pay_short_term_gold = { gold = scope:loan_temp.var:amount_owed target = scope:lender_temp }
If
is_landless_merchant = yes
Then
- Merchant (creditor) experience changes
merchant_creditor_capstone_prestige_effect = yesgdp_merchant_creditor_loan_acumen_effect = { GOLD = scope:loan_temp.var:amount_owed }
end_loan_story_effect = 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 (36 lines of game script)
repay_and_end_loan_story_effect = { # to handle repayment centrally
save_temporary_scope_as = loan_temp
var:lender = { save_temporary_scope_as = lender_temp }
story_owner = { save_temporary_scope_as = debtor_temp }
scope:lender_temp = {
send_interface_toast = {
type = event_toast_effect_neutral
title = loan_repaid_toast_title
right_icon = scope:debtor_temp
scope:debtor_temp = {
send_interface_toast = {
type = event_toast_effect_neutral
title = loan_repaid_toast_title
right_icon = scope:lender_temp
pay_short_term_gold = {
gold = scope:loan_temp.var:amount_owed
target = scope:lender_temp
}
}
}
if = {
limit = {
is_landless_merchant = yes
}
add_trait_xp = {
trait = lifestyle_merchant
track = creditor
value = lifestyle_merchant_xp_gain_minor_value
}
merchant_creditor_capstone_prestige_effect = yes
gdp_merchant_creditor_loan_acumen_effect = { GOLD = scope:loan_temp.var:amount_owed }
}
}
}
end_loan_story_effect = yes
}As written in game/common/scripted_effects/00_scripted_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls repay_and_end_loan_story_effect.
Decisions (1)
Character interactions (1)
Events (2)
- holy_order.0202
- Monetary Ministrations
vassal.2205
Scripted effects inside an event file (1)
- gdp_merchant_3020_demand_loan_effect
Scripted effects (1)
Source: game/common/scripted_effects/00_scripted_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.21.0.