I am using v.91.
Everytime I run my 'attack' macro, it changes the target token from 'top down' to 'circle'. There is nothing in the macro that refers to gettokenshape or settokenshape, so I do not understand why the token is being changed. I did a quick workaround by making the last line of the macro "[H: setTokenShape("Top Down")]" so that it forces the token back to a 'top down' token, but that is purely a temporary fix. Is there a bug in v.91 or is this a known problem with another function that is causing it? The macro is over 300 lines long so I have not attached a copy.
As an aside, I also tried it in Mote and the same problem arises.
Any help/feedback gratefully accepted.
Macro changes 'top down' to 'circle'
Moderators: dorpond, trevor, Azhrei, giliath, jay, Mr.Ice
Re: Macro changes 'top down' to 'circle'
Have you tried turning the macro log on then run the macro and then check the log whether it does make a call to settokenshape somewhere in a called sub macro?
GETTING STARTED WITH MAPTOOLS - TUTORIALS, DOCS, VIDEOS, TOOLS, ETC
DISCORD (the new MT forum!)
My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent.
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade, Only War, SET Card Game, RoboRally
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow, READ THIS
DISCORD (the new MT forum!)
My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent.
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade, Only War, SET Card Game, RoboRally
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow, READ THIS
Re: Macro changes 'top down' to 'circle'
Thanks for the reply Wolph.
There are no called sub-macros - which is why the macro code is 300 lines long. It's a macro that worked fine in earlier versions of MT, so I think it is something to do with version 91. I see that "aranginor" had the same problem in Feb 2014, but cannot find a reply suggesting what to do. http://forums.rptools.net/viewtopic.php ... le#p250453
It was suggested that the problem was to do with 'facing'. The only part of my macro that deals with facing is:
[H: Enemyfacing=getTokenFacing(currentTgt)]
[H: Myfacing=getTokenFacing()]
and I can't see any problem with these lines.
Any other suggestions?
There are no called sub-macros - which is why the macro code is 300 lines long. It's a macro that worked fine in earlier versions of MT, so I think it is something to do with version 91. I see that "aranginor" had the same problem in Feb 2014, but cannot find a reply suggesting what to do. http://forums.rptools.net/viewtopic.php ... le#p250453
It was suggested that the problem was to do with 'facing'. The only part of my macro that deals with facing is:
[H: Enemyfacing=getTokenFacing(currentTgt)]
[H: Myfacing=getTokenFacing()]
and I can't see any problem with these lines.
Any other suggestions?
Re: Macro changes 'top down' to 'circle'
Perhaps a bug. Can you post the campaign file worth instruction how to replicate?
GETTING STARTED WITH MAPTOOLS - TUTORIALS, DOCS, VIDEOS, TOOLS, ETC
DISCORD (the new MT forum!)
My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent.
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade, Only War, SET Card Game, RoboRally
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow, READ THIS
DISCORD (the new MT forum!)
My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent.
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade, Only War, SET Card Game, RoboRally
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow, READ THIS
Re: Macro changes 'top down' to 'circle'
I've run across this one before and it is a bug. Whatever the autotype is, it reset when you change facing or something like that. Very annoying. I actually forgot what the trigger was until you mention facing which sounds right. It may also reset with mvoeToken. I haven't played with it for awhile, so I'm not sure without some testing.
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
- JamzTheMan
- Great Wyrm
- Posts: 1872
- Joined: Mon May 10, 2010 12:59 pm
- Location: Chicagoland
- Contact:
Re: Macro changes 'top down' to 'circle'
We have a few people deep into macro functions currently for 1.4, maybe someone can look into this and RPTroll can add it to our list. Any details will help track it down if it's a bug.aliasmask wrote:I've run across this one before and it is a bug. Whatever the autotype is, it reset when you change facing or something like that. Very annoying. I actually forgot what the trigger was until you mention facing which sounds right. It may also reset with mvoeToken. I haven't played with it for awhile, so I'm not sure without some testing.
-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
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork
Re: Macro changes 'top down' to 'circle'
Oh, I remember what it was now. It was Wiki: setLayer(). I use top down for most of my tokens and when I had a token with a facing set and I changed the hit points it would use that function to make sure the token was on the token layer if alive and object layer if dead. moveToken and setTokenFacing wasn't the problem.
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
Re: Macro changes 'top down' to 'circle'
Thanks to everyone so far with help and suggestions.
This may help to track down the problem. I dragged a new token onto the active map and then ran an attack against it. It did not change to a 'circle' token. However, when I then ran an attack against a token that was already on the map when I upgraded to v.91, it did change to a 'circle' token. So, I do not think the problem is with the macro - it seems to be something to do with the change to v.91.
Hope this helps
This may help to track down the problem. I dragged a new token onto the active map and then ran an attack against it. It did not change to a 'circle' token. However, when I then ran an attack against a token that was already on the map when I upgraded to v.91, it did change to a 'circle' token. So, I do not think the problem is with the macro - it seems to be something to do with the change to v.91.
Hope this helps