Skip to Content
ModulesActivities and rewards

New Year

NewYear module: snow and midnight fireworks on every page of the site, optional snowdrifts, a daily gift paid to the balance, and a New Year countdown block.

With this module, snow falls on every public page of the site from December 15 to January 14, and fireworks start at midnight on January 1. Once a day a gift can fall with the snow: the player who catches it gets money on their balance. The module works with any theme and adds no page of its own and no item to the admin menu.

Snow on the site's home page
DependenciesGamesPermissionsStudio blocksBot commandsCron tasks
Flute 2.0not tied to a gameadmin.newyear"New Year countdown" (newyear.countdown)nonenone

Where the module shows up

PlaceWhat is there
Every public pagesnow, fireworks, the gift of the day and the "Stop the snow" button in the corner; snowdrifts once you turn them on
Studiothe "New Year countdown" block
Module settingsthe "New Year" section at /admin/modules/NewYear/settings
Player's balance historya "New Year gift" line for each caught gift

The admin panel has no decorations, they only appear on the site's pages.

Installation and first setup

Install the module from the marketplace. It is on right after installation with the window 12-15 to 01-14: if today falls inside it, snow appears on the next page load. The gift of the day is off and has to be turned on separately.

Open the settings with the "Settings" button on the module's card: AdminExtensions. The admin.newyear permission gives a staff member access to them without owner rights.

The New Year settings section with the When, Snow, New Year's Eve and Gift of the day groups

Gift of the day on the balance

Turn the gift on

In the "Gift of the day" group, turn on "Gift of the day" and set "Amount added to the balance", for example 50. The amount is in the site's balance currency, from 1 to 100000.

Check the snow

The gift falls with the snow, so "On" must be enabled and today's date must fall between "Starts" and "Ends".

Catch a gift yourself

Sign in with a regular account and wait on any page: the first gift falls after 6 to 20 seconds, and a missed one falls again after 40 to 90 seconds. After the click the player sees "Gift caught: 50 added to your balance", and "New Year gift" appears in the balance history.

Guests do not see the gift, and it does not fall for visitors who pressed "Stop the snow". Each player gets one gift a day, counted by the site server's clock. A second click or tab gets "You already have today's gift. Come back tomorrow", and no money is paid twice.

New Year countdown

Place the "New Year countdown" block on any page in Studio, like any other block. It shows days, hours, minutes and seconds until midnight on January 1 in the visitor's time, then shows "Text when the countdown ends".

The New Year countdown block on a page
Block fieldWhat it changesDefault
"Heading"text above the numbers, up to 80 characters"Until the New Year"
"Date and time (YYYY-MM-DD HH:MM), empty for January 1st"your own date, for example 2027-01-01 00:00 for a season launchempty, the next January 1
"Text when the countdown ends"what to show once time is up"Happy New Year!"
"Show seconds"seconds in the countdownon

The block ignores the date window in the module settings: it works all year, even when there is no snow.

Settings

AdminExtensions, the "Settings" button on the module.

FieldWhat it changesDefault
"On"turn off to take everything down earlyon
"Starts"month and day of the start, repeats every year12-15
"Ends"month and day of the end; if it is earlier than the start, the window wraps over the New Year01-14
"Snow"snowfall on the pageson
"Amount of snow""Light", "Medium" or "Blizzard"; phones get fewer flakes"Medium"
"Snowdrifts"snow piles up at the bottom of the screen; screens narrower than 768 pixels and pages with a bottom bar get noneoff
""Stop the snow" button"a snowflake in the corner, the visitor's choice is kept in their browseron
"Fireworks at midnight"fireworks from 00:00 on January 1, visitor's timeon
"Fireworks length"how many minutes the fireworks last, 1 to 12015
"Gift of the day"once a day a gift falls with the snowoff
"Amount added to the balance"the amount of one gift, 1 to 10000010

Dates are written as 12-15, 1-5 or 01.05. If a field cannot be read, the module falls back to the default. Snow and fireworks are not shown to visitors who turned off animations in their system.

You can preview the fireworks: add ?newyear=fireworks to the address of any page, for example https://<YOUR_DOMAIN>/?newyear=fireworks. This only works inside the window set by "Starts" and "Ends".

For developers

The decorations are prepended to the template's scripts section on every public HTML request while Support\Season::active() returns true. The countdown block is registered with ModuleBlocks::register('newyear.countdown', …). A gift is claimed with POST /newyear/gift (route newyear.gift, signed-in users only, at most 10 requests a minute). The unique pair of player and day in the newyear_gifts table prevents a second payout. Money goes through user()->topup() with the newyear.gift source.

How the core side works: Blocks and zones for Studio, Module routes, middleware and API.

Troubleshooting

For any other message, use the error lookup.

No snow

Check that "On" is enabled and today's date falls between "Starts" and "Ends". If a visitor pressed "Stop the snow", the "Bring the snow back" button returns it for them. Snow also stays off for visitors who turned off animations in their system.

MessageWhat to do
"No gifts right now"turn on "Gift of the day" with an amount above zero and check the date window
"You already have today's gift. Come back tomorrow"the player already took today's gift, nothing to do
"Could not take the gift, try again"the request did not reach the site; if it keeps happening, check the error log

Next

On this page