Add persistent cross-game player bank (Refs #3)
This commit is contained in:
@@ -6,6 +6,47 @@ T5/T6 script and each native plugin. Current versions are recorded in
|
||||
|
||||
## 2026-10-12
|
||||
|
||||
### Persistent cross-game player bank — TWS #3 / Electric Cherry #146
|
||||
|
||||
| Component | Version | Affected source |
|
||||
| --- | --- | --- |
|
||||
| `tws_t5_bank.gsc` | `1.0.0` | New `t5/scripts/tws_t5_bank.gsc` |
|
||||
| `tws_t6_bank.gsc` | `1.0.0` | New `t6/scripts/tws_t6_bank.gsc` |
|
||||
| `t5-plugin` | `1.1.0` | `t5/plugins/tws-t5-gsc-utils/src/component/bank.cpp`, `src/utils/bank.cpp`, `src/utils/bank.hpp` |
|
||||
| `t6-plugin` | `1.1.0` | `t6/plugins/tws-t6-gsc-utils/src/component/bank.cpp`, `src/utils/bank.cpp`, `src/utils/bank.hpp` |
|
||||
|
||||
- Add `.b`, `.d <amount|all>` and `.w <amount|all>` plus help registration on
|
||||
both engines. Store shared GUID balances and ledger history through Electric
|
||||
Cherry's authenticated bank API. EC generates and injects a private token per
|
||||
immutable server instance, preserving it on rebuild/move and revoking it on
|
||||
retirement. No manual token map is required;
|
||||
the shared telemetry token does not authorize bank operations.
|
||||
- Add native `bankLoad`, `bankStore`, `bankRemove` and `bankResponse` helpers.
|
||||
Save cancellation before preparing a transfer, replace it with a commit
|
||||
decision before applying points without yielding, and replay settlement
|
||||
after map/process restarts. Invalid replies, insufficient funds, changed
|
||||
player state, and failed journal writes leave spendable points unchanged.
|
||||
Preserve earned `score_total`; applied withdrawals belong to the current match.
|
||||
- T5 and T6 receive equivalent behavior with their own namespaces, last-stand
|
||||
APIs, entry points and journal directories. Other scripts are unchanged;
|
||||
existing common help registration and telemetry match keys already suffice.
|
||||
- Compatibility: deploy Electric Cherry #146 first, then each game's plugin
|
||||
`1.1.0` and bank script `1.0.0`, with common and telemetry `1.0.0` or newer.
|
||||
EC host agents `1.9.0+` settle pending journals before destructive teardown.
|
||||
No new third-party dependency, upstream pin, or loader version requirement.
|
||||
Keep `tws-bank/<game>/` on persistent writable storage; preserve pending
|
||||
journals when rotating credentials or restarting servers.
|
||||
- Deployment: build/install both Windows x86 DLLs and **restart the full server
|
||||
processes**, then install the new bank scripts and create/rebuild through EC
|
||||
to inject private credentials. Restart maps after script changes. See
|
||||
[bank setup and recovery](README.md#player-bank-t5-and-t6).
|
||||
No deployment was performed. Windows DLL linking, GSC compilation and live
|
||||
Plutonium checks remain required.
|
||||
- Checks: `node tools/check_bank.mjs` exercises the actual transfer functions;
|
||||
`python3 tools/test_plugin_bank.py` checks native journals, response validation,
|
||||
failed writes and process recovery with sanitizers. The T6 compiler check
|
||||
now includes all eight modules.
|
||||
|
||||
### T6 newcomer join eligibility — `tws_t6_join.gsc` `1.0.1`
|
||||
|
||||
- Fix `t6/scripts/tws_t6_join.gsc` treating the initial T6 setup spawn as
|
||||
|
||||
Reference in New Issue
Block a user