Log inGet started
World

Save Point: Profiles, Levels and Unlocks Kit

README.md

profile

The rules applied to one saved record, as pure functions with no engine calls.

  • XP and levels: view, addXP, relevel.
  • Stats and unlocks: addStat, unlock, ruleMet, checkUnlocks (rules by level, by stat, by event) and buy (rules with a cost, paid in meta currency).
  • Roguelite: endRun resets the run's XP and level, keeps unlocks, currency and lifetime stats, and banks part of the run's XP as currency.
  • Public card: card builds what other players see, sanitizeCard makes a card read from another player safe to draw, title picks the best title_ unlock.

DEFAULT_UNLOCKS is the unlock list used when a game names none.

Internal: saveKit.save drives these for the local player. Tests and tools can call them on any record.