Portal This script manages doors and windows (“portals”), allowing you to: Create portals on the map Lock / unlock them Toggle open/closed state Shutter / unshutter windows Hide / unhide doors Convert Doors and Windows from paths or pathv2 objects Bulk-select and modify portal Properties [ Video Demo ] Base Command: !portal This will bring up a control panel in chat. The script can be almost entirely operated through this interface, but the commands and action of the script are detailed below. Conversion Commands --convertwindow — Convert selected doors or paths into windows. --convertdoor — Convert selected windows or paths into doors. --convertall — Apply the same conversion to all similar objects: Doors → all doors of same color Windows → all windows of same color Paths → all paths matching color and barrierType Attribute Commands Format: --attributeName|value Values are case-insensitive. Booleans accept: true: true, yes, on false: false, no, off flip: toggles true/false Common Door/Window Attributes --isLocked|true/false/flip --isOpen|true/false/flip --isSecret|true/false/flip --isShuttered|true/false/flip --color|#rrggbb --color|default — sets selected doors or windows to Roll20 defaults Position Attributes Use + or − prefixes for relative moves: --x|100 — set position --x|+20 — move right 20 units --x|-20 — move left 20 units --y|100 — set position --y|+10 — move down 10 units Note: All Y and Y values are figured with the top left corned of the map being (0,0), and positive values increasing toward the lower right, to conform with how graphics are handled. Path Handling Only paths with exactly two endpoints are converted. Paths with more points are skipped and noted in chat. Position is taken from the path endpoints. General Rules All commands are case-insensitive. All provided attributes apply to every selected object. Missing attributes (e.g., isSecret on windows) are ignored. Examples !portal --convertwindow !portal --isLocked|true !portal --isLocked|flip --isOpen|false !portal --x|+20 --y|-10 !portal --convertwindow --color|#FF00FF --isLocked|true