Log inGet started
World

Save Point: Profiles, Levels and Unlocks Kit

README.md

curves

The levelling curves: how much XP each level costs, and how a total XP turns into a level, the XP into that level and the XP the next level needs.

  • steady: 100 XP for every level, up to level 50.
  • steep: 100 XP for the first level, then 40% more each level (rounded to tens), up to level 50.
  • quadratic: 25 × n² + 75 XP from level n to n+1 (100, 175, 300, 475, 700, …), up to level 50.
  • custom: your own table of XP costs; its length sets the top level.

get(name, opts) builds a curve object with cost(n), totalFor(level), levelFor(total) and table(n); canonical normalises a name (aliases such as linear or exponential) and describe returns the catalogue entry.

Mostly internal: saveKit.save picks the curve from Save.setup({ curve = ... }), and game code reaches the live curve through Save.curve(). Pure functions with no engine calls, so tests and tools can use it directly.