The store
Offers and currencies
Section titled “Offers and currencies”Everything the store sells is an offeroffer: Something the store sells: what you get, what it costs, and in which currency.: a data file saying what the player gets (one or more items), what it costs, and in which currency. It can also limit how many times a player may buy it.
A currency is a data file too: Holobux, style chips, an event’s own tickets. An offer names the currency it’s paid in.
All of this is decided by the backend, not the player’s game. The game asks the backend what’s for sale and asks it to make a purchase, so store files are server files.
Every offer must be in the economy
Section titled “Every offer must be in the economy”The backend knows the whole store from one central file, the economy. It lists every offer and every currency, and an offer it doesn’t list can’t be bought, however it’s shown.
Each one uses the ones to its right.
- Economycatch.
economy lists every offer and currency- Offeryour_
offer - Itemwhat the player gets
- Currencywhat it's paid in
- Offerevery other offer
A new currency needs one more: the game’s interface keeps its own list of currencies it can show, and a currency missing from it doesn’t display properly.
The daily shop
Section titled “The daily shop”The Brawl Shop’s daily tiles come from a store schedule: a list of days, each a row of offers. The shop shows today’s row. The schedule is a loop: when it runs out of days, it starts again from the first.
Which schedule? A season or event can bring its own. The Private Server Edition has no season running, so the daily shop uses the game’s fallback schedule, which ships with one day. So a fresh private server sells the same things every day, and editing that schedule changes the daily shop.
Owned items are skipped. An offer for something the player already owns isn’t shown. With the backend’s backfill switched on, the shop fills that tile with a substitute from a pool of spare offers; with it off, the tile stays empty.
Bundles
Section titled “Bundles”A bundle is a Market offer with a presentation: its name, pictures, and the items in it with their full prices, so the shop can show the discount. It’s three pieces: the offer itself, the bundle’s display info, and an entry in a bundle schedule that says when it’s on sale. See the tutorial Put a bundle in the store.
Event stores
Section titled “Event stores”A seasonal event can have a store tab of its own, with its own schedule and usually its own currency. Shipped event stores use a schedule of a single day, shown for the whole event.
Testing store changes
Section titled “Testing store changes”The store follows the backend’s date. Studio’s Start at UTC run setting sets that date, so you can see another day’s shop without waiting. A substitute chosen for a tile is remembered until the backend’s day changes, so move the clock on by a whole day between tests. See Testing.
For programmers
The backend is the source of truth: it loads the economy (every offer and currency) and answers purchases. A store schedule is a table of days by slots; the shop picks today’s day by counting days from a fixed start date and wrapping by the schedule’s length. Offers with a purchase limit are tracked per account; durable items are owned once.