RPTools.net

Discussion and Support

Skip to content

It is currently Fri Nov 17, 2017 6:16 pm 






Reply to topic  [ 10 posts ] 

Previous topic | Next topic 

  Print view

Author Message
User avatar  Offline
Deity
 
Joined: Fri Mar 20, 2009 4:40 am
Posts: 9419
Location: Netherlands
 Post subject: [b91] ATTENTION: rudimentary change in macro script!
PostPosted: Tue Oct 28, 2014 3:23 am 
Edit: for none coders: basically this is a good thing as it allows more freedom in the macros. It might however effect existing frameworks, fixing those however isn't really hard and I can help with that if need be.

In this topic the 'token layer filter' is discussed and its decided to remove it. The intention was about Wiki: getTokens() only, but when this was posted, I realized that (probly) ALL 'getXXXXXTokenXXX()' were changed (like Wiki: getExposedTokens() is for sure). And alas, not all these functions have build in filters.

So here a method to return the 'original' functionality of these functions. I'll use getXXXTokenXXX() as 'substitute' function, just replace that with the one you're using.

Code:
[h:result    = json.intersection(getTokenNames("json",'{layer:["TOKEN"]}'), getXXXTokenXXX("json"))]

<!--
 and in case you were not using the 'json' delimiter but lets say this one "," -->

[
h:result    = json.toList(json.intersection(getTokenNames("json",'{layer:["TOKEN"]}'), getXXXTokenXXX("json")),",")] 


you can also consider setting this as a user defined function, redefining the function to behave like this.

another thing. Some of these functions have their OWN FILTER, e.g. Wiki: getTokens() you can just add the filter internally, see the examples given in the wiki.

note that this is NOT fully confirmed for ALL getXXXTokenXXX functions, only for getExposedTokens and getTokens, but its a safe assumption.

_________________
GETTING STARTED WITH MAPTOOLS - TUTORIALS, DOCS, VIDEOS, TOOLS, ETC

My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent and
DPI.
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


Last edited by wolph42 on Fri Oct 31, 2014 1:57 am, edited 2 times in total.
moved to announcements, left shadow copy in maptool (on purpose).


Top
 Profile  
 
User avatar  Offline
Great Wyrm
 
Joined: Mon Sep 15, 2008 8:27 am
Posts: 1180
Location: Bristol, UK
 Post subject: Re: [b91] ATTENTION: rudimentary change in macro script!
PostPosted: Tue Oct 28, 2014 3:43 pm 
This explains changes in the behaviour of my RoboRally game


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Fri Mar 20, 2009 4:40 am
Posts: 9419
Location: Netherlands
 Post subject: Re: [b91] ATTENTION: rudimentary change in macro script!
PostPosted: Tue Oct 28, 2014 6:17 pm 
Jagged wrote:
This explains changes in the behaviour of my RoboRally game

Wait for my new version. It's nearly done :)

_________________
GETTING STARTED WITH MAPTOOLS - TUTORIALS, DOCS, VIDEOS, TOOLS, ETC

My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent and
DPI.
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


Top
 Profile  
 
User avatar  Offline
RPTools Team
 
Joined: Thu Jun 01, 2006 1:05 pm
Posts: 5538
Location: Buffalo, NY
 Post subject: Re: [b91] ATTENTION: rudimentary change in macro script!
PostPosted: Thu Oct 30, 2014 7:36 pm 
Question, Friend. I don't know what all this means exactly, but our group just uses Maptool for the most part and does very little with intense macros. Is this that you mention, a deal breaker?

I was going to have the guys use B91 next session, but should I wait?

Let me know in layman's terms. :)

Thanks man, and thanks for taking note on the 'issues' and addressing them!

_________________
How to use my bundled artwork (MT1.3B60+): http://forums.rptools.net/viewtopic.php?f=8&t=11759


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Fri Mar 20, 2009 4:40 am
Posts: 9419
Location: Netherlands
 Post subject: Re: [b91] ATTENTION: rudimentary change in macro script!
PostPosted: Fri Oct 31, 2014 1:54 am 
No not at all. It's actually a good thing. Before it was not possible with some functions to select tokens on the background, now it is. However with some frameworks this might lead to strange behaviour.

I've actually asked NOT to change this back. So if you don't use many macros it most likely won't effect your game. And if it does, post here. I can vouch for b91 as its one of the most stable (bug free ) versions in a long time.

_________________
GETTING STARTED WITH MAPTOOLS - TUTORIALS, DOCS, VIDEOS, TOOLS, ETC

My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent and
DPI.
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


