Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Deck Builder Games

1662501441

Edited 1662541120
I'm trying to figure out a way to create Deck Builder game like DC Deck Builder. To do it, I would need to figure out how to have:  the Persona Deck (1 card each, non-shuffle-able, always face up), Punches (dealt at the beginning, and removable as circumstances dictate, then put away) Vulnerabilities (dealt at the beginning,  and removable as circumstances dictate , then put away), Kicks (purchased with points, but limited number), Weakness (drawn as cards or circumstances dictate, but limited number), Main Deck (various numbers of each card and purchased with points from other decks), Supervillain deck (only 1 of each, but purchasable with points from other decks). The problem I'm running into is, as you take a card, it needs to be removed from it's main deck and put into a deck only that player has access to, and can be reshuffled into the player deck when it gets to 0 cards. Does anyone have any ideas on how to implement that? Any macros or apis that might be helpful for that? Or is this all a pipe dream?
1662533227
Gauss
Forum Champion
Some of this may be doable with a combination of Decks of cards and rollable tables. Unfortunately your wall of text is a bit difficult to parse. If you could bullet point the features of your game that would make it easier to read. 
Thanks for the suggestion. Hope that helps
1662545632

Edited 1662546289
Gauss
Forum Champion
wesley h. said: the Persona Deck (1 card each, non-shuffle-able, always face up), Punches (dealt at the beginning, and removable as circumstances dictate, then put away) Vulnerabilities (dealt at the beginning,  and removable as circumstances dictate , then put away), Kicks (purchased with points, but limited number), Weakness (drawn as cards or circumstances dictate, but limited number), Main Deck (various numbers of each card and purchased with points from other decks), Supervillain deck (only 1 of each, but purchasable with points from other decks). The problem I'm running into is, as you take a card, it needs to be removed from it's main deck and put into a deck only that player has access to, and can be reshuffled into the player deck when it gets to 0 cards. Does anyone have any ideas on how to implement that? Any macros or apis that might be helpful for that? Or is this all a pipe dream? I do not believe that any of the decks are themselves an issue.  The issue appears to be the mechanic "Placing cards in the players deck". Can the player putting the card in the deck see what the card is before putting it into the deck? Can the player see what is in the deck at any time? Can the player shuffle the player deck?  I *think* there is a way forward here, but it depends on the answers to the above questions. 
Unfortunately, deck building games are not supported. You cannot combine cards from different decks and shuffle them into a player deck or hand.  There might be clunky ways to get close to what you want to do. At any rate, you can add your vote and comments to t his suggestion   for Enhanced Card Deck Features  in the Suggestion Forum .
Gauss said: I do not believe that any of the decks are themselves an issue.  The issue appears to be the mechanic "Placing cards in the players deck". Can the player putting the card in the deck see what the card is before putting it into the deck? Can the player see what is in the deck at any time? Can the player shuffle the player deck?  I *think* there is a way forward here, but it depends on the answers to the above questions.  Can the player putting the card in the deck see what the card is before putting it into the deck?      Yes. They purchase the cards from a center line, and move it to their discard pile, until it's time to shuffle, their personal deck. Can the player see what is in the deck at any time?     No. Once their deck is shuffled, they have to draw and discard each round. Can the player shuffle the player deck?      Yes, once their personal deck hits 0 cards, they shuffle the discard pile.
1662588732
Gauss
Forum Champion
wesley h. said: Gauss said: I do not believe that any of the decks are themselves an issue.  The issue appears to be the mechanic "Placing cards in the players deck". Can the player putting the card in the deck see what the card is before putting it into the deck? Can the player see what is in the deck at any time? Can the player shuffle the player deck?  I *think* there is a way forward here, but it depends on the answers to the above questions.  Can the player putting the card in the deck see what the card is before putting it into the deck?      Yes. They purchase the cards from a center line, and move it to their discard pile, until it's time to shuffle, their personal deck. Can the player see what is in the deck at any time?     No. Once their deck is shuffled, they have to draw and discard each round. Can the player shuffle the player deck?      Yes, once their personal deck hits 0 cards, they shuffle the discard pile. Based on what you said I spoke to Those That Know More Than I Do and they believe the API can do this.  Here is what you need:  1) A space (per player) on the table for a "deck" (stack of cards, face down, that will operate as the deck).  2) Space (per player) on the table for a "discard pile" (stack of cards, face up, that will operate as the discard pile).  3) An API script that does the following:  3a) After the player selects their discard pile (entire stack) via dragging a box over the pile they execute an API command to shuffle the pile. 3b) Upon receiving the shuffle command the API flips over every card in the discard pile. Then it generates a randomized order and organizes the deck to that order via the To Front/To Back command.  4) After the API script is done the player can either move the "deck" to the "deck area" or you can just keep going back and forth between areas.  5) To put a card in the player's hand is a simple "take card"  I would take the above (especially 3a/3b) over to the API forum and put in a request there for an API script that does this. However, it may not be easy. 
Gauss said: Based on what you said I spoke to Those That Know More Than I Do and they believe the API can do this.  Here is what you need:  1) A space (per player) on the table for a "deck" (stack of cards, face down, that will operate as the deck).  2) Space (per player) on the table for a "discard pile" (stack of cards, face up, that will operate as the discard pile).  3) An API script that does the following:  3a) After the player selects their discard pile (entire stack) via dragging a box over the pile they execute an API command to shuffle the pile. 3b) Upon receiving the shuffle command the API flips over every card in the discard pile. Then it generates a randomized order and organizes the deck to that order via the To Front/To Back command.  4) After the API script is done the player can either move the "deck" to the "deck area" or you can just keep going back and forth between areas.  5) To put a card in the player's hand is a simple "take card"  I would take the above (especially 3a/3b) over to the API forum and put in a request there for an API script that does this. However, it may not be easy.  Thank you. I thought it would probably be an API answer, and you've pretty much confirmed it. I appreciate the help. 
1662593376

