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

Found a detailed YouTube video on how to configure a macro with a rollable table to allow a druid to switch to different creatures for WildShape

It's very nice.  I'd been searching for something like this for a while.
1575525737
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Link? For those seeking the same solution?
1575549400

Edited 1575549417
doh <a href="https://www.youtube.com/watch?v=p4lpuEnxxHI" rel="nofollow">https://www.youtube.com/watch?v=p4lpuEnxxHI</a>
1577066219
Dumbhuman
Pro
Marketplace Creator
I've been messing around trying to find the ideal Wild Shape solution for a while and I just want to point out a couple of things about the method used in the video: 1. There's no need for a rollable table to create a multi-sided token, because you can do this *so much* more quickly if you're already using TokenMod. 2. There's no need to manually set the mental stats on each Wild Shape character sheet, because the ChatSetAttr API can do this *so much* more quickly. 3. The video isn't quite a full solution (though it's better than most), because the creatures still aren't quite set up as true Wild Shapes.&nbsp; His beasts have the Druid's mental stats, but don't yet have the Druid's potentially higher saves/skills/proficiency bonus calculated.&nbsp; Any rolls automatically made from clicking on or referencing their in-game character sheets will be off for those things.&nbsp; Then there's the additional issue of class features which can be used in beast form (e.g. Barbarian's Rage/Unarmored Defense/Fast Movement, Fighter's Action Surge/Second Wind, Monk's Unarmored Defense/Fast Movement/Deflect Missiles, feats, etc.) which is a whole other can of worms likely beyond the scope of easy automation. Here's my process for number 1: I have a map set up as a menagerie with all the tokens for beast shapes I might want to assign to a Druid.&nbsp; I bring the Druid's token onto that page and (assuming it isn't already multi-sided), I select the Druid token, click the macro below (which I call #AddImageToToken), and then click the Druid token again as the macro's target. !token-mod --set imgsrc|+@{target|token_id} --ids @{selected|token_id} You now have a multi-sided token with side 1 as the Druid's base form.&nbsp; You can verify this by right-clicking on the Druid token and seeing the Multi-sided option in the context menu, from which you can Choose Side using the slider or Random Side, but neither will be much fun until you add more sides.&nbsp; Then you simply add another form by selecting the Druid token again, running that macro, and clicking a beast token.&nbsp; Do that for as many forms as you'd like and it'll continue adding sides to the token. Even if you don't have a menagerie map set up, it's still far faster to drag the tokens you want to use onto a map rather than into a rollable table.&nbsp; Plus, you don't litter your unfolderable/unorganizeable rollable table menu with truly unneeded tables. The macro that I use to change shapes is very similar to his though.&nbsp; Obviously, I assign my bars differently (3 for hit points, 2 for AC, 1 for speed).&nbsp; Here's an example for a character named Snow White: !token-mod {{ &nbsp; --set ?{Form|Human,currentside#1 represents#"Snow White" height#70 width#70 bar3_link#hp bar2_link#ac bar1_link#speed &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |Weasel,currentside#2 represents#"Snow White Weasel" height#35 width#35 bar3#[[@{Snow White Weasel|npc_hpformula}]] bar2_value#[[@{Snow White Weasel|npc_ac}]] bar1#[[@{Snow White Weasel|npc_speed}]] &nbsp;&nbsp;&nbsp; &nbsp; |Wolf,currentside#3 represents#"Snow White Wolf" height#70 width#70 bar3#[[@{Snow White Wolf|npc_hpformula}]] bar2_value#[[@{Snow White Wolf|npc_ac}]] bar1#[[@{Snow White Wolf|npc_speed}]] &nbsp;&nbsp;&nbsp; &nbsp; |Bear,currentside#4 represents#"Snow White Bear" height#140 width#140 bar3#[[@{Snow White Bear|npc_hpformula}]] bar2_value#[[@{Snow White Bear|npc_ac}]] bar1#[[@{Snow White Bear|npc_speed}]] &nbsp;&nbsp;&nbsp; &nbsp; |Elk,currentside#5 represents#"Snow White Elk" height#140 width#140 bar3#[[@{Snow White Elk|npc_hpformula}]] bar2_value#[[@{Snow White Elk|npc_ac}]] bar1#[[@{Snow White Elk|npc_speed}]] &nbsp;&nbsp;&nbsp; &nbsp; } }} I've got a text file that I can edit with NotePad++ to quickly insert extra lines in that macro using size-based templates that are easy to edit with copy/replace.&nbsp; I'll add some more line breaks to one I use for large creatures so you won't have to scroll to see exactly what it does: |4 &nbsp; height|140 &nbsp; width|140 &nbsp; represents|"Snow White Large" &nbsp; bar3|[[@{Snow White Large|npc_hpformula}]] &nbsp; bar2_value|@{Snow White Large|npc_ac} &nbsp; bar1|@{Snow White Large|npc_speed} For Tiny creatures I set height/weight to 35, Small I set it to 60, Medium to 70, Huge to 210, and Gargantuan (not that I'd really need it) to 280.&nbsp; I just change the number 4 at the top to the match the correct image side I want to use, copy and paste the line into the macro, select it, then use find/replace in Notepad++ to change all instances of "Large" in the selection area to the proper beast name used on the character sheet. Which brings us to point number 2 from above and here's my process for that (using the example of a Druid named Snow White that wants to turn into a wolf): I already have characters pulled from the compendium for all the beasts in my game, so the first step is to select the Wolf from the Journal tab and Duplicate it.&nbsp; Then I rename the duplicate "Copy of Wolf" to "Snow White Wolf" and drag it onto the map.&nbsp; I select its token and use the following macro which requires the ChatSetAttr API: !setattr {{ --sel --intelligence|@{Snow White|intelligence} --wisdom|@{Snow White|wisdom} --charisma|@{Snow White|charisma} }} Done.&nbsp; It's a good thing that's so quick, because you'll likely need to do this for all of the Druid's beast forms any time that Druid has a change in a mental stat.&nbsp; As far as I can tell, you can't link to another characters attributes from within an attribute field, but I would love to be proven wrong on that one.&nbsp; I'd also love to learn how/if math can be processed within those fields, because I'm still searching for an easy solution to point 3 from above. The problem of point 3: The Druid's Wild Shape is supposed to use not only the Druid's mental stats, but also the Druid's saves/skills (if the Druid's are higher) and even the Druid's proficiency modifier for skills/saves if it happens to be higher than the beast's. Manually comparing and adjusting the beast's saving throws, skills, and proficiency mods to the Druid character's is the big time sink, especially to do it correctly.&nbsp; For example, let's use 5th level Druid Snow White and the Snow White Wolf.&nbsp; Druid Snow White has a proficiency modifier of +3 with proficiency in Animal Handling, Athletics, Nature, Perception, and Survival skills plus Constitution, Intelligence, and Wisdom saving throws.&nbsp; The default wolf has a proficiency modifier of +2 with proficiency in just Perception and Stealth.&nbsp; So Snow White Wolf should retain its original proficiencies, become proficient in the additional skills/saves that Druid Snow White has, and add Druid Snow White's higher proficiency bonus to its own ability scores (with mental stats to match Druid Snow White) to determine the final bonuses for skills/saves.&nbsp; In the end, Snow White Wolf has Animal Handling +5, Athletics +4, Nature +3, Perception +5, Stealth +5 (thanks to a higher proficiency bonus), and Survival +5, plus its saves are Constitution +4, Intelligence +3, and Wisdom +5.&nbsp; It doesn't use the improved proficiency for attacks though because those are intended to remain fixed. A repetitive, formulaic task like the above should absolutely be able to be automated, but I'm not a programmer nor am I intimately familiar with how all the 5E OGL sheet's attribute fields interact with each other or how/if they perform math operations within individual fields. I've tried a few things with ChatSetAttr's evaluate function, but haven't had any success yet.&nbsp; Mostly it just tells me over and over again that I'm getting syntax errors. The test macro below will change the pb_custom and npc_athletics_flag as I want, but it spits out an error when it comes to changing the npc_athletics attribute: !setattr {{ --sel --evaluate --pb_custom| (%pb_custom% &lt; @{Snow White|pb}) ? @{Snow White|pb} : %pb_custom% --npc_athletics_flag| (@{Snow White|athletics_prof} &gt; 0) ? 1 : npc_athletics_flag --npc_athletics| (%npc_athletics% &gt; 0) ? (%strength_mod% + %pb_custom%) : npc_athletics }} The Holy Grail here would be for someone to roll all of these things into one perfect Druid Wild Shape script which would function as follows... 1. Select the Druid's token, run an api command like !WildShape --add 2. Check if the Druid has a rollable token already.&nbsp; If not, make the Druid's token rollable with its current image as side 1. 3. Prompt the user to select a beast token as a target. 4. Add the target token's image to the Druid's token as a new side (after counting how many sides already exist and keeping track of the new side's number). 5. Create a copy of the character represented by the target token, prepending the selected token's name to the beast character's original name instead of "Copy of". 6. Evaluate and recalculate all mental stats/saves/skills for the new Wild Shape character based on the selected Druid character. 7. For players who have control of the selected Druid's token, add the journal and control for the new Wild Shape character. 8. Check if the Druid has a #WildShape macro already and either create the macro or insert the line for the new shape as needed. 9. Include an api command like !WildShape --update which can run step 6 for all Wild Shape characters linked to a selected Druid token (probably by However, since there are only three more days until Christmas, I'll settle for the much smaller miracle of someone figuring out the syntax to make ChatSetAttr perform the proper evaluations to make setting those skills/saves as easy as the rest of it!