0 Favourites

Stat Curves

This forum is currently in read-only mode.
• 10 posts
• So I'm trying to work out some stat formulas for my game. I'm incorporating a level up system where the maximum HP is going to be 999, and the maximum level 99. I'm trying to get a healthy curve to the stat growth, but I can't seem to make it a smooth curve. I've played around a bit with lerp, qarp, and cube, but no dice. My biggest problem is I'm rubbish at math.

Basically, I'm trying to do this:

<img src="http://img560.imageshack.us/img560/986/statcurvegraph.png" border="0" />

but I'm not much of an Ian Malcolm.

Help me Obi-Wan Kenobi! You're my only hope!

• Theres a 4 billion ways to do this, one way: "BaseHP +((lvl^2)*X)"

Just change the 2 to 1.1 to be less dramatic or to 8 to be more dramatic.

• Theres a 4 billion ways to do this, one way: "BaseHP +((lvl^2)*X)"

Just change the 2 to 1.1 to be less dramatic or to 8 to be more dramatic.

Whats baseHp? Is it start or end? And whats x?

• Base stats are level 1 stats.

If your BaseHP is 45. The formula would be 45 + ((lvl^2)*X) I'm assuming X is your current HP.

• I dunno why I put x there

• You've put 'x' there, because you need a factor to reach the right cap.

Your formula would output 9821 (99^2 = 9801 + baseHP = 20) for level 99, but TL22 wants 999 as the max value. To reach 999, the factor 'x' would need to be (rounded) 0.0998877665544332211, that's calculated by 979 / 9801

This by the way is a parabola, the image looks more like a quarter circle.

With a parabola, the value increase per step will be higher and higher, while level increases.

With a quarter circle, the increase will be flatter towards beginning and end, and steeper towards the middle.

Develop games in your browser. Powerful, performant & highly capable.

Construct 3 users don't see these ads
• Even a quarter ellipse will do. <img src="smileys/smiley2.gif" border="0" align="middle">

I have put a name to my pain!

Bias

This module calculates Ken Perlin's Bias function. Given an input value between 0 and 1, it calculates an output value which is also between 0 and 1 according to:

y(x) = x^(log(B)/log(0.5))

where the input value x and bias B correspond to the two input ports. If B=0.5, then y(x)=x. Values of B less than 0.5 push the output toward smaller values, while values of B greater than 0.5 push the output toward larger values.

So I played around a bit with it and came up with:

ceil(18 + (("level" / 99)^(log(0.15) / log(0.5))) * 881 + "level")

Essentially what this does is force Level 1 to be 20HP, and upon every level up you gain at the very least 1 HP, and the amount grows with each level up, until Level 99, at which it will end on 999 HP. I'm not huge into the ugly fix making it a 1 HP stat growth in the beginning, but it only lasts until around Level 10 or so.

Here's the cap with an example!

http://dl.dropbox.com/u/20459682/levelhp.cap

It feels a bit convoluted though, so of course, I'm still open to suggestions! <img src="smileys/smiley4.gif" border="0" align="middle">

• Damn, I worked on a cap to play around with PerlinBias to find the right values. Was too late :(

Anyway. I am posting it, if you don't mind, in case someone else might need it:

http://www.mediafire.com/file/d7iwraufey7v6nw/PerlinBias.cap

• My wow, that's really cool. Looking at your formula also makes me want to rework mine a bit to make it look a bit nicer. Like how you threw the base HP outside of the whole bias calculations so that it added it after. Makes it look cleaner and helps with modifying it more easily on a character by character basis. Also what'll help me on a per character basis is being able to quickly see stat values and curves so that I can use it as a reference for coming up with character growth stats. You've given me a calculator I can use!

Plus, it's better to have an example cap by someone who knows what they're doing than someone massacring a sweet calculation. So thanks! <img src="smileys/smiley4.gif" border="0" align="middle" />

• Thank you.

I'm glad it helps <img src="smileys/smiley1.gif" border="0" align="middle" />

• 10 posts