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

[Guide] ScenarioSwitcher Token Switching

1522159532

Edited 1523112714
This is a written guide to the Script called&nbsp;ScenarioSwitcher. It teaches switching tokens and dynamic layer walls. The script post itself is found at: <a href="https://app.roll20.net/forum/post/6217778/script-s" rel="nofollow">https://app.roll20.net/forum/post/6217778/script-s</a>... This guide was originally written be the user G G. I approve of this guide, and thank G G for his amazing help :) BASIC INFO This script can be used to activate and deactivate dynamic lighting walls, and to move tokens from the Dynamic Light Layer to the object/map/gm layer, and vice-versa. After the installation process, the script creates a character named ScenarioSwitcher, which holds macros needed by the script. The script requires the user to set-up&nbsp; Command Tokens . To create a Command Token, use any token you like, and set its Represents field to the ScenarioSwitcher character. This activates the token action .Switch , which you'll be using later. Please name the command token using the format: ScenarioSwitcher* [the name you want] An Example would be: ScenarioSwitcher* Castle of the Bat You then need to set up bar1_value and bar1_max . Those are the only two other things that matter on the command token. Bar1 Value tells the script which type of switch this command token is for: #DL# - for manipulating dynamic lighting walls object_layer - for switching tokens between DL layer and object layer. map_layer - for switching tokens between DL layer and map layer. gm_layer - for switching tokens between DL layer and gm layer. Bar1_Max creates the dropdown menu that appears when you click .Switch , and sets up what actions this particular command token can do. The format is as follows: Description1,Value1|Description2,Value2|Description3,Value3 and so on for as many descriptions and values as you need. The Description is what appears in the Dropdown when you click .Switch. To understand the Value, read on. TOKEN HIDE/SHOW Let's say you want to hide creatures on the DL layer and move them to the token layer, when needed. Maybe you have an encounter where the players will be raiding a bandit camp, and during the fight, a Gryphon will appear. first you set up the inital tokens: lets say you have 3 bandits (numbers 1, 2, and 3), a bandit leader, and their pet bear. You need to pick a single Value for this group. Lets say you pick Bandit. You'd add that word to the Bar1 of each of these tokens . Since the Gryphon's arrival is a separate event, you give it another value and add the word Gryphon to its Bar1. Now you need to set up the Command Token. You'd enter object_layer in its Bar1, and in bar1_max , put something like this: A Gryphon attacks,Gryphon|Some Bandits appear,Bandit Now the important elements are the Values. In this case, we have two values: Gryphon, and Bandit Now the token has a Token Action, .Switch. When you click that, you get a dropdown button with the above items as entries: "A Gryphon Attacks" and "Some bandits appear". If you select "some bandits appear", all the tokens with the word Bandit in their bar1 will be moved to the object layer; if they are there already, they will instead by moved back to the DL layer. Note that the creature token's name is unimportant. You could have 4 tokens, names Bandit 1, Bandit 2, Bandit Leader, and Pet Bear. As long as each has the word Bandit in their Bar1, and the command token has a matching entry (with Bandit as a value), all 4 of these tokens appear when that entry is triggered. So you can use this to set up encounter opponents quickly. Hide all the enemies on the DL layer, and use the .Switch action to pop the ones you want on to the object layer to fight the pcs, and when done with them, hide them again. The same process can be used for background map features, just create another command token, and put "map_layer" in its Bar1. The guide video has a good example of how to use this to create weather effects. The video is at: <a href="https://youtu.be/TCPH_s5p-rc" rel="nofollow">https://youtu.be/TCPH_s5p-rc</a> DYNAMIC LIGHTING Dynamic lighting paths are not tokens, and do not have a bar1. So you have to use a different method to activate them. Each has a colour, in standard Hex format , for example: #ff0000. So create the paths you need, and take note of their colours . This will be the Value used in the Command Token. Create a Command Token, and set #DL# as its bar1. Set up the description something like: The Vault's Secret Door,#ff7766|The shadow blocking the hidden alcove,#ff0000 Any paths with matching colours will be moved by the script. The videos show this working really well: youtube.com/watch?v=rxjLDgoITlo& INACTIVE ENTRIES AND DUPLICATE TOKENS If you use "-" as the value, the script ignores it. So you can set up dummy actions; using the example above: A Gryphon attacks,Gryphon|Some Bandits appear,Bandit|Just a placeholder,- In this case, clicking Just a Placeholder will do nothing: the script will not search for tokens with "-" in their bars. This is handy to solve a problem: If you have IDENTICAL command tokens in different pages , the script will not be reliable. It uses the first token it finds with that text, and might pick the one on the wrong map. An easy fix to this is to add a dummy entry with the map name . So if that creature command token was on a map named GryphonLair , you would change the text to: A Gryphon attacks,Gryphon|Some Bandits appear,Bandit|GryphonLair,- This ensures that Command Tokens will be unique. ON CORRECT FLAGGING The Command Token's bar1_max is used to create the dropdown entry, and is in the form of Description,Value| pairs. It's VITAL that you do not include any extra spaces in the value section: between the , and | or at the in the value text. This is bad: A Gryphon attacks, Gryphon|Some Bandits appear,Bandit |Just a placeholder, - This is good: A Gryphon attacks ,Gryphon| Some Bandits appear ,Bandit|Just a placeholder ,- This is also fine A Gryphon attacks ,Big_Gryphon| Some Bandits appear ,Bandit|Just a placeholder ,- You can include spaces at the start and end of the Description, but not at the start or end of the Value. FEEDBACK AND QUESTIONS All Feedback, questions and suggestions are welcome. Post them under the original post for the script , or if that thread gets closed create a new post and add [gui8312] and [ScenarioSwitcher] to the post.
1522261987

