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

How do I set bar 3 to npc_speed for my npc tokens?

1693533068

Edited 1693533209
I have alot of character sheets, the default token settings isn't updating them. I want them to show npc_speed on bar 3 when I drag them to the map. Its for a campaign module Wild Beyond the Witchlight so I'm not really grabbing anything from the compendium. Is there something similiar to how monsterhitDice Api does it? -Updates the values when it drops the tokens. 
1693538415

Edited 1693538455
vÍnce
Pro
Sheet Author
I believe you should be able to set the bar value in the game's campaign settings (might depend on the sheet... 5e has the bar link options), then go to the in-game Settings > Miscellaneous > Apply Default Settings but , I think there could be a bug preventing that from working ATM... Anyone else know if this is the case? So, you might need to use the tokenmod script ; !token-mod --set bar3_link|npc_speed Sadly, this will have to be ran on selected tokens.
It is what is. I appreciate the help.
1693543376

Edited 1693543465
Gauss
Forum Champion
Vince,  The bar value you are referencing does not affect pre-existing Characters and their tokens. It is only for Characters and their associated tokens that are pulled from the Compendium, after the bar is set (or changed) in the Campaign Details settings.  It states this on the setting.  "On Default Tokens created by doing a Compendium drop onto the virtual table top, set the Bar 1's value to this attribute." As a result, this is not a bug (unfortunately).  Regarding the tokenmod script, can it handle selecting multiple tokens at once? If so Esdras can go through doing a ctrl+a on a page's tokens, then make the change. 
1693544125

Edited 1693544180
vÍnce
Pro
Sheet Author
Thanks Gauss.  Seems like a strangely limited feature. ;-( Pretty sure you can select multiple token using tokenmod.  This is my preferred method for setting up tokens.  Create a macro that sets multiple settings at once.  I use one macro for PC's and another for mooks.
1693554345
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
You can change the assignments with Mod scripts, but those setting on the Campaign Settings Page are for Compendium drags. It's code that runs upon creation of a token, since it already has data to work from, not only link values, but token size, for instance. I agree, it would be a nice feature to have at the very least a button to "set to my campaign defaults" when setting up a token. You probably wouldn't want it to bee fully universal and automatic, because named NPCs, PCs, and generic NPCs (mooks) are typically managed differently.
1693571023
timmaugh
Forum Champion
API Scripter
Just expanding on vÍnce's command line, above, you should be able to use a combo of SelectManager and TokenMod to affect the tokens you want to affect pretty easily: !token-mod --set bar3_link|npc_speed {&select *, +@npc_speed} That should theoretically select everything on the current page who has an attribute called "npc_speed"... so it will skip player characters and tokens not associated with a sheet.
1693598752
vÍnce
Pro
Sheet Author
@Tim Meta-Magic™
1693615371
timmaugh
Forum Champion
API Scripter
=D I *like* that!
There actually appears to be some kind of bug with this though. I have bar2 set to "npc_ac" and bar3 set to "npc_speed". I was building some maps yesterday and found that some of my npc's, when I pull them from the compendium, have the bars' values set correctly. On others though, when I pull the npc from the compendium, the token's setting page shows that the bars should have "npc_ac" and "npc_speed" but the values are blank. If I change one of the values manually (like for example, manually changing bar2 to "npc_acrobatics", bar3's value fills to the correct "npc_speed" as well as bar2 changing. I then change it back to "npc_ac" and all is well.   And sometimes, it only half works: These examples are both from the same game with the same default settings...
1693667452
Gauss
Forum Champion
Saul, Please make sure that the NPC/Monster isn't already in the campaign when you drag it from the compendium.  If an NPC/Monster is already in the game when you pull it from the compendium then nothing happens. This is to make sure you don't overwrite existing NPC/Monsters that you may have modified. 
I've had this happen as well. I have the bar links set under Game Settings to default to None, npc_ac, and npc_perception, but when I drag an NPC from either the compendium or the journal, it shows the proper links but the values are blank. If I temporarily change the third bar link to something else then back again, the proper values appear. I've submitted a bug report about this behavior. Saul J. said: There actually appears to be some kind of bug with this though. I have bar2 set to "npc_ac" and bar3 set to "npc_speed". I was building some maps yesterday and found that some of my npc's, when I pull them from the compendium, have the bars' values set correctly. On others though, when I pull the npc from the compendium, the token's setting page shows that the bars should have "npc_ac" and "npc_speed" but the values are blank. If I change one of the values manually (like for example, manually changing bar2 to "npc_acrobatics", bar3's value fills to the correct "npc_speed" as well as bar2 changing. I then change it back to "npc_ac" and all is well.