Stock over multiple divs

Game development with Board Game Arena Studio
Post Reply
User avatar
apollo1001
Posts: 191
Joined: 21 July 2015, 10:41

Stock over multiple divs

Post by apollo1001 »

Hi all

I have a question about the stock component. I understand its use when you have one location (div) for say a set of cards, but am wondering about the situation when one deck is spread amongst multiple locations (each could hold any of the original deck), so currently I believe I need to set up a stock for all of the 'sub-locations' and initialise the complete set of possible types to each. Am I missing some way of creating a 'sub-stock'/'sub-location' without having to set up a new stock for each?

Thanks

Apollo

EDIT: I have created a stock for each div and it works okay, I am merely curious about whether such functionality exists and if I have overlooked it.
User avatar
pikiou
Posts: 389
Joined: 03 October 2011, 05:36

Re: Stock over multiple divs

Post by pikiou »

You're not missing anything. There currently is no way in the Studio to handle the cards of a deck being spread in different divs.
But creating many stocks is no issue, so the way you're doing it right now it the best way.
User avatar
Quinarbre
Posts: 140
Joined: 15 December 2013, 23:26

Re: Stock over multiple divs

Post by Quinarbre »

It hurts your common sense because you're thinking about each card as unique physical object that gets moved from one location to another, like it happens with the deck module in your game.php.

But you need to remember that, as its name hints, stock was made initially for stacks of tokens and such, where the elements have no individual meaning and can be duplicated at will without changing the game much. I guess that component has evolved later to accommodate for cards because it wasn't a big leap from one to the other.
Post Reply

Return to “Developers”