Edited 1522278530
GiGs
Pro
Sheet Author
API Scripter
Edit: Guide has been removed and incorporated in the above post.
1522267456

Edited 1522277424
@ G G oh wow! going to read the guide now, but first of all: that is amazing! thank you so much for taking the time :)
1522273818

Edited 1522288875
Reworked guide, based on G G's guide: ---- [removed to keep post clean, guide can be found on top of this page]
1522274128
GiGs
Pro
Sheet Author
API Scripter
It looks very well written! ;)
ah cool you already saw it. Can I use this guide, in a post of mine? This way I can update if needed. I will credit you, of course :)
1522276195
GiGs
Pro
Sheet Author
API Scripter
Yes, you have my blessing.
could you please delete your original guide? I just do not want users to see both the corrected guide and your original guide (as it includes some mistakes).
1522277225

Edited 1522277471
GiGs
Pro
Sheet Author
API Scripter
What were the mistakes btw? edit: I see it uses the dynamic layer to store the tokens, not gm layer as I assumed. was there anything else? The guide currently says ======== Bar1 Value tells the script which type of movement this token is for: #DL# - for manipulating dynamic lighting walls object_layer - for switching tokens between DL layer and object layer. map_layer - for switching tokens between DL layer and map layer. gm_layer - for switching tokens between DL layer and gm layer. ================ shouldn't this be: Bar1 Value tells the script which type of movement this token is for: #DL# - for manipulating dynamic lighting walls object_layer - for switching tokens between DL layer and object layer. map_layer - for switching tokens between DL layer and map layer. empty or anything else&nbsp; - for switching tokens between DL layer and gm layer.
the main one would be that the script works by switching tokens between the DL layer and other layers. you wrote it switches between GM and map/token layers. thats the main one. the rest was barely changed.
1522278219
GiGs
Pro
Sheet Author
API Scripter
So I see,&nbsp; i misunderstood that. See my edit two posts up. Also this makes me realise I omitted something the token setup section. I'd add this to the end of the guide. (Assuming the behaviour I describe is correct!) ADDENDUM: TOKEN LAYER SETUP You'll find it simplest to place tokens you plan to use with this script on the dynamic lighting layer. But for reference, here's the behaviour you'll see: Remember that each Command Token that moves tokens has one of three layers: object_layer , map_layer , or gm_layer . We shall call this the destination layer . If a token is on its destination layer , running the script will move it to DL layer . If it is on any layer other than destination or DL layer, running the script will move it to its destination layer . So, if you forget to place creatures on the correct layer, running the script once or twice will get them out of sight on the DL layer.
G G said: What were the mistakes btw? edit: I see it uses the dynamic layer to store the tokens, not gm layer as I assumed. was there anything else? The guide currently says ======== Bar1 Value tells the script which type of movement this token is for: #DL# - for manipulating dynamic lighting walls object_layer - for switching tokens between DL layer and object layer. map_layer - for switching tokens between DL layer and map layer. gm_layer - for switching tokens between DL layer and gm layer. ================ shouldn't this be: Bar1 Value tells the script which type of movement this token is for: #DL# - for manipulating dynamic lighting walls object_layer - for switching tokens between DL layer and object layer. map_layer - for switching tokens between DL layer and map layer. empty or anything else&nbsp; - for switching tokens between DL layer and gm layer. I tried to keep it simple, but you are indeed correct, it defaults to the gm layer. I will change it, better the way you said.
G G said: So I see,&nbsp; i misunderstood that. See my edit two posts up. Also this makes me realise I omitted something the token setup section. I'd add this to the end of the guide. (Assuming the behaviour I describe is correct!) ADDENDUM: TOKEN LAYER SETUP You'll find it simplest to place tokens you plan to use with this script on the dynamic lighting layer. But for reference, here's the behaviour you'll see: Remember that each Command Token that moves tokens has one of three layers: object_layer , map_layer , or gm_layer . We shall call this the destination layer . If a token is on its destination layer , running the script will move it to DL layer . If it is on any layer other than destination or DL layer, running the script will move it to its destination layer . So, if you forget to place creatures on the correct layer, running the script once or twice will get them out of sight on the DL layer. that is more or less how it works, yes. but I will leave the guide like it is - keeping it as simple as possible :)
so has anybody actually used this and how simple has it been for them to set up and make work in the campaign?&nbsp; I will probably make a stab at it in the next couple of weeks, but at first glance, it looks like there is quite a bit of setup to make it work.&nbsp; I primarily want it to open doors in my game.
1525148020
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Try&nbsp; SimpleDoorControls , a nice script by Three of Swords, and The Aaron.&nbsp; I tried Matt's Door Script for a while, but I liked this because I didn't need all the extras the other script came with, like automatic traps and so forth. I have installed Scenario Switcher, and intend to give it a through testing on a trap-intensive kobold lair I'm building, but that won't be for a while, yet.
1525148746
GiGs
Pro
Sheet Author
API Scripter
I've used it. I think it's pretty easy to set up if you follow the instructions. I wrote the original version of the guide because I was trying to figure out how the various bits worked together and what the script did, but it's a lot simpler than it seems. I am assuming you mean you want to use it for dynamic lighting, opening areas and closing them again so players can see. Once you have installed the script, all you need to do to get it working: Add a door. Give it a unique colour. Lets say you pick #ff0000 Add a token to use as Command token: set its represents field to the ScenarioSwitcher character, and in its Bar1 put #DL# In the command token's Bar1_Max, put a description like this: The hidden alcove,#ff0000 The text before the comma is a description to remind you which door this is. The number after the comma is the identifying colour. If you have multiple doors on the map, you can chain them together, separated by | 's, like so: The Vault's Secret Door,#ff7766|The hidden alcove,#ff0000 Now, the command token has a token action: . Switch . When you click that, you'll get a dropdown menu, and each item in the list will appear. This one would show two entries: The Vault's Secret Door , and The hidden Alcove .&nbsp;You select one, and that door (or all doors of the same color) get 'opened' if currently closed, or 'closed' if currently open. Reading this description of how to set it up takes longer than actually setting it up,&nbsp;especially once you've done it once or twice.&nbsp;
1525175893

