Mirage Source

Free ORPG making software.
It is currently Tue Apr 23, 2024 1:24 pm

All times are UTC




Post new topic Reply to topic  [ 1061 posts ]  Go to page 1, 2, 3, 4, 5 ... 43  Next
Author Message
PostPosted: Thu Jan 04, 2007 1:18 pm 
Offline
Knowledgeable

Joined: Sat Jul 08, 2006 8:24 am
Posts: 339
Okay, I tried explaining this on msn to someone, but failed. Possibly because this's difficult to explain, possibly because of my english, but I'm gonna try again here anyway.

Note; I'll be talking about not player-owned pokemon here.

I have a pokemon system. Every pokemon has certain "base-stats". A certain amount of strenght, defense, magic and speed. (Different names, but same deal.) The file looks like this :

Code:
[Pokemon1]
Type=
MAX_HP=0
Attack=0
Defense=0
Special_Attack=0
Special_Defense=0
Speed=0
Attack1=0
Attack2=0
Attack3=0
Attack4=0

It goes on like that till Pokemon6 (MAX_POKEMON = 6)
So that're basicly the stats at level 1.

I also have a file that saves how much stats it gains every level. That one looks something like this :
Code:
[Level2]
MAX_HP=1
Attack=1
Defense=1
Special_Attack=1
Special_Defense=1
Speed=1
Learn_Attack=0
Evolve=0
[Level3]
MAX_HP=2
Attack=2
Defense=6
Special_Attack=2
Special_Defense=4
Speed=1
Learn_Attack=0
Evolve=0


So, if a pokemon levels from level 1 to level 2, all it's stats would increase by 1. And if it levels from level 2 to 3, all it's stats would increase by something too.

Now here's the problem. Since this is about NPC-owned Pokemon, they don't level. Instead, they have a high-level pokemon. Say, a level 3 charmander.

It's stats would be the level 1 basestats + the stats you get at level 2 + the stats you get at level 3.

Now, here's my question. The way I'm doing it now doesn't looks very smart to me. If a trainer used a level 100 pokemon, it'd mean a lot of calculating. Is there a better way to do this? I'd especially like to hear from Matt(?) because he's working on a pokemon-like game what his solution on this problem is. Or maybe I'm just thinking too difficult.

I hope I explained it clearly enough, and if not, ask some questions, I'll glady answer them.

EDIT

Oh, and I know using ini files isn't very smart, I plan on switching to binary, but not until I've got everything done, because Ini's are easier to read/debug, I believe.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 04, 2007 7:22 pm 
Offline
Community Leader
User avatar

Joined: Mon May 29, 2006 1:00 pm
Posts: 2538
Location: Sweden
Google Talk: johansson_tk@hotmail.com
I understand what you mean, and don't think it's a good idea to do it that way. You should probably use a function for it:

Code:
Function GetPokeStats(ByVal PokemonIndex As Long, ByVal level As Long) As Long
    Int(Pokemon(PokemonIndex).Str) = 1.2 * Level
    etc...
End Function


And then make types for the pokemons. Not sure if this was what you was looking for. Just gave you a fast idea I had.

But still, its very hard for us to give you some hints on this, because we dont know how the pokemon works, and how you are going to use the stats.

_________________
I'm on Facebook!My Youtube Channel Send me an email
Image


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 04, 2007 10:50 pm 
Offline
Pro

Joined: Sat Jun 03, 2006 8:32 pm
Posts: 415
Yeah this is where the math comes into play. Do like he said to make an equation to get each stat based on level. Mess around till you get about what you want.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 05, 2007 2:18 pm 
Offline
Knowledgeable

Joined: Sat Jul 08, 2006 8:24 am
Posts: 339
William wrote:
I understand what you mean, and don't think it's a good idea to do it that way. You should probably use a function for it:

Code:
Function GetPokeStats(ByVal PokemonIndex As Long, ByVal level As Long) As Long
    Int(Pokemon(PokemonIndex).Str) = 1.2 * Level
    etc...
End Function


And then make types for the pokemons. Not sure if this was what you was looking for. Just gave you a fast idea I had.

But still, its very hard for us to give you some hints on this, because we dont know how the pokemon works, and how you are going to use the stats.


I think you know what I mean exactly.

The problem is, I don't want to use a formula to calculate it's stats per level. Instead, I want to calculate it based on it's base stats, and on an .ini file that has the amount of stat points it should grow per level. It can vary per level.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 05, 2007 3:19 pm 
Offline
Community Leader
User avatar

Joined: Mon May 29, 2006 1:00 pm
Posts: 2538
Location: Sweden
Google Talk: johansson_tk@hotmail.com
Well you simply want the CurrentLevelStats + NextLevelStats.

So, lets say you still want to use the function. You could do it like this:

Code:
Function GetPokeStats(ByVal PokemonIndex As Long, ByVal level As Long) As Long
Dim i as Byte
    For i = 1 to Level
       Int(Pokemon(PokemonIndex).Str) = GetVar()
       etc...
    Next i
End Function


Now the GetVar will use the "i" variable. Something like this:
Code:
GetVar(path, "LEVEL & i, "Attack")


So in the For loop you will need to add them together, so the previous is added to the new etc..

Code:
Function GetPokeStats(ByVal PokemonIndex As Long, ByVal level As Long) As Long
Dim i as Byte
    For i = 1 to Level
       Int(Pokemon(PokemonIndex).Str) = Int(Pokemon(PokemonIndex).Str) + GetVar(path, "LEVEL & i, "Attack")
       etc...
    Next i
End Function


Remember that the GetVar isnt correctly done here.. I think this would be what your looking for? Otherwise I can give you some other ideas or develop this one.

_________________
I'm on Facebook!My Youtube Channel Send me an email
Image


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 10, 2007 3:52 am 
Offline
Newbie

Joined: Sun Dec 24, 2006 6:48 am
Posts: 1
I really wouldn't recommend the full use of either method. When you are creating a game, or in your case, re-creating a game such as Pokemon, you do not want to have a simple calculation such as William's suggested (x 1.2). What would be the point of having every Pokemon level the same way? That would make it so that the player could just go out and catch any Pokemon, and have to level the hell out of it inorder to dominate in that game's situation. That would also ruin the point of having other Pokemon other than just having a different looking one.

You would want to implement a more sophisticated system of leveling in that kind of situation. You would be better off creating a matrix of levels, so that way you could have the leveling based off of, we will use rarity for example. If you made it so that the pokemon's stat increase for each level based on how hard it would be to capture it would also give more opportunities for game play. Otherwise what incentive would the player have to play further into the game and catch the almighty legendary bad ass Pokemon. If I can remember far enough back it was Mew or something like that. It doesn't have to be just based of rarity, could also be the type of Pokemon, (Rock, Water, Fire, Grass, etc...) possibilities of creating a good leveling algorithm are endless. Just don't be fooled into creating a very simple formula for the "speed", the process of a single sub seems to be so overly dramatised in these forums. Just as long as you make it efficient.

When creating a matrix for the program to reference to allow the correct constants to be input into the calculation you could simply create it as a table. When opening a table, such as with ADO control and an SQL statement. It will not load up the entire table into memory at that single instant. It will pull up the information enough to search tell whether the values currently pulled up are true, if so then put them in your query, if not then try the next record. So if you wanted to create a single stat system for each individual Pokemon it isn't as bad on performance as it looks.

This is just me being in a tired ramble but you can take what ever information in this to use to your advantage. Just remember the one thing that drives every person who plays a game. The goal to get or reach the best level or object in the game. Give your players that chance and good game play along the way, and you will really have something going for you.

Best of luck to you,
Beldame


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 10, 2007 12:49 pm 
Offline
Regular
User avatar

Joined: Sun Aug 27, 2006 5:36 pm
Posts: 53
i hated it, that you were able to make a mage and just put points in strengh and get the same hp bonus like warriors, so i added job hp/mp/etc modificators :>
so its like
maxmp=[(10 +Level*JobMPFactor)*(1 + Magi/100)]

i added these vars to my classx.ini files like
JobHPFactor= 3
JobMPFactor= 1

works pretty well :)

you could also do something like that for your pokemons


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 13, 2007 10:13 pm 
Offline
Knowledgeable

Joined: Fri Aug 25, 2006 6:40 pm
Posts: 132
random level and stat generator so you only have to make the npc and push a button to have it randomly chose the stats for it.

_________________
http://spirea.flphost.com come and join today i got flash games lol.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 13, 2007 10:32 pm 
Offline
Knowledgeable

Joined: Sat Jul 08, 2006 8:24 am
Posts: 339
I prefer setting ALL settings manually, per level, but I've already worked this one out. Thanks anyway.


Top
 Profile  
 
PostPosted: Tue Jan 25, 2022 1:52 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 484229
XIII


Top
 Profile  
 
PostPosted: Tue Jan 25, 2022 1:53 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 484229
169.2


Top
 Profile  
 
PostPosted: Tue Jan 25, 2022 1:54 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 484229
Bett


Top
 Profile  
 
PostPosted: Tue Jan 25, 2022 1:55 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 484229
Bett


Top
 Profile  
 
PostPosted: Tue Jan 25, 2022 1:56 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 484229
Brad


Top
 Profile  
 
PostPosted: Tue Jan 25, 2022 1:57 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 484229
Natu


Top
 Profile  
 
PostPosted: Tue Jan 25, 2022 1:58 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 484229
numb


Top
 Profile  
 
PostPosted: Tue Jan 25, 2022 2:00 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 484229
Alfr


Top
 Profile  
 
PostPosted: Tue Jan 25, 2022 2:01 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 484229
Warn


Top
 Profile  
 
PostPosted: Tue Jan 25, 2022 2:02 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 484229
Trac


Top
 Profile  
 
PostPosted: Tue Jan 25, 2022 2:03 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 484229
Pian


Top
 Profile  
 
PostPosted: Tue Jan 25, 2022 2:04 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 484229
Wind


Top
 Profile  
 
PostPosted: Tue Jan 25, 2022 2:05 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 484229
Atla


Top
 Profile  
 
PostPosted: Tue Jan 25, 2022 2:07 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 484229
Cryo


Top
 Profile  
 
PostPosted: Tue Jan 25, 2022 2:08 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 484229
Boil


Top
 Profile  
 
PostPosted: Tue Jan 25, 2022 2:10 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 484229
Macr


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1061 posts ]  Go to page 1, 2, 3, 4, 5 ... 43  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 16 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group