How are people handling card metadata in a deck?

Game development with Board Game Arena Studio
Post Reply
User avatar
HumanBot
Posts: 11
Joined: 29 March 2020, 07:43

How are people handling card metadata in a deck?

Post by HumanBot »

So i was reading the docs for the deck class and was wondering about how developers are handling metadata for each card. Hearts is a pretty easy example because its a single deck and the value of the cards explain themselves (numbers and suites). With multiple types of decks with cards that have abilities, cost, vp, conditions, etc, I'm thinking of doing a separate array for each deck that maps each card's type_id to an array of metadata. To make it less messy for me, I was gonna throw these arrays into some php file in the /modules directory and include it into the game.php file.

Are people kind of doing it like this or is there a more built in strategy? Would love for some advice.
User avatar
paramesis
Posts: 398
Joined: 28 April 2020, 05:00

Re: How are people handling card metadata in a deck?

Post by paramesis »

That's the best way to go about it, and it's the intended usage of the material.inc.php file.
User avatar
HumanBot
Posts: 11
Joined: 29 March 2020, 07:43

Re: How are people handling card metadata in a deck?

Post by HumanBot »

Oh oops, I must have missed that. Thanks for pointing that out.
Post Reply

Return to “Developers”