Unit (Data Type)

Which unit an experience comparison is read in — whole levels or raw points.

A string naming the unit an experience value is measured in. Used by apoli:xp, which reads the same two numbers the vanilla XP bar keeps.

Values

ValueMeaning
levelsWhole experience levels — the number printed above the XP bar. Level 30 is 30, regardless of how many points that took.
pointsRaw experience points — the total the player has banked. Level 30 is 1395 points, so the two units are never interchangeable.

Example

{
  "type": "apoli:xp",
  "unit": "levels",
  "comparison": ">=",
  "compare_to": 30
}

The apoli:xp_levels and apoli:xp_points aliases fill unit in for you, so a condition written with one of those never needs to name it. apoli:add_xp takes no unit — it has a points field and a levels field instead.