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

Help with macro using TokenMod for 5e druid wildshape

I'm having an issue with the following macro that I'm trying to use for the 5e Druid's Wildshape ability. Whenever the player (or I as GM) uses the macro, it works as expected for the first wildshape choice, no matter which one is pickled, but when any other choice is selected it does not display the correct hp or ac. In fact, it overrides the hit point and armor class on the selected character sheet with the hp and ac of the last selected one! I've used this macro previously (within the last year) for another druid character and it worked flawlessly. All I did was copy the original macro, changed the character name and added the names of the new character's wildshape choices. I have checked for typos in the character's name (Mist) including checking for leading or trailing spaces. New macro: !token-mod {{ --set showname#yes ?{Wildshape |Mist Normal, currentside#1 scale#1u represents#@{Mist|character_id} bar1_link#hp bar2_link#ac bar3_link#passive_wisdom name#'Mist' has_night_vision#yes night_vision_distance#60 night_vision_effect#nocturnal night_vision_color#666666 |Brown Bear, currentside#2 scale#2u represents#@{Mist-Brown Bear|character_id} bar1_link#hp bar2_link#npc_ac bar3_value#13 bar1_reset# name#'Mist' has_night_vision#no |Dire Wolf, currentside#3 scale#2u represents#@{Mist-Dire Wolf|character_id} bar1_link#hp bar2_link#npc_ac bar3_value#13 bar1_reset# name#'Mist' has_night_vision#no |Giant Eagle, currentside#4 scale#2u represents#@{Mist-Giant Eagle|character_id} bar1_link#hp bar2_link#npc_ac bar3_value#14 bar1_reset# name#'Mist' has_night_vision#no |Salmon, currentside#5 scale#1u represents#@{Mist-Salmon|character_id} bar1_link#hp bar2_link#npc_ac bar3_value#13 bar1_reset# name#'Mist' has_night_vision#no |Skunk, currentside#6 scale#1u represents#@{Mist-Skunk|character_id} bar1_link#hp bar2_link#npc_ac bar3_value#13 bar1_reset# name#'Mist' has_night_vision#no |Owl, currentside#7 scale#1u represents#@{Mist-Owl|character_id} bar1_link#hp bar2_link#npc_ac bar3_value#13 bar1_reset# name#'Mist' has_night_vision#yes night_vision_distance#120 night_vision_effect#nocturnal night_vision_color#666666 } --ignore-selected --ids @{target|Target 1|token_id} }}
1705208855
The Aaron
Roll20 Production Team
API Scripter
I suspect you have marketplace content in your multisided token.  The API doesn't currently have a way to access marketplace content, so switching to it will fail.
1705238455
David M.
Pro
API Scripter
If one or more marketplace images are your problem as Aaron suspected, the solution would be to copy the art to your personal art library. Drag the art to a map, press "z", right click and save to a local drive, then upload the file to your art library. Then replace the art on your multisided token with the new version. 
1705253181

Edited 1705253387
I knew about the restriction concerning using Marketplace tokens, so all the images that I used in the rollable table are ones that I uploaded to my personal library. The rollable token part of the macro is working fine: the correct image is displayed and appears at the correct size. The problem is with the linking of the bars and bubbles and having the values on the character sheets overwritten with the values from the previous designated character sheet. For instance, I (or the player) click on the macro button in the macro bar; a prompt appears asking to select a token; I select the druid's (rollable) token; a dropdown  menu appears from which I select "Mist-Brown Bear"; the token correctly changes to a large (2u) token displaying a bear, with all the proper hit points, armor class, etc.; I now run the macro again, select the bear token and pick "Mist Normal" from the list; the token now correctly changes back to the druid's normal token, but the hp, ac, etc are still set to those of the brown bear  AND  those values have also been overwritten on the druids character sheet with those from the brown bear's sheet! I'll try recreating the rollable token just to verify that the images aren't from the marketplace, but I don't understand how that could be causing the values on the character sheets to be overwritten.
1705255378
David M.
Pro
API Scripter
Ah, sounds like a timing issue with updating linked bars and changing the "represents" property. Maybe try not linking the hp/ac to the wildshape forms, making them "mooks", and instead manually setting to the correct values with token-mod from their sheet attributes? You'd need to relink again when reverting to the PC form. Not sure if there still might be a race condition with this approach, but might be worth a try? 
1705262089

Edited 1705262199
I'll try that! The wildshape forms come in at full hp anyway and their ac is always static. Is there a way to introduce a delay to prevent to prevent a race condition?
1705339151

Edited 1705339177
Well, connecting to the wildshape NPC character sheets works OK now, but relinking to the original druid character sheet is still not working. (D&D 5e by Roll20 sheet). This player's druid character sheet does load slowly anyway, as does one other spell casting character's (a wizard). Other player's say that their PC sheets load quickly, even the ones that also have spells, although their spell lists aren't as full as the druid's and the wizard's. All of these PCs are at 9th & 10th level, so the two full casters have pretty extensive spell lists. (The druid is a new player, which is why this macro problem hasn't come up until now)
Did you ever get this sorted? I would be interested in seeing the updated macro. Thx
Unfortunately no, I never got this to work. It's odd, because it used to  work for another druid character that played in this same game about a year ago.