Skip to content
Rosti Studios

RS-Economy documentation · v2.0.0

Coins and villagers

Turn balance into carryable silver and gold coins, and optionally pay villagers in them instead of emeralds.

Coins make money physical. A player can withdraw part of their balance as items, hand them to someone, put them in a chest, and deposit them again later.

#How coins work

Tier Item Default value
Silver coin iron nugget 1
Gold coin gold ingot 100

Coins are ordinary vanilla items with a marker in their custom data. That is why the mod stays server-side only, and why a normal iron nugget or gold ingot is never touched or mistaken for a coin. A coin shows its worth in its tooltip: Worth: 100 Coins each.

#Withdraw

Command
/withdraw <amount> [silver|gold]

Takes amount out of the balance and gives it as coins. The amount has to be payable exactly with the coin values you have set. With the defaults, 250 is two gold and fifty silver; 0.5 is refused because the smallest coin is worth 1.

  • Without a tier, the mod uses as few coins as possible: gold first, silver for the rest.
  • With silver, it uses as much silver as it can; with gold, as much gold.
  • At most 2,304 coins in one go (36 stacks).

#Deposit

Command
/deposit                      every coin you carry
/deposit <amount> [tier]      exactly this much

An exact amount has to be makeable from the coins in your inventory; otherwise you are told that you cannot deposit exactly that. Coins are taken from the inventory and credited to the balance.

#Seeing the coins in-game

The coin textures live in the mod. A client that has the mod sees them with no extra step. For vanilla clients, the release includes a small resource pack (RS-Economy-Coins.zip):

  • Put it in the client's resourcepacks folder, or
  • serve it from your server: set resource-pack=<url> and resource-pack-sha1=<sha1> in server.properties.

Without the pack, coins still work and keep their name and tooltip, but show as a placeholder icon instead of the coin art.

On Minecraft 1.21.1 there is no item_model component. Coins carry custom_model_data 7340001 (silver) and 7340002 (gold), so a pack can override iron_nugget and gold_ingot for them.

#Changing the coins

Setting Default
coin_status true master switch for /withdraw and /deposit
coin_silver_status true allow silver
coin_gold_status true allow gold
coin_value 1.0 value of one silver coin
coin_gold_value 100.0 value of one gold coin

Changing a value changes the coins already out there. A coin is worth whatever the config says now. Don't halve a coin's value after players have saved up.

Switching a tier off does not delete coins. They stay in inventories and work again when you turn it back on.

Admin commands: /rs:economy coin_status enable|disable [silver|gold], /rs:economy coin_value <tier> <amount> and /rs:economy coin <tier> [count] [player] to give coins directly.

#Villager trades in coins

Off by default. Turn it on and every villager and wandering trader trade that costs or pays emeralds uses coins instead. The economy then reaches into the part of Minecraft most players already trade with.

Command
/rs:economy villager_coins enable
Setting Default
villager_coins_status false turn it on
villager_emerald_value 10.0 what one emerald is worth in your coin units

How a price is built: the trade is made of silver coins where they fit into one stack of 64, and of gold coins where they do not. Gold coins are rounded to whole coins.

There is a ceiling on the emerald value. A full stack of 64 emeralds has to still be payable as a stack of coins. With gold coins on, that limit is the value of one gold coin; without them, the value of one silver coin. A higher value is lowered to the limit, and /rs:economy villager_emerald_value tells you the current maximum.

Villager coins need coins enabled (coin_status). Turning it off gives every trade its emeralds back the next time it is opened. Discounts (curing a zombie villager, hero of the village) are scaled to the coin price.

A note on money flow: a villager that pays coins for goods creates money out of thin air, just like a villager that pays emeralds creates emeralds. Leave this off if you want shops and players to be the only source of money, or price your emerald value so selling to villagers is not worth the effort.

Something missing or wrong? Tell us on Discord. This documentation describes v2.0.0.