Skip to content

Commit 6f70bb1

Browse files
committed
Cosmetics: five rare skins instead of one, so a rare chest roll isn't always the same skin
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DfCR7RPoK1UNAvb7iRuPWn
1 parent bee483a commit 6f70bb1

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ Personal site hosted with GitHub Pages at **https://ascoding11.github.io**, the
9898
- `e63334287a3deaa3/cosmetics.js`, `wallet.js` and `shop/`: skins, accessories, chests, packs and the coins to buy them with (Back Room). **Switched off**: `var ENABLED = false;` at the top of `cosmetics.js` hides every part of it (no Shop chip, no wallet, no chests, no skin picker, nothing saved), and `shop/` then only says the shop isn't open yet. `?cosmetics=1` turns it on for testing, on localhost or in an automated browser only (the check is `captains.js`'s, above, which every page loads before `cosmetics.js`; without it the address does nothing). The site's captains are not let in here early: for them only the three games' own screens open, and the shop, the wallet, earning and buying stay shut like for everyone else (`on()` asks `captains.js`'s `open()`, which leaves captains out). Hub pages load both scripts (`cosmetics.js` with `data-hub`, which adds an "emeralds · Shop" chip to the `.topbar` or to an element marked `data-cosmetics-slot` when switched on). Odd One Out's 33 items (14 hunter outfits, 6 hunter tools, 8 prop taunts and 5 catch poofs) are in `GAME_ITEMS` under `odd-one-out` (prefix `oo`), drawn and played by `odd-one-out/wardrobe.js`, in no pack: captains wear them free in the game's Wardrobe (see Odd One Out above). Chromaflage's 13 Seeker kit items (7 hats, 4 tools, a catch splash and a caught animation; ids `cf-…`) are in `GAMES` as `chromaflage` and in no pack: captains wear them free in the game's Seeker kit (`chromaflage/kit.js`; seekers only) and nothing is sold. Rampline's Captain's garage items (cars, paints, wheels, tyre smoke, horns; game `rampline`, prefix `rl`) are in the catalogue too, drawn by `rampline/garage.js` and free to wear for captains while the shop is shut. Asteroid Run's 39 game items (19 aliens, 10 run trails and 10 tunnel colours) are in `GAME_ITEMS` too, in no pack: captains wear them free in Asteroid Run's Wardrobe, which draws them by slot and number (see Asteroid Run above; the shop's small `itemSvg()` picture is the plain fallback for its aliens and tunnel colours). Shell Crackers' 43 game items (19 egg types, 7 hats, 12 gun skins and 5 crack effects; slots `egg`, `hat`, `gun`, `crack`, ids `sc-…`) are drawn by `shell-crackers/kit.js`, are in no pack yet, and for now are only worn by captains, free, through the game's Locker (see Shell Crackers above). Tumble Trials' 83 Closet items (10 colours, 6 premium colours, 9 patterns, 9 underpants, 14 hats, 6 faces, 12 costumes, 6 victory dances, 6 fall screams and 5 knockout splashes; ids `tt-…`) are in `GAMES` as `'tumble-trials'` and in no pack: captains wear them free in the game's Closet (`tumble-trials/closet.js`) and nothing is sold. Rumble Karts' 53 (17 drivers, 15 karts, 8 wheels, 5 horns and 8 wreck effects) are in `GAMES` as `rumble-karts` but in no pack: today only captains wear them, free, through the game's own Garage (see Rumble Karts above), which keeps what they wear in its own `rk_cos`. Updraft's 40 items (22 skins, 6 backpacks, 3 height rewards marked `give: 'earned'`, 5 fall screams and 4 trails) are in `GAME_ITEMS` under `updraft` (prefix `up`), drawn by `updraft/gear.js`, in no pack, and worn only through the game's own Gear screen for now (captains only; see Updraft above). Coil's 74 game items (colours, animal and design patterns, object snakes, heads, a trail and death bursts) are in `GAME_ITEMS` too, in no pack: captains wear them free in Coil's Wardrobe, which draws them by slot and number (see Coil above).
9999
- **Coins.** Mangos are the small coin and emeralds the big one: 17 mangos make an emerald (13 until 19 Nov 2026; saved test balances were kept as the same number of mangos, since the system has never been public). Emeralds are only bought with real money, in `wallet.js`'s `EMERALD_PACKS`, the owner's six packs as created in Stripe (7 emeralds per $0.99, rounded up): Emerald Handful 7 for $0.99, Emerald Pouch 36 for $4.99, Emerald Sack 71 for $9.99, Emerald Chest 142 for $19.99, Emerald Buttload 354 for $49.99 and Emerald Vault 707 for $99.99; there is no other dollar rate. "Emerald Chest" is a pack of emeralds, not the loot Chest: the shop lists it under "Buy emeralds" with its card saying "142 emeralds". Each pack has an empty `link: ''` where the owner pastes its Stripe Payment Link later (like `AD_SLOT`); while a link is empty or `PAYMENTS.enabled` is false the shop shows the pack as "Not available yet". Mangos only come from breaking emeralds: the balance is whole mangos, and a price that isn't whole emeralds leaves the change in mangos (shown as "3 emeralds 9 mangos"). `BackRoomWallet.{balance(), inEmeralds(), format(), earn(mangos, why), spend(mangos, why), log()}` fires `backroom:wallet` on `document` when the balance changes.
100100
- **Earning: off on purpose (19 Nov 2026).** Coins come from real money only: `PLAY_PAYS = false` and `WELCOME = 0` in `wallet.js`, so playing pays nothing and there is no welcome gift (the shop's Wallet tab says so). What follows is how earning works if `PLAY_PAYS` is ever set back to true. Play pays mangos through stats.js's existing hooks. `wallet.js` wraps `BackRoomStats.add/max/min` in the page and in a hub page's game frames, and pays from `EARN`: mangos per unit for counts, per call for bests, and a daily cap per game by the browser's date. Every change is logged in `wallet:log` (the last 200). There's a one-time 20-emerald welcome gift when the shop first opens.
101-
- **Rarities and prices.** Five rarities, priced the same for skins, accessories and every game item (`PRICE` in `cosmetics.js`, whole mangos): common 60 ($0.50), uncommon 119 (7 emeralds, $0.99), rare 420 (24 emeralds 12 mangos, $3.49), epic 600 (35 emeralds 5 mangos, $4.99) and legendary 1,200 (70 emeralds 10 mangos, $9.99). Every item can be bought on its own from the shop's Locker (`buy('item:<id>')`), including the game items described above as "in no pack"; only items with `give` (handed over by their game) are not sold. Uncommon was added on 19 Nov 2026 by one rule, so the owners can move items later: common, epic and legendary items stayed as they were; of the items that were rare, within each group in file order (skins by theme, accessories by slot, game items by game and slot) the first half, rounded up, became uncommon and the rest stayed rare. That gave skins 12 common, 8 uncommon, 1 rare (Winter Frost), 6 epic, 3 legendary; accessories 8, 6, 3, 5, 1; game items 265, 141, 115, 168, 33. Every rarity must keep at least one skin, or a chest roll of that rarity can't be paid out.
101+
- **Rarities and prices.** Five rarities, priced the same for skins, accessories and every game item (`PRICE` in `cosmetics.js`, whole mangos): common 60 ($0.50), uncommon 119 (7 emeralds, $0.99), rare 420 (24 emeralds 12 mangos, $3.49), epic 600 (35 emeralds 5 mangos, $4.99) and legendary 1,200 (70 emeralds 10 mangos, $9.99). Every item can be bought on its own from the shop's Locker (`buy('item:<id>')`), including the game items described above as "in no pack"; only items with `give` (handed over by their game) are not sold. Uncommon was added on 19 Nov 2026 by one rule, so the owners can move items later: common, epic and legendary items stayed as they were; of the items that were rare, within each group in file order (skins by theme, accessories by slot, game items by game and slot) the first half, rounded up, became uncommon and the rest stayed rare. For skins that left only one rare (Winter Frost), so every rare chest roll would give the same skin; four were put back to rare by hand (Circuit Scout, Red Fox, Autumn Ember, Magma Walker). Skins are now 12 common, 4 uncommon, 5 rare, 6 epic, 3 legendary; accessories 8, 6, 3, 5, 1; game items 265, 141, 115, 168, 33. Every rarity must keep at least one skin, or a chest roll of that rarity can't be paid out.
102102
- **Catalogue.** `SKINS` has 30 skins in the five rarities above. Each has an avatar look and a 3D colour set `colors {body, accent, trim, emissive, pattern}`, and `texture(id, size)` paints the pattern on a canvas. `ACCESSORIES` has 23, one per slot `hat, glasses, cape, trail, aura, pet` worn with any skin; each has a `three` description (`attach, shape, color, color2, size`) for 3D games. All of them are drawn in code. Item `no` numbers are permanent.
103103
- **Game items.** `GAME_ITEMS` holds looks worn inside one game instead of on the avatar; today they are Boostball's 99 (31 decals, 27 boost trails, 21 goal explosions, 6 antenna toppers, 6 roof hats, 4 sets of wheels, 4 engine sounds; see Boostball's Kit above) and Slipstream's 76 (the next point). One entry per game in `GAMES` gives its name, id prefix and slots. Each has its game, one of that game's slots (`GAMES`), a number `no` that is permanent within its game and slot (the game sends it to other players and draws by it, so add new ones at the end and never renumber), a rarity that sets its price (`PRICE`, above) and two colours for the small picture `itemSvg()` draws. They are sold in packs of kind `items` (19 Boostball packs and 8 Slipstream packs, each priced at the sum of its items; shown under "Boostball packs" and "Slipstream packs" in the shop), worn with `equip(id)` and taken off with `unequip('boostball:decal')`, shown in the shop's Locker under their own chips, and read by the game with `gameEquipped('boostball')`. They are not mirrored into the Google account yet (`w.a` holds at most 128 item numbers, and a new field in `w` needs the rules checked with a signed-in account), so they stay in the browser that bought them. Driftfall's 89 (16 outfits, 8 backpacks, 24 gliders, 6 glider trails, 19 gun skins, 6 build skins, 6 emotes, 4 victory poses; game `drop-zone`, prefix `dz`) are worn from the game's own Locker by captains only and are in no pack: see Driftfall's Locker extras above.
104104
- **Game items: Slipstream.** Slipstream's 76 are 15 sponsors, 23 liveries (8 patterns and the 15 sponsors' own), 23 helmets, 8 boost effects, 5 tyre smoke colours and 2 podium celebrations. The 38 that are sold come in the eight Slipstream packs (the Garage in the game buys the same packs). The other 38 are in no pack and carry `give`: `'free'` (the sponsors and the eight plain helmets: anyone may wear them, and the game puts one in the locker the first time it is worn) or `'earned'` (a sponsor's livery, handed over when its challenges are finished); `grant(id)` adds one of these and refuses anything that is sold. Worn with `equip(id)`, taken off with `unequip('slipstream:livery')`, read by the game with `gameEquipped('slipstream')`; the game draws them (`slipstream/garage.js`), and its page loads `cosmetics.js` and `wallet.js` itself so its Garage can buy. Kept in `cosmetics:v1` (`g`, `ge`) and not mirrored into the account yet (this browser only).

‎e63334287a3deaa3/cosmetics.js‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,19 +154,19 @@
154154
S(16, 'gumdrop-knight', 'Gumdrop Knight', 'uncommon', 'candy', 'Sworn to protect the candy jar, mostly from itself.',
155155
{ bg: '#B8F2E0', bg2: '#FF9AC8', bgp: 'checker', outfit: 'armor', head: 'gumdrop' },
156156
{ body: '#5ED6B0', accent: '#FF9AC8', trim: '#FFFFFF', emissive: '#C8FFF0', pattern: 'sprinkles' }),
157-
S(17, 'circuit-scout', 'Circuit Scout', 'uncommon', 'robot', 'A small explorer robot that beeps when it finds something.',
157+
S(17, 'circuit-scout', 'Circuit Scout', 'rare', 'robot', 'A small explorer robot that beeps when it finds something.',
158158
{ bg: '#123B36', bg2: '#4FF0C0', bgp: 'hex', outfit: 'circuit', head: 'plate', tone: '#A9D9CF' },
159159
{ body: '#2C6E62', accent: '#4FF0C0', trim: '#CFE8E2', emissive: '#4FF0C0', pattern: 'circuit' }),
160-
S(18, 'red-fox', 'Red Fox', 'uncommon', 'animals', 'Clever, quiet and very good at hide and seek.',
160+
S(18, 'red-fox', 'Red Fox', 'rare', 'animals', 'Clever, quiet and very good at hide and seek.',
161161
{ bg: '#2F5D3A', bg2: '#4E8A57', bgp: 'leaves', outfit: 'hoodie', head: 'fox' },
162162
{ body: '#E0612B', accent: '#FFF3E6', trim: '#3A2418', emissive: '#FFB27A', pattern: 'spots' }),
163-
S(19, 'autumn-ember', 'Autumn Ember', 'uncommon', 'seasons', 'Crunchy leaves and the first cosy jumper of the year.',
163+
S(19, 'autumn-ember', 'Autumn Ember', 'rare', 'seasons', 'Crunchy leaves and the first cosy jumper of the year.',
164164
{ bg: '#E07A2E', bg2: '#FFC46B', bgp: 'leaves', outfit: 'puffer', head: 'leaf' },
165165
{ body: '#B8481F', accent: '#FFC46B', trim: '#6E2A12', emissive: '#FF9A3D', pattern: 'leaves' }),
166166
S(20, 'winter-frost', 'Winter Frost', 'rare', 'seasons', 'Ice in the hair and snowflakes that never melt.',
167167
{ bg: '#BFE4FF', bg2: '#FFFFFF', bgp: 'snow', outfit: 'puffer', head: 'frost' },
168168
{ body: '#6FB7F0', accent: '#FFFFFF', trim: '#2C6FB0', emissive: '#C8F0FF', pattern: 'snow' }),
169-
S(21, 'magma-walker', 'Magma Walker', 'uncommon', 'volcano', 'Walks on cooled lava and keeps the warm bits for later.',
169+
S(21, 'magma-walker', 'Magma Walker', 'rare', 'volcano', 'Walks on cooled lava and keeps the warm bits for later.',
170170
{ bg: '#2A1410', bg2: '#FF5A1F', bgp: 'dots', outfit: 'armor', head: 'horns' },
171171
{ body: '#3B2420', accent: '#FF5A1F', trim: '#1A0F0C', emissive: '#FF7A2E', pattern: 'flames' }),
172172
// Epic

0 commit comments

Comments
 (0)