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

[Script] Dealer

I loaded the API script dealer via the API tool on Roll20 - I made 2 decks - one Inspiration and one Potion for the Renown Potion. I can add them to a DM controlled character but I can not add them to a player controlled character. Other than just adding DM control to every character token which seems redundant I am at a loss of what to do. It gives the error of the following. Any ideas??? (From deal):  If a token represents a character controlled by 'All Players', an individual player must be also be specified. If there are multiple controllers, only the first will get inspiration.
Ultimately would prefer that DM only can give them out and remove the player ability to see the deck but still see the cards on their name. Want to set this up also for Hero Points that could be more than 1 per person for Eberron.
1601875297
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Can you post a screen shot of the "Controlled by" settings on the example PC? You should be able to give them a card without expressly being a controller. Also, note that you cannot give a card to a player who is not logged in to the game, just in case that's the issue. This is a limitation of Roll20, not the script.
I know the token was controlled by the character but when I looked at the character sheet it was set to all players - this was an uploaded character sheet. That is probably the reason why - will test it again tonight during the game with more guinea pigs.
1601913762
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Sure thing. "All players" will probably still work if there is an individual player set to the first position in the permissions list. The script only looks for the first entry.
That was the culprit the one character I was testing on was set to All Player on the character sheet but the token was set to just that individual - didn't catch it. All worked last night - was able to give out Inspiration on the fly and a Renown Potion to every player and they remembered to use them!!!. Wish the "Take" function would work - is there an API command to recall a card from a character. Just for flow - I know these aren't commands. For Selected Token == Take == Inspiration|Inspiration and remove that inspiration card instead of having them drop it on the playtop. possibly in a player token macro to "Use Inspiration" or "Use Renown Potion" or "Use Hero Point" I dont know if there is an API equivalent of the Recall function when a deck is shown and use the deck commands. Again wishing for Stars but glad it works and thank you for the script.
Would also like a Recall command for Dealer. 
There is a recall function on the deck if you show it which is fine when the game or session is over but wish I had the ability to "Take" an individual card from an individual player with out it being the "stealing" card feature where they have to allow it - just select the token, invoke the take selected cardA command and its done. I have been looking at the code some when I have time to see if I can do it but I'm dangerous with code now and haven't coded since pascal in the 80's on 5.25" floppies!!!! Was looking at how to do a command where it selects all the current players in the game and awards a set of cards to them - ie - start of an AL game Inspiration and Renown Potion card to each player. Even better - remove all current cards and reset to card x and card y or what ever combination. Just need to figure out how to cde this into the API.
keithcurtis said: Also, note that you cannot give a card to a player who is not logged in to the game, just in case that's the issue. This is a limitation of Roll20, not the script. Presumably you can, judging by the settings below (I've not tested it, BTW);
1603036492

Edited 1603036636
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Hm... that's either new(ish), or I was confusing it with not being able to take a card from an offline player. Or I'm just wrong. It happens. :) Sorry for anyone waiting on updates for this. My workload has gotten pretty heavy, and the uninterrupted hours I would have to set aside to make meaningful improvement on this (I'm a slow and painful coder) have not appeared.