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 .
×
Advertisement Create a free account

[Script] Token Action Maker v.0.2.7

when i copy paste the current (0.3.5) script to the custom API, it doesn't run at all. no CheckInstall notification, no commands work. the copy in the repository works (the one i can install through /campaigns/scripts), and 0.3.4 works as well. i am messing with the backend so i can have the script make buttons for a custom system, so the version doesn't really matter to me, but i figured i should let you know, in case it becomes an issue in the future.
1634501599
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
That's very odd. The repository one is the one that is installed by One Click. There are two things you can try: Make sure the code you are copying comes from the "Raw" page. That should ensure there's no odd characters or character encoding going on. Make sure you copy the script from the folder, not the one at the root level of the repo. They should be identical, but just in case. The one from the version folder is the one that is installed. In the meantime, I will investigate.
1634513326
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
borings b. said: when i copy paste the current (0.3.5) script to the custom API, it doesn't run at all. no CheckInstall notification, no commands work. the copy in the repository works (the one i can install through /campaigns/scripts), and 0.3.4 works as well. i am messing with the backend so i can have the script make buttons for a custom system, so the version doesn't really matter to me, but i figured i should let you know, in case it becomes an issue in the future. I have investigated. I manually loaded 0.3.5 from the root and from the subfolder into two separate clean games. Both created token actions for the selected characters. Do you have repro steps I could follow to try to re-create the issue you are seeing?
1634514836
When I've had that problem, I had an api script bombing on load just prior to the script I was testing.  You might try disabling most of your scripts, one at a time to see if that is the problem.
keithcurtis said: borings b. said: when i copy paste the current (0.3.5) script to the custom API, it doesn't run at all. no CheckInstall notification, no commands work. the copy in the repository works (the one i can install through /campaigns/scripts), and 0.3.4 works as well. i am messing with the backend so i can have the script make buttons for a custom system, so the version doesn't really matter to me, but i figured i should let you know, in case it becomes an issue in the future. I have investigated. I manually loaded 0.3.5 from the root and from the subfolder into two separate clean games. Both created token actions for the selected characters. Do you have repro steps I could follow to try to re-create the issue you are seeing? i created a new game with all the same stuff attached and now it is working fine? i really dunno what it was doing earlier. mebbe a combination of the commands i was inputting and the way the API console doesn't always do all of the "checkInstall" style outputs made me think it wasn't working when it was? i mean, it was weird that 0.3.4 worked fine. sorry for the false alarm?
1634568515
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
This could be related to the "silent API failure" bug that some (including myself) have reported. Instead of getting the big pink error box, the sandbox just... stops. Next time you run into an error like that, don't trust the API page and force a refresh and see if that works.
1634833149

Edited 1634833206
Is anyone having an issue withe the script that it no longer produces drop down menu but opens a box with Input Value? (tried all the versions that are available 0.3.2/3/4/5)  (sorry for the overexposed screenshot, screen capture does not play nice with HDR)
1634833506
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
This is due to the flawed rollout of the new query parsing from Roll20. There is nothing I can do about it at the moment, since Roll20 is still trying to fix the issue. As soon as they have settled on a final codebase, I can re-write the routines to produce a usable query. (Ideally, any changes they made along these lines should have been backward compatible). Until then (hopefully very soon), the Check and Save Token Actions will be broken. You can follow the progress of the issue here .
1634834323
@keithcurtis, thanks for the quick reply and the link, I was thinking that the "syntax" must have changed as this is affecting all the past versions. It is a shame that it has been rolled out without any tests, breaking so many exisiting implementations.
i can put a version up that works if anyone wants, i have an altered version that i made for my games anyways so its not a prollem.
1634835027
@borings b.  at least share the source code :) so we can update manually if we want.
so i put up a version that i think should work here: <a href="https://github.com/boringsss/boringsss/tree/main" rel="nofollow">https://github.com/boringsss/boringsss/tree/main</a> i don't have any 5e games to test it, but i fixed it the same way i fixed the file for my local game (which is working)
1634835776
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Thanks borings. I did some investigation this morning, including the issue you PMd me a bout (thanks!), but I'm not going to touch the source code until this gets resolved by Roll20 first. Not going to build a sand castle while the tide is still coming in. I would caution anyone wishing to fix the macro code for "Check" and "Save" that any solution will likely be temporary, and require a later "fix of the fix".
1634835830
it works 50% the dropdown works.. but the output is broken... the rolls don't work.
i took a look and i missed a couple extra }} and ]], try again mebbe? also yeah i would only use this as a temp fix. it looks like they are doing a rollback sometime in the next few hours tekbart said: it works 50% the dropdown works.. but the output is broken... the rolls don't work.
1634836116
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
In the meantime, here are&nbsp; Chat Menus &nbsp;that can be used as Universal Token actions. (Put the code in a Collections Macro and set for "Use as Token Action). NPCs only. Ability score rolls and saves /w gm &amp;{template:npcaction}{{rname=@{selected|character_name}}}{{description=**Abilities** [**Str @{selected|strength}** *(@{selected|strength_mod})*](~selected|npc_str) | [save](~selected|npc_str_save) [**Dex @{selected|dexterity}** *(@{selected|dexterity_mod})*](~selected|npc_dec) | [save](~selected|npc_dex_save) [**Con @{selected|constitution}** *(@{selected|constitution_mod})*](~selected|npc_con) | [save](~selected|npc_con_save) [**Int @{selected|intelligence}** *(@{selected|intelligence_mod})*](~selected|npc_int) | [save](~selected|npc_int_save) [**Wis @{selected|wisdom}** *(@{selected|wisdom_mod})*](~selected|npc_wis) | [save](~selected|npc_wis_save) [**Cha @{selected|charisma}** *(@{selected|charisma_mod})*](~selected|npc_cha) | [save](~selected|npc_cha_save)}} Skill Checks /w gm &amp;{template:npcaction}{{rname=@{selected|character_name}}}{{description=**Skills** [Acrobatics](~selected|npc_Acrobatics) | [Animal Handling](~selected|npc_Animal_Handling) | [Arcana](~selected|npc_Arcana) | [Athletics](~selected|npc_Athletics|Deception](~selected|npc_Deception) | [History](~selected|npc_History) | [Insight](~selected|npc_Insight) | [Intimidation](~selected|npc_Intimidation) | [Investigation](~selected|npc_Investigation) | [Medicine](~selected|npc_Medicine) | [Nature](~selected|npc_Nature) | [Perception](~selected|npc_Perception) | [Performance](~selected|npc_Performance) | [Persuasion](~selected|npc_Persuasion) | [Religion](~selected|npc_Religion) | [Sleight of Hand](~selected|npc_Sleight_of_Hand) | [Stealth](~selected|npc_stealth) | [Survival](~selected|npc_survival)}}
1634836940

Edited 1634836952
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
A rollback is coming . This includes a promise that macros do not and will not need to be re-written. I would urge folks to remain patient while the code is restored and to not worry about re-working anything. If you are in urgent need of the functionality of those two token macros, I suggest using the macros I posted above as universal Token Actions in the Collections Tab until the issue is resolved.
1634838414
I'm having the same issue. Tried disabling and reenabling API as well as restarting sandbox. Same issue. tekbart said: Is anyone having an issue withe the script that it no longer produces drop down menu but opens a box with Input Value? (tried all the versions that are available 0.3.2/3/4/5) &nbsp;(sorry for the overexposed screenshot, screen capture does not play nice with HDR)
1634838600
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Hi Paul, Please read the posts that follow the one you quoted. That should clarify things. The code Roll20 rolled out yesterday that broke queries, is being rolled back. Everything should work again soon.
1634838943
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Also, to clarify something for users of this script: The script only creates token actions. The API is not required in order to run them. The latest WotC offering, Wild Beyond the Witchlight, offers token actions on all monsters, created by Token Action Maker. The actions work for Free users, just as well as Pro. Just to save time in toggling the sandbox if you suspect a problem.
1634843262
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
It looks like the rollback has been implemented. Token Actions are working normally.
1634869838
keithcurtis said: Also, to clarify something for users of this script: The script only creates token actions. The API is not required in order to run them. The latest WotC offering, Wild Beyond the Witchlight, offers token actions on all monsters, created by Token Action Maker. The actions work for Free users, just as well as Pro. Just to save time in toggling the sandbox if you suspect a problem. I just want to say how much I appreciate that this script was used for WBW. I was thrilled when I saw that. I hope they continue to do so going forward, and even backwards if they're still updating any of the previous adventure modules. I think it might be my favorite script.
1635380183
I love this script and use it all the time. Thank you for maintaining it and making my games much easier to run :-) Would it be at all possible to include Mythic Actions with this as it does not seem to work for those?
1635380686
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Good idea. I forgot those had been added.
1635385340
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Next week's version will support mythic actions.
1635402150

Edited 1635402505
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Unless someone has a compelling reason for another solution, mythic actions will be preceded by "m-" in the button name, to distinguish them from Legendary Actions. Since some legendary actions do not list an action cost, I think they also need a prefix to distinguish them from normal actions: "l-". When using !ta, the button names will be as follows: Action l-Legendary Action (#a) m-Mythic Action (#a) When using !sortta, the button names will be as follows: a-Action al-Legendary Action (#a) am-Mythic Action (#a) ...where the # is the number of actions used. In the case of 1 action, no parenthetical number is used.
1637007568
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Now in Beta - Pathfinder 2 by Roll20 Support This is a work in progress. It is theoretically ready to go, but I'd like to shop it in beta first and get feedback from the live userbase before putting it in One Click next week. If you would like to test it, the code is here . I'll repeat the full documentation below: This script creates token actions on selected tokens for the D&amp;D 5e by Roll20 sheet. Tokens must represent character sheets, either PC or NPC. 0.2.9, the script will also abbreviate common phrases like "(One Handed)" to "-1H". 0.3.3, the ability to protect specific token actions was added (put a period after the name). 0.3.4, added support for the new npc bonus action repeating field. 0.3.5, numerous fixes 0.3.6, Added support for Pathfinder 2 by Roll20 Sheet !ta &nbsp;This command will create a full suite of token action buttons for a selected character. Actions for NPCs and Attacks for PCs. !sortta &nbsp;This command functions identically to !ta, but will prepend "a-" to NPC actions, and "la-" to NPC Legendary Actions. This is for users who like to alphabetize Token Actions. This is not recommended for the PF2 sheet, as it breaks the logical progression of Attack-Attack2-Attack3. !deleteta &nbsp;will delete unprotected token actions for the selected character. To protect a token action, end its name with a period. "longsword" will be deleted. "longsword." will not. This allows you to keep any custom token actions from being affected by the script. !deleteallta &nbsp;will delete ALL token actions for the selected character, whether they were created by this script or not. Use with caution. D&amp;D 5th Edition by Roll20 Sheet You can create specific classes of abilities by using the following arguments separated by spaces: attacks &nbsp;Creates a button for each attack. In the case of NPCs, this includes all Actions. (PC/NPC) trait s Creates a button for each trait. PCs can have quite a number of these, so it is not recommended to run this command on PCs. (PC*/NPC) pc &nbsp;creates full suite of buttons for everything but traits. Although this will also work on npcs, the intent is to not include trait buttons for pcs, which can get rather numerous. bonusactions &nbsp;Creates a button for each bonus action. This will be ignored on PCs since only NPC sheets have a repeating attribute for bonus actions. (NPC) reactions &nbsp;Creates a button for each reaction. This will be ignored on PCs since only NPC sheets have a repeating attribute for reactions. (PC) spells &nbsp;Creates a button that calls up a chat menu of all spells the character can cast. (PC/NPC) checks &nbsp;Creates a drop down menu of all Ability and Skill (Ability) checks. Recommended for NPCs, as PC checks and Saves can be affected by many different abilities as levels progress, that this script cannot account for. (PC*/NPC) saves &nbsp;Creates a dropdown menu of all saving throws. Recommended for NPCs, as PC checks and Saves can be affected by many different abilities as levels progress, that this script cannot account for. (PC*/NPC) init &nbsp;Creates a button that rolls initiative for the selected token (PC/NPC) name &nbsp;Normally, Token Actions are created using the character_id. They will still function even if the character is renamed. However this is not always desireable. If a character is moved to a new game via the Character Vault, it will receive a new character_id, and the token actions will not function. If you intend to move the character, use the "name" argument in the string and it will call the token actions by name. help &nbsp;Calls up this help documentation Examples: !ta saves checks &nbsp;will create token ability buttons for Ability Checks and Saving Throws. !ta name &nbsp;will create alltoken ability buttons and identify them by name, rather than character_id. Pathfinder Second Edition by Roll20 Sheet All PF2 use requires adding the argument "pf2" to the argument list. Otherwise the script will try to create Token Actions for the 5e sheet. Until all sheets have a uniform sheet identifier attribute, this is necessary. In cases where there is an action cost, it will be indicated in the button name as&nbsp; Action&lt;#&gt; . You can create specific classes of abilities by using the following arguments separated by spaces: pf2 &nbsp; Required on all PF2 commands attacks &nbsp;Creates a button for each attack. TAM will append a '-M' or '-R' after the name to distinguish melee from ranged. Each Attack will have a two buttons immediately following for Attack 2 and Attack 3. These will be abbreviated using the first two characters from each word in the Attack. Example&nbsp; Silver Dagger &nbsp; SiDa-2 &nbsp; SiDa-3 &nbsp;(PC/NPC) reactive &nbsp;Creates a button for each reaction (NPC) offensive &nbsp;Creates a button for each offensive ability (PC/NPC) spells &nbsp;Creates a button that calls up a chat menu of all spells the character can cast. These are separated by innate, focus, cantrips and normal spells. Normal Spells are separated by level. (PC/NPC) actions &nbsp;Creates a button for each normal action (NPC) checks &nbsp;Creates a drop down menu of all Skill check (PC/NPC) saves &nbsp;Creates a dropdown menu of all saving throws (PC/NPC) init &nbsp;Creates a button that rolls initiative for the selected token, obeying the skill chosen on the character sheet. The skill cannot be chosen without API interaction, so it will need to be manually chosen. (PC/NPC) name &nbsp;Normally, Token Actions are created using the character_id. They will still function even if the character is renamed. However this is not always desireable. If a character is moved to a new game via the Character Vault, it will receive a new character_id, and the token actions will not function. If you intend to move the character, use the "name" argument in the string and it will call the token actions by name. Examples: !ta pf2 &nbsp;will generate a full suite of token actions For PCs, this would be the same as typing&nbsp; !ta pf2 checks saves attacks offensive reactive interaction spells . For PCs, this would be the same as typing&nbsp; !ta pf2 checks saves attacks offensive spells . !ta pf2 saves checks &nbsp;will create token ability buttons for Skill Checks and Saving Throws. !ta pf2 name &nbsp;will create all token ability buttons and identify them by name, rather than character_id.
1637047987
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Oosh has supplied me with a neat little function to generate save and ability check 5e token actions that will respect global modifiers. It will be in next week's pull, unless something goes awry with the PF2 support.
1637301399

Edited 1637302191
It works wonderfully! This is especially useful for NPCs, and the spell menu is great. The only bugs I noticed (only tested on a few characters so far): when running !ta pf2 with a PC selected, the Check and Save abilities that the script builds are set up for 5e still, and the Spells ability doesn't get added ( !ta pf2 spells works). No issues when running the commands with an NPC selected. EDIT: Tried on a few more PCs just to check and for some reason this only happened with the initial two! Working fine now, though the drop down for skills seems to have been broken by my own setup. PCs skill notes include an inline roll that uses a {}k1 function, and the right bracket stops the query short, much like tekbart's issue a few posts up.
1637302910
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Does the broken PC have something like Reliable Talent, or Remarkable Athlete? TAM can't account for that and is not recommended for such PCs.
keithcurtis said: Does the broken PC have something like Reliable Talent, or Remarkable Athlete? TAM can't account for that and is not recommended for such PCs. No, this is all with the PF2 sheet, which doesn't have any settings like that afaik. I suppose it's also possible that I somehow erased the 'pf2' part from the command without realizing right before entering it :)
1637390949
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Sent you a PM, in case you are still having issues.