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, Update] Facing - facing indicator for tokens

1559490990

Edited 1560015533
The Aaron
Roll20 Production Team
API Scripter
Update v0.1.5 : Added configuration for whether to place the facing marker on the Map layer or the Objects layer. On the Objects layer is important if you're using "Advanced" Fog of War, so that your facing markers don't reveal the location of entities.&nbsp; (Thanks&nbsp; Luke S. ) Update v0.1.4 : Added option to center tokens that are smaller than a grid unit when moving. (Thanks&nbsp; Luke S. ) In the help, simply toggle the option on to have tokens centered on drop, along with their facing ring.&nbsp; Only applies to tokens smaller than one grid unit: !facing --help Facing Creates a facing indicator for the selected token(s). The indicator is on the top of the map layer, so won't interfere with tokens on the object layer. If the Token is on the GM layer, the indicator will be on the GM layer as well, at the very bottom. The indicator maintains its relationship to the token through moves, scales, etc. Additionally, if a token represents a character, Facing will create an attribute on that character that has the current facing angle. Commands: !facing -- toggles the facing indicator on and off for a token !zero -- aligns the indicator to north when you've got it just a few degrees off or are using absolute direction mode. By default Facing uses relative rotation, which means that if you rotate the token 45 degrees, the indicator will rotate 45 degrees as well. (Hint: watch the resize indicator box that is on the indicator to line things up.) You can switch off Relative Rotation in which case the direction you point the rotation handle will be the direction the indicator points. However, there is no way to point the rotation handle up, so you will need to use !zero to face the token north in that case. You can select your own Direction Indicator. Just put it on the table and push the Pick button and then click on the graphic. You must use a graphic in a User Library. MarketPlace assets cannot currently be created by the API. After setting a new Direction Indicator, you can adjust the scaling to get the indicator token to fit correctly. Facing creates an attribute on the character associated with a token that has the rotation stored in it for reference in macros. The name of that attribute can be set by clicking the Set Name button.&nbsp; (Click to watch animation) Prior forum post:&nbsp; <a href="https://app.roll20.net/forum/post/1903275/script-facing-facing-indicator-for-tokens" rel="nofollow">https://app.roll20.net/forum/post/1903275/script-facing-facing-indicator-for-tokens</a> GIT:&nbsp; <a href="https://github.com/shdwjk/Roll20API/blob/master/Fa" rel="nofollow">https://github.com/shdwjk/Roll20API/blob/master/Fa</a>... Support my work on If you use my scripts, want to contribute,&nbsp; and have the spare bucks to do so , go right ahead. However, please don't feel like you must contribute just to use them! I'd much rather have happy Roll20 users armed with my scripts than people not using them out of some sense of shame. Use them and be happy, completely guilt-free! Disclaimer:&nbsp; This Patreon campaign is not affiliated with Roll20; as such, contributions are voluntary and Roll20 cannot provide support or refunds for contributions.
1559502208
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Feature Creep or potentially a different script: You have the ability to snap a smaller token to center. Many people (playing D&amp;D type games) use 10 foot grids to indicate large area maps. Tokens are larger than normal, taking up a 10 foot square. You can make the token smaller, but then it snaps to upper right. How about an option or a script which snaps to "nearest corner"? It would give the performance of a 10 foot grid map, but imitate the utility of a 5 foot grid map. I'm not sure how the API interprets the "drop point" of a token, so this may not be possible.
1559502412
The Aaron
Roll20 Production Team
API Scripter
I'd do it as a different script. The snap occurs on the client side, so the API doesn't see it until it's snapped. What could be done is cleaning up a manual position set with alt-dragging.&nbsp;
1559502923
vÍnce
Pro
Sheet Author
Any way to get LoS to sync with facing? ;-)
1559504326
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
The Aaron said: I'd do it as a different script. The snap occurs on the client side, so the API doesn't see it until it's snapped. What could be done is cleaning up a manual position set with alt-dragging.&nbsp; Yeah, the intent felt different enough to warrant a different script. What you had described above just clicked off a potential in my brain.
1559504648
The Aaron
Roll20 Production Team
API Scripter
Vince said: Any way to get LoS to sync with facing? ;-) It gets a bit more complicated... &nbsp;=D
1559504852
vÍnce
Pro
Sheet Author
The Aaron said: Vince said: Any way to get LoS to sync with facing? ;-) It gets a bit more complicated... &nbsp;=D Aaron "solving-complications" Scriptomancer lol
1559567323
Wes
Pro
Sheet Author
I've been waiting for this script. Wouldn't it be cool if you could add a second facing, like for a turret or a torso!
1559569753
The Aaron
Roll20 Production Team
API Scripter
This script is 4 years old. I just added the centering of small tokens. =D That would be cool. I helped someone work on a script like that a few years ago.&nbsp;
1559665560
Wes
Pro
Sheet Author
Lol, I guess I should pay more attention&nbsp;
1560015546
The Aaron
Roll20 Production Team
API Scripter
Update v0.1.5 : Added configuration for whether to place the facing marker on the Map layer or the Objects layer. On the Objects layer is important if you're using "Advanced" Fog of War, so that your facing markers don't reveal the location of entities.&nbsp; (Thanks&nbsp; Luke S. )