EXP = Level And Exp Needed
-
Can anyone help me I’m stumped, my friend made this formula. I need help making this in Fuze And I need the EXP And Skill Level in a array or structure so I can make more skills after.
// Formula
Y=L*(C)^(X)
L is starting amount of xp required for lvl 1
C is a constant you pick.
For example if C is 1.2, the next level will reuire 20% more xp than the last.
X is the current level
Y is the amount required for the next level -
I assume you need
pow
notexp
in this case:Y = L * pow(C, X)
-
Y = L * (C) pow (X)
I’m trying to write the formula in Fuze
L*(C)X != L(C)^(X)
Go to wolfram alpha and type in
Y=1001.2^x
And in a different tab
Y=1001.2*x
They will not be the same. -
Y=100 * 1.2^x
Y=100 * 1.2*x
*** correctionI have no idea why it was auto correcting my formula sorry for any confusion
-
Y = 100 * pow(1.2, x)
Y = 100 * 1.2 * x
If you need
exp(x)
you can write it aspow(2.71828, x)
.See:
https://www.maplesoft.com/support/help/Maple/view.aspx?path=exp
https://fuzearena.com/help/view/pow
https://en.wikipedia.org/wiki/E_(mathematical_constant) -
Lol is there a way I can delete this post lol I’ve figured it out or should I just post my solution for others to use
-
Post your solution for others would be the correct way
-
Ok sounds good
-
So This is the solution I’ve came to in Fuze.
SkillEXP = 0 SkillLevel = 0 // (X) Level1EXP = 50 // (L) Constant = 1.2 // (C) AmountNextLevel = 0 // (Y) // Formula // Y = L * (C) ^ (X) Loop AmountNextLevel = Level * pow( SkillLevel, Constant ) // joy = controls ( 0 ) If joy.a then SkillEXP += .05 endif If joy.a then SkillEXP += .1 endif If joy.a then SkillEXP += 1 endif // If SkillEXP >= AmountNextLevel then SkillLevel += 1 endif // PrintAt( 0, 0, “Skill Level - ”, SkillLevel ) PrintAt( 0, 1, “Current EXP - ”, int(SkillEXP) ) PrintAt( 0, 2, “EXP Needed - ”, int(AmountNextLevel) - int(SkillEXP) ) PrintAt( 0, 3, “Amount To Next Level - “, int(AmountNextLevel) ) PrintAt( 0, 25, int(AmountNextLevel), “ = “, Level1EXP, “ * (“, Constant, “) ^ (“, SkillLevel, “)” )
[edit by Martin] Added code tags. Please see the last entry in the FAQ: https://fuzearena.com/forum/topic/226/faq-common-questions-and-answers/4