If you're using PCs that are linked to the combat tracker, then the visibility is controlled by the global TokenManager scripts. (And thus, it will get reset to what the scripts think it should be every time.)
Regards,
JPG
Printable View
If you're using PCs that are linked to the combat tracker, then the visibility is controlled by the global TokenManager scripts. (And thus, it will get reset to what the scripts think it should be every time.)
Regards,
JPG
They shouldn't unless there is a script that has registered to listen to add events; and is doing something. (i.e. that's what the TokenManager script does for any tokens it recognizes as linked to CT.)
JPG
Not sure what registering to add events would look like. In my polymorphism I call TokenManger calls directly but don't override anything. And in Map Parcel I basically just call the tokeninstance stuff and don't touch TokenManger at all. And that pesky Death Indicator thing I didn't write but manage for community has tons of calls into TokenManager - but I don't see anything that looks like an override or register of them.
Is there a particular call that I can search for that would indicate what your talking about might be happening?
Also, I feel like you've spent too much time with me here so don't feel you have to answer. I don't use these visibility settings or plan to now that defaults are correct. It's more a "understand it in case there is a bug buried in my code" sort of thing that is preventing this weird setting from getting updated across sessions.
Tokens can have 3 different visibility states: always visible, always invisible and mask-sensitive visibility. With mask sensitive visibility, the token is only visible if the center of the token is in an unmasked region of the map.
For CT-linked tokens, PC token visibility defaults to always visible, and NPC token visibility can be toggled through the GM combat tracker between always invisible and mask-sensitive visibility. For other tokens, the default visibility is mask-sensitive.
To manually set the visibility of a token, right click on the token and select the Visibility menu option you desire.
Just got notified that something has changed in last three days where the token tied to the DB I placed (based on previous conversation) now appears invisible to players. Setting it to Invisible always seems to be only way to fix it but then we are back to the problem of seeing it no matter where it is on the map. What changed? How do I fix it now?
The following is the code that worked until about 3 days ago (placing token shows it visible). Need to know what I need to do to get it placed visible to players within LOS rules again (which was working).
Post Edit: I can also see it if I turn off LOS for the map. With LOS it is invisible no matter where it is on the map with regards to the characters. So I think something in LOS has changed.Code:if newTokenInstance then
newTokenInstance.setTargetable(false);
newTokenInstance.setActivable(true);
newTokenInstance.setActive(false);
newTokenInstance.setVisible(nil); -- had to experiment around to get the two flavors of visibility defaulted the way I wanted them. Visible to players but not through LOS.
newTokenInstance.setName(DB.getValue(nodeParcel, "name", ""));
end
There's an issue where tokens added from outside CT drag are not always showing on player clients (i.e. added by extension or direct from Assets bag). There is a fix queued for the next release build.
Regards,
JPG