Edited 1525176070
Thanks for the replies guys!&nbsp; @Omegaman after using the script for a while, I would say that the script has potential, and it can create pretty great results. When you get used to it you only need a few seconds to set things up for each scenario. Of course I am a bit biased as I wrote the script myself and therefore know how to use it very well. Anyway, what really matters is you have a great time, maybe check out the other scripts too, if all you want is doors switching. This script is quite broad in its focus, and maybe something more specific will be easier for your situation.
Hmm I am not sure if this was the script or not but I am looking to manipulate the dynamic lighting and forgot how in an open field map, there is a 2 story building. Few important enemies NPC hiding behind the building and 1 on the roof. So Obviously I want to add a dynamic lighting around the building so they can't see behind the building. Now my players brought a ladder and 1 of them wants to go on the roof. First off, how do I give my players access to see the NPC on the roof? Once 1 of my PC is on the roof, how do I give him access to see the ground where all the pc and npcs are at, since he is inside the dynamic lighting wall.
1526076321

Edited 1526076427
You can manipulate DL with this script :) now, regarding your specific case. you should create a dynamic light wall around the house, taking care to pick a colour not used anywhere else on the page's DL walls.&nbsp;Note down the hex colour of the wall you just created.&nbsp; The script is able to switch this DL wall on and off when setup is done, which means, when the player takes a ladder, the DL wall around the house walls should be switched from on to off (party starts off with the house walls blocking the view, but then they can suddenly see over the roof). As al players are down again you can switch the walls back on. use the guide to help through the setup: you should follow the instructions under the basic info section, followed by the Dynamic light section. any more questions, just ask!
gui - a group of 5, only 1 goes up, I want him to see everything but the other 4 still had the building blocking the view.&nbsp; unless I am misunderstanding you, this would affectly allow the 4 players on the ground to now see through the building walls
Oh, the script can only toggle the view for all at the same time, if they are in the same page. I normally consider that players can always communicate, so they can share what they see. It is not ideal, but player specific DL is not possible I think, because of the roll20 platform itself.