RPTools.net

Discussion and Support

Skip to content

It is currently Mon Jul 24, 2017 5:47 pm 




Forum rules


PLEASE don't post images of your entire desktop, attach entire campaign files when only a single file is needed, or generally act in some other anti-social behavior. :)



Reply to topic  [ 8 posts ] 

Previous topic | Next topic 

  Print view

Author Message
 Offline
Cave Troll
 
Joined: Thu Jul 07, 2016 6:45 am
Posts: 28
 Post subject: Multiple vision types on token
PostPosted: Tue Dec 13, 2016 10:47 am 
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?


Top
 Profile  
 
 Offline
Cave Troll
 
Joined: Sat Mar 12, 2016 11:39 am
Posts: 53
 Post subject: Re: Multiple vision types on token
PostPosted: Thu Dec 22, 2016 12:59 am 
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 . . .


Top
 Profile  
 
 Offline
Cave Troll
 
Joined: Thu Jul 07, 2016 6:45 am
Posts: 28
 Post subject: Re: Multiple vision types on token
PostPosted: Fri Dec 23, 2016 7:18 am 
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


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Fri Mar 20, 2009 4:40 am
Posts: 9268
Location: Netherlands
 Post subject: Re: Multiple vision types on token
PostPosted: Fri Dec 23, 2016 7:28 am 
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

_________________
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  
 
 Offline
Cave Troll
 
Joined: Thu Jul 07, 2016 6:45 am
Posts: 28
 Post subject: Re: Multiple vision types on token
PostPosted: Fri Dec 23, 2016 7:46 am 
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:
[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:
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:
Error running onTokenMove on Lib:MoveVision : java.lang.NullPointerException errore nell'esecuzione dell'espressione moveToken(CurrentX, CurrentY, 0, 00000000C7E1EB2BFC1D000000000000).


I think I'm stuck.


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Fri Mar 20, 2009 4:40 am
Posts: 9268
Location: Netherlands
 Post subject: Re: Multiple vision types on token
PostPosted: Fri Dec 23, 2016 11:36 am 
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

_________________
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  
 
 Offline
Cave Troll
 
Joined: Thu Jul 07, 2016 6:45 am
Posts: 28
 Post subject: Re: Multiple vision types on token
PostPosted: Fri Dec 23, 2016 11:56 am 
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!


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Fri Mar 20, 2009 4:40 am
Posts: 9268
Location: Netherlands
 Post subject: Re: Multiple vision types on token
PostPosted: Fri Dec 23, 2016 3:02 pm 
yeah, what you can do in addition is:

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

_________________
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  [ 8 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 4 users online :: 1 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: Google [Bot] and 3 guests





cron

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

Style based on Andreas08 by Andreas Viklund

Style by Elizabeth Shulman