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

Need Help Realizing A Dream Regarding Tokens and Macros

1548821103
Dupree
Pro
Marketplace Creator
Compendium Curator
Ok, so, is it possible using a rollable token to have it so that when you make an attack it switches to a different result on the token? With the animated gif functionality now, I want to be able to change from idle non-combat to attacking or idle combat just by clicking an attack. This is for a D&D 5e game that uses the roll20 standard sheet.
1548822289

Edited 1548822305
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Not sure of how the API will interact with the GIFs yet, but I'd think you could use Aaron's Tokenmod to do all this. Simply add the tokenmod command on a new line of your attack macro. If you are using a sheet (e.g. 5e by Roll20 or the shaped), there are various ways to force this to happen.
1548849551

Edited 1548849788
Dupree
Pro
Marketplace Creator
Compendium Curator
My plan is to treat the gif part of the equation as I would a regular image file. So, with a rollable token you can have several images assigned to the same token and can switch them, but the process of right clicking, selecting multi-sided, then using the slider, is not very fluid. Can you get me a link to the mod and do you know of a tutorial anywhere I could look at for API stuff? I'm...pretty new to it.
1548852840
The Aaron
Roll20 Production Team
API Scripter
Here is TokenMod:&nbsp; <a href="https://app.roll20.net/forum/post/4225825/script-update-tokenmod-an-interface-to-adjusting-properties-of-a-token-from-a-macro-or-the-chat-area/?pageforid=4225825#post-4225825" rel="nofollow">https://app.roll20.net/forum/post/4225825/script-update-tokenmod-an-interface-to-adjusting-properties-of-a-token-from-a-macro-or-the-chat-area/?pageforid=4225825#post-4225825</a> When you say API tutorial, do you mean for using API scripts, or writing them?
1548869054
Dupree
Pro
Marketplace Creator
Compendium Curator
Either? Both? I'm...so old and not tech savvy...
1548881748
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
If you're not tech savvy, you probably want to start with using ones other folks have written, before writing your own. The wiki really lacks a page for this purpose, unfortunately. It makes the leap directly into writing your own, whereas I would wager that most people use them as written (like me).&nbsp; Go to your game settings page, click the Settings tab (the one with the gear icon), and choose API Scripts. From there you will be take to a page that has a drop down to install many of the most popular and useful scripts. If there is one associated with the sheet you use, that's a good one to start with. Most of them have descriptions of how to use them. There is a list of many scripts here , to give you an idea of what's possible, though it's pretty out of date on some scripts. Also you can browse the API forum. Most threads dedicated to a script will start with [Script]. Any thread with over 100 posts is probably a pretty popular or active one. Don't be afraid to ask questions.