Lotteries & prizes

How to create lotteries in Frozen Christmas Lottery: prices, ticket items, prizes, rarity, stock, and how the odds and RTP work.

On this page

A lottery is one kind of ticket: its game, its price, its ticket item and its prize table. The script ships with four (Candy Cane Scratch, Santa's Sack, Frosty Wheel and Golden Star) and you can add as many as you like. Everything on this page is in /xmasadmin → Lotteries.

Creating a lottery

  1. Open /xmasadmin → Lotteries and press New lottery.
  2. Pick a game (you can change it later):
  • Scratch card: nine fields to scratch. Three of the same prize wins it.
  • Prize wheel: one wheel segment per prize, plus coal segments.
  • Pick a present: the player picks one of 3 to 9 presents.
  1. Fill in the fields below, add prizes, and press Save.

A new lottery starts disabled and has no ticket item. Switch on Enabled when it's ready, otherwise players don't see it.

Duplicate makes a copy of the selected lottery. The copy is disabled and has no ticket item, because two lotteries can't share one item. The bin button deletes a lottery.

General

FieldWhat it does
EnabledOff hides the lottery from players. Tickets for it can't be used while it's off
NameShown on the ticket and in the booth (up to 40 characters)
GameScratch card, Prize wheel or Pick a present
DescriptionThe short text players see when they open the ticket (up to 220 characters)
ColourThe ticket's colour in the booth and on the game screen
PictureOne of the built-in icons. To use your own picture, put img/xmas/lottery_<id>.webp (or .png / .jpg) in the resource; the admin menu shows the exact file name

Tickets & price

FieldWhat it does
Ticket itemThe inventory item that opens this lottery when used. Leave it empty for a lottery that is only played at the booth. One item can only open one lottery. The 📋 button shows the code to add that item to your inventory
Players can buy / Only from the itemPlayers can buy sells tickets at the booth. Only from the item means tickets can't be bought: players only get them from you (Give tickets, the advent calendar, another lottery's prize, your own shops or jobs)
PriceThe price of one ticket
Paid withWhat the ticket costs: cash, bank, dirty money or any item (for example a candy_cane item or casino chips)
Daily limitHow many times one character can play this lottery per day. 0 = unlimited
CooldownSeconds a player has to wait between two plays. 0 = no wait
Sort orderThe order of tickets in the booth. Lower numbers are shown first
Starts on / Ends onDates the lottery is open (server date). Empty = always open. Outside these dates the lottery is hidden and its tickets can't be used
Coal weightHow likely a ticket is to win nothing (see How the odds work)
Presents to pick fromPick a present only: how many presents are shown, 3 to 9
Coal segmentsPrize wheel only: how many coal segments are drawn on the wheel, 1 to 4. They are only for looks; the coal weight decides how often the wheel lands on coal

How players get a ticket

  • At a booth, Buy and play uses a ticket from the player's pocket first. If they have none, it buys one with the price above.
  • Buy to keep or gift buys 1 to 50 tickets into the inventory, to use later or give to a friend.
  • Using the ticket item anywhere opens the lottery straight away.
  • One ticket is played at a time. A player has to finish their ticket before starting the next one.

Prizes

Press Add prize to add a row. A lottery can have up to 30 prizes; a prize wheel shows at most 14 of them as segments.

ColumnWhat it does
TypeMoney (an account), Item, or Coal (a prize that gives nothing, for example a "Lump of Coal" segment)
WhatMoney: the account (money = cash, bank, black_money = dirty money). Item: the item name. The menu warns you when an item doesn't exist in your inventory
AmountHow much money, or how many of the item
Random up toOptional. When set, the amount is random between Amount and this number every time it's won (for example $5,000 to $20,000)
WeightHow likely this prize is compared with the others (see below)
ChanceWorked out for you from the weights: the real chance of winning this prize
RarityCommon, Rare, Epic or Legendary. Sets the prize's colour and how big the win celebration is. It doesn't change the odds
LabelThe prize's name. Empty = automatic ("$25,000", "3x Bread")
StockHow many times this prize can be won. -1 = unlimited. It goes down with every win; at 0 the prize is sold out and can't be won any more
Worth (for stats)Item prizes only: what the item is worth in money. Only used for the RTP and the dashboard, nothing is paid
PictureOptional own picture: an https:// link, a nui:// link, a file in html/img/items/, or a built-in icon name (star, candy, sack, wheel, tree, bell, snowflake, gift, sock, deer, cookie, ornament, coal, money, bank). Empty = the item's picture from your inventory
AnnounceShows this prize to the whole server when someone wins it (a small paper strip at the top of the screen)

The arrows move a prize up or down; on a wheel, this is the order of the segments.

How the odds work

Every ticket picks one result from the prize weights and the coal weight. A prize's chance is its weight divided by all weights together (every prize that isn't sold out, plus the coal weight).

Example: three prizes with weights 50, 15 and 5, and a coal weight of 30. Together that's 100, so:

ResultWeightChance
$1,0005050 / 100 = 50%
$5,0001515 / 100 = 15%
$25,00055 / 100 = 5%
Coal (nothing)3030 / 100 = 30%

So 70% of tickets win something. Weights don't have to add up to 100; 0.5 and 1000 both work. Only the proportions matter. Doubling every weight changes nothing.

Players see the odds on each ticket ("1 in 4.2") and next to each prize, unless you turn off Odds in Settings.

The result is always rolled on the server before the game starts. Scratching, spinning and picking only show it:

  • Scratch card: a winning card has exactly three of the won prize; a losing card never has three of anything.
  • Prize wheel: the wheel stops on a segment of the won prize, or on coal.
  • Pick a present: whichever present the player picks holds the result. The other presents then open too and show random prizes from the table, or coal. They are only for show.

RTP: how much comes back

At the bottom of the editor you see three numbers for the lottery:

  • Win chance: how many tickets win anything.
  • Average prize: what one ticket pays out on average, counting losses as $0.
  • RTP (return to player): the average prize divided by the ticket price.

With an RTP of 80%, a $5,000 ticket pays $4,000 back on average, so every ticket takes $1,000 out of your economy. Below 100% the lottery is a money sink; above 100% it prints money. RTP only shows when the ticket is paid with money, and item prizes count with their Worth (for stats).

How the four default lotteries are set:

LotteryPriceCoal weightDaily limitTop prize
Candy Cane Scratch$5,00035none$100,000
Santa's Sack$2,00010none$50,000
Frosty Wheel$10,00012none$100,000
Golden Star$25,0004010 per day$1,000,000

Test play

Test play plays the lottery you're editing for free, exactly as a player would see it. Nothing is charged or paid out, and the round is marked "test" in the logs and left out of the winners list. Save first; test play uses the saved version.

Still stuck?Ask on our Discord