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

Using Tarot cards on Roll20?

Who has used tarot cards on Roll20 before? What has been your experience with it?
1534435084
The Aaron
Pro
API Scripter
I've not really used them, but I can tell you one problem you may run into: You'll never get an inverted card.
Would there be a way to connect a simple coin flip action result with each card that is dealt to a player? Heads as Upright and Tails as Reversed.
1534435793
The Aaron
Pro
API Scripter
Yes, with the API it would be trivial, but that would require a Pro Subscription.
If you were to create your own custom deck, you could double the number of cards, and include each one twice, one normal, one inverted.
1534490476

Edited 1534490494
Ziechael
Forum Champion
Sheet Author
API Scripter
Or simply have another table set up with "Normal" and "Inverted" as potential results and 'roll' on that after each draw to allow you to rotate the last card pulled or not... might break the flow a little bit though :/
1534492168

Edited 1534492220
GiGs
Pro
Sheet Author
API Scripter
Ziechael's suggestion sounds better to me, because each draw - whether normal or inverted - removes that card from the deck. If you're using two decks, you dont get that happening. Of course, if you're using tarot cards for a game where they replace dice, whether the card is inverted or not might not be important at all.
I was just coming here to ask about this. The Crimson Cutlass Omnibus was just released and it uses Tarot, and the reading of each card is based on whether or not the card was inverted. Because of other decks I have used, I knew that inversion didn't happen in shuffling on Roll20, at least not from any settings I had seen. That would be a nice optional checkbox on decks.
1535230936
The Aaron
Pro
API Scripter
If you want an API script to automatically randomly invert played cards, let me know. 
1535307831

Edited 1535307859
Hi The Aaron, I would be interested in having access to randomly inverted cards when drawn from a custom deck.  :-)
1535314336
The Aaron
Pro
API Scripter
You’d have to have a pro subscription to take advantage of the API method. If you want to see it it’s worth it yo you, I could create a game for you to try it in. 
1535315221
The Aaron
Pro
API Scripter
Here's the script: on('ready',()=&gt;{ on('add:card',(obj)=&gt;{ if(randomInteger(2)===1){ obj.set('rotation',180); } }); }); Here's a game where you can try it out:&nbsp; <a href="https://app.roll20.net/join/3666748/GymU8Q" rel="nofollow">https://app.roll20.net/join/3666748/GymU8Q</a>
1535320686
GiGs
Pro
Sheet Author
API Scripter
Aaron, how would you change that script so its only triggered by a single deck, say with the name Tarot. I often have extra decks in a game, used for things like one-use items and hero point tokens.
1535330469

Edited 1535377712
The Aaron
Pro
API Scripter
It gets slightly complicated, but not too bad: on('ready',()=&gt;{ const flippingDeckIds = []; findObjs({type: 'deck'}) .filter( (d) =&gt; /^Tarokka/i.test(d.get('name')) ) .forEach( (d) =&gt; flippingDeckIds.push(d.id) ); const isFlippingDeck = (cardid) =&gt; { const lookup = {}; if( lookup.hasOwnProperty(cardid) ) { return lookup[cardid]; } let card = getObj('card',cardid); lookup[cardid] = flippingDeckIds.includes(card.get('deckid')); return lookup[cardid]; }; on('add:card',(obj)=&gt;{ if( isFlippingDeck(obj.get('cardid')) &amp;&amp; randomInteger(2) === 1 ) { obj.set('rotation',180); } }); }); I build a list of the deck ids in flippingDeckIds.&nbsp; I'm using findObjs() to get all decks, then .filter() is checking the name (here I'm seeing if they start with Tarokka as I have those available for testing), then add the ids to the list. When a card is added to the table, it actually comes in as a graphic of the subtype card, so I built a function called isFlippingDeck() and pass the cardid from the graphic to it.&nbsp; That function does some caching, but basically gets the card from the card id and looks to see if its associated deck id is in the list of flippingDeckIds, returning true or false. The rest of the logic is the same.
1535366824
GiGs
Pro
Sheet Author
API Scripter
Thanks. I'm glad I asked. That's more complicated than I expected! Also, FlippingDeck makes me giggle, thats a clever name.
Cool. Does a member have to upgrade their account in order to implement OR to actually use the provided script?
1535373981
GiGs
Pro
Sheet Author
API Scripter
You need to be a Pro user to be able to create campaigns that use API scripts like this.&nbsp;
1535377790
The Aaron
Pro
API Scripter
G G said: FlippingDeck makes me giggle, thats a clever name. =D David M-K said: Cool. Does a member have to upgrade their account in order to implement OR to actually use the provided script? As G G points out, the game must be created by a Pro Subscriber to have access to the API.
Okay, so if I wanted to have a game that included this functionality, I would have to be a Pro Subscriber. Would any other people/players who played in this game need to be a Pro Subscriber too, or not?
The Aaron said: You’d have to have a pro subscription to take advantage of the API method. If you want to see it it’s worth it yo you, I could create a game for you to try it in.&nbsp; Hi The Aaron, yes, I'd be interested in seeing it this is worth it or not. Thank you.&nbsp; :-)
1535383707
GiGs
Pro
Sheet Author
API Scripter
David M-K said: Okay, so if I wanted to have a game that included this functionality, I would have to be a Pro Subscriber. Would any other people/players who played in this game need to be a Pro Subscriber too, or not? No, the subscription level of a campaign is set by the campaign's creator. All features - dynamic lighting, scripting, etc., are dependent just on that one person's subscription level.
1535384119
The Aaron
Pro
API Scripter
David M-K said: Hi The Aaron, yes, I'd be interested in seeing it this is worth it or not. Thank you.&nbsp; :-) Click here:&nbsp; <a href="https://app.roll20.net/join/3666748/GymU8Q" rel="nofollow">https://app.roll20.net/join/3666748/GymU8Q</a> That will put you in a game where it is active.&nbsp; You can draw Tarroka cards (black deck) to the table and they have a 50/50 chance of being inverted.&nbsp; There's another deck as well that will not get inverted, just to test out G G's specific deck question. Only the Game's Creator needs to be a Pro subscriber, it doesn't even need to be you, technically.&nbsp;
1535384249
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
David M-K said: Okay, so if I wanted to have a game that included this functionality, I would have to be a Pro Subscriber. Would any other people/players who played in this game need to be a Pro Subscriber too, or not? Only the creator of the game (not necessarily the same thing as the DM) needs to have a subscription in order for the API to function within that game. Some scripts do require coding to ensure that players can trigger an event, but I'm guessing this is not the case with this script, since it triggers on a card pull, which anyone can do. Aaron can answer that last part definitively, though.
1535384681
The Aaron
Pro
API Scripter
keithcurtis said: &nbsp;I'm guessing this is not the case with this script, since it triggers on a card pull, which anyone can do. Aaron can answer that last part definitively, though. Absolutely right.&nbsp; Anyone pulling one of those cards to the table causes it to have the chance to be inverted. Interestingly enough, if you only wanted certain players to trigger that behavior, it would be impossible with the API.&nbsp; The add:card &nbsp;event (and all events that aren't chat:message, actually) contains no information about who instigated the event.&nbsp; This is why scripts like TokenLock must infer who could have caused an event. (In TokenLock's case, if a token has a controlled by, it might have been a player, so it disallows movement, but things without a controlled by can be moved willy-nilly as only a GM could have done that.)
The Aaron said: David M-K said: Hi The Aaron, yes, I'd be interested in seeing it this is worth it or not. Thank you.&nbsp; :-) Click here:&nbsp; <a href="https://app.roll20.net/join/3666748/GymU8Q" rel="nofollow">https://app.roll20.net/join/3666748/GymU8Q</a> That will put you in a game where it is active.&nbsp; You can draw Tarroka cards (black deck) to the table and they have a 50/50 chance of being inverted.&nbsp; There's another deck as well that will not get inverted, just to test out G G's specific deck question. Only the Game's Creator needs to be a Pro subscriber, it doesn't even need to be you, technically.&nbsp; That seems to work very nicely. Thank you.
Thanks to all. I've upgraded to Pro and have successfully included the shared script for my game. I was worried that I was going to need to redo all 78 cards, but it's working as is.&nbsp; :-)
1535394618
The Aaron
Pro
API Scripter
GREAT!&nbsp; Let me know if you have any other API questions!