Skip to content
haxthewebPublic
forked from jno-de/rpg-me

About

RPG me HAX app to share fun character creations

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

 
 

Repository files navigation

rpg-me

rpg.art.hax.cloud, one of HAX Art's tools (rpg-me.hax.cloud redirects there): build an rpg-character, keep its character code, share a link that recreates it, and drop it into any page that loads HAX. It is part of the HAX network of sites (hax.cloud, the element portfolio, the live HAXcms demo) and shares their header strip, hax-network-bar.

What it does

  • Everything rpg-character-builder can pick: the look (body, skin, hair, hair color, face, glasses, neckwear, shirt, pants), the character type, expression, pose, hat, mask, makeup, gear (item, offhand, feet, pet, flag text) and extras (shaved, seasonal, fire, circle background).
  • A character code (1-0103...~PSU) that <rpg-character code="..."> turns back into the same character anywhere.
  • Links: ?code=<code> opens a character, &walking=true makes it walk. Old links still work: ?seed=05700899&hat=none (the 8 digits are body, face, glasses, hair, pants, shirt, skin and hair color), as does ?seed=<a name>.

Develop

  • npm install
  • npm start runs it locally
  • npm run build writes the site to public/ (Vercel runs this, see vercel.json). It builds against webcomponents master, not the last npm release: scripts/webcomponents-master.mjs (run as prebuild) copies the @haxtheweb elements rpg-me uses, and the ones they use, from master over what npm installed. WEBCOMPONENTS_REF=<branch> builds against another branch, WEBCOMPONENTS_SRC=<checkout>/elements uses a local checkout, RPG_ME_NPM_ONLY=1 uses the npm release.
  • npm test runs the tests
  • Vercel only builds when this repository changes, so .github/workflows/vercel-nightly.yml asks for a production build of main every night (and on demand from the Actions tab), to pick up webcomponents master. It calls a Deploy Hook: create one in the Vercel project (Settings → Git → Deploy Hooks, branch main) and store its URL as the repository secret VERCEL_DEPLOY_HOOK. Without the secret the job does nothing and says so.

Option labels come from rpg-character's own HAX settings, so they stay in step with the element. English strings are in rpg-me.js (this.t) and locales/rpg-me.en.json.

License

Apache-2.0

About

RPG me HAX app to share fun character creations

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages