Graalians

Graalians (https://www.graalians.com/forums/index.php)
-   Technology (https://www.graalians.com/forums/forumdisplay.php?f=54)
-   -   Leveling Algorithm (https://www.graalians.com/forums/showthread.php?t=27962)

Grief Hero 03-26-2015 05:49 PM

Leveling Algorithm
 
So I'm currently trying to make some sort of leveling system, like from Runescape, but within Graal and with GS2.
The basic idea is to get X number of EXP, which is then used to calculate the next level.
The only issue I'm having is creating a proper equation which works.
Could anyone possibly help?

Multipas* 03-31-2015 01:20 PM

Steal from Pokemon.

Seņor Albonio 03-31-2015 01:57 PM

Quote:

Posted by Multipas* (Post 550619)
Steal from Pokemon.

I really hope this wasn't serious.

fp4 03-31-2015 05:25 PM

Look at other games and see how they calculate their max required exp, along with deciding how much exp you gain from a certain task.

PHP Code:

function addExp(exp) {
  
clientr.stat.exp += exp;
  if (
clientr.stat.exp >= expRequired(clientr.stat.level)) {
    
levelUp();
  }
}

function 
expRequired(lvl) {
  
temp.amount lvl 3;
  return 
temp.amount;
}

function 
levelUp() {
  
clientr.stat.level++;
  
clientr.stat.exp 0;



Emera 03-31-2015 05:33 PM

There are some informative posts on this Stackoverflow thread: http://stackoverflow.com/questions/6...l-based-on-exp

Grief Hero 03-31-2015 05:41 PM

Quote:

Posted by fp4 (Post 550666)
Look at other games and see how they calculate their max required exp, along with deciding how much exp you gain from a certain task.

PHP Code:

function addExp(exp) {
  
clientr.stat.exp += exp;
  if (
clientr.stat.exp >= expRequired(clientr.stat.level)) {
    
levelUp();
  }
}

function 
expRequired(lvl) {
  
temp.amount lvl 3;
  return 
temp.amount;
}

function 
levelUp() {
  
clientr.stat.level++;
  
clientr.stat.exp 0;




Ah, alrighty thanks. Would I be placing this in a class, or a weapon then?



Quote:

Posted by Emera (Post 550667)
There are some informative posts on this Stackoverflow thread: http://stackoverflow.com/questions/6...l-based-on-exp

Makes sense how it works, thanks!

Sardon 03-31-2015 05:44 PM

cant open level editor
keeps sqying i need bass.ltd or something, where do i get that?
i was on editor a month ago and it worked

Grief Hero 03-31-2015 05:50 PM

Quote:

Posted by Sardon (Post 550670)
cant open level editor
keeps sqying i need bass.ltd or something, where do i get that?
i was on editor a month ago and it worked

http://forums.graal2001.com/forums/s....php?p=1669970
That might work if you download it and replace it with your current one, it's from Emera :)

Emera 03-31-2015 05:56 PM

Quote:

Posted by Grief Hero (Post 550672)
http://forums.graal2001.com/forums/s....php?p=1669970
That might work if you download it and replace it with your current one, it's from Emera :)

Why am I being a **** in that thread? O.o

#ClearlyOnMyMeriod

Grief Hero 03-31-2015 06:03 PM

Quote:

Posted by Emera (Post 550674)
Why am I being a **** in that thread? O.o

#ClearlyOnMyMeriod

You did mention bloody a few times :sarcastic:

Emera 03-31-2015 06:13 PM

Quote:

Posted by Sardon (Post 550670)
cant open level editor
keeps sqying i need bass.ltd or something, where do i get that?
i was on editor a month ago and it worked

How unrelated.

Seņor Albonio 03-31-2015 06:34 PM

Quote:

Posted by Sardon (Post 550670)
cant open level editor
keeps sqying i need bass.ltd or something, where do i get that?
i was on editor a month ago and it worked

http://im4.woodbrass.com/images/woodbrass/GES-B4E-B.JPG


All times are GMT. The time now is 10:57 PM.

Powered by vBulletin/Copyright ©2000 - 2025, vBulletin Solutions Inc.