XP Quadratic Next-Level Curve

Invert caller exact integer cumulative quadratic threshold curve by bounded binary search; canonical decimal next-threshold/gap strings preserve values beyond safe integers. Cap has no next level, represented by empty strings.

Description

A quadratic experience curve assigns cumulative XP thresholds to levels.

A quadratic experience curve assigns cumulative XP thresholds to levels. Integer arithmetic avoids rounding a boundary into the wrong level.1

Enter nonnegative safe-integer XP, integer coefficients 0–1000000 and cap 1–1000000 with a+b>0 and XP≥c. Use BigInt thresholds and binary search for the highest affordable level through the cap. Return level, XP into level and next threshold/gap as decimal strings; capped next fields are empty strings.

When to use XP Quadratic Next-Level Curve

Use XP Quadratic Next-Level Curve when you need to evaluate the supplied records under the calculation and evidence rules below. No XP awards or extrapolation above the level cap is supplied.

Prepare the supplied game state, observations and explicit variant settings. Follow the card, board, coordinate and state conventions in the calculation rules.

How to use XP Quadratic Next-Level Curve and understand its results

  1. Prepare the supplied game state, observations and explicit variant settings. Follow the card, board, coordinate and state conventions in the calculation rules.
  2. Enter totalEarnedXp, quadraticCoefficient, linearCoefficient, constantCoefficient, callerLevelCap using the field table and calculation rules, then run the tool.
  3. Read resolvedCurrentLevel, xpIntoCurrentLevel, nextLevelThresholdXp, xpNeededForNextLevel, atCallerLevelCap. The explanation below defines the units, signs, ordering and any flags or placeholder values.
  4. If the tool reports an input issue, correct the values and run it again. Apply the stated assumptions when interpreting a successfully returned result.
Input fieldMeaningValue type; see rules belowRequirement
totalEarnedXpTotal earned xpnumberRequired
quadraticCoefficientQuadratic coefficientnumberRequired
linearCoefficientLinear coefficientnumberRequired
constantCoefficientConstant coefficientnumberRequired
callerLevelCapCaller level capnumberRequired

Enter nonnegative safe-integer XP, integer coefficients 0–1000000 and cap 1–1000000 with a+b>0 and XP≥c. Use BigInt thresholds and binary search for the highest affordable level through the cap. Return level, XP into level and next threshold/gap as decimal strings; capped next fields are empty strings.

threshold(L)=aL²+bL+c

Units, indexing, boundary conditions and exceptional cases are defined in the calculation rules above.

Output fieldMeaningValue type
resolvedCurrentLevelResolved current levelnumber
xpIntoCurrentLevelXp into current levelnumber
nextLevelThresholdXpNext level threshold xpstring
xpNeededForNextLevelXp needed for next levelstring
atCallerLevelCapAt caller level capboolean
json
{
  "input": {
    "totalEarnedXp": 90,
    "quadraticCoefficient": 10,
    "linearCoefficient": 0,
    "constantCoefficient": 0,
    "callerLevelCap": 10
  },
  "output": {
    "resolvedCurrentLevel": 3,
    "xpIntoCurrentLevel": 0,
    "nextLevelThresholdXp": "160",
    "xpNeededForNextLevel": "70",
    "atCallerLevelCap": false
  }
}

Limitations and assumptions

No XP awards or extrapolation above the level cap is supplied.

Numeric inputs, where present, must be finite. Follow the calculation-specific rules for overflow, underflow and exceptional cases. Missing required fields, extra fields, wrong value types and violations of the calculation rules are input errors. A successfully returned false flag is an evaluated outcome; its meaning is explained above.

Alternative or Complementary methods

Use DPS Rotation Cycle Calculator: Damage per second over heterogeneous phases is a pooled ratio. Averaging phase DPS values would use different weighting. For a complementary task, use Cooldown Stack Refresh Policy Lookup: Cooldown event policies differ when an event arrives before the current expiry. An event at expiry starts a fresh interval.

References

  1. XP Quadratic Next-Level Curve — tool.io

Similar or alternative tools

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies