config/loans.lua.
- The player borrows up to their available limit; the bank works out the interest for the whole term up front and adds it to what’s owed.
- The total splits into fixed installments, auto-collected from the borrower’s personal account on a schedule.
- Interest is simple and charged over the full term, baked in at the start - settling early doesn’t dodge it.
- Paying on time raises credit; missing payments lowers it and adds fees.
Master switches
config/loans.lua
enabled turns the feature on or off. borrowingEnabled = false blocks new loans while existing loans keep running (installments still collect, credit still updates) - use it to freeze lending without wiping live debt.
How interest works
Flat percentage per day on the amount borrowed (not an APR):interest = amount × daily rate × days. The daily rate is a base rate from the player’s credit band plus a surcharge on larger loans:
config/loans.lua
The credit score
Runs 0-1000, starts atcreditScoreStart for new players, and does two jobs: sets the borrowing limit and unlocks savings tiers.
- Borrowing limit - the
limitbands map score to a total credit cap (most a player can owe across all debt at once). Highest reached band wins; available credit is that limit minus current debt. - Savings - higher tiers with better rates and caps require a minimum score. See Savings & interest.
- What moves it -
creditDeltasreward on-time payments and completed loans, and penalise overdue debt daily (worsening each day down to a cap). Always clamped to 0-1000.
When a payment is missed
A staged pipeline, each stage configurable:- Grace (
gracePeriodDays) - a short window before any penalty lands. - Late fee (
lateFeesEnabled,latePenaltyPercent) - a one-time fee, a percentage of the outstanding balance, added once when the payment goes late. - Overdue - credit bleeds daily (the
delinquent…deltas) and the bank auto-collects toward the debt, on bank open and on a timer. - Default (
autoDefaultAfterDays) - an asset loan (financed car/house) is handed back to the originating script to be repossessed and the player takes theloanDefaultedhit. A plain cash loan has nothing to repossess, so it just stays overdue - collected and decaying credit - until cleared. SetassetRepossession = falseto make everything use the cash model (nothing is ever repossessed).