Page 1 of 1

Multiple vision types on token

Posted: Tue Dec 13, 2016 10:47 am
by Adurna
Hi!

Is it possible to apply multiple vision types on a token at once?

Like having simultaneously cone and circle vision on a token?


I'm asking because my group has decided that the standard options we're using are a bit too stringent for our liking. So we wanted to change them, but then either we're using cone and everyone always has to move the facing, or we're using a circle which is a bit too much since it allows us to see 360°.

So the solution I proposed was to see if it was possible to create a vision type with a large cone and a smaller circle. Allowing the tokens to see farther in the direction they're facing but also keeping a bit of sight in the back.

However, I can't seem to make it work. Is it at all possible? And if not, are there some workarounds to achieve something similar?

Re: Multiple vision types on token

Posted: Thu Dec 22, 2016 12:59 am
by MandyRae
There can only be one active form of vision for any given token at a time. You might be able to get a work around with a "clear" token - one that has no image and completely transparent - and give it the second vision type, stack it on/under another token, and move them together . . .

Re: Multiple vision types on token

Posted: Fri Dec 23, 2016 7:18 am
by Adurna
Thanks, that's not the solution I'd hoped for tho :(

Unless there is a way to stick two tokens toghether? I.e. moving one moves the other as well? It would be a bit cumbersome to remember each time to move both, especially if on'es nigh invisible and you forget about it :P

Re: Multiple vision types on token

Posted: Fri Dec 23, 2016 7:28 am
by wolph42
yeah there is, you can create a macro onTokenMove on a lib:whatever token. that macro will be activated everytime you move a token. It will be easy to e.g. have a token
"John The Slayer" and then another blank token "John The Slayer Vision" and do that for all palyer tokens.
http://lmwcs.com/rptools/wiki/Guide_to_onTokenMove

Re: Multiple vision types on token

Posted: Fri Dec 23, 2016 7:46 am
by Adurna
Awesome! That looks a bit more complex than what I'm used to doing with maptool. I'll try, but I'll probably need some help along the way :P

Thanks!

Edit: ok, as I expected.

I created a library token with the onTokenMove macro. I have two tokens: PC1 and PC1Vision. I extracted their id and tried the movetoken macro on the lib token.

Code: Select all

[h: CurrentX = getTokenX(0, 00000000E58412195734000000000000)]
[h: CurrentY = getTokenY(0, 00000000E58412195734000000000000)]


[h: moveToken(CurrentX, CurrentY, 0, 00000000C7E1EB2BFC1D000000000000)]
The first ids are PC1's while the second is Pc1Vision's. But I'm getting:

Code: Select all

Error running onTokenMove on Lib:MoveVision : Invalid number of parameters 1, expected exactly 2 parameter(s)
So I tried to remove the first id, after all it should default to the current token and might be redundant. But then I get:

Code: Select all

Error running onTokenMove on Lib:MoveVision : java.lang.NullPointerException errore nell'esecuzione dell'espressione moveToken(CurrentX, CurrentY, 0, 00000000C7E1EB2BFC1D000000000000).
I think I'm stuck.

Re: Multiple vision types on token

Posted: Fri Dec 23, 2016 11:36 am
by wolph42
i would suggest first that you use the token names and not rhe ids. seoncd the issue you have is thatv the 'names ' mus be quoted (or the ids) thats why its not working

Re: Multiple vision types on token

Posted: Fri Dec 23, 2016 11:56 am
by Adurna
Uh, I didn't know I could use the names. It's much easier now. And the missing quotes was, indeed what was causing the issue. It's now working perfectly! Thank you!

Re: Multiple vision types on token

Posted: Fri Dec 23, 2016 3:02 pm
by wolph42
yeah, what you can do in addition is:

Code: Select all

[h:name = listGet(getSelectedNames(),0)]
<!-- in case multiple tokens are selected -->
[h,if(findToken(name+" vision") <> ""), CODE:{
  [CurrentX = getTokenX(0, name)]
  [CurrentY = getTokenY(0, name)]
  [moveToken(CurrentX, CurrentY, 0, name+" vision")]
  <!-- assuming that the other token name is the same name with the appendix " vision" (as in the previous post -->
}]