Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 016985a5fc | |||
| a7f95691bb | |||
| 23efdee804 | |||
| 1859613f1f | |||
| a41d8cb531 | |||
| e770cb55cb | |||
| 338617e855 | |||
| ecd5933f9f | |||
| 38fbf80bc1 | |||
| 61dd3d3754 | |||
| 61a923cbef | |||
| 57b6cd8dea |
@@ -0,0 +1,114 @@
|
|||||||
|
# bnstoolkit feature-complete — testing notes for 2026-06-07 evening
|
||||||
|
|
||||||
|
> Shipped: pack v0.35.0 / bnstoolkit 0.3.1.
|
||||||
|
> Repo: http://10.16.5.102:3000/minecraft/bnstoolkit
|
||||||
|
> Server status: ✅ live + verified at 02:41 UTC.
|
||||||
|
|
||||||
|
## What's in the build
|
||||||
|
|
||||||
|
### 5 screens (FTB Library widgets — matches FTB Quests look)
|
||||||
|
|
||||||
|
All opened via key bindings. Rebindable in vanilla controls menu under
|
||||||
|
"Brass and Sigil" category.
|
||||||
|
|
||||||
|
| Key | Screen | What it does |
|
||||||
|
|---|---|---|
|
||||||
|
| **K** | Civic Tier ladder | 13 rows, current tier highlighted. Right pane shows next tier's cost + perks + Upgrade button. Disabled if you can't afford it or are at Sovereign. |
|
||||||
|
| **J** | Bounty Board | Today's 5-bounty pool + any active set. Detail pane: target, count, reward, progress. Accept / Cancel / Turn In buttons by state. |
|
||||||
|
| **N** | Plot Office | Plot list with ownership state-coding (yours / taken / free). Detail pane: size, chunks, price. Buy / Release buttons. |
|
||||||
|
| **H** | Bazaar shop | 9-cell sell item grid. Click an item, see DR-aware effective price for current tier. Sell 1 / 16 / 64 quick buttons. |
|
||||||
|
| **M** | Quest Log | At-a-glance status: tier + balance + active bounties (with progress bars) + owned plots. |
|
||||||
|
|
||||||
|
### HUD overlay
|
||||||
|
|
||||||
|
Top-left of the screen, always visible: `<tier-colour><tier-name>` on
|
||||||
|
one line, `<balance> spurs` on the second. Refreshes 1Hz from server
|
||||||
|
push — picks up coin pickups immediately, no inventory polling.
|
||||||
|
|
||||||
|
Auto-hides when F1 is pressed or chat is open (standard NeoForge HUD
|
||||||
|
layer behavior).
|
||||||
|
|
||||||
|
### Villager trade rebalance
|
||||||
|
|
||||||
|
Every emerald cost or result in vanilla + modded villager trades is
|
||||||
|
now Numismatics:
|
||||||
|
- 1..7 emeralds → spurs
|
||||||
|
- 8..63 → bevels (1 bevel = 8 spurs)
|
||||||
|
- 64+ → cogs (1 cog = 64 spurs)
|
||||||
|
|
||||||
|
Works automatically on:
|
||||||
|
- All 14 vanilla villager professions
|
||||||
|
- Wandering trader (generic + rare)
|
||||||
|
- Any modded villager professions (we wrap the event's list, no enum
|
||||||
|
of professions needed)
|
||||||
|
|
||||||
|
This was the "blocked on API" item. Built it into bnstoolkit instead
|
||||||
|
of pulling a third-party mod, because the cleanest Modrinth option
|
||||||
|
needed NeoForge 21.1.230+ and we're on 228.
|
||||||
|
|
||||||
|
## Testing path
|
||||||
|
|
||||||
|
```
|
||||||
|
/bns me # confirm Peasant tier 1
|
||||||
|
/give @s numismatics:spur 500 # give spurs for upgrades
|
||||||
|
K # open tier ladder
|
||||||
|
# click Upgrade — should pay 200 and bump you to Farmer
|
||||||
|
|
||||||
|
/bns admin tier set <you> 5 # jump to Knight for plot testing
|
||||||
|
K # confirm new tier visible
|
||||||
|
H # open bazaar
|
||||||
|
# click diamond, click Sell 1 (you'll need a diamond in inventory)
|
||||||
|
J # open bounty board, accept one
|
||||||
|
# kill the target mobs — progress shows in chat AND the screen
|
||||||
|
# turn in via the J screen
|
||||||
|
N # open plot office, buy p001
|
||||||
|
M # quest log shows everything
|
||||||
|
|
||||||
|
# Test villager trades:
|
||||||
|
/summon villager ~ ~ ~
|
||||||
|
# Right-click the villager once it picks a profession (place a workstation)
|
||||||
|
# Trades should show spurs/bevels/cogs instead of emeralds
|
||||||
|
```
|
||||||
|
|
||||||
|
## Architecture
|
||||||
|
|
||||||
|
```
|
||||||
|
KubeJS server_scripts/economy/ ← single source of truth for state + logic
|
||||||
|
↑
|
||||||
|
│ (chat commands via server.getCommands)
|
||||||
|
│
|
||||||
|
ServerEconomyBridge.java ← reads NBT, sums Numismatics coins,
|
||||||
|
routes write verbs through /bns
|
||||||
|
↑↓
|
||||||
|
4 snapshot + 2 command packets
|
||||||
|
↑↓
|
||||||
|
ClientBnsState.java ← single static state holder
|
||||||
|
↑
|
||||||
|
Screens read this each frame
|
||||||
|
```
|
||||||
|
|
||||||
|
Source of truth stays in KubeJS. Java is just the UI layer and a thin
|
||||||
|
write-path proxy. If you want to rebalance prices or add bounties, you
|
||||||
|
do it in KubeJS — Java auto-reflects.
|
||||||
|
|
||||||
|
## Known gaps for future iteration
|
||||||
|
|
||||||
|
| Gap | Where to fix |
|
||||||
|
|---|---|
|
||||||
|
| No client toast notifications — feedback comes via KubeJS chat messages | Add a dist-isolated `ClientToastDispatcher` class (0.4.0) |
|
||||||
|
| Bazaar grid doesn't tooltip the per-unit price | One `addMouseOverText` per `ItemCell` |
|
||||||
|
| Plot office doesn't show a minimap | Render bluemap PNG snippet as background or use FTB Chunks' map widget |
|
||||||
|
| Quest log doesn't show FTB Quests progression | Hook into FTB Quests' API once first chapter ships |
|
||||||
|
| Numismatics coins as bunch — no fractional change | Bazaar pays in highest denom that fits; player converts at the Bank |
|
||||||
|
| Wanderer rare-trade rebalance is greedy (every rare item costs are converted) | Profession-aware exclusion list if anything weird sneaks through |
|
||||||
|
|
||||||
|
## File map
|
||||||
|
|
||||||
|
| File | Purpose |
|
||||||
|
|---|---|
|
||||||
|
| `pack/overrides/mods/bnstoolkit-0.3.1.jar` | The mod itself (95 KB) |
|
||||||
|
| `pack/overrides/kubejs/server_scripts/economy/*.js` | State + business logic (unchanged from v0.33.0) |
|
||||||
|
| `pack/overrides/world/serverconfig/ftbranks/ranks.snbt` | 13-tier rank config (unchanged) |
|
||||||
|
| `docs/bnstoolkit-architecture.md` | Original architecture spec |
|
||||||
|
|
||||||
|
Source repo: http://10.16.5.102:3000/minecraft/bnstoolkit (main = 14dc69f at time of pack ship).
|
||||||
@@ -0,0 +1,215 @@
|
|||||||
|
# Economy V1 — overnight build handoff
|
||||||
|
|
||||||
|
> Built 2026-06-06 / 23:00-23:55 UTC. All shipped via PR #67 (v0.33.0).
|
||||||
|
> Server running clean at port 25565. All scripts verified loaded with 0 errors.
|
||||||
|
|
||||||
|
## TL;DR — what to test tomorrow
|
||||||
|
|
||||||
|
A full command-driven economy is live. Pure-server (no client mod yet), works in chat and over the Telegram bridge equally. Open the in-game chat or telnet and try:
|
||||||
|
|
||||||
|
```
|
||||||
|
/bns help ← top of the iceberg
|
||||||
|
/bns me ← your status
|
||||||
|
```
|
||||||
|
|
||||||
|
That alone surfaces every command available. Below is the deeper walkthrough.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## What ships
|
||||||
|
|
||||||
|
### 1. 13-tier civic ladder (`/bns tier upgrade`)
|
||||||
|
|
||||||
|
Every player has a tier integer (1-13) in their NBT. New joiners are auto-set to tier 1 (Peasant). Upgrading costs spurs and runs `ftbranks add <player> <rank>` to apply the rank's permission nodes (chunk allowance, name format).
|
||||||
|
|
||||||
|
| # | Title | Cost to reach | Chunk allowance | Plot slots | Bounty slots | Shop fee |
|
||||||
|
|---|---|---|---|---|---|---|
|
||||||
|
| 1 | Peasant | 0 | 9 | 0 | 3 | 25% |
|
||||||
|
| 2 | Farmer | 200 | 18 | 0 | 3 | 25% |
|
||||||
|
| 3 | Citizen | 750 | 35 | 1 | 3 | 25% |
|
||||||
|
| 4 | Merchant | 2,500 | 60 | 1 | 4 | 23% |
|
||||||
|
| 5 | Knight | 6,500 | 100 | 2 | 4 | 20% |
|
||||||
|
| 6 | Baron | 15,000 | 150 | 2 | 5 | 18% |
|
||||||
|
| 7 | Viscount | 35,000 | 220 | 3 | 5 | 16% |
|
||||||
|
| 8 | Earl | 75,000 | 300 | 3 | 6 | 14% |
|
||||||
|
| 9 | Marquess | 150,000 | 400 | 4 | 6 | 12% |
|
||||||
|
| 10 | Duke | 300,000 | 525 | 5 | 7 | 10% |
|
||||||
|
| 11 | Archduke | 700,000 | 700 | 6 | 7 | 8% |
|
||||||
|
| 12 | Grand Duke | 1,500,000 | 900 | 7 | 8 | 6% |
|
||||||
|
| 13 | Sovereign | 10,000,000 | 1,500 | 10 | 10 | 0% |
|
||||||
|
|
||||||
|
**Test it:**
|
||||||
|
- `/bns me` shows your tier + balance + everything else
|
||||||
|
- `/bns admin tier set <player> <1-13>` to jump anyone instantly
|
||||||
|
- `/bns admin tier list` shows the full table in-chat
|
||||||
|
- `/give @s numismatics:spur 64` for testing money
|
||||||
|
- `/bns tier upgrade` pays + promotes
|
||||||
|
|
||||||
|
### 2. Bazaar sell shop (`/bns sell`)
|
||||||
|
|
||||||
|
Sell raw commodities for spurs. Tier discount reduces a flat 25% Bazaar fee. Diminishing returns lower the per-unit payout as you sell more of the same item over a lifetime (10% per 64 sold, floor 50%).
|
||||||
|
|
||||||
|
| Item | Base price |
|
||||||
|
|---|---|
|
||||||
|
| Diamond | 10 spurs |
|
||||||
|
| Netherite ingot | 100 |
|
||||||
|
| Emerald | 1 |
|
||||||
|
| Gold ingot | 2 |
|
||||||
|
| Iron ingot | 1 |
|
||||||
|
| Lapis | 1 |
|
||||||
|
| Redstone | 1 |
|
||||||
|
| Coal | 1 |
|
||||||
|
| Ancient debris | 500 |
|
||||||
|
|
||||||
|
**Test it:**
|
||||||
|
- `/bns sell list` — your effective prices right now (after fee + DR)
|
||||||
|
- `/bns sell minecraft:diamond 8` sells 8 diamonds
|
||||||
|
- Sell ~70 diamonds and watch the per-unit price drop as the DR kicks in
|
||||||
|
|
||||||
|
### 3. Bounty engine (`/bns bounty`)
|
||||||
|
|
||||||
|
20 bounties in the catalogue. Each player gets a random 5 from the pool, refreshed every 24h per-player. Slot cap = your tier (3 at Peasant, up to 10 at Sovereign).
|
||||||
|
|
||||||
|
States: AVAILABLE → ACTIVE → READY → COMPLETED → (24h cooldown) → AVAILABLE.
|
||||||
|
|
||||||
|
- Kill bounties auto-track via `EntityEvents.death` — you'll get progress messages in chat
|
||||||
|
- Cancelling applies the same 24h cooldown as completing (no RNG-shopping)
|
||||||
|
|
||||||
|
Highlights from the pool:
|
||||||
|
- Slay 10 Zombies — 15 spurs
|
||||||
|
- Hunt 5 Plunderers — 75
|
||||||
|
- Slay 3 Wither Skeletons — 150
|
||||||
|
- Slay a Skreecher — 400
|
||||||
|
- Slay the Warden — 800
|
||||||
|
- Slay a Warped Mosco — 700
|
||||||
|
- Slay the Farseer — 900
|
||||||
|
- Destroy a Void Worm — 1,200
|
||||||
|
|
||||||
|
**Test it:**
|
||||||
|
- `/bns bounty list` — what's on offer for you today
|
||||||
|
- `/bns bounty accept b_zombie_10` — accept
|
||||||
|
- Kill 10 zombies — progress chat messages every 5, ready notification at 10
|
||||||
|
- `/bns bounty active` — see your accepted with progress
|
||||||
|
- `/bns bounty turnin b_zombie_10` — claim 15 spurs
|
||||||
|
|
||||||
|
### 4. Plot system (multi-slot) (`/bns plot`)
|
||||||
|
|
||||||
|
Existing plot system (3 plots at chunks 10,10 / 12,10-11 / 14-15,10-11) now supports tier-based multi-ownership. Slot cap from your tier (0 at Peasant, up to 10 at Sovereign).
|
||||||
|
|
||||||
|
- `/bns plot list` — all plots, their state, prices
|
||||||
|
- `/bns plot buy <id>` — claim it (must be Citizen+ for at least 1 slot)
|
||||||
|
- `/bns plot release <id>` — 50% refund, opens slot
|
||||||
|
- `/bns plot mine` — list your owned plots
|
||||||
|
|
||||||
|
You'll need at least Citizen (tier 3) for any plot. **You can't buy a plot at Peasant.**
|
||||||
|
|
||||||
|
### 5. Waystones + welcome (pre-existing, untouched)
|
||||||
|
|
||||||
|
- One starter Waystone given on first login (per existing `welcome.js`)
|
||||||
|
- Waystone placement cap of 1 per player (per existing `waystones_policy.js`)
|
||||||
|
- Sharestones / Portstones banned via existing config
|
||||||
|
|
||||||
|
### 6. FTB Ranks 13-rank config
|
||||||
|
|
||||||
|
Live at `world/serverconfig/ftbranks/ranks.snbt`. Each rank has:
|
||||||
|
- `ftbchunks.max_claimed_chunks` (sets the FTB Chunks claim cap)
|
||||||
|
- `ftbchunks.max_force_loaded_chunks` (set to ~15% of claim cap)
|
||||||
|
- `ftbranks.name_format` (chat colour)
|
||||||
|
|
||||||
|
FTB Ranks auto-applies `peasant` to all players via `condition: always_active`. Tier-up commands set the rank explicitly. The `admin` rank with `condition: op` overrides everyone — you'll appear as Admin in chat regardless of your civic tier, useful for op-mode actions.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## What's deferred
|
||||||
|
|
||||||
|
### Villager trade rebalance
|
||||||
|
|
||||||
|
**Blocked.** KubeJS 2101.7.2 doesn't ship a villager-trade event. I verified by extracting the KubeJS jar — `ServerEvents` only exposes `command`, `loaded`, `recipes`, `registry`, `tags`, `tick`, `unloaded`. No `villagerTrades`. No KubeJS-villager-trade addon on Modrinth for NeoForge 1.21.1.
|
||||||
|
|
||||||
|
Options to unblock later:
|
||||||
|
1. **Add a third-party trade-overrides mod** — needs research (Villager Trade Tables-style mod for 1.21.1 NeoForge)
|
||||||
|
2. **Build into the custom mod** — KubeJS calls into Java mixin
|
||||||
|
3. **Mixin via a tiny standalone mod** — minimal Java project that just rebalances trades from a JSON
|
||||||
|
|
||||||
|
For now: vanilla villager trades remain. The 60+ trades I drafted live in the commit history (deleted file `pack/overrides/kubejs/server_scripts/economy/01_villager_rebalance.js`, restore from git when we unblock the API).
|
||||||
|
|
||||||
|
### Custom UI mod (bnstoolkit)
|
||||||
|
|
||||||
|
**Deferred to a session where you can iterate visually.** No Java/Gradle toolchain on glados, and the screens (QuestLog, BountyBoard, TierUpgrade, PlotPurchase, ShopBrowser, HUD, FTB Chunks mixin) all need visual feedback I can't get blind overnight.
|
||||||
|
|
||||||
|
The complete architecture spec is in `docs/bnstoolkit-architecture.md` — when you're ready to build, that's the source of truth. The KubeJS substrate I shipped tonight is exactly the backend the mod will sit on top of.
|
||||||
|
|
||||||
|
### Spawn build
|
||||||
|
|
||||||
|
Your manual task. The economy works from anywhere right now — no spawn buildings needed.
|
||||||
|
|
||||||
|
### FTB Quests progression chapters
|
||||||
|
|
||||||
|
Needs your arc design (themes, milestones). Mod is installed; the campaign content isn't.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Files added/changed (PR #67)
|
||||||
|
|
||||||
|
```
|
||||||
|
pack/overrides/kubejs/server_scripts/economy/
|
||||||
|
00_tier_system.js NEW (170 lines)
|
||||||
|
02_sell_shop.js NEW (197 lines)
|
||||||
|
03_bounty_engine.js NEW (347 lines)
|
||||||
|
04_player_commands.js NEW (146 lines)
|
||||||
|
pack/overrides/kubejs/server_scripts/
|
||||||
|
plots.js MODIFIED (+86 lines — multi-slot)
|
||||||
|
pack/overrides/world/serverconfig/ftbranks/
|
||||||
|
ranks.snbt NEW (122 lines — 13 ranks)
|
||||||
|
pack/pack.lock.json version bump → 0.33.0
|
||||||
|
```
|
||||||
|
|
||||||
|
## Quick recovery if something goes wrong
|
||||||
|
|
||||||
|
If a script errors at startup, KubeJS logs to:
|
||||||
|
```
|
||||||
|
/srv/fast/brass-sigil-server/server/logs/kubejs/server.log
|
||||||
|
```
|
||||||
|
|
||||||
|
To hot-reload KubeJS server scripts without a server restart:
|
||||||
|
```
|
||||||
|
/kubejs reload server_scripts
|
||||||
|
```
|
||||||
|
|
||||||
|
To revert this PR entirely if it bricks something:
|
||||||
|
```
|
||||||
|
cd /home/matt/dev/brass-and-sigil
|
||||||
|
git revert <PR-67-merge-commit-hash>
|
||||||
|
git push origin main
|
||||||
|
```
|
||||||
|
|
||||||
|
The next pack-version-sync at MC server restart will undo all the changes.
|
||||||
|
|
||||||
|
## Suggested testing path
|
||||||
|
|
||||||
|
1. `/bns me` — sanity check, you should be Peasant tier 1
|
||||||
|
2. `/give @s numismatics:spur 500` — give yourself spurs
|
||||||
|
3. `/bns tier upgrade` — should pay 200 and bump you to Farmer
|
||||||
|
4. `/bns tier upgrade` again — should pay 550 (the difference up to Citizen at 750) … actually wait — the cost is per-tier-to-reach. Each upgrade costs the NEXT tier's listed cost. So Peasant → Farmer = 200, Farmer → Citizen = 750, Citizen → Merchant = 2,500. **Worth balance-checking in playtest.**
|
||||||
|
5. `/bns admin tier set <you> 13` — jump to Sovereign for testing
|
||||||
|
6. `/bns me` — should show Sovereign + 10 plot slots + unlimited everything
|
||||||
|
7. `/bns plot list` — should show 3 plots available
|
||||||
|
8. Stand in the relevant chunks (e.g. chunk 10,10), `/bns plot buy p001`
|
||||||
|
9. `/bns bounty list` — random 5 from pool
|
||||||
|
10. Accept one, kill enough mobs, turn in
|
||||||
|
11. `/bns sell list` — see effective prices
|
||||||
|
12. `/bns sell minecraft:diamond 4` (if you have diamonds)
|
||||||
|
|
||||||
|
If any step fails, the KubeJS log tells you why. Ping me with the error and I'll patch tomorrow.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## What I'd build next session
|
||||||
|
|
||||||
|
In priority order:
|
||||||
|
|
||||||
|
1. **bnstoolkit mod scaffolding (M0)** — need to install Java/Gradle on glados first. Empty Gradle project that builds + loads cleanly. Probably 4-6 hours of focused work.
|
||||||
|
2. **TierUpgrade GUI** (M1) — first screen in the mod, replaces the `/bns tier upgrade` text flow with a visual ladder + Upgrade button.
|
||||||
|
3. **BountyBoard GUI** (M3, after M0 is done) — replaces the chat-based `/bns bounty list/accept` with a poster-board screen.
|
||||||
|
|
||||||
|
Or — if you'd rather playtest the command-driven version first and only build the UI once the mechanics feel right — that's a perfectly defensible choice. The CLI version is fully functional.
|
||||||
Binary file not shown.
+2
-2
@@ -1,13 +1,13 @@
|
|||||||
{
|
{
|
||||||
"$schema": "Brass-and-Sigil pack.lock.json - generated, do not edit by hand unless you know what you are doing",
|
"$schema": "Brass-and-Sigil pack.lock.json - generated, do not edit by hand unless you know what you are doing",
|
||||||
"name": "Brass and Sigil",
|
"name": "Brass and Sigil",
|
||||||
"version": "0.33.0",
|
"version": "0.35.0",
|
||||||
"minecraft": "1.21.1",
|
"minecraft": "1.21.1",
|
||||||
"loader": {
|
"loader": {
|
||||||
"type": "neoforge",
|
"type": "neoforge",
|
||||||
"version": "21.1.228"
|
"version": "21.1.228"
|
||||||
},
|
},
|
||||||
"lockedAt": "2026-06-06T23:34:21Z",
|
"lockedAt": "2026-06-07T02:33:07Z",
|
||||||
"mods": [
|
"mods": [
|
||||||
{
|
{
|
||||||
"source": "modrinth",
|
"source": "modrinth",
|
||||||
|
|||||||
Reference in New Issue
Block a user