Module:Experience/doc: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
(Created page with "{{Documentation}} See also: {{T|XP/Total}}, {{T|XP/Between}}, {{T|XP/To next}}, {{T|XP/Level for}} {{Helper module |name = Experience |fname1 = _total_xp(level) |ftype1 = number |fuse1 = Returns the total experience needed to reach a level (from 0). |fname2 = _between(level_low, level_high) |ftype2 = number, number |fuse2 = 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...") |
mNo edit summary |
||
Line 1: | Line 1: | ||
{{Documentation}} |
{{Documentation}} |
||
⚫ | |||
⚫ | |||
{{Helper module |
{{Helper module |
Latest revision as of 10:42, 19 December 2024
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.
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) |