Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Auto-Selecting and Click Movement??

Hey this is a really specific question but is there any script (if it's even possible) to have a player select their token and click on the page grids to move?? Like it would automatically select the only token on the page that the player can control?  Also is there a way to restrict who can edit a character sheet?  For example, could you make a sheetworker that toggles all input fields to readonly if the person accessing the sheet isn't the GM? Lastly is there a way to restrict who can drop tokens onto the page? So only GM's can drop tokens? 
1585023057
The Aaron
Roll20 Production Team
API Scripter
In order: No. The api can only react to events. There is no event for the api on clicking the map, so nothing to react to. It can find tokens controlled by players, but there wouldn't be a way to know where and when to move them.  No. Sheet workers only operate in the content of a character. They don't have a concept of a player, much less the details such as who is a GM. The closest you could get is an api script that only a GM can execute which would manipulate a character sheet to make it difficult for make changes on it. That's probably too convoluted to be practical, but you could give it a shot.  Short of just not giving players any characters, there isn't a way to prevent characters players control from being dropped on the map by them.  All of your questions make me think you have more of a social problem to deal with than a technical one. You'll probably have better luck talking to your players about not moving their tokens until you're ready, and not dropping them on the tabletop, etc. Just my thoughts. =D
As long as the grid is turned on, I find it easier to keep track of my movement by using the arrow keys.  You select your token and then press arrow keys to move.  You can select any token and hit the x key to see what it's last move was as well.  I agree with Aaron, it sounds like there is a person you don't trust in that game, my suggestion would be to resolve that, but as long as the situation exists, also make sure if you;re using dynamic lighting and lines of sight that you have the setting "only update on drop" turned on, otherwise a player can pick up a token and move it all over the map without dropping it and see everything.
I don't have an issue with my players, I just have an obsession with completeness.  If I put in some stairs, I want to add guardrails even if it's gonna be easier to say "don't walk near/off the edge". Plus have you seen stairs without guardrails? They look hella janky XD The isGM distinction I want to add to the sheets it to also be able to edit content displayed to the players. For example, if they hire henchmen I want them to be able to see the stats but the henchmen is its own person - there may be info the player cant see. It might be easier to just hide it in the GM notes and place it in the bio but then the beautiful and modular formatting available in the character also adds an element that I don't want skipped out on.
1585064525

Edited 1585064739
As far as the GM thing, would it work if: I add an attribute to the character sheet called isGM and isLooking that is updated by API and link it to a checkbox that isn't visible, which a sheet worker toggles only if the two values match? Then update the entire character sheet's input fields to readonly or something. GM can then set which elements are viewable to others with access
1585065264

Edited 1585065405
The Aaron said: No. The api can only react to events. There is no event for the api on clicking the map, so nothing to react to. It can find tokens controlled by players, but there wouldn't be a way to know where and when to move them.  Ok so my follow up.  Is there a way to modify token dropping? You can drag and drop tokens onto maps. Can you run an API to add a token but have the token be dropped on a click? I'm thinking we could use an invisible token and grab the position of its drop then just delete it after.   This is more related to my desire to be able to target areas for AOE spells. My option right now is to make a token that can be moved once before it's deleted then record its last location. But that isn't very pretty
I'm not sure I'm understanding what you're planning with the spells, but can suggest one thing and point you to another.  Many games I've played in crate character sheets for spells... blank sheet with a spell token.  You size the token, right click it and send it to the bottom of the token layer, then save it as the token for the character sheet.  Make it editable by anyone you want to be able to drag it out and drop for a spell.  maybe create a spells folder and put it in there.  The other thing that may apply is this video .  At the end of this Nick applies saves to a group all at once and applies damage to them all at once. Also, there is a GM notes section on character sheets and NPC sheets, you could put anything you don't want characters seeing in that section of the sheet.