Page 1 of 1

[b91] ATTENTION: rudimentary change in macro script!

Posted: Tue Oct 28, 2014 4:23 am
by wolph42
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: Select all

[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.

Re: [b91] ATTENTION: rudimentary change in macro script!

Posted: Tue Oct 28, 2014 4:43 pm
by Jagged
This explains changes in the behaviour of my RoboRally game

Re: [b91] ATTENTION: rudimentary change in macro script!

Posted: Tue Oct 28, 2014 7:17 pm
by wolph42
Jagged wrote:This explains changes in the behaviour of my RoboRally game
Wait for my new version. It's nearly done :)

Re: [b91] ATTENTION: rudimentary change in macro script!

Posted: Thu Oct 30, 2014 8:36 pm
by dorpond
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!

Re: [b91] ATTENTION: rudimentary change in macro script!

Posted: Fri Oct 31, 2014 2:54 am
by wolph42
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.

Re: [b91] ATTENTION: rudimentary change in macro script!

Posted: Fri Oct 31, 2014 11:13 pm
by dorpond
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!

Re: [b91] ATTENTION: rudimentary change in macro script!

Posted: Sat Nov 01, 2014 9:13 am
by wolph42
Thank you.

Re: [b91] ATTENTION: rudimentary change in macro script!

Posted: Tue Nov 04, 2014 11:19 am
by Jagged
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 :)

Re: [b91] ATTENTION: rudimentary change in macro script!

Posted: Tue Jan 06, 2015 4:45 am
by Sereptus
Thanks Wolph42, I thought I was going crazy! This bit of code was working fine....and then not....

Code: Select all

[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.
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!!

Re: [b91] ATTENTION: rudimentary change in macro script!

Posted: Tue Jan 06, 2015 7:31 am
by wolph42
I have no idea Whats going on with that. I think this is something craig Needs to comment on.