Medici Download v1.2.1
The ledger · docs

Economy

The decree, the money supply, the numbers and the simulation.

The numbers behind concept §5. All values are defaults in medici-server.toml (CONFIG); the formulas live in logic/econ/ (pure Java, JUnit) and are mirrored by tools/econ/sim.py so a change can be checked before anyone plays it.

1. Units

coin value struck from per strike die
Penny (copper) 1 p 1 c:ingots/copper 4 pennies penny die (512 strikes)
Groat (silver) 10 p 1 c:ingots/silver 4 groats groat die (512 strikes)
Ducat (gold) 100 p 1 c:ingots/gold 1 ducat ducat die (256 strikes)
Doge's medal (gold) not money 1 gold ingot + 5 ducats fee (burned) 1 any ducat die

Display: 1D 4G 5P with the total in pennies beside it. Every Medici block makes change. Stack size 64.

Power: mint 2,000 FE per strike (flavour more than cost in ATM10), 4 seconds per strike; the Create die press needs 64 RPM and takes as long as a normal pressing. Dies need c:ingots/steel and a diamond, so a mint is a mid-game build, not day one.

2. The decree

Coins enter the world only through the decree. One decree day = 24 h real time (configurable; resets at decreeResetTime, default 06:00 server time, "the Council meets at dawn").

N       = active players (logged in during the last 7 days, min 1)
target  = 20,000 p × N                       (200 ducats each)
fill    = 1 − supply / target
refill  = 0                                   if fill ≤ 0
        = 2,000 p × N × max(0.05, fill)       otherwise
  • supply = everything minted − everything burned, from the MintLedger (world saved data). Coins lost in lava are not seen and slowly push the real supply below the number; that's fine, it errs on the side of more minting.
  • The refill is split: 55 % houses (equal shares per active house: an FTB team or a solo player), 20 % the Merchant, 15 % fortune (mob drops, chest loot, appraisals, quest rewards), 10 % the street (outside traders, below). Unused shares return to the common pool at the next reset.
  • The street share exists only while an outside trader is registered. On a server with Medici alone it goes to the houses (65 %), so the split is exactly what it was before the street share existed.
  • A house's share is shared by all its mint presses; the GUI and comparator show what's left.

The street share (outside traders)

