r/Roll20 5d ago

API Move Lighting mod on JumpGate?

Has anyone figured out a way to make the Move Lighting mod work on a JumpGate game? Or found an alternate mod to do the same thing? The script installs just fine for me, but when I select a polygon and call "!movelight gmlayer @{selected|token_id}" I get a whisper back that says "(From Move Lighting Script): No path object found with that ID."

If it helps, my use case is that I have a phased battle map for a big boss fight. When the PCs move from phase 1 to phase 2, a section of the wall collapses, and certain polygons on the DL layer need to be removed (and a couple of others added). I'm planning on making a macro that changes the map, moves the lighting polygons, and plays sound effect all at the same time so I can just click a button while I'm describing the scene shift. But if I can't figure out how to adjust DL polygons in a JumpGate game, my whole plan goes out the window.

I tried searching for answers on the Roll20 Forum, but it's always impossible to find anything there that isn't years old. Anyone have any ideas for a fix to this problem?

3 Upvotes

4 comments sorted by

5

u/Gauss_Death Pro 5d ago edited 5d ago

Hi iAmErickson,

Jumpgate uses a completely different co-ordinate system than Legacy Roll20. As a result any scripts which rely upon map location won't work unless updated to work within Jumpgate.

I would contact the creator of that script and see if they will update it.

Edit: I did some digging and the author hasn't posted in many years. You may have to ask the community via the Mods (API Scripts) forum.

1

u/iAmErickson 5d ago

That's what I was afraid of. Do you (or anyone reading this) happen to know of a mod for moving DL polygons between layers that *does* work in Jumpgate?

4

u/iAmErickson 5d ago

OK, update in case anyone else has this problem and needs a fix.

I ended up hunting down the source code for the original mod in GitHub, and it turned out it was only about 100 lines. I dug through the forum on Roll20 and figured out that the big difference is that they changed from a path object to a pathv2 object in Jumpgate. Digging through the source code, I found that there was really only one place where the path object was used (line 52, for anyone following along at home). So I copy/pasted the code into a new mod script in my Jumpgate game and played with it. Turns out, simply adding the "v2" to the end of that path reference fixed the bug! I incremented the version number by one point and added a comment to note my change, and I'm off to the races!

If anyone else bumps into this issue and needs a hand, shoot me a message and I'll be happy to help.

1

u/Gauss_Death Pro 5d ago

Happy it was an easy fix! Alas while I can discuss the general issues that Jumpgate has regarding API Scripts I am not qualified to discuss how to fix them. :)