Module:Experience/doc
This is the documentation page for Module:Experience
Module:Experience's function between is invoked by Template:XP/Between.
Module:Experience's function level_at is invoked by Template:XP/Level for.
Module:Experience's function to_next is invoked by Template:XP/To next.
Module:Experience's function total_xp is invoked by Template:XP/Total.
Module:Experience requires strict.
Module:Experience loads data from Module:Experience/data.
Module:Experience is required by Module:Skill calc.
See also: {{XP/Total}}
, {{XP/Between}}
, {{XP/To next}}
, {{XP/Level for}}
This module is a helper module to be used by other modules; it may not designed to be invoked directly. See Brighter Shores:Lua/Helper modules for a full list and more information.
Function | Type | Use |
---|---|---|
_total_xp(level) | number | Returns the total experience needed to reach a level (from 0). |
_between(level_low, level_high) | number, number | Given a level_low and a level_high, return how much experience is needed, starting at level_low, to reach level_high. This is assuming you start at exactly level_low and end as soon as you reach level_high, with no extra experience. |
_to_next(level) | number | Given a level, return the experience needed to get to the next level. Returns nil for level 500 |
_level_at(xp) | number | Returns the level you would be at if you had xp experience. When the result is < 500, _total_xp(result) <= xp and xp < _total_xp(result+1) |