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 .
×
May your rolls be merry + bright! 🎄
Create a free account

move tokens from the DL layer

I've been playing with token-mod, and cant find a way to take a drawing of a wall in the DL layer to the gmlayer, so it ceases to obscure light or/and prevent passage. Whether I select the shape in the DL layer or start by naming its ID, there is just no way to make it work. Also, it might have a link to the fact I am using UDLwindow. This the simple macro that does nothing : !token-mod --ids -MuRmZf3Al7vPxrvGZzA --set layer|gmlayer What's wrong ?
1644415761

Edited 1644420569
Eric E. said: I've been playing with token-mod, and cant find a way to take a drawing of a wall in the DL layer to the gmlayer, so it ceases to obscure light or/and prevent passage. Whether I select the shape in the DL layer or start by naming its ID, there is just no way to make it work. Also, it might have a link to the fact I am using UDLwindow. This the simple macro that does nothing : !token-mod --ids -MuRmZf3Al7vPxrvGZzA --set layer|gmlayer What's wrong ? It's possible to move the drawings on the DL layer, but unless Aaron has updated TokenMod, I believe you need a different API. Here's a thread where we discuss options. This ability is built into some of the full-featured door managing scripts, but I usually prefer simpler methods with a lower setup cost. How to move drawn lines on the DL Layer. to GM layer: !movelight gmlayer -M6vpypwKC2-LzGJr3RS -LJdaF9LwaqkFmTmA0uC to DL Layer: !movelight walls -M6vre7ctu7KWgV94FyR -M6vriHPBmriVdd42EIx to objects Layer: !movelight objects -M6vre7ctu7KWgV94FyR -M6vriHPBmriVdd42EIx to map Layer: !movelight map -M6vre7ctu7KWgV94FyR -M6vriHPBmriVdd42EIx // By: Kastion // Contact: <a href="https://app.roll20.net/users/3173313/kastion" rel="nofollow">https://app.roll20.net/users/3173313/kastion</a> var moveLighting = moveLighting || (function(){ 'use strict'; var showHelp = function() { sendChat('Move Lighting Script', '/w gm '+ '&lt;div style="border: 1px solid black; background-color: white; padding: 3px 3px;"&gt;'+ '&lt;div style="font-weight: bold; border-bottom: 1px solid black;font-size: 130%;"&gt;'+ 'moveLighting'+ '&lt;div style="clear: both"&gt;&lt;/div&gt;'+ '&lt;/div&gt;'+ '&lt;div style="padding-left:10px;margin-bottom:3px;"&gt;'+ '&lt;p&gt;Allows the GM to move what layer a lighting path is on.&lt;/p&gt;'+ '&lt;/div&gt;'+ '&lt;b&gt;Commands&lt;/b&gt;'+ '&lt;div style="padding-left:10px;"&gt;&lt;b&gt;&lt;span style="font-family: serif;"&gt;!movelight [layer] [ID]&lt;/span&gt;&lt;/b&gt;'+ '&lt;div style="padding-left: 10px;padding-right:20px; font-size:12px;"&gt;'+ 'Valid Layer Options Are: map, objects, gmlayer, walls'+ '&lt;/div&gt;'+ '&lt;/div&gt;' ); }, handleInput = function(msg) { if ( "api" !== msg.type || !playerIsGM(msg.playerid) ) { return; } let args = msg.content.split(/\s+/); switch(args.shift()) { case '!movelight': { let valid_layer = 0; let new_layer = args.shift(); switch (new_layer) { case "gmlayer": case "walls": case "objects": case "map": valid_layer = 1; break; } if (valid_layer == 1) { args.map(id=&gt;getObj('path',id)) .filter(o =&gt; undefined !== o) .forEach(p =&gt; p.set({layer: new_layer})) ; } else { sendChat('Move Lighting Script', '/w gm Invalid Layer Specified.'); showHelp(); } break; } } }, checkInstall = function() { var script_version = "0.1.5"; if( ! state.moveLighting ) { state.moveLighting = { version: script_version }; } if (state.moveLighting.version != script_version) state.moveLighting.version = script_version; log("-=&gt; Move Lighting Script v"+state.moveLighting.version+" Initialized &lt;=-"); }, registerEventHandlers = function() { on('chat:message', handleInput); }; return { CheckInstall: checkInstall, RegisterEventHandlers: registerEventHandlers }; }()); on("ready", function() { 'use strict'; moveLighting.CheckInstall(); moveLighting.RegisterEventHandlers(); });
Great ! Thanks a lot ! Perfect !
1644421092
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Just in case this is an A-B problem, are you trying to automate doors? If that is the case, the Door Knocker script does exactly what you are asking.
1644426809
The Aaron
Roll20 Production Team
API Scripter
And just for context, TokenMod only modifies Tokens, not Drawings or Text Objects.&nbsp; I've long considered making a more universal "Mod" script, but haven't had the opportunity to write it yet.&nbsp; =D
The Aaron said: And just for context, TokenMod only modifies Tokens, not Drawings or Text Objects.&nbsp; I've long considered making a more universal "Mod" script, but haven't had the opportunity to write it yet.&nbsp; =D Could that explain a very strange bug I have, where I use a bump command on various token ids that have been "transformed" into drawings for size purposes. My whole macro works as predicted, except it also bumps a mummy token that is standing nearby !!!&nbsp;&nbsp;
keithcurtis said: Just in case this is an A-B problem, are you trying to automate doors? If that is the case, the Door Knocker script does exactly what you are asking. Possibly, but probably not quite. The PC takes an action and , Voilà, A statue disappears, is replaced by a &lt;whatever&gt;, a burst of magic happens here and there, and the window (light goes through, but prevents passage) disappears, freeing the way. So I really need a flexible way from DL layer to GMlayer. I will look at automate doors, I am curious as to what it can do. Thanks !
1644428076
The Aaron
Roll20 Production Team
API Scripter
Eric E. said: The Aaron said: And just for context, TokenMod only modifies Tokens, not Drawings or Text Objects.&nbsp; I've long considered making a more universal "Mod" script, but haven't had the opportunity to write it yet.&nbsp; =D Could that explain a very strange bug I have, where I use a bump command on various token ids that have been "transformed" into drawings for size purposes. My whole macro works as predicted, except it also bumps a mummy token that is standing nearby !!!&nbsp;&nbsp; Uh... that is strange.&nbsp; You're certain you don't have it selected?&nbsp; What are the token ids of the tokens being bumped? Maybe there's a weird duplicate?
Nope. Checked the duplicate. But I understand, I should add --ignore selected to make sure. I'll see if that changes something
I think you can also associate a drawing and a DL line together so when you put this drawing on the token layer for example (and i think it works on the map layer) then the drawing is blocking the view. That means you can have a real door drawing associated with a dl line and thus taking the door away removes the dl line at the same time. It's an Aaron script, i'm sure he'll be able to link the script here for reference.
1644512184

