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

Scripted effect

loan_disguised_interest_effect

loan_disguised_interest_effect = { AMOUNT = … DEBTOR = … LENDER = … }

game/common/scripted_effects/00_scripted_effects.txt, line 212 (46 lines). Parameters: $AMOUNT$, $DEBTOR$, $LENDER$.

loan_disguised_interest_effect is a scripted effect in Crusader Kings III, written at line 212 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
  • $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 (46 lines of game script)
loan_disguised_interest_effect = {
	save_temporary_scope_value_as = {
		name = loan_owed_temp
		value = {
			value = $AMOUNT$
			multiply = {
				value = 1
				add = gdp_loan_disguised_interest_rate_value
			}
		}
	}
	scope:new_loan ?= {
		set_variable = { name = instrument value = flag:disguised }
		set_variable = { name = original_interest value = gdp_loan_disguised_interest_premium_value }
		# Effects
		change_variable = {
			name = amount_owed
			add = var:original_interest
		}
	}
	# Interest explanation
	custom_description = {
		text = gdp_loan_owed_disguised_interest_tt
		subject = $DEBTOR$
		object = $LENDER$
		value = scope:loan_owed_temp
	}
	$LENDER$ = {
		add_disguised_usury_secret_effect = { DEBTOR = $DEBTOR$ }
	}
	# Messages
	$DEBTOR$ = {
		if = {
			limit = { # hide messages for inherited loans
				NOT = { var:inheriting_loan ?= scope:new_loan.var:original_debtor }
			}
			loan_interest_disguised_message_effect = {
				LENDER = $LENDER$
				DEBTOR = $DEBTOR$
				AMOUNT = $AMOUNT$
				OWED = scope:loan_owed_temp
			}
		}
		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_disguised_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.

Spotted a mistake on this page, or have an idea for the site?