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

[Script] Help for the new feature that just came : convert path to door&windows

1671171461

Edited 1671335328
Hi Everyone I heavily used Door Knocker on my side as a GM, and with what came, i had to do something to help convert "old" door&amp;windows to the new system. I have to thank the creator of Door Knocker( Scott C.h ) &nbsp;for the work he did as i started my work on his, and changed for what it is now but used it to learn some things meanwhile. Well, it's functional, it's my first Pull Request on roll20 so dunno if it'll be accepted as is but, i share you the (temporary ?) repository i made for it during the time <a href="https://github.com/groch/PathToWindowOrDoor/blob/main/PathToWindowOrDoor/1.0/PathToWindowOrDoor.js" rel="nofollow">https://github.com/groch/PathToWindowOrDoor/blob/main/PathToWindowOrDoor/1.0/PathToWindowOrDoor.js</a> i find it usefull to gain some time setting the new doors/windows as you can setup the color you need, and it create the door/window in the same place you trace your simple line (2 points) Using PathToWindowOrDoor This script is only meant to be used by the GM, only the help will be returned to other players. This script will convert all single-segment paths on dynamic lighting &amp; map layer (on a page or across the entire game) that match a specific color into either windows or doors, depending on the chosen command. For example: If the setting for hidden doors is the color green (#00ff00), then all single-segment green paths will be converted to a hidden door. You can configure the color relationship in the Bio tab of a character created by the script. BEWARE This script won't ask for confirmation, it will convert all single-segment paths on DL &amp; map layer which color correspond to configuration, if you want to limit scope, be sure to read next section. Default configuration : Hidden Doors: #00ff00 Locked Doors: #ff9900 Unlocked Doors: #ffff00 Windows: #00ffff Basic Command Syntax The script uses a standardized API command syntax. All PathToWindowOrDoor commands will begin with&nbsp; !ptwod . This will then be followed by a space a double dash preceding a keyword and options group. This looks like this: !ptwod --keyWord|option1|option2|... For example: By default you will convert on the current page all single-segment green, yellow and orange paths to the new doors by using the command !ptwod --convertDoors|page If the&nbsp; "|page" &nbsp;flag is omitted, then the script will convert all matching paths across the entire game Converting Windows Convert windows using the " !ptwod --convertWindows" &nbsp;or " !ptwod --convertWindows|page" &nbsp;commands Configured Windows segments converted as : Windows color =&gt; Roll20 Windows Locked by default Converting Doors Convert doors using the " !ptwod --convertDoors" &nbsp;or "! ptwod --convertDoors|page" &nbsp;commands Configured Doors segments converted as : Hidden color =&gt; Roll20 Secret doors Locked by default Locked color =&gt; Roll20 Locked doors Unlocked color =&gt; Normal Roll20 doors All doors are closed by default BEWARE , there is no confirmation, check your dynamic lighting layer wall colors &amp; the path/wall color configuration in the character created by the script (yeah i took that part from Door Knocker x) ) before sending the command, especially without the "|page" part hope it helps a person or two ! (and i hope that i tested enough so that there is no bug that show up too fast ^^') Feel free to comment/criticize x) (not on the logo part xD)
1671192944

Edited 1671192972
David M.
Pro
API Scripter
Interesting idea, Groch. I'd recommend being more explicit in your help as to how the script actually works.&nbsp; Something like: "This script will convert all single-segment dynamic lighting paths (on a page or across the entire game) that match a specific color into either windows or doors, depending on the chosen command. For example: If the setting for hidden doors is the color green ( #00ff00 ), then all single-segment green paths on the current page will be converted to a hidden door by using the command !ptwod --convertDoors|page If the "|page" flag is omitted, then the script will convert all matching paths across the entire game" etc. etc. __________________ For others reading this, the help is on the "Bio &amp; Info" tab of the "PathToWindowOrDoor UI" character sheet that the script generates during install. Calling up help prints a link to this sheet in chat, but note that the sheet defaults to opening on the "Character Sheet" tab. I missed this and decided to just start clicking buttons before finishing my first cup of coffee in the morning. I managed to convert 182 paths across my entire Test game into doors, lol. Luckily a test game, so NBD, but it might be good to put a warning in there somewhere. :)
thanks ! i'll try to improve the description and help, i was focused on delivering something that didnt bug and doing my first pull request so i was a bit stressed out XD
okay i updated the help to explain a bit better how it's used. Thanks for the wording, i took more or less what you advised David :)