Edited 1644512262
The Aaron said: And just for context, TokenMod only modifies Tokens, not Drawings or Text Objects.&nbsp; I've long considered making a more universal "Mod" script, but haven't had the opportunity to write it yet.&nbsp; =D I would definitely like to see a re-thinking of tools for managing DL elements. There's so much potential there, but as far as I know the API are developed for certain types of game play moments (e.g. doors or traps), rather than as an agnostic Mod tool designed to provide DL control as such. Take the new isometric support for example - dynamic lighting on an iso map is just a different animal, and a Mod toolkit for "Complete DL Control [TM] "&nbsp; could do so many cool things for the gameplay experience, regardless of what visual experience the GM is trying to provide for players.
1644513478
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Could you elaborate? What specific things would you like such a tool to be able to do?
There are 2 api's of note that I utilize to achieve the OP's request.&nbsp; You could just color the lines the color of your locked or hidden doors, and manage it via the doorknocker api, or if its something like a raised platform or an encased window you could use one-way dynamic lighting api.&nbsp; Its old but specifically moves shapes that the players are within to the GM layer so that they remove blockage of sight.&nbsp; I actually renamed this script Vantage Point api and tweaked it a lil cause I find this very flashy to show off to players when they ask to climb a tree, jump on top of a roof, or jump on a wagon.&nbsp;&nbsp;