Can you keep players from editing Token Properties?

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
Tyshalle
Giant
Posts: 173
Joined: Sat Jul 10, 2010 5:45 pm

Can you keep players from editing Token Properties?

Post by Tyshalle »

I'm making a basic framework for my campaign, which pulls from token properties. Is there a way to keep players from editing the token properties of their own tokens? I trust my players current players, but occasionally I bring in new people and you just never know. Anything I can do?

User avatar
Full Bleed
Demigod
Posts: 4736
Joined: Sun Feb 25, 2007 11:53 am
Location: FL

Re: Can you keep players from editing Token Properties?

Post by Full Bleed »

Tyshalle wrote:I'm making a basic framework for my campaign, which pulls from token properties. Is there a way to keep players from editing the token properties of their own tokens? I trust my players current players, but occasionally I bring in new people and you just never know. Anything I can do?
I use a property on my player tokens called Library. The value of which is the name of a lib token specifically tied to the token (i.e "Lib:John").

Create a library token for each PC with properties you want to protect.

Then you can call a value from the lib token like so:

Code: Select all

[h: value = getLibProperty("Property Name", Library)]
It makes it so players can't monkey with their token props and helps with concurrency issues.
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."

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

Re: Can you keep players from editing Token Properties?

Post by aliasmask »

I do that too (sort of) with my lib:players token. It creates a new lib token for each new user name. But since the updates I've been thinking of changing that since you can now dynamically update tables now. Rather than holding the any specific token info, it holds global player info. I use it for player chat.

In your case, I would recommend using hidden variables, ones that don't appear in the token type. Or you can obfuscate the info and put it in a json data structure.

Another option would be to write a function that writes to a token but also updates a hidden variable. Using another function to get that data will check the value vs the hidden value to notice any tampering. You wouldn't have to use it for all your variables, just certain ones that are likely to be tampered with.

Post Reply

Return to “MapTool”