Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

[Resolved] Calculating Exp based on Atribute

Status
Not open for further replies.
First off, sorry about my English, if you don't understand it so well... Neevr Studied English in my poor, poor life...

Now to the question...

I'm making a script to increase the Atributes of the characters whitout leveling up... for that I use this formula:

[exp] = ([Atribute]²)/10

for example, a character with 20STR will need 20²/10 = 40EXP to increase this atribute.
I have the windows and the entire scene almost finished... but I simply can't apply the formula into scripting... I try to get an atribute and place into a local variable and it won't work...
it isn't working the command I placed to calculate it

can anyone help me?

thanks in advance.
 
UP...
C'mon people, I don't think this question is that complicated...
I'm sure someone know how to do it, and I'm sure it's pretty easy...

thanks again...

EDIT: I's not this ugly guy in my avatar, is it?^^
 
Note: Please Wait 24 hours before bumping

Acutally its pretty easy to implement after you get the stat you want just use this for example I get the str stat from the actor (@actor is a Game_Actor object)

attribute = @actor.str
exp_needed = attribute ** 2 / 10

the ** means exponentiation

But really I would consider tweaking that formula a bit if you have say 400 maxhp you would need 16,000 EXP to raise it.
 
the formula doesn't apply to HP... it's another one... And my game has simplified atributes(with means that the HP will not even get bigger than 1000...)

thanks, it worked!


P.S.: Sorry for the late in replying... I was a bit busy(university and stuff...) thanks again...
P.S.2:If you don't understand what I said in P.S1, sorry about my english... again, never studied it...
 
Status
Not open for further replies.

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top