ID:151393
 
I've been trying to increase the HP and Magic based upon the Stat(INT(Intelligence) for Magic or STR(Strength) for HP) and multiplying that with the maxHP at the previous level and then dividing that by 1000...

My results for this are just awful... To me, at least

--------
~HP: 662, EXP: 90392, Magic: 681
HP: 663, EXP: 95099, Magic: 682
You have gained a level!

{Level: 99 - Five Stat Points Acquired}

~HP: 663, EXP: 95099, Magic: 682
HP: 664, EXP: 100000, Magic: 683
You have gained a level!

{Level: 100 - Five Stat Points Acquired}
--------
"~HP:" Represents the HP before
"HP:" Represents the HP afterwards...

So what is the formula you use and how could I possibly fix my formula?

Also, if this is in the wrong category, sorry, didn't know whether to put it in BYOND Discussion, this, or Code Problems...

var/Rand3 = pick(1,2,3)
var/OriginalHP = usr.maxHP
usr.maxHP = round((usr.str*OriginalHP)/1000)
usr.str += Rand3
Recheck1
if(OriginalHP >= usr.maxHP)
usr.maxHP+=20
goto Recheck1

Same as Magic.
Random stat increases tend to suck; I would avoid that. Use a formula if you can, like HP = base + slope * (level-1), where the base and slope can vary by class.

Your stats also seem to be quite high. Bear in mind that in Rogue you have to be at an extremely high level just to get into triple-digit hit points, and by extremely high I mean like 20 or so. If you've got level 100 built in there I think your characters are leveling way too often and the stats are all just too inflated. Bigger numbers are just too hard to balance.

Lummox JR
In response to Lummox JR
Lummox JR wrote:
Random stat increases tend to suck; I would avoid that. >Use a formula if you can, like HP = base + slope * >(level-1), where the base and slope can vary by class.

----What do you mean by "slope", I generally think "m = y2 -y1 over x2-x1"... The graphing slope and I don't see where I can find two "y" values and two "x" values.
By Base, you mean their original hp right? Sorry, just in Ninth Grade, mandatory for me to ask.

Your stats also seem to be quite high. Bear in mind that in Rogue you have to be at an extremely high level just to get into triple-digit hit points, and by extremely high I mean like 20 or so. If you've got level 100 built in there I think your characters are leveling way too often and the stats are all just too inflated. Bigger numbers are just too hard to balance.

Lummox JR

----Oh, I just started to make the game and decided to add the Leveling Proc so now i'm here testing to see if your stats are extremely high at Level 100 or too low.
Is "Rogue" an mmo? Never heard if it, I'm assuming it is.
In response to Kenny84
Rogue is actually a dungeon crawler.
In response to Kenny84
Kenny84 wrote:
Lummox JR wrote:
Random stat increases tend to suck; I would avoid that. >Use a formula if you can, like HP = base + slope * >(level-1), where the base and slope can vary by class.

----What do you mean by "slope", I generally think "m = y2 -y1 over x2-x1"... The graphing slope and I don't see where I can find two "y" values and two "x" values.
By Base, you mean their original hp right? Sorry, just in Ninth Grade, mandatory for me to ask.

Note that the equation he gave is actually in slope-intercept (y=mx+b) form, where the y-axis is your HP and the x-axis is your level (minus one). Base being the y-intercept (where the HP starts out at at level 1), and 'slope' simply being the change in your HP given a change in level (y2 - y1)/(x2 - x1). You would just need to determine the slope based on what 'feels' right. i.e. Ok, 1 level = 5 HP, or 1 level = 10 HP.

What he gave, though, is just an example. You're free to have exponential growth (hp = base * e^(level - 1), for example) or whatever you feel would be appropriate and 'balanced' for your game. A linear relationship (y=mx+b) is recommended, though.
In response to Audeuro
Audeuro wrote:
Note that the equation he gave is actually in slope-intercept (y=mx+b) form, where the y-axis is your HP and the x-axis is your level (minus one). Base being the y-intercept (where the HP starts out at at level 1), and 'slope' simply being the change in your HP given a change in level (y2 - y1)/(x2 - x1). You would just need to determine the slope based on what 'feels' right. i.e. Ok, 1 level = 5 HP, or 1 level = 10 HP.

What he gave, though, is just an example. You're free to have exponential growth (hp = base * e^(level - 1), for example) or whatever you feel would be appropriate and 'balanced' for your game. A linear relationship (y=mx+b) is recommended, though.

Yeah, I tried exponential growth, I probably failed at making the formula because the value for HP increased greatly.

I suppose I will try linear relationship.

-------------

Alright, so I was trying it and It didn't work out as hoped...

Then I tried Exponential Growth. After I got to level 20, I continued to have 70 HP... Then at 100 levels or so later, I started to increase again. After a while, I reached level 180 and it started to increase again.

.<i think I continue to input the formulas incorrectly
<br/>
var/P = usr.Level/100
usr.maxHP += round(usr.ClassBase*(1 - P)**ClassBonus)

Where, ClassBase is 10 and ClassBonus is also 10.
I'm of the opinion these things should be almost self-apparent from your game design. Take a paper and draw a graph of the HP and magic progression you desire; take into account content difficulty and distribution, as well as class balance. You should have no difficulty drawing the function graph itself. If you end up having difficulty turning the graph into an actual function, you can post it here and we can help you.
In response to Toadfish
I figured out the formula a couple of days ago :D

And, that is a good idea, I should've done that -_- Instead, I went the hard way and took random guesses. In the end, it's based of the persons str Stat. Their StatBonus on the str Stat and their ClassBase of their HP.

usr.maxHP = usr.StrBonus + usr.HPBase*(usr.Level+usr.str)/10


Five Stat Points are given each level.
If you add the Five each Level to STR and get 75 STR, your HP becomes 99 :D
:3 If something does mess up with the formula, I'll come back ^^

Anyways, Thank You!