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

Adding Token/Image to a Deck with a Macro

1604835653

Edited 1604836003
Hi everyone, I suspect that this may not be possible, but thought I'd check anyway... does anyone know if there is a way to add a token/image (ideally one placed on a map) to a deck (and ideally remove it from the map when this is done) using a macro? Thanks in advance, Francesco
1604838779
GiGs
Pro
Sheet Author
API Scripter
This cant be done with a macro. It should be doable with a custom API script, but I've never done anything with card decks so dont know how.
Thanks for the answer, I feared that would be the case. I might try with a more open question to see if anyone has any ideas.
1604940139
GiGs
Pro
Sheet Author
API Scripter
I didnt mention why  macros couldnt do this. macros can only send text to chat. That's all they do. Often that text includes a dice roll. Macros cant manipulate objects like cards, or tokens, in anyway.  API scripts can do a lot more stuff, and macros can be used to trigger them 9by sending text to chat that has the trigger commands in them).
Ahh gotcha. I may have to look into how easy/difficult making API scripts is (have never tried).
1604969577

Edited 1604969592
Oosh
Sheet Author
API Scripter
You can modify the imgsrc of a card once it's on the canvas, I'm pretty sure - it's a graphic object like a token. I'm not sure about when they're in-hand though, I've never really used or looked at them. With API that is.
Thanks for the tip Oosh.
If the token/image came from a deck, it is easy to remove it from the map by right-clicking and selecting delete (to put it in the 'discard' pile) or take card to hand. I'm unclear as to your use case but you could lay down a map with a deck of map tiles, place treasures on the map with a deck of treasures, same for monsters, etc. The card deck system in Roll20 is very poorly implemented, imho. There are so many card games out there that have mechanics (like deck-building) that Roll20 cannot do. 
1605087611

Edited 1605087622
As an FYI the use case is this one here: Bag of Tokens The annoying part is adding the tokens to a deck from the map using a button of some kind - the rest is all pretty much covered by the existing functionality.
The sam idea GIG : I didnt mention  why  macros couldnt do this. macros can only send text to chat.