4
\$\begingroup\$

While looking for examples of RPG experience formulas I came across this one How to create adjustable formula for RPG level up requirements?, and I would really like to figure it out because I don't seem to get the same results. I'm trying to understand the maths behind it because actually we are using UDK and Unreal scripts for our project.

Thank you in advance for your time.

\$\endgroup\$
4
  • 2
    \$\begingroup\$ ... what results are you getting? And what code are you using to get it? \$\endgroup\$
    – Tetrad
    Jan 10, 2012 at 0:33
  • \$\begingroup\$ Actually I'm trying to figure out the formula used in order to have two variables (startpoint, endpoint)I would like to set up the starting experience and the exp required at the last level. This formula uses two variables, but whenever I calculate it, I get a lesser curve. And rather than getting to 1 000 000, I get to aprox 18 000. I'm not using code (C++ nor other) but just trying to figure out the formula first. Although I found other solutions, but this one seems more suitable. Thanks in advance for your help. And sorry for not being clear enough. \$\endgroup\$
    – JamesAlex
    Jan 10, 2012 at 0:40
  • \$\begingroup\$ Have you tried using the same variables as the example in the answer? You'll only get to 1,000,000 that is the XP you enter for the last level. \$\endgroup\$
    – House
    Jan 10, 2012 at 0:46
  • \$\begingroup\$ This is what I actually did: B = log(1 000 000 / 1 000) / (40 - 1) where B = 0.0769 A = 1 000 / (exp(0.0769) - 40) where A = 924.961 oldxp = round(924.961 * exp(0.0769 * (40 - 1))) newxp = round(924.961 * exp(0.0769 * 40)) newxp - oldxp = 1486 Thanks! \$\endgroup\$
    – JamesAlex
    Jan 10, 2012 at 1:02

1 Answer 1

9
\$\begingroup\$

When used together with exp, the log function is commonly understood as the natural logarithm. You are actually using base 10 logarithm (which would be log10 in C++).

Fortunately you can get the same results using base 10 logarithm, provided you also use base 10 exponent: just replace every occurrence of exp(X) with 10**X (10 to the power of X) in the formulas.

UnrealScript’s logarithm and exponent functions are called Loge and Exp.

\$\endgroup\$
3
  • \$\begingroup\$ Thanks for your help and pointing out my mistake. Now is working perfectly. \$\endgroup\$
    – JamesAlex
    Jan 10, 2012 at 21:24
  • \$\begingroup\$ Sorry if I ask, but how do you do that?(I'm new here) \$\endgroup\$
    – JamesAlex
    Jan 11, 2012 at 1:16
  • 1
    \$\begingroup\$ @JamesAlex: there is a checkbox on the left of all answers, next to the current vote total. \$\endgroup\$ Jan 11, 2012 at 8:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .