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

Token Actions & Compendiums

1638466915

Edited 1638467649
Eli N.
Pro
Compendium Curator
So got a couple questions;  The first: is it possible to create a token action tied to that character only that is not visible on the character sheet but is when you select the token?  The second: is it possible to create a token action that is fillable from a compendium? So that when you drag and drop it fills in the tokens name and the token actions action? I tried the first thing that came to mind like this  <button class="tokenaction" type='roll' name='roll_@{m_taction_name_a}' value='@{selected|m_taction_ability_a}'></button> and it did not work with values that worked for a token action for  @{m_taction_name_a} and  @{selected|m_taction_ability_a}
1638467318
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
I realize you are asking from a Sheet Creation point of view, so this may not help at all. But to answer question one, this is possible by crating a collections macro, setting it to be a token action, and either making it available to All Players, or by the specific players that you give permissions to. Regardless, it will always appear on a GM-selected token.
1638467673
Eli N.
Pro
Compendium Curator
Yeah I should have specified that both questions are from a sheet creation point of view. Thank you for your response though! 
1638469052
Finderski
Plus
Sheet Author
Compendium Curator
You can create token actions on a character and have them as hidden elements on the sheet. The problem with putting token actions on the character sheet itself is the player (or GM) can't turn them off, and the name is whatever the name is you gave them on the sheet - which is usually very ugly, because it has to follow the syntax for the character sheet. The general advice is NOT put token actions on the character sheet itself, but rather let the GM and/or Player add them to the Attributes and Abilities tab. The problem with your code above is the name...the rollbutton name needs to be a proper roll button name (no @ symbol, etc). And for filling in data on a character sheet, the drag and drop from a compendium can do that, but the easiest way I've found is to use sheet workers for that.  Meaning, you have the compendium drop fields and watch for changes in those and then the sheet worker takes over.
1638469657
Eli N.
Pro
Compendium Curator
The general advice is NOT put token actions on the character sheet itself, but rather let the GM and/or Player add them to the Attributes and Abilities tab. And for filling in data on a character sheet, the drag and drop from a compendium can do that, but the easiest way I've found is to use sheet workers for that.  Meaning, you have the compendium drop fields and watch for changes in those and then the sheet worker takes over. Thanks for both of these statements