VBL Stamps Being Slow

Developer discussion regarding MapTool 1.4

Moderators: dorpond, trevor, Azhrei

Forum rules
Posting now open to all registered forum users.
Post Reply
MaxAstro
Kobold
Posts: 2
Joined: Mon Nov 21, 2016 1:57 am

VBL Stamps Being Slow

Post by MaxAstro »

So I recently discovered that 1.4 exists, and the coolest feature for me is VBL token stamps. One of the main reasons for this is that I like caverns in my maps to have jagged, natural-looking edges. However, getting the VBL to conform to the edge of the cavern takes FOREVER. Single biggest time sink for me. T_T

So, I figured what I would do is, use photoshop to make an image that was a perfect outline of my map (took about five minutes), create a token with that image and overlay it on my map, and give that token a vbl stamp.

This worked perfectly, as far as blocking vision goes.

Unfortunately, it also makes token movement ~incredibly~ slow. If I replace the vbl stamp with normal vbl (blue, instead of yellow) the slowdown is much less noticeable. I tried using Bag of Tricks, which claims that the "VBL move check" feature helps with vbl-related lag. Sadly, it does not seem to help nearly enough in this case.

Is there a solution here? Am I just too far outside the intended use case of token VBL stamps?

User avatar
wolph42
Winter Wolph
Posts: 9999
Joined: Fri Mar 20, 2009 5:40 am
Location: Netherlands
Contact:

Re: VBL Stamps Being Slow

Post by wolph42 »

Hi,

What you encountered is a simple Maptool limitation. VBL will get an overhaul in the future, but for now it is what it is and 'high definition vbl' will bog the system down. Tip is to use as much straight lines as possible.

As for the speed:
- yellow VBL is by far the slowest, don't know why, but it is
- turning yellow into blue VBL (simple macro command) helps a LOT, but after that...it won't get any faster.
- BoT: the only thing it does (if you turn that feature on) is to make sure that NO vbl data is stored on tokens, you mainly notice this if tokens bog down in dragging 'after a while'.

If you want 'hi def' caves, you can best make the walls black and then use simple (so long straight lines) vbl, that way the vbl and the cave walls are both black and overall you don't see the difference.


Clever PS trick by the way!!

User avatar
aliasmask
RPTools Team
Posts: 9024
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: VBL Stamps Being Slow

Post by aliasmask »

I had the same problem. Things I did to help speed things up. First, I turned off the movement functions onTokenMove and onMultipleTokenMove. If you're using wolph's BoT there is a checkbot for that, otherwise I just rename the macros with a _ at the end. I then check the FoW: Expose only at waypoints. Limit your light sources to 1 or 2 if possible. I changed the yellow VBL to blue with a macro. (http://forums.rptools.net/viewtopic.php ... 13#p264711) Clear FOW token data every so often with ctrl-shift-o. Moving tokens went from 22 seconds to 4 seconds which was more tolerable.

User avatar
JamzTheMan
Great Wyrm
Posts: 1872
Joined: Mon May 10, 2010 12:59 pm
Location: Chicagoland
Contact:

Re: VBL Stamps Being Slow

Post by JamzTheMan »

Yes, tokenVBL is powerful but with great power comes great responsibility :)

tokenVBL is meant for "Moveable" VBL. So that means every time you move a token, MapTool says, "go get me all the VBL" which is basically one object. But now when that is called, it now says, "and go get me a list of all the tokens that have tokenVBL and add that to the area".

So
1. IF you have either a lot of token VBL or a large 1 or 2, it's going to add CPU time.
2. If you use the AutoGenerate VBL it can grab a pretty accurate pixelated VBL. And that can add CPU as well.


So like the others said, your best bet is to transfer the final tokenVBL to the main VBL and that will help a lot. I do that for any statues or things that won't move as well. On average I have a dozen or so doors/items that end up being actual tokenVBL and performance is great.
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork

MaxAstro
Kobold
Posts: 2
Joined: Mon Nov 21, 2016 1:57 am

Re: VBL Stamps Being Slow

Post by MaxAstro »

Wolph, your script looks like the perfect solution. Unfortunately, trying to run it seems to have caused more problems than it solved, I assume because I somehow used it incorrectly. ^^;

The script did create a blue VBL the same shape as the yellow VBL. Unfortunately, it also made the yellow VBL permanent somehow - even erasing the blue VBL and deleting the original item does not cause the yellow VBL to go away. Help? XD

EDIT: Whoops. My bad. Accidentally had an extra copy of the mask object sitting around. Black object on a black background... >.>

Anyway, it's working perfectly now. Still slow, but faster than it was. And I think as fast as I can expect it to be with how big this map is.

Post Reply

Return to “MapTool 1.4”