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

Scripted effect · Silk and Silver files

gdp_usury_pay_back_disguised_interest_effect

gdp_usury_pay_back_disguised_interest_effect = yes

game/common/scripted_effects/gdp_merchant_scripted_effects.txt, line 6218 (73 lines). No parameters.

gdp_usury_pay_back_disguised_interest_effect is a scripted effect in Crusader Kings III, in the Silk and Silver files, written at line 6218 of its file. It takes no parameters: gdp_usury_pay_back_disguised_interest_effect = yes. The game's script calls it in 2 places, among them gdp_merchant.5020 (event) and The Fine Print (event gdp_merchant.5010). Its body carries 1 text of the game's own for the player. Patch 1.21.0, from game/common/scripted_effects/gdp_merchant_scripted_effects.txt.

The comment above it in the file

Creditor is root.

What it does

  • Otherwise:
    • pay_short_term_gold = { target = scope:debtor gold = scope:interest_repaid_temp }
    • If a check the game hides passes: the same again (1 line)
      • scope:debtor › scope:usury_payer:
        • pay_short_term_gold = { target = scope:debtor gold = scope:interest_repaid_temp }
  • The hidden Interest is no longer owed

• 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 (73 lines of game script)
gdp_usury_pay_back_disguised_interest_effect = {
	save_temporary_scope_as = usury_payer
	scope:loan = {
		save_scope_value_as = {
			name = interest_repaid_temp
			value = gdp_loan_disguised_interest_portion_value
		}
	}
	if = { # Wipe debt only
		limit = { scope:loan.var:amount_owed > scope:loan.gdp_loan_less_interest_value }
		change_variable = {
			name = amount_owed
			add = {
				value = scope:loan.var:original_interest
				multiply = -1
			}
		}
	}
	else = { # Wipe debt and repay
		pay_short_term_gold = {
			target = scope:debtor
			gold = scope:interest_repaid_temp
		}
		if = {
			limit = { NOT = { exists = scope:usury_skip_pay_toast } }
			scope:debtor = {
				send_interface_toast = {
					type = event_toast_effect_good
					title = gdp_merchant.5020.a.tt
					left_icon = scope:usury_payer
					show_as_tooltip = {
						scope:usury_payer = {
							pay_short_term_gold = {
								target = scope:debtor
								gold = scope:interest_repaid_temp
							}
						}
					}
				}
			}
		}
	}
	custom_tooltip = gdp_usury_penance_interest_paid_back_tt
	hidden_effect = {
		scope:loan = {
			save_temporary_scope_value_as = {
				name = principal_temp
				value = gdp_loan_disguised_principal_value
			}
			set_variable = {
				name = amount_owed
				value = scope:principal_temp
			}
			set_variable = {
				name = instrument
				value = flag:free
			}
		}
		if = {
			limit = {
				any_secret = {
					type = secret_disguised_usury
					secret_target = scope:debtor
				}
			}
			random_secret = {
				type = secret_disguised_usury
				limit = { secret_target = scope:debtor }
				remove_secret = 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_pay_back_disguised_interest_effect.

Events (2)

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.

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