Page history
19 December 2024
Artoire
Handle commas in xp arg since they can be quite large
+77
Artoire
Created page with "require('strict') local data = mw.loadData('Module:Experience/data') local p = {} function p.total_xp(frame) local args = frame:getParent().args return p._total_xp(args[1]) end --Returns the total experience needed to reach a level (from 0) function p._total_xp(level) level = tonumber(level) or 0 local floor = math.floor(level) local frac = level - floor if frac ~= 0 then -- Linearly interpolate things like "level 100.5" as "halfway between level 100 and..."
+2,068