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

Update monsters default token with selected token

Hi, From what I understand what i'm trying to do needs to be done throught the API but i'm hitting a wall, I've just bought the MM, and I want to be able to easily switch the pretty token over to my usual style; so I use the following macro to setup bars/ as I want and then show token action buttons: !token-mod {{   --on showname light_hassight   --off isdrawing   --set     name|"@{selected|character_name} %%NUMBERED%%"     bar1_link|npc_AC     bar3_value|@{selected|HP|max}     bar3_max|@{selected|HP|max}     light_radius|?{Light|60}     light_dimradius|=?{Dim at|-5}  ?{Player Visible?|No,--off|Yes --on} light_otherplayers }} !ta Is there then a script I  can use to replace the monsters default token with my "improved" one in my journal without opening each charactersheet>edit>remove>use selected token?
1542559156
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Just add this line to your macro. It's part of the token mod command:  --set defaulttoken
1542560718
GiGs
Pro
Sheet Author
API Scripter
Just make sure you have the new token selected when you do it.
Perfect, thanks folks
Wait, is the wiki wrong? I thought default token was read-only for the API <a href="https://wiki.roll20.net/API:Objects#Character" rel="nofollow">https://wiki.roll20.net/API:Objects#Character</a> : Anyways, that's neat. Could save a lot of effort.
1542670825
The Aaron
Pro
API Scripter
keithcurtis said: Just add this line to your macro. It's part of the token mod command: &nbsp;--set defaulttoken Just a note, it will write it with any changes prior to it applied, and the apply any changes from after it. Usually you’ll want this to be the last thing you do.&nbsp; Bast L. said: Wait, is the wiki wrong? I thought default token was read-only for the API <a href="https://wiki.roll20.net/API:Objects#Character" rel="nofollow">https://wiki.roll20.net/API:Objects#Character</a> : Anyways, that's neat. Could save a lot of effort. Yup, this is a recent addition to the API’s capabilities.&nbsp;