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 .
×

Token Actions from GM-written Macros

1595555825

Edited 1595574246
Malk
Pro
I would like to make a list of token macros for my players, have a method for sorting them and making the buttons different colors, so that their interface is seamless & intuitive.  I have every feature, Pro, etc.  What are my options?  Last night I spent considerable time just attempting the ordering with zero space character sets, and it did not work.  ​KarmaTwist   just gave me a button called "&#8203KarmaTwist" and did not create a zero space. I tried in various ways and with alphabetize token actions on & off.  As a Pro user since roll20's inception, I am surprised & disappointed that there has been no fix or workaround for such a simple request.  I read various threads dating 4-5 years when I searched, including  multiple promises to address this soon, but i could not find anything current on this once the "alphabetize" token action button was published.  Are there solutions for this I am not aware of? If not, what is going on?
1595556526
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
If you turn off Alphabetize Token Macros; the order is this: 1. Character Sheet Abilities in sort order, i.e. the order they appear on the Abilities tab of the journal. This can be manually changed by using the handles to drag them up and down the list 2. Macros (on the Collections tab) that are defined as token actions. These will always appear after the Abilities, and in Alphabetical order. The order of Macros on the tab (and hence cannot be changed on the Token Action Buttons) is always Alphabetical. If you do choose to Alphabetize Token Macros: All token action buttons sort alphabetically, regardless of source. In either case, you can force sort order on alphabetical buttons by using a dash, or a number or somesuch: 1Initiative, 2Long Rest, and so on. Color on token action buttons is very limited. Out of the box, you can do nothing. You can make a color distinction between Character Abilities and Collections macros using a third party extension like Stylus. You can even to a limited degree, make each button a distinct color, but in the latter case, it would only be uniform across characters if they all had an identical number of buttons.
1595560290

Edited 1595560429
Oosh
Sheet Author
API Scripter
Actually you can recolor individual Token Actions with Stylus. I'm not sure if this has already been covered in the Stylening thread, but I was just mucking about with it: .btn[data-macroid=" -Lz7ZupXmab9veL6W_TG|-M--C3LjkYn5tx8nTwN9 "] { color:#e36806 !important; background-color:#dbe60d !important; background-image:none !important; } The id string in bold is obviously different for every macro, so this is probably only worth the effort for pretty permanent, core macros. Note the "background-image:none" line - the default button appears to have a grey background image rather than flat grey color, so changing the background color will only work if you have this line in there. Collections macros colored in this way will be consistent across characters
1595565351
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Nice! There a Style for Coloring based on nth child, I believe, but that's a good one, You should add it, along with a hint about how to find the macro ID. Also, as with any Stylus solution, everyone who want's their buttons colored needs to have the extension and the style installed.
I really appreciate your help & comments, KeithCurtis & Oosh!