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

New API Keys

1622747119

Edited 1622747539
Corey J.
Roll20 Team
Hello API developers and enthusiasts! We have a number of exciting updates to the API for you to go over. These additional keys have been long requested: Token Bar Location - ‘bar_location’ Bar Styling - ‘compact_bar’ Page   Play on Load - ‘jukeboxtrigger’ For Updated Dynamic Lighting, we have added support for the following: Token Light Multiplier - ‘light_sensitivity_multiplier’, Night Vision Effect - ‘night_vision_effect’ The following two keys are the same from the Legacy Lighting API but we thought it was worth mentioning again:  Page Update on Token Drop - ‘lightupdatedrop‘ GM Darkness Opacity - ‘fog_opacity’ And we made a lot of under the hood changes to UDL over the past few months so tokens should be able to update their light renders without the need to restart the page or use the key we added a few months back. So this is a notice that we will be deprecating the key ‘force_lighting_refresh’ in the upcoming months.. We’ve updated all of our Help Center articles to reflect these changes, so you can use those pages for reference. Cheers!
1622747481
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
That is awesome and very welcome news!
1622747872
The Aaron
Forum Champion
API Scripter
The token properties are now supported in TokenMod!&nbsp;&nbsp; <a href="https://app.roll20.net/forum/post/4225825/script-update-tokenmod-an-interface-to-adjusting-properties-of-a-token-from-a-macro-or-the-chat-area/?pageforid=10136003#post-10136003" rel="nofollow">https://app.roll20.net/forum/post/4225825/script-update-tokenmod-an-interface-to-adjusting-properties-of-a-token-from-a-macro-or-the-chat-area/?pageforid=10136003#post-10136003</a> Also of note, the setdefaulttokens() API function now preserves all the above settings.
1622748517
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Woot! looking forward to using this!
1622749915
Gold
Forum Champion
Looking forward to using the API scripts that make use of this (For starters, I make regular use of TokenMod to configure Monster Tokens and PC tokens according to my standard desired settings, being able to switch a whole group of monster tokens to Compact Bar, Underneath &amp; Overlapping style, will be great.) Thanks Roll20 &amp; those who script Community API Scripts, snippits &amp; the one-click.
1622751078
David M.
Pro
API Scripter
Particularly excited about the bar location and style! Thank you!
1622752404
Thank you! It looks like my suggestion can be closed!
1622892695
Xeno
Pro
Super :) When do we get api access to the style/placement of the token bubbles? :)
Really, REALLY happy to see all of these but especially the&nbsp;light_sensitivity_multiplier!&nbsp;I have a neat lighting effect combining low light sensitivity and night vision that makes for great temporary obscured vision (like thick fog). Using between 1-10% sensitivity with 15/15 light sources gives them a minor halo effect (like it's piercing the fog) but the rest of the area stays obscured. It makes navigating easier for the player as they can keep a point of reference but can still blindly bump into walls and other obstacles. I was going to have to either set this by hand each time for each token or keep a second set of player tokens ready on the gm layer and switch out, but now I can add this to the API command that makes all the other changes and finish it out. Thanks guys! Looking forward to using it in the next session this week!
1623251435
The Aaron
Forum Champion
API Scripter
That sounds like a cool project!&nbsp; One thing to be aware of: light sensitivity is computed for the full view of a player, so if they have one token with 15% and one with 100%, the view will be as if all of them have 15%.&nbsp;&nbsp; Also, there's a minor bug right now where if you remove a token with a light sensitivity setting, it doesn't recalculate the sensitivity multiplier.&nbsp; you need to either set it back to 100% before deleting it, refresh the page, or set a different value on another token (or set it and set it back).
1623252802

Edited 1623252981
Thanks for the heads up! I'll definitely keep that second one in mind. But yeah, I've noticed a few quirks like that since I test with a dummy account that has vision through all the player's tokens. In practice though, each player only uses one each and I've been using force_lighting_refresh as a precaution for the time being. Hopefully that's enough to satisfy the pink kraken. :-) The only thing left to complete the illusion would be the ability to change the page's darkness color, like you can the background. Shifting it to white or a light gray would sell the "fog" feeling much more. But I won't get greedy, and be happy with this. :-D
1623253278

Edited 1623253350
The Aaron
Forum Champion
API Scripter
force_lighting_refresh doesn't actually do anything now, and probably will get removed as a property.&nbsp; (Corey posted that somewhere, I think.&nbsp; Edit: Here ) You could create a Path object and fill it with a transparent color like #ffffff99 to "white out" the scene.&nbsp; Just put it on the map layer sized for the area to affect and pulled to the front.
1623254445

Edited 1623254966
You can display paths over "darkness"? The only trick I know for doing something like that is giving the player control over a token and granting it vision to trick Roll20 into rendering it over everything else but use with a 0deg range, so it can't actually see (actually&nbsp;I think you're the one that suggested that to me a while back, it helped a lot! :-D) But then you have to use the object layer for vision to count and end up with the awkward situation where they can accidently select and move it. It works fine for temporary things that quickly get removed anyways (like message boxes or spell effects), but I learned not to use it for anything meant to be more permanent, like map decorations. Edit: Also, holy crap! I never knew you could add alpha values to the colors. That... opens a lot of doors for me... :-D
1623255795
Andreas J.
Forum Champion
Sheet Author
Translator
updated the references on the wiki, where all the api keys are on a single page: <a href="https://wiki.roll20.net/API:Objects" rel="nofollow">https://wiki.roll20.net/API:Objects</a>
1623257784
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Andreas J. said: updated the references on the wiki, where all the api keys are on a single page: <a href="https://wiki.roll20.net/API:Objects" rel="nofollow">https://wiki.roll20.net/API:Objects</a> Thank you!
1623274879
timmaugh
Pro
API Scripter
The token properties are now also supported in Fetch, making them available in the chat input line of any other script. Usage parameters here: <a href="https://app.roll20.net/forum/permalink/10151776/" rel="nofollow">https://app.roll20.net/forum/permalink/10151776/</a>
1624075269
Pat
Pro
API Scripter
The Aaron said: force_lighting_refresh doesn't actually do anything now, and probably will get removed as a property.&nbsp; (Corey posted that somewhere, I think.&nbsp; Edit: Here ) You could create a Path object and fill it with a transparent color like #ffffff99 to "white out" the scene.&nbsp; Just put it on the map layer sized for the area to affect and pulled to the front. I have a partially working version of just such a thing...&nbsp; <a href="https://app.roll20.net/forum/post/9631549/slug%7D" rel="nofollow">https://app.roll20.net/forum/post/9631549/slug%7D</a>
1624204976
Can the turn tracker window be given the option of being moved as an independent window - outside the map window?
1624216530
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Not to my knowledge, though you can double click on the header to minimize it.
1627080885
Corey J.
Roll20 Team
Hi All,&nbsp; Wanted to follow up and mention two things that affect the API from the release this week: The first was the introduction of the ' lightColor ' key. This Graphic key will allow a color to be added to bright and dim light for a token. It takes strings with hex color codes like "#0000FF".&nbsp; The second&nbsp; change we unshackled the dynamic lighting keys that were primarily only updating through controlled tokens. This means on object creation and updating values on the fly for lighting should just work in many cases. We have a few more key to fold in as David M. mentioned in the main bug thread here &nbsp;like the directional and bright light keys. So we'll keep you posted when we get those addressed.&nbsp; Have a good weekend!
1632145427
Andreas J.
Forum Champion
Sheet Author
Translator
The Sept. 8th changelog mentions: Added Pro API support for removed cards. Is this a new function or a bugfix to existing stuff? Was the documentation update? I see several API pages where edited Sept.1st...
1632240192
Corey J.
Roll20 Team
Hi @Andreas J.&nbsp; There were some new keys added to the 'deck' objects Key Default Value removedcardsmode 'choosefronts' removedcards 'none' And related we also added to the 'card' object Key Default Value is_removed false The is_removed flag&nbsp;marks them as "removed" which makes them not get recalled in the deck or show up in the discard pile, instead they show up in a "Removed Cards" section Andreas J. said: The Sept. 8th changelog mentions: Added Pro API support for removed cards. Is this a new function or a bugfix to existing stuff? Was the documentation update? I see several API pages where edited Sept.1st...
1632479220
That's nice thanks.
1632755735
Andreas J.
Forum Champion
Sheet Author
Translator
September 1, 2021 You can now change the the brightness of Dynamic Lighting Daylight Mode&nbsp; Adjust Dynamic Lighting Daylight Mode brightness with the Pro API What's the key &amp; values for this?
1632758505
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
daylightModeOpacity, with a value from 0 to 1. per this thread .
1632760496
Andreas J.
Forum Champion
Sheet Author
Translator
lol missed that I've already added it to the docs
1633837453
Thank you, that's amazing :D