Skip to content
Rosti Studios

RS-Casino documentation · v1.0.0

How a casino works

Owner, cashier, bank, chips, team and staff. The ideas everything else is built on.

Read this page once and the rest of the documentation falls into place.

#The parts

Part What it is
Cashier a block. The player who places it becomes the casino owner. A villager works behind it and sells chips.
Chips the casino's own money. Bought with a currency item (emeralds by default), spent at machines, cashed in again at the cashier.
Bank the owner's money behind the casino, belonging to the cashier. It pays out wins and cash-ins.
Machines and tables the games. They belong to the owner who placed them.
Team players the owner lets help run the casino.
Staff villagers who work the tables and the cashier. Roulette, blackjack and craps only play while theirs is at work.

#The money loop

  1. A guest gives the cashier emeralds and gets chips (default: 1 emerald = 100 chips).
  2. The emeralds go into the bank.
  3. The guest plays with chips. A win pays more chips; a loss leaves the chips on the table and in the bank's favour.
  4. The guest cashes chips in. The cashier pays emeralds out of the bank.

So the bank earns exactly what players lose, and pays exactly what players win.

#The bank has to cover every bet

A bet is accepted only if the bank could pay the worst case:

Text
chips in circulation + the most this bet could win  <=  bank balance

If it could not, the player is told the bank cannot cover the bet, and nothing is taken. This is what stops a casino from promising money it does not have. If the bank runs dry, the cashier shows "out of cash" and stops paying out.

The owner fills the bank, and takes out only the profit: the bank balance minus the chips still out there. See Running a casino.

#Chips belong to one casino

Chips carry the owner's name: Casino of Alex. They only work at Alex's tables and Alex's cashier. Chips from another casino are refused ("These chips belong to another casino owner"). Nobody can print money by moving chips between casinos.

Chips cannot be crafted. Only a cashier hands them out.

#Admin mode

An operator can switch a cashier to admin mode (/rs:casino admin <pos> true). It then pays without limit and with no bank, which is useful for a server-run casino or for testing. See Commands.

#The server decides

Every result is decided by the server at the moment you bet. The wheel, the cards, the ball and the dice only show what was already decided. Restarting the server does not change a result, and open bets and held winnings are saved in the world: a restart pays them out rather than losing them.

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