Skip to content

alta.onboarding/0.2: the guide ​

Generated from docs/standards/alta-onboarding-0.2.md · npm run docs:gen

Code: core/onboarding/onboarding.ts. Tests: tests/contracts.test.ts, tests/onboarding.test.ts. Design: docs/ONBOARDING-V2.md (the guide on a Mac and in the cloud).

The guide is a list of beats over the campaign quests; each world may ship universes/<id>/onboarding.json, content/onboarding.json is the neutral fallback. 0.1 files are still read.

0.2 adds:

  • on a step: setup (the id of a setup plan the step shows; lot D1) and cutscene (a scene id of alta-cinematics-0.1);
  • on a beat: auto: "app-open" | "hosted" (the proof given by the app being open, or by running hosted: AUTO_PROOFS), and wait (the beat waits for its proof instead of offering "Next");
  • on a beat and on a tour stop: host: "local" | "hosted" | "hosted-free" | "hosted-paid" (HostCond, see platform): where it is played. Absent = everywhere.

Host and axis: two questions, two mechanisms ​

Host: where it runsAxis: who arrives
Changesthe facts: which quests and steps existthe tone: lines, order, first tracked quest
Mechanismthe host condition inside the filea file variant onboarding.<axis>.json
Comes from/api/game.host (mode, tier)host.axis
  • beatsFor(o, host): the beats played on this host, in file order. An auto beat implies its host (app-open = local, hosted = hosted), so the two doors are two quests, hence two beats.
  • stopsFor(beat, host), resumeAt(o, at, host): if the saved beat is not played on this host, the guide resumes at the first played beat after it in the file; if there is none, the guide ends.
  • The counter "n / total" counts the played beats; track is read on the last played beat.
  • guideProofs(o, at, done, host?) proves only the auto quests of played beats.
  • onboardingFor(files, universe, variant?): the first file that exists in universes/<u>/onboarding.<v>.json → universes/<u>/onboarding.json → content/onboarding.<v>.json → content/onboarding.json. A host mode is never a variant name (HOST_VARIANT_NAMES): such a variant is ignored.

Validation ​

checkOnboarding(o, questUids, sceneIds?, opts?: { game?, variant? }) refuses unknown quests, unknown scenes (when sceneIds is given), an unknown auto, any 0.2 field in a file that declares 0.1, and:

  1. a host outside HOST_CONDS;
  2. a host that contradicts auto (auto: "app-open" with a hosted condition, auto: "hosted" with local);
  3. a reference host (local, hosted-free, hosted-paid) on which no beat is played;
  4. two beats of the same quest played on the same host (a variant that wants other lines per mode writes wake and wake-hosted, each with its host);
  5. opts.variant equal to local, hosted, free or paid;
  6. with opts.game: a played beat whose quest cannot be played on that host, a track to such a quest, a key of steps or a tick that is not a step of the beat's quest.

Alta OS is open source (MIT).