ffff3bc78d
Foundation economy stack — fully command-driven, ready for the custom
UI mod to layer on top later. Built tonight as a single feature batch.
KubeJS scripts:
pack/overrides/kubejs/server_scripts/economy/
00_tier_system.js — 13-tier ladder + admin commands
02_sell_shop.js — /bns sell, 9 items, DR + tier-fee
03_bounty_engine.js — /bns bounty, 20 bounties, state machine
04_player_commands.js — /bns help, /bns me, /bns tier upgrade
plots.js: updated to support multi-plot ownership based on tier slots
- plotsOwnedBy() returns list, slot cap from TIER_PLOT_SLOTS table
- /bns plot release now requires plot id (multiple plots possible)
- /bns plot mine added
FTB Ranks server config:
pack/overrides/world/serverconfig/ftbranks/ranks.snbt
13 ranks with ftbchunks.max_claimed_chunks scaling per tier:
Peasant 9 -> Sovereign 1500 (chunks)
Peasant 1 -> Sovereign 200 (force-loaded)
Name format colour codes match the design doc.
Player command surface (everything callable from chat or Telegram bridge):
/bns help full command listing
/bns me tier, balance, plots, bounties
/bns tier upgrade pay spurs, advance to next tier
/bns plot list|info|buy|release|mine
/bns sell list|<item> [count]
/bns bounty list|active|accept|cancel|turnin|completed
/bns admin tier get|set|list (op level 2)
/bns admin info|waystone-*|reset-welcome (pre-existing)
Tier upgrade flow:
1. Player runs /bns tier upgrade
2. KubeJS takes spurs from inventory
3. KubeJS sets player.persistentData.bnsTier += 1
4. KubeJS runs `ftbranks add <player> <rank>` so FTB Ranks applies
the permission nodes (chunk allowance auto-flips)
Cross-file scope: KubeJS 2101 runs all server_scripts in shared Rhino
global scope. Constants (TIER_CONFIG, COIN_VALUES, bnsTier object,
shared functions like giveCoins/countCoins/takeCoins) are declared
once in their owning file and referenced from siblings. Don't redeclare.
Blocked tonight (deferred):
- Villager trade rebalance: KubeJS 2101.7.2 doesn't ship a
villagerTrades event. ServerEvents only exposes command/loaded/
recipes/registry/tags/tick/unloaded. Verified by grepping the
KubeJS jar's ServerEvents class. No KubeJS-villager-trade addon
on Modrinth for NeoForge 1.21.1. Either build into the custom
mod or add a third-party trade-overrides mod (research pending).
- Custom mod UI screens: no Java toolchain on host, and these
need visual iteration with the user anyway.
Verified live: server boots clean, all 4 economy scripts log loaded,
port 25565 binds, no EcmaError or EvaluatorException in KubeJS log.
FTB Ranks reload via rcon confirms "Ranks reloaded from disk!"
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
123 lines
2.6 KiB
SNBT
123 lines
2.6 KiB
SNBT
{
|
|
# Brass and Sigil 13-tier civic ladder.
|
|
# Permission nodes:
|
|
# ftbchunks.max_claimed_chunks — wilderness chunk allowance
|
|
# ftbchunks.max_force_loaded_chunks — force-load allowance (~15% of claim cap)
|
|
# ftbranks.name_format — chat colour for this rank
|
|
# Mirrors TIER_CONFIG in pack/overrides/kubejs/server_scripts/economy/00_tier_system.js.
|
|
# Tier upgrade flow: KubeJS sets player.persistentData.bnsTier AND runs
|
|
# /ftbranks add <player> <rankId> to apply this rank's permission nodes.
|
|
|
|
peasant: {
|
|
name: "Peasant"
|
|
power: 1
|
|
condition: "always_active"
|
|
ftbchunks.max_claimed_chunks: 9
|
|
ftbchunks.max_force_loaded_chunks: 1
|
|
ftbranks.name_format: "&7{name}"
|
|
}
|
|
|
|
farmer: {
|
|
name: "Farmer"
|
|
power: 2
|
|
ftbchunks.max_claimed_chunks: 18
|
|
ftbchunks.max_force_loaded_chunks: 2
|
|
ftbranks.name_format: "&7{name}"
|
|
}
|
|
|
|
citizen: {
|
|
name: "Citizen"
|
|
power: 3
|
|
ftbchunks.max_claimed_chunks: 35
|
|
ftbchunks.max_force_loaded_chunks: 4
|
|
ftbranks.name_format: "&f{name}"
|
|
}
|
|
|
|
merchant: {
|
|
name: "Merchant"
|
|
power: 4
|
|
ftbchunks.max_claimed_chunks: 60
|
|
ftbchunks.max_force_loaded_chunks: 8
|
|
ftbranks.name_format: "&e{name}"
|
|
}
|
|
|
|
knight: {
|
|
name: "Knight"
|
|
power: 5
|
|
ftbchunks.max_claimed_chunks: 100
|
|
ftbchunks.max_force_loaded_chunks: 12
|
|
ftbranks.name_format: "&a{name}"
|
|
}
|
|
|
|
baron: {
|
|
name: "Baron"
|
|
power: 6
|
|
ftbchunks.max_claimed_chunks: 150
|
|
ftbchunks.max_force_loaded_chunks: 18
|
|
ftbranks.name_format: "&b{name}"
|
|
}
|
|
|
|
viscount: {
|
|
name: "Viscount"
|
|
power: 7
|
|
ftbchunks.max_claimed_chunks: 220
|
|
ftbchunks.max_force_loaded_chunks: 26
|
|
ftbranks.name_format: "&9{name}"
|
|
}
|
|
|
|
earl: {
|
|
name: "Earl"
|
|
power: 8
|
|
ftbchunks.max_claimed_chunks: 300
|
|
ftbchunks.max_force_loaded_chunks: 36
|
|
ftbranks.name_format: "&5{name}"
|
|
}
|
|
|
|
marquess: {
|
|
name: "Marquess"
|
|
power: 9
|
|
ftbchunks.max_claimed_chunks: 400
|
|
ftbchunks.max_force_loaded_chunks: 50
|
|
ftbranks.name_format: "&6{name}"
|
|
}
|
|
|
|
duke: {
|
|
name: "Duke"
|
|
power: 10
|
|
ftbchunks.max_claimed_chunks: 525
|
|
ftbchunks.max_force_loaded_chunks: 65
|
|
ftbranks.name_format: "&6{name}"
|
|
}
|
|
|
|
archduke: {
|
|
name: "Archduke"
|
|
power: 11
|
|
ftbchunks.max_claimed_chunks: 700
|
|
ftbchunks.max_force_loaded_chunks: 85
|
|
ftbranks.name_format: "&c{name}"
|
|
}
|
|
|
|
grand_duke: {
|
|
name: "Grand Duke"
|
|
power: 12
|
|
ftbchunks.max_claimed_chunks: 900
|
|
ftbchunks.max_force_loaded_chunks: 110
|
|
ftbranks.name_format: "&c{name}"
|
|
}
|
|
|
|
sovereign: {
|
|
name: "Sovereign"
|
|
power: 13
|
|
ftbchunks.max_claimed_chunks: 1500
|
|
ftbchunks.max_force_loaded_chunks: 200
|
|
ftbranks.name_format: "&d{name}"
|
|
}
|
|
|
|
admin: {
|
|
name: "Admin"
|
|
power: 1000
|
|
condition: "op"
|
|
ftbranks.name_format: "&2{name}"
|
|
}
|
|
}
|