Edited 1662594136
Gauss
Forum Champion
You are in luck, The Aaron already made an API that does what I outlined above except for flipping cards over. I suggest that as cards are discarded the user flips them over.&nbsp; <a href="https://app.roll20.net/forum/post/8454937/shuffle-card-order-on-table/?pageforid=8462174#post-8462174" rel="nofollow">https://app.roll20.net/forum/post/8454937/shuffle-card-order-on-table/?pageforid=8462174#post-8462174</a> Are the cards uploaded or are they purchased? If uploaded then flipping cards can be done via API , if purchased then they cannot be flipped via the API&nbsp; (according to Those Who Know More Than I Do) .&nbsp;
1662595355
The Aaron
Roll20 Production Team
API Scripter
Just to refine on what Gauss said a bit more, the script he linked will do 3a in his list.&nbsp; 3b isn't possible in all cases because of the way the API is restricted on access to images--effectively, if all of your images were uploaded by you (or someone you know), the API would be able to flip cards, if they are from the marketplace, it would not. With all that said, I think what Gauss outlined would work paired with the above script.&nbsp; The modified steps for 3) would be: 3a) Select all the cards in the discard pile, right click, select flip 3b) Call !shuffle-selected 3c) Move stack to the draw area. Players can then right click the top card and take it. into their hand, and repeat as needed to build the current hand. There are certainly some API scripts that could be written to facilitate things like cleaning up stacks, drawing the next hand, clearing the tableau, etc., but those are all ancillary to just getting a working flow. Note that the above script, because of the way sorting the stack order is global, takes about 1 second per 10 cards in a stack to do the shuffling.&nbsp; So if there are 100 cards, you'll be waiting about 10 seconds for the shuffling to be completed.&nbsp; This time includes all cards currently being shuffled, so if 4 players are each shuffling 100 cards, it will take 40 seconds to shuffle them all.&nbsp; Each person calling for a shuffle will be notified when their stack is done. Hope that helps.&nbsp;
Gauss said: You are in luck, The Aaron already made an API that does what I outlined above except for flipping cards over. I suggest that as cards are discarded the user flips them over.&nbsp; <a href="https://app.roll20.net/forum/post/8454937/shuffle-card-order-on-table/?pageforid=8462174#post-8462174" rel="nofollow">https://app.roll20.net/forum/post/8454937/shuffle-card-order-on-table/?pageforid=8462174#post-8462174</a> Are the cards uploaded or are they purchased? If uploaded then flipping cards can be done via API , if purchased then they cannot be flipped via the API&nbsp; (according to Those Who Know More Than I Do) .&nbsp; You are amazing. Thank you for finding this.&nbsp;
The Aaron said: Just to refine on what Gauss said a bit more, the script he linked will do 3a in his list.&nbsp; 3b isn't possible in all cases because of the way the API is restricted on access to images--effectively, if all of your images were uploaded by you (or someone you know), the API would be able to flip cards, if they are from the marketplace, it would not. With all that said, I think what Gauss outlined would work paired with the above script.&nbsp; The modified steps for 3) would be: 3a) Select all the cards in the discard pile, right click, select flip 3b) Call !shuffle-selected 3c) Move stack to the draw area. Players can then right click the top card and take it. into their hand, and repeat as needed to build the current hand. There are certainly some API scripts that could be written to facilitate things like cleaning up stacks, drawing the next hand, clearing the tableau, etc., but those are all ancillary to just getting a working flow. Note that the above script, because of the way sorting the stack order is global, takes about 1 second per 10 cards in a stack to do the shuffling.&nbsp; So if there are 100 cards, you'll be waiting about 10 seconds for the shuffling to be completed.&nbsp; This time includes all cards currently being shuffled, so if 4 players are each shuffling 100 cards, it will take 40 seconds to shuffle them all.&nbsp; Each person calling for a shuffle will be notified when their stack is done. Hope that helps.&nbsp; Love your scripts. Thank you for all your hard work.&nbsp;
1662653579
The Aaron
Roll20 Production Team
API Scripter
No problem!&nbsp; Hope that works out for you. =D