mIRC Home    About    Download    Register    News    Help

Print Thread
#2985 22/12/02 06:56 AM
Joined: Dec 2002
Posts: 8
D
Davey Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
D
Joined: Dec 2002
Posts: 8
A while back, I was planning on scripting a battle system where players can connect and battle. Thing is, I really have no idea how to calculate things like EXP and stuff like that. I know it's not 100% mIRC scripting related, but I really would like to know how I would calculate EXP with the level and HP and MP, etc. If anyone is familiar with RPG, then they'll know what I'm talking about.
Thanks; Dave.

#2986 22/12/02 09:16 AM
Joined: Dec 2002
Posts: 208
C
Fjord artisan
Offline
Fjord artisan
C
Joined: Dec 2002
Posts: 208
each game designs its own system

although i'm not a gamer i'm fimialr with the terms and how things work.

each one is differnt, you being the author have the liberty of designing a unique system for your game.. define how much experence you get for each win .. perhaps different level oponets would give u more experence .. based on that number .. how hard is it in your game to reach the next level .. as the next level is obtained by exp points .. u set the number of exp needed to reach the next level in proportion to how long/hard it should be to get there

perhaps to get to level 2 u need only 100 exp .. but to get to level 3 u need 500 .. u can either define an external database with these figures .. or come up with a calculatiosn table .. perhaps the number of exp to reach the next level is defined by:

$calc((%l -1) ^ 2 * 150)

where %l is the level number they are trying to reach

which would give u

* 1: 0
* 2: 150
* 3: 600
* 4: 1350
* 5: 2400
* 6: 3750
* 7: 5400
* 8: 7350
* 9: 9600
* 10: 12150

its all up to you man.

Cobra^

#2987 22/12/02 09:31 AM
Joined: Dec 2002
Posts: 8
D
Davey Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
D
Joined: Dec 2002
Posts: 8
That's kinda difficult...
The range is too wide. I'm looking more at:
  • 1: 100.
  • 2: 145.
  • 3: 190.

Like that, which is simply +45 each level you go up. But then, I get lost with the HP/MP.
I can't figure how to get the HP and MP to work with the method above.
And that's basically what I'm asking.
Thanks; Dave.

#2988 22/12/02 09:40 AM
Joined: Dec 2002
Posts: 208
C
Fjord artisan
Offline
Fjord artisan
C
Joined: Dec 2002
Posts: 208
first of all

i've never seen a game where the number of exp u need to get to the next level is = to the amount u needed to get to the previous one

with increased levels is increased abilities .. it shouldnt be as easy to go from level 7 to level 8 as what it was to go from level 1 to level 2

make sence?

perhaps: $calc((%l -1) ^ 2 * 50)

which would give you:
* 1: 0
* 2: 50
* 3: 200
* 4: 450
* 5: 800
* 6: 1250
* 7: 1800
* 8: 2450
* 9: 3200
* 10: 4050

obviously level one is where u start .. so thats 0 exp

and as far as hp, just make anouther system which gets in the ball pack of where that should be.. maybe somethign like this: $int($calc(%l ^ 1.5 * 7))
* 1: 7
* 2: 19
* 3: 36
* 4: 56
* 5: 78
* 6: 102
* 7: 129
* 8: 158
* 9: 189
* 10: 221

as far as mp .. i'm not fimilar with that one ..

its realy all up to you .. u also have to deside how much damage different blows take .. based on rand() and the level of the atacker .. and what weapon they used .. .. u have to come up with numbers for all this stuff .. i'm not about to sit here and design it for you though .. if u know RPG's beter than me .. as u should if your making one .. it realy shouldnt be to hard. .. the hard part will be .. codeing the GUI for it .. lol

Cobra^

#2989 22/12/02 09:58 AM
Joined: Dec 2002
Posts: 12
M
Pikka bird
Offline
Pikka bird
M
Joined: Dec 2002
Posts: 12
Never played Final Fantasy 8? Each level only took 1000 exp :P

#2990 22/12/02 10:03 AM
Joined: Dec 2002
Posts: 208
C
Fjord artisan
Offline
Fjord artisan
C
Joined: Dec 2002
Posts: 208
i said i wasnt a gamer .. i just gave examples that could easily be modifed

the user joined my chan on irc to continue .. he told me that the range for hp was 400-4000 or there abouts and levels 1 to 99 .. so i did this

//var %l = 0 | while (%l < 99) { inc %l | echo -a * %l $+ : $int($calc(%l ^ 1.1 * 25 + 400)) }

which isnt exact .. but its close ..

it all depends on where he wants them for HIS game... each is unique .. if theyw ere all the same .. what fun would that be :P


Cobra^

#2991 23/12/02 07:41 PM
Joined: Dec 2002
Posts: 1
D
Mostly harmless
Offline
Mostly harmless
D
Joined: Dec 2002
Posts: 1
I think, that u should try first write code. And after that think, how exp will grow up. Cause i tried to do it. And there's a lot of problem. Have U already thought, how the batlle will begin, go on, and end? Have u tried to script it?

#2992 28/12/02 02:05 PM
Joined: Dec 2002
Posts: 8
D
Davey Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
D
Joined: Dec 2002
Posts: 8
No because when I saw that I couldn't work out the levels I gave up altogether.
I might start up using Cobra's idea, if and when I can be bothered.

Dave.

#2993 08/01/03 03:37 PM
Joined: Jan 2003
Posts: 44
L
Ameglian cow
Offline
Ameglian cow
L
Joined: Jan 2003
Posts: 44
before you even start scripting which is programming; you need to write down on paper all the rules that your game will be tracking.

you then need to write up the charts that will be used for levels, mp and hp -- and whatever else that uses a range of numbers.

and finally you need to write up some sample content.

then after doing all of that you need to decide where you are going to start your scripting and study the appropriate materials you have created to determine the relationships and how you might achieve those relationships when represented as code.

and just go from there.

eventually you'll have a working game.

as far as the level thing goes with your +45 I'd recommend three variables, where the first one can be read from an ini file:
base exp
current level
next level

you don't have to use an ini file, but it would be in your best interest so you won't have to edit your script when you are diong balancing.

anyways in script only you might have something like:
Code:
var %base_xp = 100
var %curr_lv = $readini(ini_for_game,players,$nick $+ level)
var %next_lv = %base_xp + ( %curr_lv * 45) + 45

based on what you said, that's how i'd write it.
i'd also being store individual player stats inside of an ini file


Link Copied to Clipboard