Page 1 of 1

Macro Issue moving from 1.3 to 1.4

Posted: Tue Sep 26, 2017 2:35 pm
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.

Re: Macro Issue moving from 1.3 to 1.4

Posted: Tue Sep 26, 2017 4:03 pm
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.

Re: Macro Issue moving from 1.3 to 1.4

Posted: Wed Sep 27, 2017 8:37 pm
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...

Re: Macro Issue moving from 1.3 to 1.4

Posted: Thu Sep 28, 2017 3:19 am
by wolph42
can you share your campaign file.

Re: Macro Issue moving from 1.3 to 1.4

Posted: Thu Sep 28, 2017 2:23 pm
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.

Re: Macro Issue moving from 1.3 to 1.4

Posted: Thu Sep 28, 2017 6:31 pm
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.

Re: Macro Issue moving from 1.3 to 1.4

Posted: Fri Sep 29, 2017 9:30 am
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.

Re: Macro Issue moving from 1.3 to 1.4

Posted: Fri Sep 29, 2017 12:09 pm
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.

Re: Macro Issue moving from 1.3 to 1.4

Posted: Mon Oct 23, 2017 4:58 pm
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.