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

Can a token action call for an ability (%) and also send an API command (!)

Many thanks to Scott C for helping me move a weapon attack into the token action section. However, a new complication has arisen. When calling the ability with a %, Roll20 seems to ignore anything else in the token action and only resolves the ability. Specifically, I want it to also send a command via !ammo, which works either by itself or with virtually anything other than an ability (%) call. But if I add the !ammo or a /roll or /em or anything else to the token action with an ability (%) call, no matter in what order I place them, Roll20 ignores everything except the ability (%) call. See below for how it is currently set up... is there anything I can do to get roll20 to do the !ammo part in the same token action as the ability call? Many thanks for any advice. %{selected|repeating_weapons_-OJKuPdLUvaafCh66biC_roll-weapon-rep} !ammo @{selected|token_id} repeating_weapons_-OJKuPdLUvaafCh66biC_weapon_magazine-rep -1
More info... the only way I have gotten it to work is to make the ability a chat button, which "works" but isn't as neat and tidy as having Roll20 just do it without the added step of clicking a chat button. The chat button solution looks like this: [Fire Weapon](~selected|repeating_weapons_-OJKuPdLUvaafCh66biC_roll-weapon-rep) !ammo @{selected|token_id} repeating_weapons_-OJKuPdLUvaafCh66biC_weapon_magazine-rep -1
1739993672
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Have investigated this some more, and this appears to be an issue with calling action buttons specifically (as oppossed to roll buttons on sheets or custom abilities).
OK. In our other conversation you mentioned it might be a bug... is that still your feeling? If there's a solution, great, I'd love to know it, and if there is not a solution or its a bug that is unlikely to be fixed any time soon, at least I'll stop banging my head on my desk. Thank you for your assistance with this.
1740007097

Edited 1740007215
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
I'd personally consider it a bug. Not sure on fix timeline or if it is intended for some reason. There should be a workaround for it using the API, likely with Timmaugh's Meta Toolbox.
1740024912
timmaugh
Forum Champion
API Scripter
Strangely, this (using the Toolbox) is failing. We are trying to get to the bottom of if it's a bug on the Roll20 side or if something might have changed that affects this specific combination of command types.