Best way to load in different structs?

Hi All.
I am creating a Hearthstone clone with blueprints, and im currently implementing the card system so it loads the deck.
How its working right now with 1 card, is that a ‘BP_Card’ gets spawned and added to your hand, and a struct with all the values (Health, Mana, Attack, Card Image, isTaunt,…etc) is assigned.
What I was thinking, was making a bunch of different structs for each Card in the game, and having some sort of manager that picks the correct one.
Is this the most optimal way of doing this? It would be so much faster if there was some sort of Struct Array where I can just assign all the values, and I can just call that and load in a card based on the Index.

Thanks for your help!

hi @RobbeVlaeminck
take a look at this: Data tables WTF Is? Data Table in Unreal Engine 4 ( UE4 ) - YouTube
I would say that the best way to handle things like your is fill a datatable with all the cards, and cards stats …
when you need to spawn one ,
you make spawn a card and put in the structure of the card all the info in the "
"Card line " of the datatable

1 Like

thank you so much! this is exactly what I needed :slight_smile: