OLD Wolph42's 'Drop-in' Bag of MT Tricks OLD

These are tools and utilities that make it easier to run games. This includes Lib: macro tokens dropped into MapTool to manage the game, a conversion file for CharacterTool to allow use in MapTool, or just about anything else you can think of -- except graphics with macros and anything specific to a particular campaign framework. Those are already covered by the Tilesets subforum and the Links and External Resources forum.

Moderators: dorpond, trevor, Azhrei, giliath, Gamerdude, jay, Mr.Ice

Merudo
Giant
Posts: 228
Joined: Wed Jun 05, 2019 7:06 am

Re: Wolph42's 'Drop-in' Bag of MT Tricks v.43 [EMBARKATION]

Post by Merudo »

Am I right to say that Wolph42's Bag of Tricks v.43 does not support MT 1.5.2?

I tried some functions on the example maps and got a tons of error.

Clicking on Toggle ALL doors gives me about ten "getProperty" errors.

Same for Toggle slid. doors and Toggle Door 1,2.

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

Re: Wolph42's 'Drop-in' Bag of MT Tricks v.43 [EMBARKATION]

Post by wolph42 »

given the fact that Ive still not been able to test and the fact that more error reports are dripping in: yes, thats a safe assumption.

User avatar
Full Bleed
Demigod
Posts: 4736
Joined: Sun Feb 25, 2007 11:53 am
Location: FL

Re: Wolph42's 'Drop-in' Bag of MT Tricks v.43 [EMBARKATION]

Post by Full Bleed »

wolph42 wrote:
Sat Jun 29, 2019 10:24 am
given the fact that Ive still not been able to test
Bummer. This is one of the core resources for MT that would really put 1.5+ to the test. I'm seeing some performance issues with it that have been hard to articulate in a way that provides actionable info to the developers... I suspect that results from you with regard to how the BoT works in 1.5+ would provide the kind of specificity the devs need.
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."

karrel
Kobold
Posts: 7
Joined: Sat May 07, 2016 10:02 pm

Re: Wolph42's 'Drop-in' Bag of MT Tricks v.43 [EMBARKATION]

Post by karrel »

ok with the door thing this is what i do i make the map using an older version of maptools and bot works fine when i open the map in the 1.5 version of maptools

derf
Kobold
Posts: 3
Joined: Thu Aug 08, 2019 3:28 am

Re: Wolph42's 'Drop-in' Bag of MT Tricks v.43 [EMBARKATION]

Post by derf »

To fix the "This version of maptool does NOT support VBL manipulation" abort when using Set Door:
  1. Make sure the Selection window is visible (under the Window menu, Selected should be checked) and select the lib:OnTokenMove token
  2. Scroll the Selection window down until you see section 6b. Door Animation, right click the setDoor macro, and edit it
  3. Scroll down to line 87, and replace this line:

    Code: Select all

    [h:hasVbl		= !json.isEmpty(json.get(json.get(bot_VBLGrenade(1,0),0),"points"))]
    with this one:

    Code: Select all

    [h,if(vblSupport): hasVbl = !json.isEmpty(json.get(json.get(bot_VBLGrenade(1,0),0),"points")); hasVbl = 0] 
  4. Hit OK, and then Set Door should work.
This is using version 43g of the BoT, and Maptool 1.5.3.

I did notice that the door action on the map I was using to test had a pretty considerable delay compared to 1.4.1.8. I'm not sure if that's due to the number of doors (it has 15 or so), the number of tokens, or something else, but on a fresh map I could create 10+ doors and performance wasn't a problem.

If you were using the BoT door VBL functions before, under 1.5.3 you can give your door a thin token VBL line by drawing the VBL you want on the map, then editing the door token and under the VBL tab pressing Move VBL From Map.

Since I'm finally delurking and creating an account to post this, I'd also like to say thanks to Wolph42. The BoT has been really handy, even if I only use a portion of all the stuff packed in there. Cheers!

Phergus
Deity
Posts: 7132
Joined: Fri May 12, 2006 8:56 pm
Location: Middle of Nowhere, NM
Contact:

Re: Wolph42's 'Drop-in' Bag of MT Tricks v.43 [EMBARKATION]

Post by Phergus »

Welcome derf and thanks for finding the fix for this!

derf
Kobold
Posts: 3
Joined: Thu Aug 08, 2019 3:28 am

Re: Wolph42's 'Drop-in' Bag of MT Tricks v.43 [EMBARKATION]

Post by derf »

Glad to help. I was looking into the door slowness today - turns out it was only when they were being operated by a switch token and the Toggle Door macro was fine.

It is related to the number of tokens on the token layer, and possibly their distance from the door. The getTokenNames() call in the operateLever macro is what's taking the time, specifically when it's checking for tokens in range of the door. Doesn't matter if a proximity is set or not, since both sides include "range" in the JSON (is that to ensure the token has a path to the door?).

I'm almost always using MapTool displayed on a TV for in-person games, so non-GM ability to hit door switches doesn't matter much to me and I was just going to eliminate the call, but I did find a better workaround: confining the search to PC tokens resolved the problem. I mean, I suppose it would resolve the problem unless you had a ton of tokens flagged as PCs for some reason, but it's a decent approach for now. For the record, the delay was ~5 to 8 secs for me with about 15 door switches and probably another 20ish NPCs (and 3 PCs) on the token layer. With the PC filter added, there was no noticeable delay.

To apply the fix, in the lib:OnTokenMove token, in the 6a. Door Button section, edit the operateLever macro and add '"pc", 1,' to the getTokenNames() calls by:
  • replacing line 12:

    Code: Select all

    [tokenList		= getTokenNames(",",json.set("{}", "layer", "TOKEN", "range",json.set("{}","token",leverToken, "upto", proximity)))]
    with:

    Code: Select all

    [tokenList		= getTokenNames(",",json.set("{}", "layer", "TOKEN", "pc", 1, "range",json.set("{}","token",leverToken, "upto", proximity)))]
  • replacing line 21:

    Code: Select all

    [tokenList	= getTokenNames(",",json.set("{}", "layer", "TOKEN", "range",json.set("{}","token",leverToken)))]
    with:

    Code: Select all

    [tokenList	= getTokenNames(",",json.set("{}", "layer", "TOKEN", "pc", 1, "range",json.set("{}","token",leverToken)))]
I'll have a quick poke later to see if I can find what's behind the range search slowness - it's definitely no problem on 1.4.1.8 and getTokenList() appears more or less the same at a glance in the 1.5.3 source, apart from some sensible reformatting. I wouldn't be at all surprised if the same or similar thing is behind other observed BoT performance hits.

derf
Kobold
Posts: 3
Joined: Thu Aug 08, 2019 3:28 am

Re: Wolph42's 'Drop-in' Bag of MT Tricks v.43 [EMBARKATION]

Post by derf »

derf wrote:
Thu Aug 08, 2019 4:09 am
To fix the "This version of maptool does NOT support VBL manipulation" abort when using Set Door:
Update to the above post: BoT is actually able to manage VBL under 1.5.3 after all, it just doesn't check for version 5 in onCampaignLoad. I think the previous fix still makes sense, since the VBLGrenade call shouldn't be made if VBL support is not actually there, but if you want BoT VBL functions enabled, you can add version 5 to the check (again, this is for BoT version 43g):
  • In the lib:OnTokenMove token, down near the bottom in the "Util - OnCampaignLoad" section, edit the onCampaignLoad macro
  • Near the bottom of the macro on line 475, add "|| mtVersionNr == 5" to the version test
    original line:

    Code: Select all

    [vblSupport		= if(bot_inStr(lower(mtVersion), "nerps") || mtVersionNr > 89 || mtVersionNr == 4, 1, 0)]
    modified line:

    Code: Select all

    [vblSupport		= if(bot_inStr(lower(mtVersion), "nerps") || mtVersionNr > 89 || mtVersionNr == 4 || mtVersionNr == 5, 1, 0)]
If anyone else has BoT functionality they want to use that isn't working in 1.5.3, feel free to let me know. I think this covers everything I was planning to use for my next few games, but I don't mind poking around at other stuff.

User avatar
Full Bleed
Demigod
Posts: 4736
Joined: Sun Feb 25, 2007 11:53 am
Location: FL

Re: Wolph42's 'Drop-in' Bag of MT Tricks v.43 [EMBARKATION]

Post by Full Bleed »

derf wrote:
Thu Aug 08, 2019 4:00 pm
I'll have a quick poke later to see if I can find what's behind the range search slowness - it's definitely no problem on 1.4.1.8 and getTokenList() appears more or less the same at a glance in the 1.5.3 source, apart from some sensible reformatting. I wouldn't be at all surprised if the same or similar thing is behind other observed BoT performance hits.
This seems very much related to what I was reporting with my getTokens() experience in 1.5+.

