CK3 DatabaseCrusader Kings III · 1.20.1.2 “Crozier” · unofficial
Silk & Silverout Tue, Nov 17What's free, what needs the DLC, price →

Scripted effect

set_up_loan_effect

set_up_loan_effect = { AMOUNT = … LENDER = … }

game/common/scripted_effects/00_scripted_effects.txt, line 21 (38 lines). Parameters: $AMOUNT$, $LENDER$.

set_up_loan_effect is a scripted effect in Crusader Kings III, written at line 21 of its file. A call passes 2 parameters: AMOUNT and LENDER. The game's script calls it in 3 places, among them …: Glittering Opportunity (event councillor_spouse_stewardship.2002), holy_order.0200 (event) and Monetary Ministrations (event vassal.2201). Patch 1.20.1.2, from game/common/scripted_effects/00_scripted_effects.txt.

The comment above it in the file

To loan money from someone (Remember: you can only have one loan at a time, but a loaner can have multiple debtors!)

What it does

Every line of it is script with no tooltip text: the script is below.

The script as written (38 lines of game script)
set_up_loan_effect = {
	save_temporary_scope_as = loanee
	set_variable = {
		name = loan_holder
		value = $LENDER$
	}
	set_variable = {
		name = loan_amount_owed
		value = $AMOUNT$
	}
	set_variable = {
		name = years_since_loan
		value = 0
	}
	set_variable = {
		name = original_loan_holder
		value = scope:loanee
	}
	set_variable = {
		name = original_lender
		value = $LENDER$
	}
	$LENDER$ = { #To make the loan inheritable
		add_to_variable_list = { # list so that multiple rulers can take loans simulataneously
			name = owes_me_money
			target = root
		}
		hidden_effect = {
			if = {
				limit  = { exists = scope:loanee.var:loan_amount_owed }
				pay_short_term_gold = {
					target = scope:loanee
					gold = scope:loanee.var:loan_amount_owed
				}
			}
 		}
	}
}

As written in game/common/scripted_effects/00_scripted_effects.txt.

Where it is used

Every place in common/, events/ and history/ that calls set_up_loan_effect.

Events (3)

Source: game/common/scripted_effects/00_scripted_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.

Spotted a mistake on this page?