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

Change a value from an existing attribute value through a macro

So I have a macro that shows my characters info, and one of the attributes (their money) &{template:default} {{name=Info}} {{Money= $ @{Fred|Eurobucks} }} {{Fred= AC @{Fred|Eurobucks} }} So I basically wanted to know how I would go about adding a button beside the money value that would open up a window, asking how much I wanted to change the value (so I don't have to go to the sheet every time) As a side note, how do I change the color of the buttons in the macros? I'd like to change them all from pink, you know?
1553904304
The Aaron
Roll20 Production Team
API Scripter
For changing values, that's purely the purview of the API, which requires a games creator to be an active Pro subscriber to take advantage of it.  With API access that becomes pretty trivial (ChatSetAttr would do it, as would other scripts). For changing the button color, if you want it changed for all players, it would require either an API script to create the button, or a custom roll template on a character sheet.  Both of those also require an active pro subscription (though the character sheet option could be done by someone else and then uploaded as community character sheet and installed by someone without a subscription, though that's a long and complicated road). For changing the appearance of the button for just you, the Stylus browser extension can be used to override the CSS of all buttons.
Well thats lame. Thanks for the help dude
1553906010
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
If you go with the Stylus route, here is a style that you might find helpful. It turns this: Into this:
The Aaron said: For changing values, that's purely the purview of the API, which requires a games creator to be an active Pro subscriber to take advantage of it.  With API access that becomes pretty trivial (ChatSetAttr would do it, as would other scripts). For changing the button color, if you want it changed for all players, it would require either an API script to create the button, or a custom roll template on a character sheet.  Both of those also require an active pro subscription (though the character sheet option could be done by someone else and then uploaded as community character sheet and installed by someone without a subscription, though that's a long and complicated road). For changing the appearance of the button for just you, the Stylus browser extension can be used to override the CSS of all buttons. Wait, you said the game creator would have to be a Pro Subscriber If I'm a player and the DM is a Pro Subscriber, would I be able to do this?
1554499741
GiGs
Pro
Sheet Author
API Scripter
The game creator has to be a Pro subscriber. If you are just a player in the game, you need to persuade your GM to add any API scripts you want to use. Once they add them, you can use them. If you just want to change how the button appears to you, and not other players, you can use the Stylus extension and don't need the GM's cooperation for that.