Skip to content

loan

Source: base/tealdef/game_mechanics/finance/loan.d.tl

Notes

Loans offered to and taken by the player (state of loan.gs).

LoanType

enum global base/tealdef/game_mechanics/finance/loan.d.tl:3

global enum LoanType

Notes

Size class of a loan.

Value Description
"Small" Small loan (1 to 5 years, 3 to 5 % interest).
"Medium" Medium loan (3 to 8 years, 5 to 8 %).
"Large" Large loan (5 to 12 years, 8 to 10 %).
"ExtraLarge" Extra-large loan (10 to 24 years, 10 to 12 %).
"Custom" Custom loan (not offered in the base game).

Loan

record global base/tealdef/game_mechanics/finance/loan.d.tl:11

global record Loan

Notes

A loan offer or a taken loan.

Fields

Name Type Description
type LoanType Size class.
amount integer Borrowed amount in game currency.
duration integer Term in game time (ms).
percentage number Interest as a fraction of the amount, paid in equal monthly parts over the term.
lastPayDay integer Game time (ms) of the last monthly payment.
timesPaid integer Monthly payments made.
birthDay integer Game time (ms) at which the offer was created; offers are renewed after half a game year.
cooldownUntil integer Game time (ms) until which a taken offer slot stays empty (4 to 8 game months).
id integer Id of a taken loan.

LoanTable

record global base/tealdef/game_mechanics/finance/loan.d.tl:23

global record LoanTable

Notes

State of the loan game script.

Fields

Name Type Description
availableLoans {Loan} Current offers, one per size class.
obtainedLoans {Loan} Loans taken by the player.
freeId integer Next free loan id.