Slice Eights: Customization Guide

Step-by-step changes for people who do not program. Every file named here is in the game/ folder (and the same file in source/).

1. Before you start

  1. Make a backup copy of the whole game/ folder.
  2. Use a plain text editor: Visual Studio Code (free) or Notepad++ (free, Windows). Never edit the files in a word processor.
  3. To preview your changes, the game must run from a web address, not from the disk. The simplest way: install Node.js 26.13.0 or newer, open the source/ folder in a terminal and run npm run dev, then open http://localhost:5270/. Edit the files in source/ and reload the page.
  4. Images: any editor that saves WebP works, for example GIMP or Krita (free).

After every change, reload the page. If the game shows a blank screen, the last edit broke the syntax: undo it (Ctrl+Z) and check commas and quotes.

2. Replace pictures

Replace a file in assets/img/ with another WebP of the same name and a similar size and proportion.

The table during a match
WhatWhere
Logoassets/img/ui/logo.webp
Card backassets/img/cards/back.webp
Suit symbolsassets/img/cards/heart.webp, sun.webp, leaf.webp, moon.webp
Special cardsassets/img/cards/nap-*.webp, boom-*.webp, gift-*.webp (one per suit), rain.webp, rain4.webp
Charactersassets/img/avatars/<name>.webp and their reactions in assets/img/avatars/moods/<name>-happy.webp, -surprised.webp, -cheer.webp
Backgroundsassets/img/bg/<place>-mesa-retrato.webp and -deitado.webp (table, portrait and landscape), <place>-mapa-*.webp (map). Places: lagoa, jardim, feira, chale
Little animated sceneryassets/img/world/: gull, butterfly, petal, leaf, lantern, snow
Buttons and panelsassets/img/ui/
Iconsassets/img/icons/

Some file names are in Portuguese: mesa = table, mapa = map, retrato = portrait, deitado = landscape, lagoa = Pizza Kitchen, jardim = Village Square, feira = Food Truck Street, chale = Alpine Pizzeria, vitoria = victory.

Internal names

Files and code use short internal names that stay the same in every theme. This table shows what each one is in this game.

In the gameIn files and code
Tomatoheart
Cheesesun
Basilleaf
Olivemoon
Burntnap
Spinning Doughboom
Pizza Box +2gift
Four Flavorsrain
Family Pizza +4rain4
Pizza Kitchenlagoa
Village Squarejardim
Food Truck Streetfeira
Alpine Pizzeriachale
Pepperyou
Ginamika
Marcotheo
Bellajuno
Dantebiscuit
Ninowaffle
Neranori
SLICE! buttonpop / call

3. Colors and fonts

The main colors are the variables at the top of css/base.css, for example --heart: #ff6b5e;, --sun, --leaf, --moon and --ink (the dark blue of the texts).

The fonts are in assets/fonts/ and are declared by the @font-face blocks at the top of css/base.css.

4. Change the campaign

The Pizza Tour campaign map

The 24 tables are a list at the top of src/game/campaign.js, one line per table:

['mika,waffle', 'normal', {}, 7, ['points', 50], 7],
PartMeaning
'mika,waffle'The rivals (1 to 3): mika, theo, juno, biscuit, waffle, nori
'normal'Their level: easy, normal or hard
{}Rules of this table, for example { stack: true, cascade: true }
7Cards in each hand
['points', 50]The goal for the second star: ['turns', 15], ['points', 50] or ['special'] (finish on a special card)
last 7Third star: the most cards the player may draw

Table 6 of each place is the boss: the player needs to win 2 rounds.

5. Change the pace and the effects

The FEEL block in src/config.js has one number per line, each with a comment:

Volumes of music and effects are in the AUDIO block of the same file. Players who prefer calm can always turn on Less motion in Settings.

6. Change the rules

The house rules panel

After changing the rules, run npm test: a robot plays thousands of rounds and reports anything that breaks.

7. Change texts and languages

Each language is one file in src/lib/locales/ (en.js, pt.js...). Find the text, change it between the quotes, keep the key on the left and any {n} or {who} marker.

To rename a character, change its name_mika line (and the same key in the other languages). To add a language, follow the Languages section of the buyer guide.

8. Sounds and music

9. Save key and starting over

Progress is saved in the browser with the prefix slice-eights.template.save.v1:, set by STORAGE_PREFIX in src/config.js. Hosting two copies on the same domain? Give each its own prefix.

To start over in your browser: press F12, open Application, Local Storage, select the site, delete those keys and reload.

10. Publish your version

  1. If you edited source/: run npm test, then npm run build. Upload the contents of source/dist/.
  2. If you edited game/ directly: upload the changed files.
  3. Keep the folders as they are. If you added a new folder next to index.html, add its name to PARTS in source/tools/build.mjs.
  4. Clear the browser cache to see the new version (see the buyer guide).

Support: willian@polargames.com.br