Az was looking into it prior to the 1.5.3 release, but I don't think anything's been found yet... or, at least, it didn't make the 1.5.3 release.

I knew the BoT would be the framework to look at to illustrate the problem. Heck, I haven't tested it yet, but I'm betting that the Crowd function crawls compared to earlier versions.

Thanks for looking into it. :)
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."

User avatar
lmarkus001
Great Wyrm
Posts: 1867
Joined: Sat Mar 29, 2008 12:30 am
Location: Layfayette Hill, PA

Re: Wolph42's 'Drop-in' Bag of MT Tricks v.43 [EMBARKATION]

Post by lmarkus001 »

"Bug" with 43g in MT1.5x
macro: rotateGroup
This version of maptool does NOT support this function

I cannot see why this line is in the rotateGroup macro, but it does prevent group rotation in MapTool 1.5x

Code: Select all

[h:assert(getLibProperty('vblSupport','lib:EventMacros'),"This version of maptool does NOT support this function",0)]

User avatar
Full Bleed
Demigod
Posts: 4736
Joined: Sun Feb 25, 2007 11:53 am
Location: FL

Re: Wolph42's 'Drop-in' Bag of MT Tricks v.43 [EMBARKATION]

Post by Full Bleed »

lmarkus001 wrote:
Thu Aug 29, 2019 2:44 pm
"Bug" with 43g in MT1.5x
macro: rotateGroup
This version of maptool does NOT support this function

I cannot see why this line is in the rotateGroup macro, but it does prevent group rotation in MapTool 1.5x

Code: Select all

[h:assert(getLibProperty('vblSupport','lib:EventMacros'),"This version of maptool does NOT support this function",0)]
It's there because certain versions of MT didn't support token VBL and the BoT checks to see what version of MT you're using and disables functions that won't work with it. rotateGroup must be one of them.

It looks like you'll need to change how it checks for which version of MT that function works with.

Did you try changing the version check as noted in a post above?

Here is the relevant code in the lib.onTokenMove onCampaignLoad macro.

Change this:

Code: Select all

[vblSupport		= if(bot_inStr(lower(mtVersion), "nerps") || mtVersionNr > 89 || mtVersionNr == 4, 1, 0)]
To this:

Code: Select all

[vblSupport		= if(bot_inStr(lower(mtVersion), "nerps") || mtVersionNr > 89 || mtVersionNr == 4 || mtVersionNr == 5, 1, 0)]
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."


venger
Giant
Posts: 144
Joined: Tue Apr 17, 2007 11:37 am

Re: Wolph42's 'Drop-in' Bag of MT Tricks v.43 [EMBARKATION]

Post by venger »

This is my first go with BOT
I'm lovin it!

I took some time to research with vids and reading, and beginning to understand its all about how the tokens inter-relate and when everything is in the right place .... nice bag of tricks!

I can now; install a basic set of features into existing campaigns to add teleport and event pads for now and expand as needed.
My next dungeon is going to be teleport madness!! hah

Its a thing of beauty and I still have much to learn!
Thanks for all the hard work and to all the contributors that went into this great BOT


jkthomsen9
Cave Troll
Posts: 25
Joined: Fri May 10, 2019 4:53 pm

Re: Wolph42's 'Drop-in' Bag of MT Tricks v.43 [EMBARKATION]

Post by jkthomsen9 »

I am having trouble with the ShadowPad feture. This is the first time I am using this feature so it could be a mistake on my part. I followed the video tutorial. Under settings there is a setting under toggle tab for invisibility. If I DO NOT have the box checked it sorta works. It requests a value for tok and I get the following error.

Invalid condition in IF(getState(invisState, meTok)) roll option.       Statement options (if any): h,if(getState(invisState, meTok)), CODE       Statement Body (first 200 characters): { [seeingToks = getTokenNames("json", json.set("{}","setStates", json.append("", seeInvisState)))] [purgingToks = getTokenNames(


If I have it checked it dose not work. I do not get a request for the value of tok and I get this error

 Invalid condition in IF(isNPC(tok) && getState("Invisible",tok)) roll option.       Statement options (if any): H, IF(isNPC(tok) && getState("Invisible",tok)), CODE       Statement Body : { [H, MACRO("InvisibleMove@Lib:libDnD35Pathfinder"): tok ] }; {}

I am using the pathfinder/3.5 framework with BOT

Locked

Return to “Drop-In Macro Resources”