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

Way to change links in all tokens?

1602037038

Edited 1602037717
Every game I have run so far I have built from the ground up. My group and I are used to seeing red health bars. Whenever I create a token Bar 3 is set to link to HP of a sheet. For NPCs, the link stays. For monsters, just the HP Value stays and the link is removed, so as to keep identical creature's HP totals separate. I got my first module through the marketplace, and all the NPCs, Monsters and such have tokens with the HP in Bar 1. I've already set and applied all the other defaults I'm used to running with (lighting, roll behavior, etc) but for some reason the tokens aren't updating. I don't mean tokens that are already placed on maps, of course. Just the token saved with any particular sheet. Is there a way to change every token saved to every sheet to display the HP on Bar 3 instead of Bar 1? I'm hoping to avoid going through each one. Edit: This is for the D&D 5E by Roll20 sheet. The mod is Rime of the Frostmaiden, if it matters.
Upon closer inspection, it looks like the Bar defaults are created only with Compendium drops onto the tabletop, and not for existing sheets linked with tokens. Is there a way to change all the existing ones?
1602039161

Edited 1602039340
Oosh
Sheet Author
API Scripter
There are a few ways - first is to use the "Apply Default Settings" option right down the bottom of the Game Settings tab (in-game). This allows you to apply the changes you made in the Campaign Settings (out of game) to all existing content in the game. Note that this has a thin progress bar in the frame once you start it - it could take a while depending on the campaign. You can also use TokenMod/ChatSetAttr to make bulk changes since you have a Pro membership. Finally, if it's only the colour that matters and not the position, you can just change the colour in the Game Settings tab for each bar. This will take about 2 seconds. I've never used it, but I'm assuming since players have access to it, it's only a CSS change and will only change the colour for the user, not in the actual game.
I did use the Apply Default Settings, and it went through everything else. The only thing it didn't seem to change were the tokens. I'm not familiar with making bulk changes with my Pro features. How does that work? Thanks for your response!
1602084662
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Apply Default Settings will not affect the save default token for characters, only ones in play, as you have found. Since you do have a Pro subscription, you can use the token mod API to fix this. !token-mod --set defaulttoken should set the default token of a character to match whichever token(s) you have selected. This can be mass run on an entire group if you wish. Most marketplace modules have a token page that should make this easy. Note that there are some limitations, imposed by an incomplete exposure of the inner workings to the API. Bar placement (above, below, etc) cannot be changed by the API. Almost everything else will, though. I would suggest using this on a test campaign to make sure the results are what you want, since it cannot be undone.
That's excellent! Is there a token mod syntax to change the HP_max and HP_current values from bar 1 to bar 3 as well?
1602115996
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Absolutely. Here is the macro I use. You can adjust to your own needs. This is for NPCs. !token-mod {{ --set bar1_value|@{selected|hp|max} bar1_max|@{selected|hp|max} bar2_link|npc_speed bar3_link|npc_ac --ids @{selected|character_id} !token-mod --set name|"@{selected|character_name} %%NUMBERED%%"}} !token-mod --off light_hassight light_angle|360 show_name|yes !token-mod --set defaulttoken /w gm @{selected|character_name} has been set up as an NPC
Thank you very much!