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 .
×
May your rolls be merry + bright! 🎄
Create a free account

Pseudo-Animated Tokens

1513974681

Edited 1513974813
So, I'm kind of a incapable when it comes to scripting and the API, so I generally have to rely on other peoples scripts to get what I need done, or I have to finagle someone else's script to fit my purpose.  But there is one thing I have been unable to accomplish, so I'm finally caving and posting here to see if anyone else has a solution. The goal is to animate tokens not with a gif, but with the roll tables, or maybe via the animation script.  Well I'm too dumb for the  animation script so I've come across a script called  change token image , which essentially allows you to flip tokens via a script command.  It looks something like  this when I repeatedly hit the chat command.  Does anyone know of script like this one that basically infinitly loops the token cycle?  This script can cycle through every image in the roll table, so hypothetically a longer animation is possible.  I know that the  bounce "animation" script exists and has an infinite cycle.   Any ideas?
1513977169
The Aaron
Pro
API Scripter
It would be very easy to set that up.  Would you want to change the cycle time?
Oh, The Aaron! Yes, the ability to tinker with the cycle would be super useful.
1513978677
The Aaron
Pro
API Scripter
So, to me it makes the most sense that you would create these from Rollable Tables expressly intended for this kind of animation.  As such, I think the weights could be used to set the initial frame percentage.  That information could be transcribed on creation into the GMNotes of the token in some very human readable format: time: 27.3 1: 1 2: 1 3: 3 4: 100 So the time would be 27.3 seconds to animate, with frame 1 taking 1/105th of that time, frame 2 taking 1/105th of that time, frame 3 taking 3/105ths of that time, and frame 4 taking 100/105ths of that time.  The initial time could be in the name of the animation table: Explosion [27.3] You could name the last row with something to indicate if the animation should repeat, or possibly point it one of the other frames, if say you had a lead in and only wanted to repeat a subset of the frames...
1513979284
Gold
Forum Champion
I would like to subscribe to your newsletter. This is in line with my research interests. Haha! Seriously, following the thread because this seems like a neat idea and a useful API script. Can it have commands for "Start Animation" and "Stop Animation"? I really am subscribed to The Aaron, via Patreon.
That could create some pretty neat animations actually.  As an example, say we use a sprite sheet and put in like 20 sprites, sure they could all be cycled, but having it point to certain points in the token table, you could actually have a single token capable of a few animations.  Hypothetically adding "weight" to a frame from the table is also pretty smart, giving more options for the animation cycle.  The animation API that I've been trying to wrap my head around obviously is more in depth and offers a lot of options for creating animations, but this way is actually pretty simple, since it relies on a lot of Roll20's built in assets.  
Gold said: I would like to subscribe to your newsletter. This is in line with my research interests. Haha! Seriously, following the thread because this seems like a neat idea and a useful API script. Can it have commands for "Start Animation" and "Stop Animation"? I really am subscribed to The Aaron, via Patreon. I'm probably going to subscribe to Aaron pretty soon too tbh.  I've noticed that pretty much every thread about API, he's been there, and he's made pretty much all of the scripts in the games I run.  
1513980831
Gold
Forum Champion
Good thoughts and ideas on this. Yes, Prodigy, The Aaron is very talented with scripts/coding, and he is clever with his practical ways of interacting with people/users to hear what is really needed or useful for gaming. He has earned a nickname around Roll20, "Arcane Scriptomancer". He isn't the author of all the scripts that I run in my games, but I always install some of his scripts right away on any new game. I think that small monthly donation support through his Patreon (which is allowed by Roll20 but not administered by Roll20) probably just encourages him to refine and work on scripts that much more for us. I pledge a couple dollars monthly. Goodness knows I get hours of gameplay each week using his scripts & save myself hours of prep-time with ones like TokenMod.
1513981834
The Aaron
Pro
API Scripter
Gosh.. now I'm all blushy... =D