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, Update] Bump -- UDL Support!

1625950059

Edited 1625972364
The Aaron
Forum Champion
API Scripter
Bump Update v0.2.25 &nbsp;-- Added several command line parameters, including --ids to specify tokens to manipulate.&nbsp; Added an API Interface for other scripts. New arguments: --slave &nbsp;-- Acts like&nbsp; !bump-slave &nbsp;below. --push &nbsp;-- When used with&nbsp; --slave , if the selected token is on the Objects Layer, it will be pushed to the GM Layer. --unslave &nbsp;-- Acts like&nbsp; !bump-slave &nbsp;below. --ids &lt;token_id&gt; [&lt;token_id&gt; ...] &nbsp;-- Optional list of ids to perform the operation on. Useful for scripting events what reveal a whole swath of tokens. API Interface To require&nbsp; Bump &nbsp;for your script, add&nbsp; "Bump" &nbsp;to the&nbsp; "dependencies" &nbsp;property of your&nbsp; script.json : "dependencies": ["Bump"] Function Reference Bump.Bump(ids) Toggle the layer for each token represented by the ids in the array&nbsp; ids . Tokens not already slaved in Bump will be ignored. The array is not checked for duplicates. Bump.Slave(ids,push=false) Adds each token represented by the ids in the array&nbsp; ids &nbsp;to Bump. If&nbsp; push &nbsp;is true, tokens on the objects layer will be pushed to the GM layer when slaved. Bump.Unslave(ids) Removes each token represented by the ids in the array&nbsp; ids &nbsp;from Bump. Update v0.2.24 &nbsp;-- Added support for UDL, including night vision and other factors ( Thanks&nbsp; Craig M.&nbsp; ) Update v0.2.21 &nbsp;-- Added LDL Light Multiplier to copied attributes of the master token. (Thanks&nbsp; Craig M.&nbsp; ) Update v0.2.18 &nbsp;-- Added auto unslave and no bars to the configuration. Added Help: Bump handout. (Thanks&nbsp; Tod L. , &nbsp; Carl H. ,&nbsp; Joe ) Turning on Auto Unslave in the configuration will cause the slave token (often seen as a green aura) to be removed when you make a token visible by putting it on the TokenLayer.&nbsp; When paired with Auto Slave, this lets you stay pretty much only on the Token Layer and still control all your things. Turning on No Bars on Slave in the configuration will cause the Slave token to only mirror the current value in each bar, excluding the max value and not linking to the attribute.&nbsp; This lets you still adjust the values, but doesn't give you double bars, which is especially nice if you're using an alternate bar position/configuration (which the API currently has no access to). There is now a Help: Bump handout created and maintained with the current help for the script.&nbsp; (see latest TokenMod update for details on how that works). Update v0.2.17 &nbsp;-- Added the ability unslave tokens with the&nbsp; !bump-unslave &nbsp;command. (Thanks GenKitty!) Update v0.2.16 &nbsp;-- Will now force visibility of bars and auras off for players on each change to a token (master or slave). (Thanks&nbsp; Joe !) Update v0.2.14&nbsp; -- Fixed bug where names get turned on for slave tokens always.&nbsp; Now the slave token does not get a name if it's a GM only token, and only gets a name for player tokens if the master player token has its name turned on. (Thanks&nbsp; Jay R. !) Update v0.2.13&nbsp; -- Added support for players to Bump their tokens and see the invisible colored square to move around the map.&nbsp; Bumped player tokens won't be visible to players that can't control them (unless that rogue left his torch burning!).&nbsp; Additionally, you can not set Status Markers on the slave token for a bumped token.&nbsp; Setting a status that is on the master token will remove it, setting one that isn't will add it, and setting a status with a number will add that number to the status on the master.&nbsp; Status Markers are then cleared from the slave to preserve their invisibility. (Thanks&nbsp; Refugee !) Update v0.2.12 &nbsp;-- Fixed issue that prevented Bump from starting up.&nbsp; Update v0.2.7 &nbsp;-- Reverted a change to push the left margin of help into the space under chat avatars. &nbsp;Disabling chat avatars was truncating the help display down the left side. &nbsp;Also removed an unnecessary warning about !bump'ing a token that didn't have a slave. (Thanks&nbsp; Three of Swords !) Update v0.2.6&nbsp; -- Bump will now automatically repair and cleanup any broken associations with master and slave tokens on startup. &nbsp;Additionally, I have cleaned up a few crash bugs with missing objects. &nbsp;Finally, the help and configuration UI is updated and more thoroughly documented. Features Slave Token Aura &nbsp;-- The created Slave Token is invisible to the players, but also serves a useful purpose of reminding you which tokens support Bump and where they are. Created slave tokens have an aura visible to the GM only. They have one color when Master Token is visible to players (defaults to green) and another when the Master Token is invisible to players (defaults to purple). Mirrored Operations &nbsp;-- Moving, Rotating, Scaling, Flipping, Renaming, Tinting, and Last Move are all mirrored between Master and Slave! Mirrored Bubbles &nbsp;-- Whatever you have the Master Bars set to, the Slave Bars mirror. Change one, it changes the other. Got some invisible monsters in an AoE? No problem. This includes Bars that are linked to a character sheet, which brings me to... Mirrored Represents &nbsp;-- Need to do a save or make a skill check? Slave Tokens have the same Represents as their Master, so they have the same Token Action bar and shift double clicking brings up the character sheet! Commands: !bump &nbsp;-- Swaps places between a token and it's counterpart if it has been added to Bump. &nbsp;If&nbsp; Auto Slave &nbsp;is on, it will add the token to Bump if it isn't already in it. &nbsp;If&nbsp; Auto Push &nbsp;is on, it will also push it to the GM Layer if it is on the Objects layer. !bump-slave &nbsp;-- Puts the selected token in Bump if it isn't there already. &nbsp;If&nbsp; Auto Push &nbsp;is on, it will also move the token to the GM Layer if it is on the Objects layer. --push &nbsp;-- The optional --push argument to !bump-slave causes the token to also be pushed to the GM Layer as if&nbsp; Auto Push &nbsp;was on. Configuration Settings: GM Layer (Visible) Color &nbsp;-- Sets the color that a slave token shows when the associated master token is visible to players. The slave token will be on the GM Layer and the master token will be visible to players on the Objects Layer. &nbsp;Click the button showing the color to be prompted to enter a new color in HTML color format. &nbsp;Show's a checkerboard for transparent. Objects Layer (Invisible) Color &nbsp;-- Sets the color that a slave token shows when the associated master token is invisible to players. The slave token will be on the Objects Layer and the master token will be hidden from players on the GM Layer. Click the button showing the color to be prompted to enter a new color in HTML color format. Show's a checkerboard for transparent. Auto Push &nbsp;-- Causes adding a token to Bump to also automatically push it to the GM Layer if it isn't already there. [Default: Off] Auto Slave &nbsp;-- Causes using the !bump command on a token that isn't in Bump to add that token to Bump. &nbsp; Auto Push &nbsp;applies to this addition. &nbsp;[Default: Off] Previous Release Notes:&nbsp; <a href="https://app.roll20.net/forum/permalink/8584976/" rel="nofollow">https://app.roll20.net/forum/permalink/8584976/</a> Git:&nbsp; <a href="https://github.com/shdwjk/Roll20API/blob/master/Bu" rel="nofollow">https://github.com/shdwjk/Roll20API/blob/master/Bu</a>... Support my work on If you use my scripts, want to contribute,&nbsp; and have the spare bucks to do so , go right ahead. However, please don't feel like you must contribute just to use them! I'd much rather have happy Roll20 users armed with my scripts than people not using them out of some sense of shame. Use them and be happy, completely guilt-free! Disclaimer:&nbsp; This Patreon campaign is not affiliated with Roll20; as such, contributions are voluntary and Roll20 cannot provide support or refunds for contributions.
1625956128
Awesome! Thanks!
1625956180
The Aaron
Forum Champion
API Scripter
No problem, thank YOU!&nbsp; &nbsp;Let me know if I missed anything, or if you think of other enhancements.&nbsp; =D
1625962789
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Happy to see this updated!
1625972374
The Aaron
Forum Champion
API Scripter
Update v0.2.25 &nbsp;-- Added several command line parameters, including --ids to specify tokens to manipulate.&nbsp; Added an API Interface for other scripts. New arguments: --slave &nbsp;-- Acts like&nbsp; !bump-slave &nbsp;below. --push &nbsp;-- When used with&nbsp; --slave , if the selected token is on the Objects Layer, it will be pushed to the GM Layer. --unslave &nbsp;-- Acts like&nbsp; !bump-slave &nbsp;below. --ids &lt;token_id&gt; [&lt;token_id&gt; ...] &nbsp;-- Optional list of ids to perform the operation on. Useful for scripting events what reveal a whole swath of tokens. API Interface To require&nbsp; Bump &nbsp;for your script, add&nbsp; "Bump" &nbsp;to the&nbsp; "dependencies" &nbsp;property of your&nbsp; script.json : "dependencies": ["Bump"] Function Reference Bump.Bump(ids) Toggle the layer for each token represented by the ids in the array&nbsp; ids . Tokens not already slaved in Bump will be ignored. The array is not checked for duplicates. Bump.Slave(ids,push=false) Adds each token represented by the ids in the array&nbsp; ids &nbsp;to Bump. If&nbsp; push &nbsp;is true, tokens on the objects layer will be pushed to the GM layer when slaved. Bump.Unslave(ids) Removes each token represented by the ids in the array&nbsp; ids &nbsp;from Bump.
1626556745
@The Aaron ... one enhancement I'd love to see, if possible... when my players bump themselves, they can no longer see their name in the turn tracker (obviously I can). Is there some way to preserve their presence in the turn tracker if they roll for initiative while bumped (or bump themselves mid-battle)? Thanks!
1626561913
The Aaron
Forum Champion
API Scripter
Hmm. There are some things I could do, I'll have to think about it. Ideally, I'd not want the other players to be able to see where they are, but they would be able to if I put the bumped slave in the turn order. I could love their actual token off the map and keep it on the objects layer so that it stays in the turn order, but they have a surrogate invisible token instead. That would take a bit of a rewrite, but sounds like a better method. I'll look into it.&nbsp;
1626711301
1627315660

Edited 1627317411
Seeing an issue with Bumped tokens not being able to see light shed by other tokens.&nbsp; In the case of dimming Night Vision, there are actually negative versions of the light levels (so, the inner ring of light shed by a Light spell token is black and the outer ring of the Light is grey.)&nbsp; Problem can be fixed by going into the "invisible" colored token and saving it without making any changes to the token settings, after which the light levels appear as expected. edited to add:&nbsp; This is under updated lighting, not legacy!
1627319727
The Aaron
Forum Champion
API Scripter
That is a bug with Roll20's handling of UDL for the API. I'll point it out and hopefully they can get it taken care of soon.&nbsp;
1627320488
Thanks for letting them know, at least there's a work-around in the meantime!
1631408583
Is there a way to use a different token as the slave/master other than the visible/invisible?
1631409370
The Aaron
Forum Champion
API Scripter
You'd need to edit the script, then you could. Be sure to use the thumb version of the image. If it's for a one-off situation, you could look at TokenCondition.&nbsp;
1631929712
Thanks!