0
\$\begingroup\$

I have yet another experience equation question, with a slight twist.

Problem Situation

Player gain experience from Level 1 - 80.

Time to level from Level 1 to 80 grows exponentially.

There is a constant of total hours X (540 hours in this case) to reach level 80.

What equation results in this?

From this, I should be able to balance an approximate Time To Kill Monster + downtime, varying from easy to hard monsters and experience they can give, resulting in same time to Max Level.

Or I could create quests that takes an approximate Time To Completion but rewards the same ratio of experience.

In my opinion this should be the optimum solution to create content that grant the same ratio of experience to time to level.

Thank you.

\$\endgroup\$
3
\$\begingroup\$

The general form of an exponential curve like this one is:

H = a * r^n + k

where:

H = total hours to reach level n
r = the ratio by which the time increases from one level to the next
a = scales the curve to make sure it hits the desired max
k = shifts the curve to make sure H(1) = 0

Now we just need to plug in numbers to hit the desired start & end points:

a*r^80 + k = 540 (max)
a*r^1 + k = 0    (min)

Subtracting:

a*(r^80 - r) = 540
a = 540/(r^80 - r)

And from the min expression:

k = -a*r^1

So now you can choose a value of r that you like (something very slightly more than 1 - exponentials build up astonishingly fast over 80 levels!) - I found something in the neighbourhood of 1.05 looked pretty decent. Then you can calculate a from r and k from a & r.

In case you're interested, the time to reach level n from the previous level n-1 is:

a * r^(n - 1) * (r - 1)

which we can verify grows by a factor of r each time we gain a level.

\$\endgroup\$
  • \$\begingroup\$ Can you elaborate on the "Subtracting" section? I feel like that came out of nowhere. \$\endgroup\$ – Daniel Kaplan Jan 29 at 6:33
  • 1
    \$\begingroup\$ @DanielKaplan This is one of the standard techniques for solving a system of equations — often called "elimination." You massage two equations so they have certain identical terms, then subtract one equation from the other to eliminate those terms and isolate what's left. Lots more info is available online if you'd like. \$\endgroup\$ – DMGregory Jan 29 at 10:29
1
\$\begingroup\$

EDIT: After a misinterpretation.

After some brief algebra work, the equation you are looking for is Y = 1.0818197904022^x. With x being the level, and y being the required amount of hour. Note that this equation needs to start at 2. Reason, even if the player starts at zero, you are compounding the level exponentially onto the base hours. If you get a zero, the output is one. If you get one. The output is the base.

Remember that an exponential works by compounding it's base by it's self exponentially. Unless the graph is shifted (some additional logic will be needed to set things correctly), you'll have to logically compensate for this factor.

Exponential Graphs http://dwb4.unl.edu/Chem/CHEM869Z/CHEM869ZMats/ExpFns.html Other graphs. http://www.coolmath.com/precalculus-review-calculus-intro/precalculus-algebra/05-graphing-basic-graphs-04

\$\endgroup\$
  • \$\begingroup\$ No just no. Sorry but never answered my question, completely off tangent. There is no need to implement diminishing returns, that can be programmed. Plus the problem of increasing too much is alleviated because my equation has a constant cap of 540 hours from 1 to 80. Oh and and calculation for my equation is based on time, not exp. Your entire answer signify you didn't even read the post. I would down vote you if I could. \$\endgroup\$ – Nick Oct 21 '15 at 7:02
  • \$\begingroup\$ Misread then. Here I went ahead and edited the answer. Side note, when I saw the word experience, I felt it safe to draw the conclusion that time meant the grind a player will go through. Then hours being confusing. \$\endgroup\$ – moonshineTheleocat Oct 21 '15 at 8:56
  • \$\begingroup\$ Thanks for the edit, but 540 refers to total time from 1 to 80 not 79 to 80 \$\endgroup\$ – Nick Oct 21 '15 at 9:02
  • \$\begingroup\$ Sorry, a tad bit tired. It's 4am right now on a college night. I wish I could graph it for you. If I find a way, I'll edit this answer later. The graph will be fine if traversed normally as steps. The graph represents the hour to the level. To get the required hours to jump to a new level. you take the delta between the two levels. F(80)-F(79) = 40.811 hours required to level up. The graph taken as a whole is the total time from level 1 to 80 \$\endgroup\$ – moonshineTheleocat Oct 21 '15 at 9:09
  • \$\begingroup\$ Just remember that the function must start at 2 to work correctly. Which is only about 1.2hrs required. So... if the player has 1.2 hrs. he is now level 2. If the player has 112hrs in total, he's level 60. f(60) = 112hrs \$\endgroup\$ – moonshineTheleocat Oct 21 '15 at 9:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.