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

[Script] [Facing] allowing players to choose between facing ring images?

I'm experimenting with the Facing script,  by  'The Aaron' As GM, it's great,  but I have a problem when using it as a player.... is there any good way to allow Players to CHOOSE which image-ring they want to use to mark their facing?  even if it's just from a pre-defined list of options created by the GM? It's really useful when, as GM,  I used color-zoned facing tokens to show where the rear, flank, shield, and weapon angles are....   but those things CHANGE based on what combination of weapons and shields the player token is using.... which means they need the ability to select between like 12 different possible facing ring options.  EG, Body Shield, Left-handed,  or Buckler, Right-handed.
1592968096
The Aaron
Roll20 Production Team
API Scripter
TokenCondition might do what your want. 
The Aaron said: TokenCondition might do what your want.  Reading through the description now.... not sure how that will help,  but I'll try it.
1592969172
The Aaron
Roll20 Production Team
API Scripter
I'm thinking mainly about the idea of players having different decorations following them.  You could use something like: Decoration: Body Shield, Left-handed [mirror:rotation|width:*1.2|height:*1.2] For the name on a character with the appropriate decoration.  Players can drag it out and place it on their token to set the "stance".  It doesn't do the facing thing, it would just match the rotation of their character.  Or if facing is important, you could leave the mirror:rotation  part out, and then they could just rotate it to the orientation that makes sense to them: Decoration: Body Shield, Left-handed [width:*1.2|height:*1.2]
Basically, all of those images are some of the possible facing rings. As GM, it's easy...  I run !facing,  pick one of those tokens as the default ring, then select the monster I want to give it to,  and run !facing to assign it again.  then repeat. That way, 12 different monsters can have 12 different facing rings,  showing where they are vulnerable or not, based on their relative choice of weapons and shields. But for PLAYERS,  they can't use that function... they can't set what default Token Facing overlay they want to actually use. That means that as GM, I would have to set it FOR them....  for example, by knowing that Character X is right handed, and USUALLY uses a medium shield.... But then, if the Character drops that shield, and picks up a two-handed weapon instead,  his facing ring image needs to change....  and I don't see any way for the Player Character to change that for himself.  I would have to change it FOR him, as GM, which is really annoying and time-consuming. I tried creating a rollable token of all possible facing images, and then assigning that to a player token as his facing icon,  but that doesn't seem to work....
1592971816
The Aaron
Roll20 Production Team
API Scripter
So, if you take that first one and make a character named: Decoration: Med+Shield, Left-H [width:*1.2|height:*1.2] Then set the above graphic to represent that character, and then set it as the default token on the character and set the character to In Journals All, and Controlled by All, then players can drag an instance of that "character" out and drop it on their character.  TokenCondition will scale it to be 1.2 times larger in both directions, so it sticks out.   When players move their token, it will follow the token, or if they move it, it will move the token to be on top of it.  They can select the ring and rotate it to set a facing, and they can delete it and drag out a different one when they want a different configuration. That seems like it should work for your situation. Modifying the facing script could be done, but it's pretty far down my list as far as scripts to write.  My board currently has 18 things listed, and that's just the stuff I wrote down... =/
Ok, that mostly works, thanks. Mirror:rotation  means the two tokens always align their facing, which is easier to keep consistent.... Without that, there's always the possibility that you selected the wrong token, and are adjusting the wrong rotation,  but still, it seems to work most of the time.... The Aaron said: So, if you take that first one and make a character named: Decoration: Med+Shield, Left-H [width:*1.2|height:*1.2] Then set the above graphic to represent that character, and then set it as the default token on the character and set the character to In Journals All, and Controlled by All, then players can drag an instance of that "character" out and drop it on their character.  TokenCondition will scale it to be 1.2 times larger in both directions, so it sticks out.   When players move their token, it will follow the token, or if they move it, it will move the token to be on top of it.  They can select the ring and rotate it to set a facing, and they can delete it and drag out a different one when they want a different configuration. That seems like it should work for your situation. Modifying the facing script could be done, but it's pretty far down my list as far as scripts to write.  My board currently has 18 things listed, and that's just the stuff I wrote down... =/
ok, If I delete the "Player is not GM"  check from the facing script,  it seems to work for players,  so that's a good sign....  I'll keep working on the code later, see if I can merge the two scripts at all.
I figured out how to make it work.  It's crazy, but it works. Create THREE character tokens. The first is your "Real" character token. named, say, "Susan". The second is the "Ring" Token.  Named, say: Decoration: Med+Shield, Left-H [mirror:+rotation|below|width:*1.2|height:*1.2] attach this token to your character. The third token is a COPY of your real character's face.  named:  Condition: Face [forward:+rotation|top] Attach THIS token to your character. That way, you can rotate the top-most face, it will force everything beneath it to rotate to the same position,  and then reset itself to 0. This would be easier if, in addition to a "forward" command,  you could also include a "recieve" command on tokens, so that they recieved the rotation from the master token, and then sent a command back to the master token to reset itself. The Aaron said: So, if you take that first one and make a character named: Decoration: Med+Shield, Left-H [width:*1.2|height:*1.2] Then set the above graphic to represent that character, and then set it as the default token on the character and set the character to In Journals All, and Controlled by All, then players can drag an instance of that "character" out and drop it on their character.  TokenCondition will scale it to be 1.2 times larger in both directions, so it sticks out.   When players move their token, it will follow the token, or if they move it, it will move the token to be on top of it.  They can select the ring and rotate it to set a facing, and they can delete it and drag out a different one when they want a different configuration. That seems like it should work for your situation. Modifying the facing script could be done, but it's pretty far down my list as far as scripts to write.  My board currently has 18 things listed, and that's just the stuff I wrote down... =/
Oh. or, the easier way is to name the ring Condition: Med+Shield, Left-H [top|width:*1.2|height:*1.2] so it's always on top,  then you can rotate the ring reliably without accidently selecting the character underneath. To make that work well, though,  I would need to edit the ring image so it doesn't have that center text,  but that's not too hard....
On this topic, is there a way to have an icon for NPCs and one for PCs? IE I want the NPCs to be red and the PCs to be blue if possible.
You're referring to the default facing icon?  from the Facing API? Easiest way would be to set the default Facing ring image to red, for the GM to use on NPC's,     and then allow PC's to set their own facings using a blue ring,  and the TokenConditions API,  as I was just talking about. The Dungeon Master said: On this topic, is there a way to have an icon for NPCs and one for PCs? IE I want the NPCs to be red and the PCs to be blue if possible.
Still playing with this..... is there anyway for the Facing API or the TokenConditions API  to use a rollable token,  instead of a single image?
1593240968
The Aaron
Roll20 Production Team
API Scripter
TokenCondition should work with one.