Scripted effect
loan_free_interest_effect
loan_free_interest_effect = { AMOUNT = … DEBTOR = … LENDER = … }game/common/scripted_effects/00_scripted_effects.txt, line 164 (47 lines). Parameters: $AMOUNT$, $DEBTOR$, $LENDER$.
loan_free_interest_effect is a scripted effect in Crusader Kings III, written at line 164 of its file. A call passes 3 parameters: AMOUNT, DEBTOR and LENDER. The game's script calls it in 1 place, among them set_up_loan_story_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/00_scripted_effects.txt.
What it does
- They will owe … … in return (Interest Free)
$LENDER$ = { … }$DEBTOR$ = { … }
• 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 (47 lines of game script)
loan_free_interest_effect = {
scope:new_loan ?= {
set_variable = { name = instrument value = flag:free }
set_variable = { name = original_interest value = 0 }
}
# Interest explanation
custom_description = {
text = gdp_loan_owed_interest_free_tt
subject = $DEBTOR$
object = $LENDER$
value = $AMOUNT$
}
# Effects
$LENDER$ = {
if = {
limit = {
rite = { rite_has_parameter = usury_charitable_lending }
}
add_piety = minor_piety_gain
}
}
$DEBTOR$ = {
if = {
limit = { is_ai = yes }
add_opinion = {
target = $LENDER$
modifier = gdp_interest_free_loan_opinion
opinion = gdp_interest_free_loan_opinion_value
}
}
}
# Messages
$DEBTOR$ = {
if = {
limit = { # hide messages for inherited loans
NOT = { var:inheriting_loan ?= scope:new_loan.var:original_debtor }
}
loan_interest_free_message_effect = {
LENDER = $LENDER$
DEBTOR = $DEBTOR$
AMOUNT = $AMOUNT$
OWED = $AMOUNT$
}
}
else = { remove_variable = inheriting_loan }
}
}As written in game/common/scripted_effects/00_scripted_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls loan_free_interest_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.