Configuration
Bank and invoices
Bank adapter and accounts, crypto, Coin Lab and how invoices are sent and split.
Files: configs/config_bank.lua and configs/config_invoices.lua. What players see is on Money.
#Config.Bank
| Setting | Type | Default | What it does |
|---|---|---|---|
Bank.Adapter |
string | 'auto' |
Where IBANs and job accounts come from: 'auto', 'tgiann-bank', 'qb-management', 'renewed-banking', 'esx_society' or 'framework'. Auto tries them in that order. 'framework' uses the phone's own IBAN and has no job accounts |
Bank.Accounts.Enabled |
boolean | true |
Extra accounts next to the main one |
Bank.Accounts.Max |
number | 3 |
Extra accounts one character can own (savings and shared) |
Bank.Accounts.SharedMembers |
number | 5 |
People on one shared account besides the owner |
Bank.Accounts.JobAccount |
boolean | true |
Bosses see their job account and can move money between it and their own |
Bank.Requests |
boolean | true |
"Ask for money": a personal request the other side pays with one tap from Bank or Invoices |
Bank.AtmModels |
model list | prop_atm_01, prop_atm_02, prop_atm_03, prop_fleeca_atm |
ATM prop models for "Nearest ATM". An ATM that is not one of these models, or has no prop, is not found |
With tgiann-bank running, its own extra and shared accounts are shown instead of the phone's, read only: money moves through tgiann-bank's ATMs.
Adapters: Bank.
#Config.Crypto
| Setting | Type | Default | What it does |
|---|---|---|---|
Crypto.Currency |
string | 'usd' |
CoinGecko quote currency, lower case |
Crypto.RefreshMinutes |
number | 30 |
Live prices are fetched once per interval for the whole server. Keep it at 5 or more on the free CoinGecko API |
Crypto.Fee |
number | 0 |
Share taken on every buy and sell of a live coin, at most 0.2. It leaves the economy |
Crypto.SellLockHours |
number | 1 |
A live coin cannot be sold for this long after its holder last bought, or was sent, some. Keep it well above RefreshMinutes |
Crypto.Coins |
list | Bitcoin, Ethereum, Litecoin, BNB | One entry per coin, fields below |
Live prices follow a real exchange, so Fee and SellLockHours exist to stop players from buying just before a refresh and selling just after.
Coin fields:
| Field | What it does |
|---|---|
id |
The CoinGecko id, for example 'bitcoin' |
symbol, name |
Shown in the app |
price |
Used until the first live price arrives, and always when live prices are off in config_server.lua |
icon |
Optional https image |
canBuy, canSell, canTransfer |
What players may do with the coin |
Scripts can add their own coins: Crypto exports. Live prices and the API key are in config_server.lua.
#Config.Coins
Coin Lab: players launch their own coin. The price is BasePrice + Step x supply, paid into a reserve that sellers are paid from, so no money is created. The launch price and the buy fee leave the economy.
| Setting | Type | Default | What it does |
|---|---|---|---|
Coins.Enabled |
boolean | true |
false switches Coin Lab off: the icon goes and every request is refused. Coins and holdings are kept until it is switched on again |
Coins.LaunchPrice |
number | 500 |
Cost of launching a coin |
Coins.BasePrice |
number | 1.0 |
Price at zero supply |
Coins.Step |
number | 0.01 |
Price increase per coin of supply |
Coins.Fee |
number | 0.02 |
Share taken from every buy and sell, at most 0.2. A buy's fee leaves the economy; a sell's fee stays in the coin's reserve |
Coins.MaxPerPlayer |
number | 2 |
Coins one character may launch |
Coins.MaxTrade |
number | 5000 |
Coins in one order |
Coins.MaxShare |
number | 0.25 |
The most of a coin's supply one character may hold after a buy, as a share. 0: off |
Coins.ShareFreeUnits |
number | 100 |
The first coins that are always allowed, so a new coin can still start |
Coins.SellLockMinutes |
number | 60 |
A coin cannot be sold for this many minutes after its holder last bought some. 0: off |
#Config.Invoices
| Setting | Type | Default | What it does |
|---|---|---|---|
Invoices.EveryoneCanSend |
boolean | true |
Any player can bill another player personally. Personal invoices are paid in full to the sender. The admin tablet can override it |
Invoices.GradeShare |
table | { Base = 20, PerGrade = 5, Max = 50 } |
How an employee's share of a job invoice grows with their grade, for jobs with cutReceiver = 'grade' |
Invoices.Jobs |
table | an example list | Jobs that can bill in the company's name, keyed by job name |
Each job entry:
luaConfig.Invoices.Jobs = {
police = { label = 'Police', cutSender = 'rest', cutReceiver = 'grade', send = 'all' },
burger = { label = 'Burgershot', cutSender = 100, cutReceiver = 0, send = 'all' },
}
| Field | What it does |
|---|---|
label |
Name on the invoice |
cutSender |
Percent that goes to the job account, or 'rest': whatever the employee does not get. Needs a bank adapter with job accounts |
cutReceiver |
Percent that goes to the employee who sent the invoice, or 'grade': Base percent at grade 0, PerGrade more for every grade above it, never more than Max |
share |
Optional { Base, PerGrade, Max } for this job instead of GradeShare |
send |
Grades allowed to send: 'all' or a list such as { 2, 3, 4 } |
With the default GradeShare, grade 0 gets 20 %, grade 3 gets 35 %, grade 6 and up get 50 %.
Anything cutSender and cutReceiver leave below 100 is paid to nobody.
When the job account cannot be paid, the payment is refused and the payer is refunded. With the framework bank adapter there are no job accounts, so set cutSender = 0 for every job.
The sender's grade is stored with the invoice when it is sent. An employee who is offline is paid through the framework's offline money when it has one, otherwise on their next login.
The shipped Jobs list is an example. Set it to your server's jobs.
Paid and cancelled invoices are deleted after Config.Retention.invoices days; unpaid ones stay. The largest invoice is Config.Limits.TransferMax. Both are on Other settings.