Before you start
This guide is for people who do not program. Every recipe says which file to open and what to change. You need:
-
a text editor (Visual Studio Code, Notepad++, TextEdit in plain-text mode) for
.jsand.cssfiles; - an image editor that saves WebP (GIMP, Photopea in the browser, Krita) for the art;
- an audio editor that saves MP3 (Audacity) for the sounds.
Make a backup first: copy the whole package folder before you change anything.
There are two ways to change the game:
-
Directly on the host (no tools): replace files in your uploaded
game/folder (art, audio,onyx-club.config.js). Fast, but these changes live only on the host. -
In
source/and build (needs Node.js, see the main guide): change files insource/, runnpm run buildand uploadsource/dist/. Use this for code, styles,theme.js,feel.jsand translations.
After each upload, reload the game without the cache (Ctrl+F5, or Cmd+Shift+R on a Mac).
A full reskin is: new pictures with the same names in art/, new sounds in audio/,
the colours of source/src/ui/theme.js, the table names in the locales, and the name in
onyx-club.config.js and index.html.
1
2
3
4
5
6
7
8
9
10
11
12
13
- balance of free demo credits (the + opens the free coins)
- player level and XP
- menu: settings, rules, statistics, tables
- rules of this table
- betting spot
- Perfect Pairs side bet
- 21+3 side bet
- chip rack (the table's five chips)
- CLEAR: take the bets back
- REBET: the last round's bets again
- ×2: double the bets
- DEAL: start the round
- the free-credits notice (keep it visible)
Which file is each part of the screen
| On screen | File (in game/art/, the same name in source/public/art/) |
|---|---|
| Room behind the first table (landscape / portrait) | bg-landscape.webp, bg-portrait.webp |
| The table in front of the dealer (landscape / portrait) | table-landscape.webp, table-portrait.webp |
| Rooms and tables of the second and third tables |
bg-stage-*.webp, table-stage-*.webp, bg-rooftop-*.webp,
table-rooftop-*.webp
|
| Table pictures in the lobby carousel |
thumb-lounge.webp, thumb-stage.webp, thumb-rooftop.webp
|
| Logo | logo.webp |
| The dealer (a black panther in an ivory tuxedo who deals, claps, shrugs and waves) |
bear-sprites/*.webp (one picture per pose) and bear-sprites/sprites.json
|
| The dealer on panels (wheel, refill, level up, rules) |
bear-cheer.webp, bear-cheer-full.webp, bear-clipboard.webp,
bear-peek.webp, bear-sack.webp, bear-thumbs.webp
|
| Playing cards (all 52 and the back) | cards.webp (one sheet) |
| Card shoe / discard tray | shoe.webp / discard.webp |
| Chips: in the rack / seen from above / seen from the side |
chip-rack-0..5.webp / chip-top-0..5.webp /
chip-side-0..5.webp
|
| Chip rack and the console bar (wide screens) | rack.webp, console-bar.webp |
| Buttons and plates |
btn-blue/teal/navy/violet/gray/pill.webp, banner.webp,
plaque.webp, panel.webp, row.webp,
round-btn.webp, badge*.webp, level-badge.webp
|
| Result panels and titles |
panel-win/push/bigwin/crest.webp, banner-bust.webp,
title-*.webp
|
| Icons | icon-*.webp |
| Daily wheel |
wheel.webp, wheel-hub.webp, wheel-pointer.webp,
wheel-base.webp, title-wheel.webp, coin piles pile-0..2.webp
|
| Statistics and achievements | stat-*.webp, medal-*.webp |
| Decorations (Art Deco ornaments, gold dust and sparks) |
crystal-0..3.webp, flake-0..5.webp, spark-0..3.webp,
coin.webp, ice-arrow.webp, gift-sack.webp
|
| Painted digits: light (bets, totals) / gold (balance, wins) |
font-ice.webp + .json / font-gold.webp + .json
|
| Texts |
source/src/locales/*.js or texts in onyx-club.config.js
|
| Colours of the effects | source/src/ui/theme.js |
| Timings of the game feel | source/src/ui/feel.js |
| Layout, sizes, palette |
source/src/ui/styles.css (base), then styles-placement.css,
styles-polish.css, styles-final.css
|
Recipe 1: replace the room and the table
-
bg-landscape.webpis 1672 × 941 (desktops and phones held sideways),bg-portrait.webpis 941 × 1672 (phones held upright).table-landscape.webpandtable-portrait.webphave the same sizes and are drawn over the room, in front of the dealer: keep their transparent upper part. - Keep the important part of the picture in the middle: the edges are cut on screens of other shapes. The far edge of the table must stay at the same height, because the dealer's paws rest on it.
- Save as WebP with the same names and replace them.
Recipe 2: the logo and the dealer
-
The logo is
logo.webp(900 × 619, transparent background). Keep a similar width-to-height shape so it fits in the same place. -
The dealer is a set of whole pictures of 1229 × 819, one per pose (
rest,deal,wave-a,wave-b,clap-open,clap-shut,cheeks,scratch,chest,shrug,up,fist,curious,blink), some with a-frontcopy whose paws come in front of the table edge. Draw your character in every pose at the same size and in the same place in the picture, so the poses switch without a jump.sprites.jsongives the size of the pictures and the point where the paws touch the table (contact). -
The six panel pictures (
bear-cheer.webp...) are the same character on the daily wheel, the refill, level up and the rules. -
To rename the game, also set
brand: { name: 'My Game' }inonyx-club.config.js, the<title>and the logoalttext inindex.html, andnameinsource/src/ui/theme.js. The small studio line under the logo on the title screen is<p class="maker">inindex.html: write your own name there or delete the line.
Recipe 3: the three tables, their rooms and a fourth table
-
Each table of
rules.tableshas anid(lounge, stage, rooftop). The first table usesbg-landscape/portraitandtable-landscape/portrait; the others usebg-<id>-landscape/portrait.webpandtable-<id>-landscape/portrait.webp. The carousel showsthumb-<id>.webp(420 × 507). -
The names shown are the texts
table_<id>of the locales (for exampletable_stage), so a table can be renamed per language withtexts. -
A new table: add a line to
rules.tablesinonyx-club.config.js, for example{ id: 'vip', minBet: 500, maxBet: 20000, chips: [500, 1000, 2000, 5000, 20000], unlock: 20 }, and its nametexts: { table_vip: 'VIP TABLE' }. It plays in the first room. To give it its own room, addbg-vip-*.webp,table-vip-*.webpandthumb-vip.webp, add'vip'to theSCENESlist insource/src/main.jsand copy the four[data-scene='rooftop']rules at the end ofsource/src/ui/styles-final.csswithvip, then build.
Recipe 4: cards and chips
-
cards.webpis 2600 × 1400: 13 columns (A, 2 to 10, J, Q, K) and 5 rows (spades, hearts, diamonds, clubs, and the back on the last row), each card 200 × 280. Keep the same grid. -
Each chip colour has three pictures with the same number:
chip-rack-N(in the rack),chip-top-N(seen from above, 256 × 256) andchip-side-N(a stack seen from the side). The values arechipsof each table inrules.tables; which colour each rack position uses ischipColorsintheme.js. The game writes the value on the chip.
Recipe 6: sounds, voice and music
-
Every sound is an MP3 in
game/audio/(same names insource/public/audio/). Replace a file with another MP3 of the same name; short effects should be short (under 2 seconds). -
Music:
music.mp3(the tables),music-wheel.mp3(the daily wheel) andmusic-bigwin.mp3(big wins). They loop. -
Announcer:
v-welcome,v-place-bets,v-blackjack,v-dealer-busts,v-big,v-mega,v-epic,v-level-up. -
Effects: the cards (
card,card-land,flip,shuffle,sweep), the chips (chip,chips-win,chips-lose), results (win,lose,push,bust,blackjack,bigwin,shatter), coins (coin,coinrain,count,collect,levelup), the daily wheel (wheel-tick,wheel-win), andclick,nope,whoosh. -
A missing optional track does not break the game. The starting volume is
audio: { volume: 0.8 }inonyx-club.config.js; the player has separate switches for music, effects and voice in SETTINGS. The list of files and their volumes is at the top ofsource/src/audio/audio.js.
Recipe 7: colours, effects and timings
-
In
source/src/ui/theme.jschangeaccent(rings, sparks, glints),gold,ambient(the gold dust rising slowly in the lamplight),rays(the light rays behind each celebration) andchipColors. Colours are written like'#6fe9ff'or[150, 230, 255]. -
In
source/src/ui/feel.jsevery timing has a name and a comment: how fast cards fly and flip, the chips, the dealer's turn, how long a result stays, the celebrations.speed.fastis the FAST setting. Smaller numbers make the game quicker. -
The palette of the interface is at the top of
source/src/ui/styles.css(the--variables). -
Run
npm run buildand uploaddist/. Nothing in these files changes a card or a payout.
Recipe 8: texts and the 14 languages
-
To change a few texts on the host, add them to
onyx-club.config.js:texts: { tapToPlay: 'PLAY NOW' }changes every language;texts: { pt: { tapToPlay: 'JOGAR' } }only Portuguese. The names (tapToPlay,deal,table_lounge...) are the keys ofsource/src/locales/en.js. -
To offer only some languages:
languages: ['en', 'es']. To always open in one:language: 'es'. -
To edit a whole translation, change
source/src/locales/<code>.js(en pt es fr de it nl pl tr ru id ja ko zh), runnpm run localesandnpm run build.
Recipe 9: table rules, limits and the starting credits
In onyx-club.config.js, inside rules: { }:
-
preset:'vegas','european'or'social'; then any single rule:decks,dealerHitsSoft17,blackjackPays([3, 2]or[6, 5]...),double,surrender,insurance,maxHands. -
tables: the minimum and maximum bet, the five chips and the unlock level of each table. -
sideBets: { perfectPairs: { enabled: false } }removes a side bet;payschanges what it pays. startBalance: the credits of a new player and of the free refill.-
After a change, run
npm run edgeinsource/to see the house edge of your table. A wrong value is refused with a message.
These are fictional demo credits only.
Recipe 10: levels, daily wheel and free coins
In onyx-club.config.js, inside progress: { }:
-
wheel: { alwaysReady: false, everyHours: 24 }offers the wheel once a day (the demo offers it on every visit);prizesandweightsset the 12 wedges. coins: { everyHours: 3, amount: 100 }sets the gift button.-
levels: { enabled: false }turns levels off (every table open from the start);needandrewardset how fast levels come and what they give.
Amounts are multiples of the smallest bet of the first table.
Recipe 11: publish your version
-
If you changed only files of
game/on the host, you are done: reload without the cache. -
If you changed
source/: runnpm test, thennpm run build, and upload the contents ofsource/dist/over your game folder.npm run robot(main guide) plays a few rounds to check nothing broke. -
Keep
SCOPE.mdwith the game and the credits notice visible. Changebrand.storageKeyif you want players to start with a fresh save.