#How would data be stored for something like a monster catching game?

1 messages · Page 1 of 1 (latest)

hallow mirage
#

So I've been thinking about how it'd be like to make something like Pokémon in GM on and off for a couple of years, and one thing I still haven't really wrapped my head around is how it'd be possible to store the data for each Pokémon (or whatever in this hypothetical scenario) that the player owns in GM. For example, the moves, ability, nature, whatever, for each creature in the player's storage and on their party. I feel like this might actually just be super easy and I may be overthinking it, but anyways I'd love to hear any ideas because I think it's an interesting topic :3

dawn ore
#

there was a thread about it a while ago, it's a good read

hallow mirage
#

Ooh 👀

lapis lynx
#

Im at work currebtly but I have literal experience in this so I can type up stuff Ive done/figures out at some point but yeah it came up in that question too

#

The short is that its not too complicated; you basically have CreatureData Struct which holds like base stats, move lists, abilities, etc, and PlayerCreatureData Struct which holds stuff like Current Moves + PP, status effect, which ability, EVs, IVs, Nature, etc. Note that Trainer Pokemon can use the same struct as PlayerCreatureData!

Once you've established all of this you'll more or less be good to go from there, obviously this doesnt cover the like 5077282984 things you gotta code to do stuff and whatnot but thats fine

#

As far as actually STORING the player's pokemon, you basically wanna like, store them in the PlayerCreatureStruct as like, MON1, MON2, etc, and probably have some sort of max size and store struct refs in an array or w/e and essentially have a Box System. The active Party is the same concept; an array storing struct refs

hallow mirage
#

Gotchaaaa. For assigning each individual creature its own unique ID, should I just do irandom, or does anybody have a better suggestion?

lapis lynx
#

Just an incrementing value is probably fine

fleet ether
#

Incrementing value could work. UUIDv4 could also work (there's a couple implementations around here)

empty anvil
#

turboGML has uuid!

#

although uuid's are probably best if u have a database of monsters and is overkill