How do I make a Trading Card or Pokémon like database?

Hi there!

I’ve grappling with this for a while, but I’ve been trying to make an action RPG game where the player would have a deck of cards (of the trading card variety) and would use them in battle.

My question is: How does one implement such functionality? You see, it would make total sense if I made a spreadsheet with Every card name and attributes, have a library in the game where it would fill every time a player got a new card, a folder or bag where the player can store the cards that he has, a deck that store the cards that can be played in battle, and finally his hand, which would be the current selected cards he drawn at every turn.

Notice similarities with Pokémon games, where there is a “database” of pokémons, each one with its distinct attributes and the game calls each monster following the player command, also, the pokédex.

Finally, is there such a way to make this in Gdevelop? Has anyone tried to make this in Gdev before? Is such a feature feasible with the current available extensions or it would be have to built from the ground up?

I thought using the built in inventory system in Gdev, and having 4 separate inventories that would talk to each other, the library, the bag, the deck and the hand. I’m just not sure yet if this would be the best solution and it also doesn’t make exactly clear how the cards equipped at each time would affect the gameplay, but I’m not that worried about that for now, what I need to know is how to implement such “database” and call it from the game.

Thanks for reading!

1 Like

It would be relatively easy to store all that data of your game in a JSON file. You can then use the “Load JSON resource into variable action” to import the json as a GDevelop resource and load the data as a GDevelop structure variable.

1 Like

Thank you very much!! :slight_smile: