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

[Community Request] Bugs/Missing Feature Parity/Desired Features -- help me build a list!

1660339921
The Aaron
Forum Champion
API Scripter
Hi Community! I'm working on building a list of all the bugs, parity issues, and Missing Features for Mods. Note: This is strictly about Mod (API) Scripts, not anything else on the site. Here's my definition of these: Bugs This is something that is clearly broken about the implementation.  It's something that should work, but doesn't.  Here's some examples: Created Text Objects don't have width and height set correctly.  When a Mod script creates a text object, both properties are set to 0. msg.selected is blank if @{target|...} is used on the call.  If you supply information with a @{target} call, the msg.selected object is not populated. Parity Issues This is where functionality exists for the Player, but doesn't exist for Mod scripts.  Here's some examples: Access to Animation States.  A Player can play or pause an animated graphic, but the API does not have access to this. Access to folders in the journal.  The GM can sort items into folders and create folders, the API cannot. Missing Features These are things it would be reasonable to expect Mod scripts to have access to, but that they don't currently.  Here's some examples: A way to get the currently configured character sheet.  This would allow tailoring scripts to sheets, and detecting incompatibilities, etc. And event when pings happen.  This would give a nice interface for scripts that want to target a location, say for moving a token, or placing an effect, etc. Try to keep one per post.   If you're posting a Bug , try to give reproduction steps, or a reproduction script, or a link to a bug post somewhere.  If you're posting a Missing Feature , try to include some examples of how you'd use it. Thanks for the help!
I tried looking for this feature and couldn't find it.  I built a map using purchased tokens.  I would like to convert the completed map into an image to speed up the processing and lower the data footprint.  Is that feature available or possible? 
1660346084
The Aaron
Forum Champion
API Scripter
That wouldn't be part of a Mod (API) Script, that would be a general feature request.&nbsp; You should look in the Suggestions and idea threads for something that matches and upvote it, probably this one:&nbsp; <a href="https://app.roll20.net/forum/post/1406171/slug%7D#post-2845827" rel="nofollow">https://app.roll20.net/forum/post/1406171/slug%7D#post-2845827</a>
1660347654
Missing feature: access to images that are loaded in a game but not in a player’s art library. This may be intentional on Roll20’s part, but Mod scripts do not have access to images that are loaded from modules or add-ons; they can only manipulate images that have been uploaded by a player. It’s a frequent question regarding image usage with scripts.&nbsp;
1660347697
Missing feature: copy scripts between games.&nbsp; Either with the Transmogrifier or when copying a game.&nbsp;
I'm no longer a Pro but when I was, I remember wishing there was a field on the 'chat:message' message object revealing the current page id of the chat sender.
1660358387
Pat
Pro
API Scripter
BUG: playCardToTable() crashes the API for User Library images. From Aaron's post here:&nbsp; <a href="https://app.roll20.net/forum/post/7583610/slug%7D#post-7595323" rel="nofollow">https://app.roll20.net/forum/post/7583610/slug%7D#post-7595323</a>
1660358846
The Aaron
Forum Champion
API Scripter
Jarren: Thanks, I've recorded those two. Jim: I'll make a note on that.&nbsp; You can get the page id with some finagling (I've got a function that makes it pretty easy), but it couldn't hurt to have that information on the msg object innately. Pat: Thanks for that, I found the repro script I wrote for that as well.
1660359340

Edited 1660359421
Oosh
Sheet Author
Missing/suggested feature A modal UI &lt;div&gt; which floats over the canvas which scripts have indirect access to - just an absolute/fixed div with a high z-index to act as a container. Roll20 writes a controller that takes custom events to request a modal to pop up, so Roll20 remains in control of: &nbsp;&nbsp;&nbsp; - the modal's outer frame, to match styling with iframes and provide control buttons in the top right &nbsp;&nbsp;&nbsp; - max number of modals open at once &nbsp;&nbsp;&nbsp; - max/default size of modals Script authors just need to send a config object. Ideally, we'd want to be able to receive data back from the modals, so some form of whitelisted elements for use in the body would be needed, and a method of returning any inputs. A few preset buttons for the footer wouldn't go astray, either - boolean returns for yes/no, 'ok' functionality for submitting filled forms.... that probably covers 99% of use cases. A couple of examples: // if (arg === 'help') .... requestModal({ title: 'Token Mod Help', id: 'tokenModHelp', buttons: [{ label: 'Got it!', action: 'close' }], content: `&lt;h3&gt;tokenMod Help&lt;/h3&gt; .... etc etc` }); // if (arg === 'settings') requestModal({ title: 'Token Mod Config', id: 'tokenModConfig', buttons: [ { label: 'OK', action: 'submit', target: '#tokenModConfig' }, { label: 'Cancel', action: 'close' } ], content: ` &lt;h3&gt;tokenMod Config&lt;/h3&gt; &lt;form id="tokenModConfig"&gt; &lt;span&gt;Allow players to use ids: &lt;/span&gt; &lt;input type="checkbox" name="allow-ids" /&gt; &lt;/form&gt; .... etc etc` }); on('modal:response', (response) =&gt; { if (response.id === 'tokenModConfig') { const newConfig = response.data; // Do things with new settings } }); Script authors have made the best of an ugly situation with chat-bar menus, but it's a pretty poor solution for 2022.
1660359542
The Aaron
Forum Champion
API Scripter
Thanks Oosh, added!
BUG (long lasting) : The update of the visions to be able to use some other scripts (observer, etc...). I know that bug is a legend and soooooo longlasting, but i thought it could be good to give a shoot at it again. Thank you sir for this initiative
1660383486
Richard W.
Pro
Sheet Author
API Scripter
Compendium Curator
Perhaps a feature that would provide a notice or alert to GM when a script has crashed, failed to load or a player tries to use an action button or command for an API script that isn't there/working/loaded? Have been in games myself but also read other peoples comments that rolls are not working and there is a lot of confusion as to why, when it turns out the script for some reason didn't load properly. Perhaps it needs a way to silence the alerts, or prevent multiple alerts of same kind to spam the alerting method, e.g. GM chat.&nbsp;
1660409231
The Aaron
Forum Champion
API Scripter
Lionel: Thanks for the reminder, I've put it on the list. Richard: Thanks, that's a great feature idea, I've put it on the list.
1661064779

Edited 1661064866
vÍnce
Pro
Sheet Author
Not sure if this qualifies... Missing Feature API/Mod changes to linked token bars do not trigger sheetworkers.&nbsp; Changes are only reflected on the sheet after reloading the sheet. Example: !setattr --charid @{selected|character_id} --armorother4_mod|?{mod|0} triggers sheet calcs as well as change the linked token bar1_value. while !token-mod --set bar1_value|?{mod|0} Only changes the token bar1_value until the sheet is refreshed, then the linked attribute change is reflected on the sheet (which may/may not trigger other calcs as well).
1661093804
The Aaron
Forum Champion
API Scripter
Vince: I'd say that counts! I'll add it to my list.&nbsp;
1661106058
The Aaron
Forum Champion
API Scripter
Vince: I verified and added that bug with reproduction steps to my list.&nbsp; I also adjusted TokenMod to handle this situation natively:&nbsp; <a href="https://app.roll20.net/forum/permalink/11047338/" rel="nofollow">https://app.roll20.net/forum/permalink/11047338/</a>
1661110772
vÍnce
Pro
Sheet Author
Thanks Aaron.&nbsp; setWithWorker() was introduced 5 years ago, I just assumed it would have already been implemented in most Mods by this point.
1661114079

Edited 1661114118
The Aaron
Forum Champion
API Scripter
The fix in TokenMod is a workaround. There is no .setWithWork() for anything but attribute objects. To make it work, TokenMod now detects if a change is happening on a bar that is linked, then changes the linked attribute instead.&nbsp;
1661872355
Not sure if this is on you list but would like the ability to control animations in the api., i.e Start/Stop/Reset/Loop.&nbsp; This would work well for door or chests for instance, where a player picks thee lock and it opens,&nbsp; Graphic animation can be played, DoorKnocker activated to handle the4 Dynamic Lighting and an appropriate sound played.&nbsp; Trying to do this currently takes a lot of mouse clicks and does not produce a smooth result. Thanks Aaron
1661873316
The Aaron
Forum Champion
API Scripter
That is a good suggestion, and don't worry Andy, I've got it on the list!
1662302447
Kurt J.
Pro
API Scripter
Aaron, if you are still collecting these, there seems to be some odd behavior with setting attributes via the API that have not been set to non-default values through the UI first. I've run into this on a couple of different sheets, but one example I can think if right away is Global * Modifiers in the 5E sheet. If a player creates one and never manually toggles it on, setting the&nbsp;global_attack_active_flag (or whatever type, like global_save, global_damage, global_ac, etc) via obj.set doesn't seem to do anything. After the player has turned it on and back off, it works normally even between sessions. I've also seen cases since the delayed character loading was introduced where an API or macro trying to access an ability on a character sheet that hasn't been opened in the UI yet acts like the ability doesn't exist. It doesn't seem to trigger the game to fully load the character, so the API can't find these resources.
1663048515
Victor B.
Pro
Sheet Author
API Scripter
The Aaron, you have to push Roll20 to get more granular in their categorizing of APIs.&nbsp; Right now there's too many broad strokes, so individual API issues won't really make this list.&nbsp;&nbsp; Go to Roll20 and find the major APIs being used, other than yours because yours are always being used, and include them in the list.&nbsp; Your approach is too broad based.&nbsp; Start with the big ones, then narrow down from there.&nbsp;&nbsp;
1663048584

Edited 1663049109
Victor B.
Pro
Sheet Author
API Scripter
And if general architecture issues are reported, then great.&nbsp; That will be broad based and not api specific.&nbsp; Otherwise focus on big fish and then move down the food chain.&nbsp;&nbsp;
1663081653

Edited 1663082567
Oosh
Sheet Author
Is there a suggestion in there, Victor? I don't actually understand what you're saying. Are you suggesting that individual user scripts need to be fixed by Roll 20? Or do you mean the actual API needs more granularity, the sandbox layer functions our scripts use to communicate with firebase, like findObjs()? I'm not quite following...
1663088035
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
I think the idea is that the categories in the One Click need to be more granular.
1663443308
The Aaron
Forum Champion
API Scripter
Kurt, I'm going to need to try and get some concrete reproductions of those to add them to my list, but I think they're something good to track down.
1663453298
Kurt J.
Pro
API Scripter
The Aaron said: Kurt, I'm going to need to try and get some concrete reproductions of those to add them to my list, but I think they're something good to track down. For the second one (late loading issue), this works every time for me to reproduce. Doesn't even need the API: Launch a game Add a new character to the game (I called mine MacroTest) On the MacroTest character, make an ability. I called mine "Say-Hello" that just has the word "Hello" in it. In the chat window, get the character id of the character (ie, @{MacroTest|character_id}) Create a button to run the ability ([Test](~-NCCU4eSfwLr4hPrTBsC|Say-Hello)) using the character ID from #4 above Clicking this button will work fine. Exit the game with all players Launch the game Recreate the button exactly as above (ie,&nbsp;[Test](~-NCCU4eSfwLr4hPrTBsC|Say-Hello) in chat) Clicking this button will report "No ability was found for %{-NCCU4eSfwLr4hPrTBsC|Say-Hello}" Open the character sheet for MacroTest Click the already existing button in chat or make a new one... now it works fine I'll put together a simple API example for the other issue, but the one above happens to me reliably. Interestingly when trying to recreate this I noticed that if I use the character name to create the button, it works ( [Test](~MacroTest|Say-Hello) and the by-id buttons work after that as well, so it seems the use of the name to look up abilities triggers the character to load into the game, but going by ID does not.
1663470914
Liam
Pro
Here's a parity issue, particularly in the 5e OGL sheet: If you have whisper/advantage toggle enabled (wtype and rtype attributes respectively, which you can set), you can change the whisper toggle between public/gm and the advantage toggle between advantage/normal/disadvantage. This state cannot be set through the API.
1663474991
The Aaron
Forum Champion
API Scripter
When you say "cannot be set through the api" do you mean it's a missing feature of the script (not what I'm collecting) or a missing capability of the Mod Sandbox (what I'm looking for)?
1663476696
Liam said: Here's a parity issue, particularly in the 5e OGL sheet: If you have whisper/advantage toggle enabled (wtype and rtype attributes respectively, which you can set), you can change the whisper toggle between public/gm and the advantage toggle between advantage/normal/disadvantage. This state cannot be set through the API. The advantage toggle state and whisper toggle state can &nbsp;be set through the API, as they are simply sheetworker created attributes on the 5E sheet.&nbsp;&nbsp; When you change the 'Roll Queries' setting on the Character Sheet tab (clicking on the small 'Cog' icon), you get 4 choices, which each update the 'rtype' attribute: Always Roll Advantage {{always=1}} {{r2=[[@{d20} Advantage Toggle @{advantagetoggle} Query Advantage @{queryadvantage} Never Roll Advantage&nbsp; {{normal=1}} {{r2=[[0d20 The Advantage Toggle changes the 'advantagetoggle' attribute to look like this: Advantage {{query=1}} {{advantage=1}} {{r2=[[@{d20} Normal {{query=1}} {{normal=1}} {{r2=[[0d20 Disadvantage {{query=1}} {{disadvantage=1}} {{r2=[[@{d20} The 'queryadvantage' attribute looks like this: {{query=1}} ?{Advantage?|Normal Roll,&amp;#123&amp;#123normal=1&amp;#125&amp;#125 &amp;#123&amp;#123r2=[[0d20|Advantage,&amp;#123&amp;#123advantage=1&amp;#125&amp;#125 &amp;#123&amp;#123r2=[[@{d20}|Disadvantage,&amp;#123&amp;#123disadvantage=1&amp;#125&amp;#125 &amp;#123&amp;#123r2=[[@{d20}} The whisper settings are similar.&nbsp; When you change the 'Roll Queries' setting on the Character Sheet tab , you get 4 choices, which each update the 'wtype' attribute: Never Whisper Rolls Whisper Toggle @{whispertoggle} Query Whisper&nbsp; ?{Whisper?|Public Roll,|Whisper Roll,/w gm } Always Whisper Rolls /w gm&nbsp; The 'whispertoggle' attribute looks like this: Public Whisper /w gm&nbsp; So if you were going to use ChatSetAttr to set the Whisper setting to Toggle, and also wanted to set the specific toggle setting to Whisper, you'd have to set 'wtype' to&nbsp; @{whispertoggle} &nbsp;a nd&nbsp; 'whispertoggle' to&nbsp; /w gm&nbsp; . If you want to use ChatSetAttr to set the Roll setting to Toggle, and the specific toggle setting to Advantage, you'd have to set the 'rtype' to&nbsp; @{advantagetoggle} &nbsp;and&nbsp; 'advantagetoggle' to&nbsp; {{query=1}} {{advantage=1}} {{r2=[[@{d20} .
1663483369

Edited 1663483556
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Kurt J. said: The Aaron said: Kurt, I'm going to need to try and get some concrete reproductions of those to add them to my list, but I think they're something good to track down. For the second one (late loading issue), this works every time for me to reproduce. Doesn't even need the API: Launch a game Add a new character to the game (I called mine MacroTest) On the MacroTest character, make an ability. I called mine "Say-Hello" that just has the word "Hello" in it. In the chat window, get the character id of the character (ie, @{MacroTest|character_id}) Create a button to run the ability ([Test](~-NCCU4eSfwLr4hPrTBsC|Say-Hello)) using the character ID from #4 above Clicking this button will work fine. Exit the game with all players Launch the game Recreate the button exactly as above (ie,&nbsp;[Test](~-NCCU4eSfwLr4hPrTBsC|Say-Hello) in chat) Clicking this button will report "No ability was found for %{-NCCU4eSfwLr4hPrTBsC|Say-Hello}" Open the character sheet for MacroTest Click the already existing button in chat or make a new one... now it works fine I'll put together a simple API example for the other issue, but the one above happens to me reliably. Interestingly when trying to recreate this I noticed that if I use the character name to create the button, it works ( [Test](~MacroTest|Say-Hello) and the by-id buttons work after that as well, so it seems the use of the name to look up abilities triggers the character to load into the game, but going by ID does not. Confirmed. The character has to be opened at least once for that construction to work. Name, yes. ID, no.
1663520509
Kraynic
Pro
Sheet Author
Kurt J. said: Interestingly when trying to recreate this I noticed that if I use the character name to create the button, it works That may be somewhat my fault...&nbsp; I reported this while lazy loading was still on the dev server.&nbsp; At that time, none of my macro sheets worked without opening the sheet to the Attributes &amp; Abilities tab (it had to be that tab at the time).&nbsp; I reported it fixed after they made a change, but I always use the sheet name the macro comes from when constructing my chat menus, so I never caught that other forms of constructing the menus weren't working.
1663521826
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Using the ID does work without opening the character first on a character Ability. It appears to be Collections macros and macros just entered into chat that have this issue. In most cases, code that refers to a specific character by ID is better suited to be an Ability (there are exceptions), so the problem probably doesn't affect too many people. Especially weighed against the exceptional advantage granted by Lazy Loading.
1664199754
From someone who's a long time coder taking a look at the API for the first time, my biggest request would be for the documentation to be updated to be de-obfuscated and made legible at a glance.&nbsp; Giving the function header by itself so you can see at a glance what parameters are passed into it, then the description for each parameter separate to that would be quite helpful. As an example of some fairly hard to read documentation, the createObj() global function has this in it: TYPE(String)&nbsp;The type of&nbsp;Roll20 object&nbsp;to create. Only 'graphic', 'text', 'path', 'character', 'ability', 'attribute', 'handout', 'rollabletable', 'tableitem', and 'macro' may be created.ATTRIBUTES(Object)&nbsp;The initial values to use for the&nbsp;Roll20 object's&nbsp;properties. Particularly confusing from a programmer's perspective is the baffling lack of space after fullstops in the sentences, leading to "created.ATTRIBUTES(Object)" looking, at a glance, like something to do with calling the ATTRIBUTES function of the 'created' object with the 'Object' parameter passed to it.
1664204824
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Where are you quoting that from? That does not look like the wording of the Wiki or the Help Center.
1664242039
Oosh
Sheet Author
Yeah, no idea where you're pulling that documentation from, but the wiki is definitely the best place to look. The Help Center text is mostly ripped straight from the wiki, but it looks worse. As Keith said, neither of those sources match what you've quoted.
1664256017

Edited 1664256303
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
It looks like a raw text rip of the wiki's function documentation page , with all the formatting ripped out. Without the formatting and new lines, it would indeed be very difficult to parse. Hopefully there isn't a wiki or help center page with the unformatted content on it.
1666971090
Parity Issue: ability to set the alpha channel (transparency) for colors It is possible to set the alpha for a color on tokens manually (e.g. the token's aura), but this is not available to Mod scripts&nbsp;