Skip to content

[rpg-character] Ship a roster of every named character and the combination count - #1034

Merged
btopro merged 1 commit into
masterfrom
feature/rpg-character-roster
Oct 29, 2026
Merged

btopro merged 1 commit into
masterfrom
feature/rpg-character-roster

Conversation

@btopro

@btopro btopro commented Oct 29, 2026

Copy link
Copy Markdown
Member

What this touches

Only rpg-character. It adds docs, demo and a script, with no runtime code changes.

  • characters.png: all 65 named characters (presets), rendered by the real element and labeled. It ships with the package.
  • CHARACTERS.md: the image plus a table of every character: label, preset value, default pieces and code. It also has a "How many characters?" summary.
  • demo/characters.html: the same roster live. It is built from the element's presets and the haxProperties labels, so new presets appear automatically. The main demo links to it from "Character types".
  • scripts/roster.mjs: regenerates characters.png and CHARACTERS.md against yarn start. It recomputes the combination count from codeSlots and poseArt, so the number stays current as options are added.
  • README: new "Named characters" and "How many characters are there?" sections.

The count

Every visual choice is independent, so the count is a product. Each factor is the number of different ways that part can be drawn, after taking the render rules into account:

  • a preset replaces the shirt and pants
  • makeup replaces the face
  • hair only shows on base 1
  • a shaved head replaces both hat color and hair
  • fire with no hat draws the coffee hat
  • a wave drops the right-hand item, and a cheer drops both hands' items
looks = head × skin × face × faceItem × accessories × outfit
      × (2·hats − 1) × masks × pets × expressions × 2 × feet
      × (items·offhands + offhands + 1)
      = 111 × 10 × 21 × 10 × 10 × 165 × 121 × 12 × 11 × 7 × 2 × 4 × 177
      = 60,890,117,571,360,000
  • About 61 quadrillion different-looking characters.
  • 66,000,000 of those come from a seed alone.
  • 239,738,895,728,640,000,000 possible character codes (about 2.4 × 10²⁰). Codes also record choices that end up hidden.
  • Left out of the count:
    • free flag text, which would make it unbounded
    • hat="random"
    • seasonal mode, which only picks existing looks
    • walking, size and accent color
  • Overlapping pieces count as different, for example a mask over glasses.

Checks

  • yarn test: 91/91.
  • node scripts/precheck.mjs: PASSED. eslint is clean on roster.mjs.
  • Walkthrough: awaiting, not stale.
  • demo/characters.html was checked in a real browser: 65 characters and no errors.

Generated by Claude Code

…ation count

- characters.png and CHARACTERS.md show all 65 presets, with each one's
  default pieces and code.
- demo/characters.html shows the same roster live, built from the element's
  presets and labels, and the main demo links to it.
- scripts/roster.mjs regenerates the image and the list, and recomputes the
  combination count from the code registry.
- The README gains "Named characters" and "How many characters are there?"
  sections, with the formula: 60,890,117,571,360,000 different-looking
  characters, 66 million from a seed alone, and 2.4 x 10^20 possible codes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PfFvVQhHTESEgN7TuVPB8U
@vercel

vercel Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
webcomponents Ready Ready Preview Oct 29, 2026 4:36pm UTC

Request Review

@btopro
btopro merged commit 282a7c8 into master Oct 29, 2026
10 checks passed
@btopro
btopro deleted the feature/rpg-character-roster branch October 29, 2026 17:20
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 29, 2026

This branch was successfully deployed

1 active deployment
Preview — 3403c35d Deployed Oct 29, 2026 by vercel[bot]
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant