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 Update] TokenMod -- An interface to adjusting properties of a token from a macro or the chat area.

I am getting a crashing sandbox with this error: For reference, the error message generated was: TypeError: update.match is not a function TypeError: update.match is not a function at getRelativeChange (apiscript.js:6412:19) at apiscript.js:6787:68 at Function._.each._.forEach (/home/node/d20-api-server/node_modules/underscore/underscore.js:153:9) at apiscript.js:6774:8 at Function._.each._.forEach (/home/node/d20-api-server/node_modules/underscore/underscore.js:158:9) at applyModListToToken (apiscript.js:6750:5) at apiscript.js:7093:25 at Function._.each._.forEach (/home/node/d20-api-server/node_modules/underscore/underscore.js:153:9) at _.(anonymous function) [as each] (/home/node/d20-api-server/node_modules/underscore/underscore.js:1496:34) at handleInput (apiscript.js:7092:22) The macro being used: !token-mod --set statusmarkers#?{Status| Disadvantaged,red| Advantaged,green| Concentrating,blue| Readying,stopwatch| ―, | Prone,back-pain| Restrained,fishing-net| Grappled,grab| ―, | Incapacitated,interdiction| Stunned,pummeled| Unconscious,sleepy| Dying,skull| ―, | Charmed,chained-heart| Frightened,screaming| ―, | Poisoned,half-heart| Blinded,bleeding-eye| Deafened,lightning-helix| Paralyzed,padlock| Petrified,broken-skull| ―, | Dodging,bolt-shield| Cover (half),broken-shield:2| Cover (three-quarters),broken-shield:5| Cover (full),white-tower| Invisible,ninja-mask| ―, } /w gm &{template:default} {{name=?{Status} [–](!token-mod --set statusmarkers#?{Status}:-1)[+](!token-mod --set statusmarkers#?{Status}:+1)[#](!token-mod --set statusmarkers#?{Status}:?{Number|1|2|3|4|5|6|7|8|9|None,-9}) [Toggle](!token-mod --set statusmarkers#!?{Status}) [Clear All](!token-mod --set statusmarkers#=red#-red)}}
1491701408
The Aaron
Pro
API Scripter
Hi guys, sorry you're running into that problem. Insufficient testing on my part. :(. I'm working on a fix and will have it finished tomorrow.   If you grab an older version and install it manually, it will fix the issue. (There is a bug with selecting an older 1-click version currently. )
1491749834
The Aaron
Pro
API Scripter
Update v0.8.32 -- Fixed crash for empty auras (and other places that could take a number or empty). Additionally, I've added error handling to prevent future crashes and make crash resolution easier. If a command would have caused a crash, it will now instead output this message as a whisper to the person who executed the command: The block at the bottom can be copied and pasted into a PM to me (link text goes to my profile). It contains the details of the message that was passed to TokenMod, as well as the callstack that crashed. Those are the two bits of information that I need to track down exactly what happened and fix it. With this new error handling, it won't crash the API and interrupt the game should there be a problem. Let me know if I can make any improvements to this. I have some ideas that will make it much nicer in the future and even allow other script authors to take advantage of it easily. Update v0.8.31 -- Fixed bug in multiply and divide logic. (Thanks Craven . , keithcurtis , Gold and others...) You can grab the latest version here:&nbsp; <a href="https://github.com/shdwjk/Roll20API/blob/master/To" rel="nofollow">https://github.com/shdwjk/Roll20API/blob/master/To</a>... It should hit the 1-Click next week or the week after.
Thanks for the quick fix Aaron!
1491759609
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Wow, that's elegant error handling!
1491761545
The Aaron
Pro
API Scripter
Thanks! &nbsp;It will be even better in the future! &nbsp;=D
I found part of the macro below and edit it to do what I want using token-mod. so it rolls the appropriate dice for the healing potions selected and adds the health back to the selected token. How can i show the number rolled? &{template:npcaction} ?{Type| Healing, {{rname=Potion of Healing&#125;&#125; {{name=**@{Selected|character_name} is healed.**&#125;&#125; {{r1=[[ {@{target|Target|bar1}+2d4+2&#44; @{target|Target|bar1|Max}d1&#125;kl1]]&#125;&#125; !token-mod --set bar1_value&#124;[[{@{target|Target|bar1}+2d4+2&#44; @{target|Target|bar1|Max}d1&#125;kl1]] --ids @{target|Target|token_id}&nbsp;&nbsp;| Greater, {{rname=Greater Potion of Healing&#125;&#125; {{name=**@{Selected|character_name} is healed.**&#125;&#125; {{r1=[[ {@{target|Target|bar1}+4d4+4&#44; @{target|Target|bar1|Max}d1&#125;kl1]]&#125;&#125; !token-mod --set bar1_value&#124;[[{@{target|Target|bar1}+4d4+4&#44; @{target|Target|bar1|Max}d1&#125;kl1]] --ids @{target|Target|token_id} | Superior, {{rname=Superior Potion of Healing&#125;&#125; {{name=**@{Selected|character_name} is healed.**&#125;&#125; {{r1=[[ {@{target|Target|bar1}+8d4+8&#44; @{target|Target|bar1|Max}d1&#125;kl1]]&#125;&#125; !token-mod --set bar1_value&#124;[[{@{target|Target|bar1}+8d4+8&#44; @{target|Target|bar1|Max}d1&#125;kl1]] --ids @{target|Target|token_id}| Supreme, {{rname=Supreme Potion of Healing&#125;&#125; {{name=**@{Selected|character_name} is healed.**&#125;&#125; {{r1=[[ {@{target|Target|bar1}+10d4+20&#44; @{target|Target|bar1|Max}d1&#125;kl1]]&#125;&#125; !token-mod --set bar1_value&#124;[[{@{target|Target|bar1}+10d4+20&#44; @{target|Target|bar1|Max}d1&#125;kl1]] --ids @{target|Target|token_id}}
1491934663
The Aaron
Pro
API Scripter
At this point, you can't. &nbsp;That's something I want to fix, but haven't gotten around to yet...
1491956938

Edited 1491956975
Hey Aaron, do you have any idea why this macro is adding 2 stopwatches to one Character but just 1 to the other tokens? !token-mod --set statusmarkers|stopwatch[2] --ids @{selected|character_id} To be clear, Im using this to represent a caster concentrating on a spell, So if they attempt to cast another spell that requires concentration it will add a second stopwatch. The character in question is getting 2 right off the bat (while the others are just getting 1). Could I have another character on another page interfering with this (Again.. lol). I've searched but can't find any in the 800 Storm King Thunder maps. Any thoughts?
1491959352

Edited 1491959428
Joe
Pro
Hi Aaron, thank you very much for sharing these excellent scripts with us, and the active support on them! I've got a player with a sword that lights on fire when he hits something, then goes out 3 rounds later. I've set up this macro called SwordFed: !token-mod --set statusmarkers|all-for-one:3 !flicker-on 40 20 yes That works great except that the flicker doesn't follow the token, and I hope that has to do with my running it on a browser on my iPad, and it will work fine once I get a chance to try it on my computer. I've got another macro called SwordBurn: !token-mod --set statusmarkers|all-for-one:-1 And one called SwordOff: !token-mod --set statusmarkers|-all-for-one !flicker-off What I really want is to combine those last two, i.e. take the icon off and turn off the flicker if it has reached 0. Do you know of any way to do that via macro or your script? I've gone over the help and the forum posts, but maybe I've missed it somewhere. Thank you again! Joe
1491961713
The Aaron
Pro
API Scripter
Dustin, the [2] syntax references the second stopwatch. In the absence of a first, it should set the first. I'll have to look at it tomorrow and see what's going on.&nbsp; Joe, I'm pretty sure there's &nbsp;a syntax for that, try: !token-mod --statusmarkers|?all-for-one:-1 turning the flicker off would need to be a separate thing though.&nbsp;
The Aaron said: Joe, I'm pretty sure there's &nbsp;a syntax for that, try: !token-mod --statusmarkers|?all-for-one:-1 turning the flicker off would need to be a separate thing though.&nbsp; Yep, that was it, thanks again! Regarding calling the other macro, is there any way to do conditional logic in macros? &nbsp;And return a value from your script based on checking an existing status if there is? 😊
1492006579
The Aaron
Pro
API Scripter
There isn't. &nbsp;Logic is the purview of the API. &nbsp;I think if you add this above case '!flicker-off': &nbsp;(about line 369), it should let you do what you want: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; case '!ficker-off-with-status': &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if((args[1]||'').match(/^(--)?help$/) || ( !_.has(msg,'selected') && args.length &lt; 2)) { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; showHelp(who); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; let status=args[1]; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; args.splice(1,1); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(playerIsGM(msg.playerid)) { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; objs=_.chain(args) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .rest(1) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .uniq() &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .value(); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; objs=_.union(objs,_.pluck(msg.selected,'_id')); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; objs=_.reduce((m,id)=&gt;{ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; let o=getObj('graphic',id); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(o && !o.get(`status_${status}`)){ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; m.push(id); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; },[]); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _.each(state.Torch.flickers, function(f) { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if( _.contains(objs, f.parent)) { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; clearFlicker(f.id); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break; I've not tested it, but you should be able to put in this: !token-mod --statusmarkers|?all-for-one:-1 !flicker-off-with-status all-for-one and have it turn off only when the token doesn't have that status.
I had some crashing API again on last night's session, I believe it was triggered by this Tokenmod macro, but not 100% sure. Macro: !token-mod {{ --set light_radius|60 light_dimradius|30 --on showplayers_bar1 }} Error: For reference, the error message generated was: TypeError: Cannot read property 'length' of undefined TypeError: Cannot read property 'length' of undefined at Object.processRolls (apiscript.js:7906:39) at Object.processRolls (apiscript.js:7913:17) at handleChatMessage (apiscript.js:8237:13) at eval (eval at &lt;anonymous&gt; (/home/node/d20-api-server/api.js:146:1), &lt;anonymous&gt;:65:16) at Object.publish (eval at &lt;anonymous&gt; (/home/node/d20-api-server/api.js:146:1), &lt;anonymous&gt;:70:8) at /home/node/d20-api-server/api.js:1510:12 at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:560 at hc (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:39:147) at Kd (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:546) at Id.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:489) at Zd.Ld.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:94:425)
Thanks, Aaron! &nbsp;I'll definitely try that. I've only used the one-click install so far for scripts. Is there an easy way to modify one of those, or do I need to disable it, create a new custom script, and copy/paste your full script code plus the above addition into it?
1492007679
The Aaron
Pro
API Scripter
If you select a 1-click version of a script, there's a button at the bottom that will copy the source into a tab.. don't remember what it's called, but it should be obvious when you look at them.
Thanks again! &nbsp;I'll look for that when I get back to my computer.&nbsp;
1492007943
The Aaron
Pro
API Scripter
Arno said: I had some crashing API again on last night's session, I believe it was triggered by this Tokenmod macro, but not 100% sure. Macro: !token-mod {{ --set light_radius|60 light_dimradius|30 --on showplayers_bar1 }} Error: For reference, the error message generated was: TypeError: Cannot read property 'length' of undefined TypeError: Cannot read property 'length' of undefined at Object.processRolls (apiscript.js:7906:39) at Object.processRolls (apiscript.js:7913:17) at handleChatMessage (apiscript.js:8237:13) at eval (eval at &lt;anonymous&gt; (/home/node/d20-api-server/api.js:146:1), &lt;anonymous&gt;:65:16) at Object.publish (eval at &lt;anonymous&gt; (/home/node/d20-api-server/api.js:146:1), &lt;anonymous&gt;:70:8) at /home/node/d20-api-server/api.js:1510:12 at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:560 at hc (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:39:147) at Kd (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:546) at Id.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:489) at Zd.Ld.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:94:425) That's actually not in TokenMod. &nbsp;It's probably either in HiddenRolls, TrackerJacker, or CreatureGen, though I don't see a processRolls function in any of them. &nbsp;What else do you have installed?
Powercards. Of course. I'm the bane of everyone apparently.
The Aaron said: That's actually not in TokenMod. &nbsp;It's probably either in HiddenRolls, TrackerJacker, or CreatureGen, though I don't see a processRolls function in any of them. &nbsp;What else do you have installed? Hmm ok, well I run these: GroupInitiative TurnMarker G Vector Math G MatrixMath G Path Math G Torch ApplyDamage TokenMod No Token Rotation RollStats HealthColors Calendar G Dynamic Light Helper TableExport 5eShapedCompanion RecursiveTable GroupCheck ChatSetAttr TokenNameNumber Perhaps&nbsp;GroupInitiative then?
Arno said: The Aaron said: That's actually not in TokenMod. &nbsp;It's probably either in HiddenRolls, TrackerJacker, or CreatureGen, though I don't see a processRolls function in any of them. &nbsp;What else do you have installed? Hmm ok, well I run these: GroupInitiative TurnMarker G Vector Math G MatrixMath G Path Math G Torch ApplyDamage TokenMod No Token Rotation RollStats HealthColors Calendar G Dynamic Light Helper TableExport 5eShapedCompanion RecursiveTable GroupCheck ChatSetAttr TokenNameNumber Perhaps&nbsp;GroupInitiative then? Disable all except token mod as that is the macro you are running. If no error turn on one at a time until you get the error
1492046875
The Aaron
Pro
API Scripter
Sky said: Powercards. Of course. I'm the bane of everyone apparently. Nah, you have "processroll", this is "processRolls".
1492046946
The Aaron
Pro
API Scripter
Arno said: The Aaron said: That's actually not in TokenMod. &nbsp;It's probably either in HiddenRolls, TrackerJacker, or CreatureGen, though I don't see a processRolls function in any of them. &nbsp;What else do you have installed? Hmm ok, well I run these: GroupInitiative TurnMarker G Vector Math G MatrixMath G Path Math G Torch ApplyDamage TokenMod No Token Rotation RollStats HealthColors Calendar G Dynamic Light Helper TableExport 5eShapedCompanion RecursiveTable GroupCheck ChatSetAttr TokenNameNumber Perhaps&nbsp;GroupInitiative then? It's not in any of my scripts or in the any of the repo scripts, I just grepped all the source.
It's likely RollStats or ApplyDamage then just guessing on names.
Thanks both for investigating. I have disabled Rollstats for now to test. I was certainly not using&nbsp;ApplyDamage at the time of the crash. But not sure if that's needed for it to crash.
1492084072
The Aaron
Pro
API Scripter
Every on('chat:message',...) chat handler will get called for every message, so if it makes certain assumptions, it can break. &nbsp;The 29 scripts I updated a few weeks ago were fixes for the assumption that a human was going to call the command. &nbsp;They would all break whenever an api script executed a command, but not necessarily the command that they serviced.
The image swap part of this API can I use it simply to change my token to an imagine of it being in a down state? &nbsp;For instance I have a standing topdown, when I hit 0 hp and also have an image of it in a prone state, can I simple run the image swap macro to replace the image? &nbsp;Then of course one for being up? &nbsp;Cause thats what it sounds like.
1492092561
The Aaron
Pro
API Scripter
Yes, with the caveat that the API can only create images that are in user Libraries, so you'd need the URL in your user library (see my note in the TurnMarker thread about how to get that.) Another option is to set up a Rollable Table Token and change sides on that in the right click menu of the token.
Hi Aaron, is there anywhere the full Help for TokenMod is listed outside of the game, so I can reference it for macro planning when I'm on my phone? &nbsp;It seems like old or abbreviated versions are on a couple different pages or forum posts, and I get trying to keep it in sync in multiple places is annoying, it would just be helpful to me right now. 😊
!token-mod --help from the chat windows.
Craven . said: !token-mod --help from the chat windows. Yes, I'm aware that is the best option, but it isn't readily available when I'm on my iPhone.&nbsp;
1492112322
The Aaron
Pro
API Scripter
It is on the 1-click install page when you have it selected, or when you click on the tab where you have it installed from 1-click. &nbsp;Aside from that, not yet. &nbsp;I have plans...
The Aaron said: It is on the 1-click install page when you have it selected, or when you click on the tab where you have it installed from 1-click. &nbsp;Aside from that, not yet. &nbsp;I have plans... Ok, that will probably work. Thanks!
When will 0.8.32 be available in the 1-click?
1492112913
The Aaron
Pro
API Scripter
Probably Tuesday. &nbsp;Phil was out sick so didn't get it merged this week.
Forgive the newbie question, but if I've installed a script via the one-click, does it update automatically to new versions, or do I need to take some action to do so?
It will automatically update.
Joe M. said: Forgive the newbie question, but if I've installed a script via the one-click, does it update automatically to new versions, or do I need to take some action to do so? It does but right now if I used the 1 click it loads 0.8.31 that crashes for me so I have manually added 0.8.32 which has all the fixes thanks to Aaron.
Gozer the Gozerian said: It will automatically update. Fantastic, thanks! 👍🏻
1492118057
The Aaron
Pro
API Scripter
Dustin C. said: Hey Aaron, do you have any idea why this macro is adding 2 stopwatches to one Character but just 1 to the other tokens? !token-mod --set statusmarkers|stopwatch[2] --ids @{selected|character_id} To be clear, Im using this to represent a caster concentrating on a spell, So if they attempt to cast another spell that requires concentration it will add a second stopwatch. The character in question is getting 2 right off the bat (while the others are just getting 1). Could I have another character on another page interfering with this (Again.. lol). I've searched but can't find any in the 800 Storm King Thunder maps. Any thoughts? So, I missed initially that this was using the character_id. &nbsp;I'd forgotten I even added that. =D &nbsp;What's happening is that by default, TokenMod includes the selected token in the group of tokens to modify (This has a complicated history of working and not working based on if you're using ?{target}, but in your case, it would be included.). &nbsp;So effectively, you are adjusting the union of: All the tokens that represent the character the selected token represents The selected token. That means the selected token is adjusted twice, while the other tokens that represent the character are not. &nbsp;Obviously, that's not what I want it to do. =D&nbsp; There are two ways to fix this: 1) I need to push an update that causes it to make the list unique after expanding the tokens a character id represent. (I'm doing this now, push coming shortly) 2) You can add --ignore-selected to your macro to cause it to exclude the selected token for the time being. Ok. I've pushed version 0.8.34 which fixes this and a few minor bugs with ! and - on [] statuses.
1492118878
The Aaron
Pro
API Scripter
Update v0.8.34 -- Fixed the behavior of ! and - adjustments to statusmarkers when dealing with [] statuses. Using - with a [] status will now remove the rightmost instance of that status, rather than all of them. !token-mod --set statusmarkers|-blue[] Using ! with a [] status with now toggle on a new copy of that status (just like +blue[] would): !token-mod --set statusmarkers|!blue[] And using ! with a [] status and an index will toggle that index of the status on. Note that toggling status indexes that are higher than a set status will cause it to fill the next lowest slot. !token-mod --set statusmarkers|!blue[3] Executing this over and over on an empty token will add 1 blue dot each time until there are 3, then subsequently toggle the 3rd one on and off on each execution. Update v0.8.33 -- Fixed bug where specifying a character_id with --ids while having a token selected that represented that character would cause a double adjustment. (Thanks Dustin C. )
1492303930

Edited 1492304062
Firstly, I am sorry for showing my ignorance again, I am looking to use tokenmod as part of an APT command button with the following: /w GM [Fireball](!roll20AM --play|Fireball by kaiju !token-mod --order toback !token-mod --set imgsrc|<a href="https://s3.amazonaws.com/files.d20.io/images/4095816/086YSl3v0Kz3SlDAu245Vg/max.png?1400535580" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/4095816/086YSl3v0Kz3SlDAu245Vg/max.png?1400535580</a> !token-mod --set width|560 height|560) i have escaped the html: /w GM [Fireball](!roll20AM --play|Fireball by kaiju &#13 ; !token-mod --order toback &#13 ;!token-mod --set imgsrc| <a href="https://s3.amazonaws.com/files.d20.io/images/4095816/086YSl3v0Kz3SlDAu245Vg/max.png" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/4095816/086YSl3v0Kz3SlDAu245Vg/max.png</a> ? 1400535580 &#13 ; !token-mod --set width|560 height|560) It wont show but i have also secaped the ? on the url But the imgsrc seems to kill it, am I missing something,&nbsp;sorry I know I am missing something, but what?
1492304047
The Aaron
Pro
API Scripter
APT command? what error are you getting?
1492304226

Edited 1492304515
Sorry - to get a button in the chat. its like API but at 2am (oops) There is no error&nbsp; just will not show the button with the img part left in
1492305541

Edited 1492314811
The Aaron
Pro
API Scripter
This seems to be a limitation of command buttons. &nbsp;Here's what I'd suggest (this worked for me): Create a character named tokenmod and add an ability to it named fireball with this in it: !roll20AM --play|Fireball by kaiju !token-mod {{ --order toback --set imgsrc|<a href="https://s3.amazonaws.com/files.d20.io/images/4095816/086YSl3v0Kz3SlDAu245Vg/max.png?1400535580" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/4095816/086YSl3v0Kz3SlDAu245Vg/max.png?1400535580</a> width|560 height|560 }} make your button call that ability like this: /w gm [fireball](!&amp;#13;&amp;#37;{ tokenmod | fireball }) Then your button will show up. Also, it makes editing the fireball commands easier. =D &nbsp;You can call the character anything you want, and name the abilities whatever, just so long as you name them right in the button.
!token-mod --set imgsrc| is this a token-mod command. I don't see it in the doc. What is the image for? Spell fx?
1492306869
The Aaron
Pro
API Scripter
This changes the token's image, so in this case, he is changing to a fireball image. It's in the help between Status Markers and Character ID:
its for creating the area of effect - so it can stay, for example, the spells spike growth or call lightning, or&nbsp;just for AOE for fireball but it still does not seem to work: &nbsp;first&nbsp;line copied and pasted as above, second with each new line escaped in the ability, sorry
1492309303
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Hmmm. I wonder if this is a more strightforward way than the one I posted last week. I was using a rollable token. It might be simpler than looking up the URL for each uploaded image.
1492315236
The Aaron
Pro
API Scripter
Jon M. said: its for creating the area of effect - so it can stay, for example, the spells spike growth or call lightning, or&nbsp;just for AOE for fireball but it still does not seem to work: first&nbsp;line copied and pasted as above, second with each new line escaped in the ability, sorry Whoops! &nbsp;The forum ate the HTML entities. I fixed the button code above. You have to have a carriage return symbol ( &amp;#13; ) after the ! and you have to use &amp;#37; instead of % so the macro isn't expanded until the button is clicked.&nbsp;