Top
 Profile  
 
User avatar  Offline
RPTools Team
 
Joined: Thu Jun 01, 2006 1:05 pm
Posts: 5538
Location: Buffalo, NY
 Post subject: Re: [b91] ATTENTION: rudimentary change in macro script!
PostPosted: Fri Oct 31, 2014 10:13 pm 
wolph42 wrote:
I can vouch for b91 as its one of the most stable (bug free ) versions in a long time.


Great bud! Glad to hear that! Thanks again for all your heart and dedication to our cause here! If people haven't told you lately, you are the bomb! Thanks again!

_________________
How to use my bundled artwork (MT1.3B60+): http://forums.rptools.net/viewtopic.php?f=8&t=11759


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Fri Mar 20, 2009 4:40 am
Posts: 9419
Location: Netherlands
 Post subject: Re: [b91] ATTENTION: rudimentary change in macro script!
PostPosted: Sat Nov 01, 2014 8:13 am 
Thank you.

_________________
GETTING STARTED WITH MAPTOOLS - TUTORIALS, DOCS, VIDEOS, TOOLS, ETC

My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent and
DPI.
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


Top
 Profile  
 
User avatar  Offline
Great Wyrm
 
Joined: Mon Sep 15, 2008 8:27 am
Posts: 1180
Location: Bristol, UK
 Post subject: Re: [b91] ATTENTION: rudimentary change in macro script!
PostPosted: Tue Nov 04, 2014 11:19 am 
dorpond wrote:
Question, Friend. I don't know what all this means exactly, but our group just uses Maptool for the most part and does very little with intense macros. Is this that you mention, a deal breaker?

I was going to have the guys use B91 next session, but should I wait?

Let me know in layman's terms. :)

Thanks man, and thanks for taking note on the 'issues' and addressing them!


Just to add to Wolph's comments, I have been using Rumble's Slim 4E framework, under b91 without issue. So I think its safe to upgrade :)


Top
 Profile  
 
User avatar  Offline
Cave Troll
 
Joined: Tue Jun 07, 2011 11:08 am
Posts: 84
Location: Canada
 Post subject: Re: [b91] ATTENTION: rudimentary change in macro script!
PostPosted: Tue Jan 06, 2015 4:45 am 
Thanks Wolph42, I thought I was going crazy! This bit of code was working fine....and then not....

Code:
[h:allToks    = getTokenNames("json",'{layer:["TOKEN"]}')]
[h:allVis    = getVisibleTokenNames("json")]
[h:allNpc    = getNPCNames("json")]
[h:allExp    = getExposedTokenNames("json")]
[h:tokExp    = json.intersection(allToks, allExp, allVis,allNpc)]

[h: assert(json.length(tokExp), "No visible NPC", 0)]


The getExposedTokenNames still doesn't work unless I start a server (no client need be connected). I think (unless I missed something as usual) this still needs to be investigated further. That bit of code taken from the Wiki will work on my Library Map but not on any other map that I've created. So when I went to test it on a token on a map I created it suddenly wouldn't work, or any other map I created but when I started the server to investigate it worked! I've ran other tests using the Lib map FOW on/off, Vision Off/Day/Night and cant figure out why it would work on that map without a server running and not on others. In any case this is just what I've recently ran into. I'm still doing some experimentation on it.

Quote:
No not at all. It's actually a good thing. Before it was not possible with some functions to select tokens on the background, now it is. However with some frameworks this might lead to strange behaviour.

I'm really looking forward to experimenting with selecting "background, etc" tokens!!

_________________
OOOHH ReGex....YOU BITTER-SWEET BEAST!!!


Last edited by Sereptus on Tue Jan 06, 2015 10:44 am, edited 1 time in total.

Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Fri Mar 20, 2009 4:40 am
Posts: 9419
Location: Netherlands
 Post subject: Re: [b91] ATTENTION: rudimentary change in macro script!
PostPosted: Tue Jan 06, 2015 7:31 am 
I have no idea Whats going on with that. I think this is something craig Needs to comment on.

_________________
GETTING STARTED WITH MAPTOOLS - TUTORIALS, DOCS, VIDEOS, TOOLS, ETC

My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent and
DPI.
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Reply to topic  [ 10 posts ] 

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:

Who is online

In total there are 3 users online :: 0 registered, 0 hidden and 3 guests (based on users active over the past 5 minutes)
Most users ever online was 243 on Sun Nov 04, 2012 6:14 am

Users browsing this forum: No registered users and 3 guests





cron

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

Style based on Andreas08 by Andreas Viklund

Style by Elizabeth Shulman