Can you keep players from editing Token Properties?
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.
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.
Can you keep players from editing Token Properties?
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?
- Full Bleed
- Demigod
- Posts: 4736
- Joined: Sun Feb 25, 2007 11:53 am
- Location: FL
Re: Can you keep players from editing Token Properties?
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").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?
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)]
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."
Re: Can you keep players from editing Token Properties?
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.
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.
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools