ID:163907
 
I'm making a Pokemon game based off mystery dungeon series. They used a unique capture/friend system. I was wondering if I can pull it off on byond. So here's my statement.

This game there will be 498 different pokemon, but you can only be 1 at a time. After you recruit them I was wondering how I would add it to a list you could choose from to change your character to. (If your a lvl 21 ditto, and you recruited a level 10 squirtle, when you'd go to your friend base, you'd be able to switch with a level 10 squirtle and now be a squirtle.) Now my concern is when they would want to switch back to ditto they would lose there stats. Is there away to make it so when they changed pokemon they keep the same stats as before on that pokemon(IE your ditto stats wont transfer to squirtle, but when you want to go back to ditto you will have your old ditto stats back, but ur squirtle stats will save if you have battled or leveled with him.) I think i'm asking if i can make a list of all the recruited pokemon, that have been recruited by the player, then he can switch to them and train them and update there stats and switch to another without losing the stats of his other pokemon.

Thanks for your time.
any help here guys?
The most obvious way would be something like this
mob
var
dittovar1
squirtelvar1

Where you just defina var for each of the mobs possible pokemon.

OR you could just create a new mob when they "capture" it, and just let them control it remotly...By that I meen make it so usrs view is the pokemons view, and if they have a certainvar, the pokemon they are controlling moves instead of them when they hit the arrows?
In response to Rikishi
Well, you would need to make vars for every pokemon and a saving system that saves all vars. There are other ways, but this way would be the most common.
OK... I got a easy solution if you know what your doing.

mob
var
list
friends=new/list()


WARNING! Bad indentation there.

Add new friends to that list, and make something in which you can bring them up in a list. When they are chosen, change the required variables to what they should be... (And make some variables to back up the actual player character's)
In response to Strong123488
yah, true thats what i was thinking when i was in bed, but then there could be the problem of huge save files due to;
i would have to include the tms and hms they can learn
restricted item held

hmmm...and definieing a var for every pokemon would get tiring, 498 is a lot.
In response to Rikishi
lol then shorten amount some pokemo might never be used at al and woul take up memoryspace
In response to Rikishi
Why would you need a seperate variable for each pokemon?

Remember: if you find yourself writing out a massive amount of samey variables, chances are you should be using a list instead.
In response to Shirukai
true, but everybody has there favorite and the moment i would cut one, someone would complain. what was thinking that i define a base stat for a character, then when you become a starter you are randomly chosen to be, it will edit stats.
IE
var/mob
charamanderhp = 36
charamanderstr = 10
squirtlehp = 40
squiretlestr = 5

lets say you became a squirtle and would load ur squirtle stats..and if they level up it would add to the squirtle stats and your main stats.

does that make any sense?
In response to RedlineM203
yes exactly what i was thinking, but still i'd have to save 498 stats from the mob they killed...so next question is..when they kill a mob and it ask to be recruit..can i have its stats saved somewhere.
In response to Rikishi
Well, if a mob is in a list, you can pick out their variables easily as long as the mob is still in the game.