Skip to content

Configuration

Every option of Cuxial Banking explained: where settings live, the data files and shared/config.lua.

The bank is configured in two places: the files of the resource, which hold the starting values, and the Config tab of /bankadmin, which edits most of them live.

Where settings live ​

shared/config.lua builds the configuration. It reads most values from the files in data/ and keeps a few of its own.

On the first start, the bank copies eleven sections into the database: general, accounts, cards, loans, savings, cheques, rewards, credit score, ATM, admin and logs. From then on the database copy is the one in use.

After the first start, change those sections in /bankadmin → Config. To load the values of a file again, edit the file, restart the resource and press the reset button of that section in the panel.

What you want to changeWhere
Anything in the eleven sections, before the first startdata/*.lua and shared/config.lua
Anything in the eleven sections, afterwards/bankadmin → Config
debug, ui, commands, world, wealth, limitsshared/config.lua, then restart the resource
admin.permission and logs.convarshared/config.lua only; the panel shows them as read-only
Branches and ATM points/bankadmin → Points

The Config tab can export the changed sections to a text and import them on another server.

General · data/general.lua ​

OptionTypeDefaultWhat it does
Currencystring'USD'Currency code shown in the interface and in the logs.
UseCashAsItembooleantruetrue handles cash as an inventory item (general.cashItem). false uses the cash account of your framework.
LogExternalBankChangesbooleantruetrue writes to the history every change another resource makes to a player's bank money. false records only the bank's own operations. Requires QBox or QBCore.
AdminMaxAdjustnumber100000000Largest amount staff can add or remove in one balance adjustment.

These options of the same section are set in shared/config.lua, under general:

OptionTypeDefaultWhat it does
cashItemstring'money'Name of the cash item. Only used with UseCashAsItem = true.
bankDistancenumber5.0Metres from a branch within which the server accepts bank operations.
atmDistancenumber3.0Metres from an ATM within which the server accepts ATM operations.
moneyItemsstring[]{ 'money', 'black_money' }Items counted as money, at face value, in the wealth report of the staff panel.
valuedItemstable{}Items counted in the wealth report at a price each: { gold_bar = 5000 }.

Accounts · data/accounts.lua ​

OptionTypeDefaultWhat it does
PINChangeCostnumber200Fee for changing the PIN of an account.
PrintReceiptPricenumber100Fee for printing a receipt.
NewAccountCostnumber500Fee shown in the window that creates a shared account. Keep it equal to CustomAccounts.CreationFee, which is the amount charged.
MaxTransactionsPerPlayernumbernil (50)Movements kept in the history shown to the player.
ReceiptItemstring'printerdocument'Item given as printed receipt.
MaxTransferContactsFavoritesnumber3Contacts a player can mark as favourite.
CustomAccounts.Enabledbooleantruefalse removes shared accounts.
CustomAccounts.MaxAccountsPerPlayernumber3Shared accounts one character can own.
CustomAccounts.CreationFeenumber500Fee charged for creating a shared account.

Set in shared/config.lua, under accounts:

OptionTypeDefaultWhat it does
transactionRetentionDaysnumber0Days a movement is kept before the daily clean-up deletes it. 0 keeps everything.
pin.maxAttemptsnumber5Wrong account PINs allowed before the lock.
pin.lockSecondsnumber30Seconds the account PIN stays locked.

Cards · data/cards.lua ​

OptionTypeDefaultWhat it does
EnableCardsbooleantruefalse disables cards.
RenewCardTimenumber8Years until the expiry date printed on a new card.
MaxTotalCreditCardsnumber10Cards one character can have in total, any state.
MaxActiveCreditCardsnumber3Active cards one character can have.
PlayerCanChangeDailyLimitbooleanfalsetrue lets the owner change the daily limit of a card.
MaxDailyLimitnumber100000Highest daily limit a card can have.
CreditCardstable[]three tiersCard tiers. Each one has label, dailyLimit, price and item.

Each tier is its own inventory item. item must be the name of an item registered in your inventory, with its image.

data/cards.lua
lua
CreditCards = {
    { label = 'Standard Card', dailyLimit = 2500,  price = 100, item = 'card_standard' },
    { label = 'Premium Card',  dailyLimit = 5000,  price = 200, item = 'card_premium' },
    { label = 'Gold Card',     dailyLimit = 10000, price = 300, item = 'card_elite' },
},

Set in shared/config.lua, under cards:

OptionTypeDefaultWhat it does
posMaxChargenumber10000000Largest amount another resource can charge or refund on a card in one call.
pin.maxAttemptsnumber5Wrong card PINs allowed before the card locks.
pin.lockMinutesnumber15Minutes a card stays locked.
pin.cooldownMsnumber3000Milliseconds between two PIN attempts.
pin.sessionSecondsnumber300Seconds an ATM session stays valid after the PIN.

Loans · data/loans.lua ​

OptionTypeDefaultWhat it does
EnableLoansbooleantruefalse disables loans.
AccountsWithLoanstableall trueAccount types that can borrow: personal, business, custom.
TimeScale.gameMonthRealSecondsnumber86400Real seconds in one game month. One instalment is due each game month.
LoanPlanstablefive plansLoan plans. See below.
MaxActiveLoansnumber4Loans one account can have open at once.
LoanSchedulerIntervalnumber1800Seconds between two runs of the collection process. Minimum 60.

Set in shared/config.lua, under loans: minRate (0.5), the lowest interest rate a loan can end up with after the credit score and reward discounts.

Plans · LoanPlans ​

A plan with a fixed term has label, maxAmount, interestRate, months and enabled. A plan with options lets the player pick the term, each with its own rate.

data/loans.lua
lua
LoanPlans = {
    starter = { label = 'Starter Loan', maxAmount = 5000, interestRate = 5.5, months = 12, enabled = true },

    custom = {
        label = 'Custom Loan',
        maxAmount = 500000,
        options = {
            { months = 12, interestRate = 8.5 },
            { months = 24, interestRate = 9.0 },
        },
        enabled = true,
    },
},

Payments · Payments ​

OptionTypeDefaultWhat it does
graceHoursnumber6Hours after the due time before an instalment counts as late.
defaultHoursnumber72Hours late after which the loan is in default.
blockNewLoansWhenLatebooleantruetrue refuses new loans while one is late.
penalty.pctnumber2.0Penalty per interval, as a percentage of what is still owed.
penalty.scoreLossnumber5Credit score points lost with each penalty.
penalty.modestring'flat''flat' adds the same percentage each interval. 'compounding' applies it on top of the previous ones.
penalty.intervalHoursnumber24Hours between two penalties.
penalty.capPctnumber30.0Ceiling of the accumulated penalties, as a percentage of the total of the loan.

Borrowing capacity · Capacity ​

The most a player can borrow is the lower of two limits, never below zero: one from the account balance, one from income.

OptionTypeDefaultWhat it does
equityMultipliernumber3.0Balance limit: (account balance − pending debt) × this value.
income.enabledbooleantruetrue adds the income limit on personal accounts. Business and shared accounts only use the balance limit.
income.recentPaychecksnumber5Collected paychecks averaged to work out the income.
income.factornumber8.0Income limit: average income × this value × score multiplier − pending debt.
scoreMultiplierstable[]six bandsMultiplier of the income limit by credit score. Each entry has min and mult.

Garnishment · Garnishment ​

OptionTypeDefaultWhat it does
enabledbooleantruefalse stops the bank from withholding income.
pctnumber25.0Percentage withheld from each paycheck while a loan is late or in default.
statusestableboth trueLoan states that trigger it: [1] late, [2] in default.
sourcestable{ paycheck = true }Income the withholding applies to.

Credit score · data/creditscore.lua ​

OptionTypeDefaultWhat it does
Enablebooleantruefalse disables the credit score.
defaultnumber500Score of a new account.
min / maxnumber300 / 850Limits of the score.
bandstable[]six bandsEach band has min, label and modifier: points added to the interest rate of a loan. Negative lowers it.
deltastableonTime = 5, late = -10, defaulted = -60Points gained or lost with each event.

Set in shared/config.lua, under creditScore: onTimeCooldownHours (0), the hours that must pass before another payment on time adds points again. 0 means every payment counts.

Savings · data/savings.lua ​

OptionTypeDefaultWhat it does
EnableSavingsbooleantruefalse disables savings.
SavingsWeekEquivalentnumber8Real hours in one savings week. Interest is paid once per savings week.
SavingsInterestRatenumber2.5Interest percentage of personal goals.
MaxActiveGoalsnumber4Goals a personal account can have.
BusinessSavingsInterestRatenumber3.0Interest percentage of business goals.
BusinessMaxActiveGoalsnumber5Goals a business account can have.
CustomSavingsInterestRatenumber2.5Interest percentage of shared account goals.
CustomMaxActiveGoalsnumber5Goals a shared account can have.
AccountsWithSavingstableall trueAccount types that can save: personal, business, custom.

Cheques · data/cheques.lua ​

OptionTypeDefaultWhat it does
Itemstring'bank_cheque'Item given as cheque.
BookItemstring'bank_chequebook'Item bosses use to issue business cheques.
BookSecondsnumber30Seconds the option to issue a cheque stays on nearby players after using the chequebook.

Set in shared/config.lua, under cheques: maxAmount (100000000), the largest amount of one cheque.

Changes to the cheque items need a restart of the resource, also when made from the panel.

Rewards · data/rewards.lua ​

OptionTypeDefaultWhat it does
Enabledbooleantruefalse disables rewards.
EarnRatestablefive actionsPoints per action: base fixed points plus 1 point for every per of the amount. per = 0 gives the base only. Actions: deposit, withdraw, transfer, atm_use, loan_payment.
ActionLabelstablefive labelsName of each action in the points history.
AntiFarm.Enabledbooleantruefalse turns the three protections off.
AntiFarm.ActionCooldowntable0 to 60Seconds between two awards of the same action, per player. 0 = no cooldown.
AntiFarm.DailyPointsCapnumber500Points a player can earn per day. 0 = no cap.
AntiFarm.RoundTrip.windowSecondsnumber300Window in which the opposite action cancels the points.
AntiFarm.RoundTrip.amountTolerancenumber0.25How close the two amounts must be to count as the same money: 0.25 = ±25 %.
AntiFarm.RoundTrip.pairstabledeposit ↔ withdrawWhich action is the opposite of which.
Categoriestable[]fiveTabs of the catalogue: key and label.
Catalogtable[]ten rewardsRewards on offer. See below.

Each reward has id (unique), name, description, cost in points, icon, category and type:

typeWhat the player getsFields
'cash'value paid into the bank at once.value
'fee_waiver'The next bank fee is free.uses, durationDays
'interest_boost'value % more interest on personal savings.value, durationDays
'loan_discount'value % less on the rate of the next loan.value, uses, durationDays

ATMs · data/atms.lua ​

OptionTypeDefaultWhat it does
ATMDistancenumber1.5Target distance of an ATM, in metres.
ATMtable[]four modelsProp models that work as ATM. Each entry is { model = hash }, with the hash as a number.

Branches · data/banks.lua ​

OptionTypeDefaultWhat it does
ShowBankBlipsbooleantruefalse hides every bank blip. Part of the general section: after the first start, change it in the panel.
DebugTargetZonesbooleanfalsetrue draws the target zones of the branches.
BankLocationstable[]example listBranches created on the first start.

BankLocations is read once, when the points table is empty. After that, manage branches and ATM points from /bankadmin → Points. The list in the file is an example for the default map: replace it before the first start if your banks are somewhere else.

Interface · data/interface.lua and ui ​

OptionTypeDefaultWhat it does
AccentColor (data/interface.lua)string (hex)'#e53935'Accent colour of the bank and ATM interface.
ui.accent (shared/config.lua)string (hex)configurableAccent colour of the staff panel.

Discord logs · data/webhook.lua ​

OptionTypeDefaultWhat it does
BotNamestring'CuxialBank'Name the messages are posted under.
ServerNamestring'My Server'Name shown as author of each message.
IconURLstring''Icon next to the author.
DateFormatstring'%d/%m/%Y [%X]'Date format of the footer.
Webhooktableone entry per log typeFor each log type: enabled and color (decimal).

Set in shared/config.lua, under logs:

OptionTypeDefaultWhat it does
enabledbooleantruefalse sends no logs at all.
convarstring'cuxial_banking_webhook'Name of the convar that holds the webhook URL. A convar named <convar>_<log type> overrides it for that type.
auditDaysnumber90Days the audit log of the staff panel is kept. 0 keeps everything.

The URL itself is never written in a file. See Installation.

The rest of shared/config.lua ​

OptionTypeDefaultWhat it does
debugbooleanfalsePrints traces to the console. Also enabled by setting the convar cuxial_banking_debug to 1.
commands.admin.namestring'bankadmin'Command that opens the staff panel. An empty string removes the command.
commands.admin.restrictedstring | falsefalseACE group required by the command, for example 'group.admin'. false leaves only the check of admin.permission.
admin.permissionstring'admin'Permission of your framework that makes a player bank staff.
world.targetDistancenumber1.5Target distance of a branch, in metres.
world.chequeTargetDistancenumber2.0Distance at which a boss can target a player to issue a business cheque.
world.nearbyRadiusnumber12.0Radius in which nearby players are offered as transfer recipients.
world.interactionsstring'cuxial_interactions'Name of the resource that shows branches as NPCs.
wealth.cacheSecondsnumber15Seconds a wealth report is reused before it is worked out again.
wealth.providerTimeoutMsnumber2000Milliseconds each source of the wealth report has to answer.
wealth.containerDepthnumber3Levels of containers inside containers that the wealth report opens.
limits.reasonLengthnumber100Characters of a transfer reason.
limits.accountNameLengthnumber100Characters of a shared account name.
limits.goalNameLengthnumber100Characters of a savings goal name.
limits.chequePayToLengthnumber100Characters of the payee of a cheque.
limits.chequeMemoLengthnumber120Characters of the note of a cheque.
limits.contactNameLengthnumber48Characters of a contact name.
limits.maxContactsnumber50Contacts per player.
limits.maxMultiTransfernumber20Recipients of one transfer to several contacts.
limits.savingsMaxTargetnumber4294967295Highest target of a savings goal.
limits.lockWaitMsnumber5000Milliseconds an operation waits for another one on the same account to finish.

Common changes ​

Move the bank to a different cash item ​

In /bankadmin → Config → General, set the cash item to the one your inventory uses, or turn cash as item off to use the cash account of your framework.

Make loans faster or slower ​

TimeScale.gameMonthRealSeconds sets the pace. With 43200, an instalment is due every 12 real hours.

Add a card tier ​

Register a new item in your inventory. Before the first start, add a line to CreditCards; afterwards, add the tier in /bankadmin → Config, in the cards section.

lua
{ label = 'Black Card', dailyLimit = 50000, price = 1000, item = 'card_black' },

Translate the texts ​

Every text is in locales/en.json and locales/es.json. The names of loan plans, card tiers, credit score bands and rewards are in the data files.

© Cuxial