
I could not find a script that just flipped a token from one image to another (a token built using a rollable table to create the different images possible), I found plenty of scripts that were random, especially when you dragged it onto the map, etc. But I just wanted to flip between 2 images when I clicked a button. (This will actually increment through the rolltable if there is more than 2). Why, you ask? Because I am taking my players through a halloween module where after a few minutes in they wake up to discover everyone else is dead, and slowly, after a certain event, the bodies start animating as zombies. My tokens image are multi-sided via rolltable, one side is a dead body on the ground, and the other side is the zombie image. I mainly wanted a script so I could flip the image quickly for many at once.
Download it here https://github.com/Roll20/roll20-api-scripts/tree/master/ChangeTokenImage
Usage: select tokens and type
As you can see, I shamelessly copied the structure from TokenMod anyway. Most of Aaron's scripts are so nicely laid out I decided "this is a pattern" and followed it.
So I suppose I'm asking:
1. What to do with this to share it (how to get it into github and set the little json files correctly, etc. )
2. Would it instead work better as another option for TokenMod, and if so how do I go about doing that? (
3. what improvements are needed ( such as picking a side instead of just incrementing the side)
thanks to Aaron for TokenMod
Matt for figuring out the easy 2 lines of code to change the token image.
Download it here https://github.com/Roll20/roll20-api-scripts/tree/master/ChangeTokenImage
Usage: select tokens and type
!change-token-img --flip !change-token-img --help
As you can see, I shamelessly copied the structure from TokenMod anyway. Most of Aaron's scripts are so nicely laid out I decided "this is a pattern" and followed it.
So I suppose I'm asking:
1. What to do with this to share it (how to get it into github and set the little json files correctly, etc. )
2. Would it instead work better as another option for TokenMod, and if so how do I go about doing that? (
3. what improvements are needed ( such as picking a side instead of just incrementing the side)
thanks to Aaron for TokenMod
Matt for figuring out the easy 2 lines of code to change the token image.