Here is the scenario:
Level 1 requires 60 exp
Level 30 requires 9000 exp
To create a formula, we assume:
x = LevelSince it start with Level 1, so we could assume that Level 1 is the base, hence, formula A:
e = exp
exp = (x - 1) * A + 60Now, at Level 30 requires 9000 exp, hence:
exp = 9000then we replace exp with formula A, hence:
(x - 1) * A + 60 = 9000because we are at Level 30, so, x = 30
(30 - 1) * A + 60 = 9000Now, we can also conclude formula B:
29 * A + 60 = 9000
29 * A = 9000 - 60
29 * A = 8940
A = 8940 / 29
A = (max exp - min exp) / (max level - min level)
Given that:
exp = (x - 1) * A + 60So, the algorithm
exp = (x - 1) * (max_exp - min_exp) / (max_level - min_level) + min_expConstant variables (controlled) : max_exp, min_exp, max_level, min_level
Input variable (independent) : x
Result variable (dependent) : exp
No comments:
Post a Comment