94 lines
3.5 KiB
Plaintext
94 lines
3.5 KiB
Plaintext
====== Coal-backed Economy ======
|
|
|
|
CoalGov uses Coal Cents for sub-coal transactions. Balances are stored as integer cents, cannot go negative, and display as coal plus ''cc'' when needed. 100cc equals 1 coal.
|
|
|
|
===== Conversion =====
|
|
|
|
* 1 coal item = 100cc.
|
|
* 1 coal block = 900cc when deposited.
|
|
* Plain command amounts are coal, so ''2.5'' means 2 coal 50cc.
|
|
* A ''cc'' suffix enters cents directly, so ''75cc'' means 75 Coal Cents.
|
|
* Withdrawals always return coal items, not coal blocks, and must be whole-coal amounts.
|
|
|
|
===== Player Balances =====
|
|
|
|
Each player has one balance stored by UUID in SQLite. A player row is created automatically when they join the server.
|
|
|
|
Players can estimate their CoalGov wealth with:
|
|
|
|
/coal networth
|
|
|
|
The estimate includes current balance, configured market value for appraised inventory items, and claim purchase value. It is an estimate, not a guaranteed sale price.
|
|
|
|
===== Deposits =====
|
|
|
|
Players run:
|
|
|
|
/coal deposit
|
|
|
|
The plugin scans the player inventory, removes all enabled deposit items, and credits the account. By default, both COAL and COAL_BLOCK are accepted.
|
|
|
|
===== Withdrawals =====
|
|
|
|
Players run:
|
|
|
|
/coal withdraw <amount>
|
|
|
|
The command fails if the amount is not positive, the amount is not whole coal, the balance is too low, or the inventory lacks space.
|
|
|
|
===== Payments =====
|
|
|
|
Players run:
|
|
|
|
/coal pay <player> <amount>
|
|
|
|
The target player must be online. Payments accept whole coal, decimal coal, or a ''cc'' suffix. The transfer is recorded in the transactions table.
|
|
|
|
===== Fines =====
|
|
|
|
Players can inspect and pay unpaid fines:
|
|
|
|
/coal fines
|
|
/coal fines pay <id>
|
|
/coal fines pay all
|
|
|
|
Paid fines go into the government treasury.
|
|
|
|
===== Resource Market =====
|
|
|
|
Players run:
|
|
|
|
/market
|
|
|
|
The market lets players sell configured resources for coal or Coal Cents and buy stacks from Ministry stock. Prices are dynamic: scarce resources cost more, oversupplied resources pay less, and market stock persists in SQLite.
|
|
|
|
Market purchases and sales can charge a configured government tax. Tax-exempt players do not pay transaction tax.
|
|
|
|
Same-day buyback protection records recent market purchases. If a player sells the same material back within the configured window, those protected units are paid back at the recorded purchase unit price instead of the current dynamic sell price.
|
|
|
|
===== Lottery =====
|
|
|
|
Players can buy lottery tickets with coal:
|
|
|
|
/coal lottery status
|
|
/coal lottery buy
|
|
/coal lottery buy <tickets>
|
|
|
|
Admins draw the current round with:
|
|
|
|
/coal lottery draw
|
|
|
|
The lottery has a built-in house edge. The configured payout defaults to 90%, is capped in code at 95%, and always leaves at least 1 Coal Cent for the treasury when tickets were sold.
|
|
|
|
===== Treasury =====
|
|
|
|
The treasury receives market transaction tax and paid fines. Admins can inspect the treasury and issue treasury-funded grants.
|
|
|
|
===== NPC Economic Agents =====
|
|
|
|
CoalGov NPCs have their own coal accounts and inventory. Trader NPCs buy and sell from their own stock and balance. Worker NPCs move between home and work, consume food, buy food if funded, request supplies from same-zone NPCs, and periodically produce configured goods into their own inventory. Hungry workers stop working and return home until fed.
|
|
|
|
===== Transactions =====
|
|
|
|
CoalGov records deposits, withdrawals, player payments, admin grants, admin takes, permit purchases, claim purchases, land sales, market sales, market purchases, market refunds, fine payments, and treasury grants in the transactions table.
|