The script includes built-in helper functions for developers:
-- Linear interpolation helperlocal function lerp(a, b, t) return a + (b - a) * tend-- Get interpolation factor based on curve typelocal function getInterpT(curve, level) local minL, maxL = curve.minLevel, curve.maxLevel local range = maxL - minL local t = (range > 0) and ((level - minL) / range) or 0 if curve.interpolation == "linear" then return t elseif curve.interpolation == "exponential" then return math.pow(t, curve.expPower or 1) elseif curve.interpolation == "custom" then return nil -- custom values handled separately else return t -- fallback to linear endend
-- Get perk values for a specific levellocal perkValues = Config.GetPerk(playerLevel)local accuracy = perkValues.minAccuracylocal recoil = perkValues.maxScopeRecoil
Perk values are pre-computed at startup, so lookups are cheap and safe to call during gameplay.