Other mods that pay players money (the Plantations Dealer, contracts, Dead Drop and shop customers) go through de.benkl.medici.api.MediciTreasury (modpack-devs) instead of creating coins themselves. Each registers a purse (e.g. plantations:street), and registering any purse turns the street share on.

  • A purse is an ordinary bank account, trader:<purse id>: coins a trader takes in are deposited there (they stay in the supply, and /medici audit counts them with the other accounts).
  • A payout comes from the purse's account first, then as new coins from today's street pool, minted through the ledger like the Merchant's (the caller's reason is the ledger source). All purses share the one street pool.
  • Surplus burn: at each decree day start, a purse keeps at most max(1,000 p, 3 × today's street pool); the rest is burned (street_surplus), so a trader can't sit on the money supply (logic/econ/StreetPurse).
  • Outside sinks (a trader destroying coins) are burned through the same API and logged like Medici's own.

python3 -I tools/econ/sim.py --table (the balance harness, #43; every source draws from the decree, the sinks of §3 included; the street rows add an outside trader that pays out its whole street share every day, from its purse first, and takes 60 % of it back from players):

scenario what day 7 day 30 day 90 (of target)
casual 5 players, use 40 % of the refill 4,640 p (23%) 12,812 p (64%) 17,253 p (86%)
server 12 players, 60 % 6,701 p (34%) 15,719 p (79%) 18,323 p (92%)
big 40 players, 60 % 6,701 p (34%) 15,719 p (79%) 18,323 p (92%)
greedy 12 players mint every penny the decree allows (unlimited gold) 10,109 p (51%) 18,269 p (91%) 19,028 p (95%)
mob_farm as greedy; mob farms add nothing (spawner/fake-player kills don't pay) 10,109 p (51%) 18,269 p (91%) 19,028 p (95%)
inactive 30 registered, 4 active: the target follows active players only 6,701 p (34%) 15,719 p (79%) 18,323 p (92%)
street as server, with an outside trader (Plantations): pays out its whole share daily, 60 % comes back to its purse 6,559 p (33%) 15,484 p (77%) 18,255 p (91%)
street_greedy as greedy, with the same trader 9,678 p (48%) 18,033 p (90%) 18,949 p (95%)

Supply per player doesn't depend on the number of players, and with unlimited gold it still settles below the target; the only lever is targetPerPlayer. An outside trader doesn't push the supply up: its share replaces part of the houses', and what comes back to its purse is paid out again before any new coins are drawn. Mob farms add nothing: spawner, egg and fake-player kills never pay (§5).

3. Sinks

sink rate where
market duty 2 % of every vending machine/stall sale, rounded down burned at the shop
transfer fee 1 %, min 1 p burned at the bank counter
art commissions 5 p – 20 ducats (colossus 50 ducats) the Artist (§4.9), all burned
Doge's medal 5 ducats each mint press
Banker goods 2 p – 20 ducats villager trades
die wear dies cost steel + diamond indirect
ticket paper 1 paper per ticket indirect
street purse surplus what an outside trader's purse holds above max(1,000 p, 3 × the street pool) at day start burned at the decree day start (§2)
outside sinks whatever another mod destroys through MediciTreasury.burn that mod
pack sinks (optional) claim charters (FTB Chunks bonus claims), waystone tolls, quest shop KubeJS examples

4. Price anchors

Not enforced anywhere; they set the Merchant's wishes and the Banker's prices, and they're the guide's "what's a fair price" table. Override in data/<ns>/medici/appraisal/*.json (item or tag → pennies).

thing ≈ price
a stack of cobblestone, dirt, logs 1 p
a loaf of bread, 16 wheat 1 p
a stack of glass, 16 iron ingots 1 groat
a diamond 3 groats
a netherite ingot, a stack of Mekanism osmium 3 ducats
an Allthemodium ingot 1 ducat
a single ride ticket 2–10 p
a day pass to an attraction 1–5 groats
renting a chest for a day 5–20 p
a market stall for a week 2–5 ducats

At target supply each player holds about 200 ducats: enough for a good week of shopping, not enough to buy another player's whole base.

5. Found money (concept §4.7)

  • Fortune share at 12 players and zero supply: 0.15 × 24,000 = 3,600 p per day; it shrinks with the refill.
  • Per-player daily cap on mob coins: 64 p (configurable). Chest coins have no per-player cap but are rolled once per chest per player (Lootr) and the share caps the total.
  • Kill check (medici:real_player_kill loot condition): killer is a ServerPlayer that is not a FakePlayer; victim's spawn type is natural, patrol, raid, structure or chunk generation (tagged at spawn), not spawner, trial spawner, egg, command, conversion from a farmed mob, or mob-crusher machines.
  • When the fortune share is empty: mob coin drops are skipped silently; chest coin rolls are replaced by antique coins (worth nothing until appraised, appraisal waits for the next decree day if the share is still empty).
  • Antique coin appraisal: 5–40 p each by rarity (worn groat, old ducat, hyperpyron, trade token).

6. The Merchant

  • Arrives at a trading house every 2 decree days (configurable) if the Merchant pool has ≥ 200 p; stays one in-game day.
  • Posts 3–5 wishes, priced 0.01–40 p each, from the appraisal table: every item it lists by id, plus every item in the medici:merchant_wishes tag that it prices at all (by id or through a tag entry such as #minecraft:logs). Tagged items are drawn 4 times as often (logic/econ/WishPicks), so he mostly asks for what the server can make; the default tag covers farming (wheat, carrots, potatoes, beetroot, sugar cane, bread), building (oak, spruce and birch logs, bricks, terracotta, white wool, clear glass) and early tech (iron, copper, tin and lead ingots, leather, string, paper, books).
  • Pays the appraisal price for the first delivery, then −10 % per further delivery of the same wish (floor 40 %).
  • Per-player cap per visit: 15 % of his purse, so the first player there doesn't take it all.

7. Anti-abuse checklist

  • No recipe turns coins back into metal.
  • Mob drops: real-player kills of natural spawns only, daily cap per player (§5).
  • Only Medici's recipe types strike coins; KubeJS recipes of our type are allowed (they draw on the decree too).
  • Shops and tills expose item handlers only on owner-enabled faces; the strongbox exposes none.
  • Purchases are atomic: stock and payment are checked and moved in one server tick or not at all (GameTest).
  • Outside traders never create coins themselves: their payouts come from their purse or the street share (§2).
  • /medici audit counts coins in accounts (outside traders' purses included), strongboxes, shops and online players' inventories and compares with the ledger; a jump of more than 5 % between audits is logged for the admin.