Handling Invisibility/See Invisiblity

Thoughts, Help, Feature Requests, Bug Reports, Developing code for...

Moderators: dorpond, trevor, Azhrei

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. :)
Post Reply
xavram
Dragon
Posts: 891
Joined: Tue Apr 20, 2010 8:22 pm

Handling Invisibility/See Invisiblity

Post by xavram »

In my framework, when a token is assigned the Invisibility state, we also change it so that "Visible to Owner Only" is set to true. This works just fine; the player and DM can see the token, no one else can.

But when someone has "See Invisibilty" on, its gets a little tricky. Currently what we do is that we make the player who has See Invisiblity another owner of the Invisible token(s). Works fine but...if he clicks on the token, then he sees all their abilities and whatnot. And that's not a great solution, even with players trying to be honest.

I was wondering if this a particular cat anyone else has skinned more elegantly....and if so, if they would be willing to share their solution.

Thanks!

User avatar
aliasmask
RPTools Team
Posts: 9024
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Handling Invisibility/See Invisiblity

Post by aliasmask »

Creating a shadow token to follow the movements of the original token and have it on the object layer. You can then change permissions of the shadow token for vision. This is something I haven't done though, but if I were to come up with a fancy way of dealing with invisibility, that's how I would do it.

Here is some pseudo-code

Code: Select all

Create macro to set Invisibility and change permissions
Set Invis
   set invis state
   copy blank token to object layer
   set image to current token
   name it the same with _invis at end
Set Permission
   set token ownership of _invis token
Remove Invis
   delete _invis token
   remove invis state
   
Create a hook for movement. 
   Could be done with onTokenMove
      This is complicated, but BoT has basics and may already have invis mechanics or some use of their shadow token code.
   OR Could be done with mouseover event 
      move _invis token to current token x,y if invis state

User avatar
wolph42
Winter Wolph
Posts: 9999
Joined: Fri Mar 20, 2009 5:40 am
Location: Netherlands
Contact:

Re: Handling Invisibility/See Invisiblity

Post by wolph42 »

if you want to skip all the hassle, install my BoT (link in sig) it has the tools for invisibilty programmed. Including see, negate and purge invisibility. However its been a while since i created it and im not sure i worked with a shadow token, I thought I did though.

Post Reply

Return to “MapTool”