Summary
Standalone bank and cash system for Arma Reforger: per-player balances, an ATM, a balance HUD and persistent saving. A reusable economy core other mods (e.g. ConflictEconomy) build on top of.
Description
FEATURES
- Per-player accounts, keyed to the backend UID (reconnect-safe). For environments without a backend UID (Workbench, local server without auth) there is a separate offline area.
- ATM menu for deposits and withdrawals (cash to/from bank).
- Balance HUD (bank + cash) and a subtle "+$X / -$X" feedback on money changes.
- Persistence as JSON on the server disk, with batched autosave (no disk write on every transaction).
- Transaction log per player and day, with configurable retention.
- Cash toggle: the cash system can be turned off - everything then runs through the bank account, the cash display disappears and any existing cash is automatically moved to the bank.
- Built for 128 players: throttled saving, spam protection on ATM requests, sparse logging.
- Localized messages in 13 languages.
BasicBanking ships no gameplay rules of its own (no costs, no rewards). It is the foundation - the actual economy is defined by the mod on top. For the Conflict game mode, that mod is ConflictEconomy.
ADMIN SETUP
BasicBanking is a building block, not a finished game mode. To use it:
1. On the game mode:
Add the component KF_BankingGameModeComponent to your game mode prefab. Attributes:
- Starting amount (Bank) - balance of new accounts (default 10000).
- Cash system enabled - on/off (off = everything via bank, cash HUD hidden).
- Transaction log retention (days) - 0 = never delete.
2. On the player controller:
BasicBanking already overrides the vanilla prefab Prefabs/Characters/Core/DefaultPlayerControllerMP.et and automatically adds KF_BankingNetState, KF_FeedbackNetState as well as the HUD (KF_BankingInfoDisplay) and the money feedback. Usually nothing more to do here.
3. Place an ATM:
Put the ATM prop (Prefabs/Systems/ATM.et) or the editor entry "ATM" into the world. Interacting with it opens the banking menu.
DATA STORAGE (server profile)
- $profile:BasicBankingDB/Accounts/<uid>/BankAccount.json - balance
- $profile:BasicBankingDB/Accounts/<uid>/Transactions/<date>.json - transactions
- $profile:BasicBankingDB/Offline/<name>/... - players without a backend UID (test data)
- $profile:BasicBankingDB/Settings.json - saved server/GM settings
Debugging: verbose logging is off by default (performance). To troubleshoot, set KF_Log.s_bDebugEnabled to true.
FOR MODDERS (API)
Everything is server-side (the transaction logic runs on the authority):
- KF_BankingService.AddCash(playerId, amount, reason) / AddBank(...) - creates new money (rewards).
- KF_BankingService.RemoveCash/RemoveBank(...) - destroys money (fines/costs).
- KF_BankingService.Debit(playerId, amount, reason, out fromCash, out fromBank) - pays from cash + bank combined; returns false if insufficient.
- KF_BankingService.Deposit/Withdraw/Transfer/ChargeCustomer(...) - transfers.
- Read balance: KF_BankingManager.Get().GetAccount(playerId) (server) or KF_BankingNetState on the controller (GetBank()/GetCash(), invoker GetOnBalanceChanged()) on the client.
- Cash state: KF_BankingGameModeComponent.IsCashEnabled().
License
BasicBanking - License
======================
Author: KatataFish17
This mod ("the Mod") is published under the Arma Public License No Derivatives
(APL-ND) by Bohemia Interactive a.s.:
https://www.bohemia.net/community/licenses/arma-public-license-no-derivatives
AUTHOR'S ADDITIONAL GRANT
-------------------------
Notwithstanding the "No Derivatives" clause, the author additionally grants the
right to create and publish derivative works of the Mod's files (in particular
via Enfusion modded/override scripts, or by editing/replacing this Mod's files),
PROVIDED THAT ALL of the following conditions are met:
1. This Mod remains a required dependency of your work: it must be referenced
as a dependency and loaded alongside your work. You may NOT bundle a
standalone copy of this Mod's content into your own work.
2. Clear credit to this Mod is given in the public description of your
mod/work (name of the Mod + author).
All other terms of APL-ND continue to apply unchanged (attribution, no
misrepresentation, non-commercial use as defined by APL-ND, etc.).