Seasonal events
An event is data and a date
Section titled “An event is data and a date”Holo-Ween, Snowbrawl, Midnight Madness: every event in Knockout City was data. No event needed new engine code. An event is three pieces that point at each other, plus a window of dates:
- an event
- schedule entrythe event's name, and when it starts and ends (UTC)
- time periodon the server, the same name: what to switch on while it runs
- layere.g. 23 · Holo-Ween: decorations and lighting across every map
- content packagethe event's own files
- switch off the default layer?for events that replace the ordinary world
- event contenta level holding the event's settings
- event pagewhat the event tab shows
- currencythe event's own tickets, if it has them
- contractsthe challenges and what they pay
- store schedulethe event store's offers
- playlistswhich modes are featured
What happens when it starts
Section titled “What happens when it starts”When the date enters the event’s window, the server’s schedule turns the event on, and everything follows from its time period:
- Its layer turns on. Every map shows whatever is tagged with it: the Holo-Ween sky, pumpkins, the moody lighting. An event’s look costs nothing extra per map: it’s already in the maps, waiting for its layer.
- Its content loads on the server and in every game.
- The game shows the event page, opens the contracts and the event store, and features its playlists.
When the window ends, all of it switches off again.
The Private Server Edition’s events are gone
Section titled “The Private Server Edition’s events are gone”The Private Server Edition shipped with its events taken out: the schedule entries, the time periods and the event content levels. The layers and a lot of event material survive (Holo-Ween’s decorations in the maps, the Candy Wars mode, some event currencies, contracts and store offers), but nothing turns them on.
So running an event on a private server means rebuilding those three pieces, and pointing them at what survived or at what you make.
What else has to know
Section titled “What else has to know”An event’s pieces aren’t enough on their own. A few central files gather things from across the game, and new event content has to be added to them:
| Your event adds | Also add it to |
|---|---|
| Contracts | the game’s list of contract lists, so the backend knows them |
| A currency | the economy, and the interface’s list of currencies |
| Offers | the economy’s list of offers |
Studio adds the files to the right package lists once you’ve made these links. It’s the links themselves that are yours to make.
Testing an event before its dates
Section titled “Testing an event before its dates”Studio’s Start at UTC run setting moves the backend’s clock, which is enough for the store and for the game deciding what’s on. The match server has been seen judging some event features (contracts among them) by the real date, though. The reliable way to test is to widen the event’s window so it includes today, and put the real dates back before you ship.
For programmers
An event is a time_period_schedule entry (name and UTC window) matched by name to a child of the server’s time
period director level. That child’s time_period component sets the layer, the content package, and whether the
default layer is switched off. The event content level’s event_content component points at everything else.
Nothing about an event lives in the backend’s database; it’s game data plus the clock.
Where to go next
Section titled “Where to go next”- Tutorial: Make a seasonal event.
- The store.