Description
Elements: Economy
Elements: Economy is a server-side economy mod for NeoForge 1.21.1. I couldn't find an economy setup for 1.21.1 that worked with the mods I already run, so I made my own. It finds whatever currency your server uses and connects it to your shops and auction house, so everything runs on the same money. When you change currency later, everything follows.
In this mod, I have added a Master Control File. Every feature and
subcommand has its own on/off switch in
config/elements_economy/features.toml. Only those switches need a
restart. Every other config file, and the stored data, is reloaded
with /economy reload.
Requires Elements: Vault.
Currency
- Finds supported currency mods on its own, can use vanilla items such as emeralds when an admin picks them in chat, or falls back to plain digital money.
- Item values are set in
currency_values.toml, so 1 Block of Emerald = 9 Emerald or any ratio you want. They can also be changed in game with/economy currency values. - Money is always shown with your currency's own item names, e.g. "3 Block of Emerald, 5 Emerald". Digital money can be given any name and symbol.
- Money is 1:1 between currencies. 1 Emerald is worth 1 digital money.
- Currency mods where money is an account balance are used for
/bal, shops and the auction house too.
The bank and /exchange
With an item currency, players can also keep digital money in a bank.
/exchange deposit [amount] [item]puts the currency items you carry into your bank./exchange withdraw <amount> [item]takes it back out, paid in the fewest items possible.- The Tab list shows each item's in-game name (Gold Coin shows as Gold),
never the item ID. Set your own names with
namesunder[exchange]in economy.toml. - Players can pay in shops, server shops and the auction house straight
from their bank, together with the currency items they carry. Pick
which goes first with
pay_order(hands_firstorbank_first). /balshows the items you carry plus a "Bank:" line, shown in your currency items.
Named accounts
- Other mods can keep their own accounts in the economy, such as a team bank, separate from every player's balance.
- Saved with the rest of the economy data, in every storage type.
- Switch:
named_accountsunder[api]in features.toml.
Shops
- Player shops: chest and barrel buy/sell shops with a sign display, owner menu, sale alerts, daily limits, per-rank shop limits and an optional creation fee. Item Vaults can be linked as stock vaults that restock your shops.
- Server shops: admin shops that open with
/shopor from a linked villager, NPC or block. Players never create or edit them. - Shop protection: hoppers, pistons, drills, saws and contraptions can't steal from or break shops.
Auction house
- Buy-now and bid listings, search, categories, sales tax, a blacklist, and a collection box for your money and items.
- Staff can make an NPC, a villager or a block open the auction house.
Currency switch-over & migration
/economy currency switchshows a preview, then converts balances, shop prices, shop tills, listings and collection boxes to the new currency. A backup is made first.- Imports balances from other economy mods and most currency mods, with a preview before anything is written.
Hooks
- Hooks into Elements: Vault (the economy API other mods use).
- Hooks into Impactor, OctoEconomy, SDM and Spud's Shops (shops and balances).
- Hooks into Easy NPC (server shop and auction house NPCs).
- Hooks into Create (Item Vaults as stock vaults, contraption protection).
If another mod already handles shops or the auction house, Economy turns its own off so they don't clash. You can force them back on.
Private trades
Purchases are never announced in chat or Discord. /payments shows
your own history.
Storage
JSON (default), YAML, SQLite or MySQL. Copy your data with
/economy storage convert <type>, set the type in storage.toml, then
run /economy reload. SQLite and MySQL need their driver jar in
<server>/elements_economy/drivers (not included): sqlite-jdbc for
SQLite, mariadb-java-client for MySQL.
What's new in 1.0.4
- Named accounts: other mods can keep their own balances, such as team banks, in the economy.
Commands
| Command | Permission | Default |
|---|---|---|
/bal |
economy.balance |
everyone |
/bal <player> |
economy.balance.others |
OP 2 |
/pay <player> <amount> / pay toggle |
economy.pay / economy.pay.toggle |
everyone |
/baltop |
economy.baltop |
everyone |
/payments |
economy.history |
everyone |
/exchange deposit / withdraw |
economy.exchange.deposit / economy.exchange.withdraw |
everyone |
/shop create buy / sell |
economy.shop.create.buy / economy.shop.create.sell |
everyone |
/shop rename / remove |
economy.shop.rename / economy.shop.remove |
everyone |
/shop |
economy.servershop.use |
everyone |
/ah |
economy.ah.open |
everyone |
/ah link npc / villager / block, /ah unlink |
economy.ah.link |
OP 3 |
/eco give / take / set / reset |
economy.eco.<action> |
OP 3 |
/economy version |
economy.admin.version |
OP 2 |
/economy reload |
economy.admin.reload |
OP 3 |
/economy storage convert <type> |
economy.admin.storage |
OP 3 |
/economy migrate |
economy.admin.migrate |
OP 3 |
/economy currency setup / values / value / remove |
economy.currency.setup |
OP 3 |
/economy currency switch <new currency> |
economy.currency.switch |
OP 3 |
Shop and listing limits can be set per rank with the economy.shop.limit
and economy.ah.limit number nodes. The full list is on
GitHub.
Config
Files are in config/elements_economy/.
features.toml: the Master Control File, one switch per feature and subcommand, plus the overlap guardeconomy.toml,shops.toml,auction_house.toml,storage.tomlcurrency_values.toml: what each currency item is worthmessages.toml: every line players and admins see. After an update, lines you never edited get the new built-in text and lines you edited are kept.
Everything except the features.toml switches is reloaded with
/economy reload.
License
Free to use in any modpack. Credit Telmarine. No resale.







