Macro Issue moving from 1.3 to 1.4

Developer discussion regarding MapTool 1.4

Moderators: dorpond, trevor, Azhrei

Forum rules
Posting now open to all registered forum users.
Post Reply
User avatar
TheIneffableCheese
Cave Troll
Posts: 64
Joined: Sun Mar 22, 2015 3:57 pm

Macro Issue moving from 1.3 to 1.4

Post by TheIneffableCheese »

I've been using MapTool for several years now as a battlemat replacement in my Pathfinder game. To this end, I've built a streamlined framework that suits my needs for basic combat management (tracking HP, rolling initiative, noting status effects, etc).

Recently, my group had a change of play venue, and I had to rethink my GM computer situation. I decided to make the switch to 1.4 as part of whole rethink.

Currently I have both 1.3.b91 and 1.4.1.8 on my laptop. I loaded a campaign file with my framework into 1.4, and for the most part it works fine.

I created a "token setup" macro that I run on all tokens I bring into the campaign. It was built in 1.3 using the "input" roll command to generate a very basic dialog that requests basic info to allow the aforementioned tracking (Max HP, current HP, initiative modifier, etc). Basically, it is an easier way to change properties on the token without having to open them up and directly edit them. Unfortunately, when I try to use this macro in 1.4, it doesn't work - instead of having a single dialog pop up it cycles through a bunch of dialogs that ask for some of the information, but not all of it.

I'm assuming that there are some changes in the syntax between the two versions. I'm not a coder (I just pretend sometimes), and it's been a LONG time since I had to work on my framework. I'm hoping that there is a relatively easy fix, but I'm perfectly willing to rework the macro from the ground up if need be.

In the meantime, I can work around this by opening a campaign file containing the macro in 1.3, doing the work of setting up the token, saving that a .rptok file, then bringing that file into 1.4 - obviously less than ideal, but workable until I can figure it out.

Thanks in advance for the help.

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

Re: Macro Issue moving from 1.3 to 1.4

Post by aliasmask »

Without looking at the campaign, my best guess is the token type on the token is incorrect. Perhaps the update changed them all to the basic default, so properties normally accessible are now hidden properties. If you share your campaign and give detailed instructions on how to duplicate your problem I can give a more informed opinion. Upgrading shouldn't really affect a campaign in this manner described unless it's from a really old version. I wouldn't really count b91 as a really old version.

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

Re: Macro Issue moving from 1.3 to 1.4

Post by JamzTheMan »

Are you getting any errors?

One of the changes in 1.4.x was a fix to the parser. Macro Functions were not "changed", BUT some badly formatted function calls were allowed to "run" but now spit out an error. I can't remember any exact examples but I know I was hit with it in a few places...

Debug 101: Put a [h: broadcast("Here!")] half way through your code. Or pepper before each if statement like "Here 1", "Here 2", etc. narrow down exactly what line is breaking and isolate it. Alternative, copy the macro out to notepad, then delete half of the code. test. Either cut more until it work or add more back until it breaks...
-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


User avatar
TheIneffableCheese
Cave Troll
Posts: 64
Joined: Sun Mar 22, 2015 3:57 pm

Re: Macro Issue moving from 1.3 to 1.4

Post by TheIneffableCheese »

No error messages - it just doesn't generate the expected dialog when it runs.

I am attaching a stripped down version of the campaign file. The macro in question is a Campaign macro in a section designated "6. Utilities" named "Token Setup."

As noted, it works as expected in 1.3. The attached image shows the dialog as it should work. Thanks for the help.
Attachments
SetupCmpgn_1-3b91.cmpgn
(1.34 MiB) Downloaded 22 times
Screen shot of the expected Dialog
Screen shot of the expected Dialog
TokenSetupDialog.JPG (41.23 KiB) Viewed 648 times

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

Re: Macro Issue moving from 1.3 to 1.4

Post by wolph42 »

I did a quick check in 1.4.7, selected a token, hit the macro and it just appears. Note that it does NOT appear when no token is selected. I also checked the debugger, but no errors appeared. It might be .8 but dont have that around at the moment.

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

Re: Macro Issue moving from 1.3 to 1.4

Post by JamzTheMan »

Tested this in 1.4.1.8 and my fork and it works just fine and I see nothing complicated/wrong with that macro, it's pretty simple and fine.

What it sounds like is the token is missing "properties". Make sure the token has the property type set, the campaign properties are set, and you are running as GM and not having permission issues. (Although the sample you sent is working...)

When you use a 'variable' in a macro and it's empty/not initialized, and it's not on the token, it "Prompts" you for the value to use at that point.
-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

User avatar
TheIneffableCheese
Cave Troll
Posts: 64
Joined: Sun Mar 22, 2015 3:57 pm

Re: Macro Issue moving from 1.3 to 1.4

Post by TheIneffableCheese »

Well, at least my code isn't wrong. I will poke around with some of the settings like you mentioned and see if I can't figure it out.

Thanks for taking the time to look at this.

User avatar
TheIneffableCheese
Cave Troll
Posts: 64
Joined: Sun Mar 22, 2015 3:57 pm

Re: Macro Issue moving from 1.3 to 1.4

Post by TheIneffableCheese »

I ended up installing the Nerps fork, and suddenly this just worked. I never did figure out what was wrong with it in the main release. Oh well - it's working now.

Post Reply

Return to “MapTool 1.4”