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

Issue creating a macro to roll random values

1553791383

Edited 1553791603
Question Better summed up at the bottom Can't seem to edit the name of this post Hello all! Thank you for reading this im in a little conundrum :/ My Issue: im running a pathfinder playtest (PF2) campaign right now, and thought it would be great to have some macros for me as the DM to generate information for some of my NPC stats. the issue im running into seems to be more of a specific PF2 issue. when i look at a monster stat block for say... a Zombie Shambler it all looks fine except for the HP value (20). looking at this i though well thats lame, i don't like the fact that all monsters will have the same HP pool. so i looked into converting the hp value of (20) into what im used to something like (3d8+9). i have the math behind how i achieved this but i can't seem to figure out how to take the sum of (20), and make it turn into a version like (3d8+9). Basically im trying to take a catch all approach to this something i can copy paste into each NPC abilites as a macro and it will work regardless of what the HP Value is. any suggestions? 
1553814293

Edited 1553814385
So i have this macro which lets me generate random hit points for my monsters and it also lets me level them up so that they stay up with the players level. I put this in my initiative macro so i can adjust the tokens on the fly and set up encounters quickly. Here is the full code: Oh and as long as you select the token it is universal so you can use it for any monster! /w gm [[1d8 + ?{Level|1}d8 + 0]]**HP**  /w gm @{Selected|wtype}&{template:simple} {{rname=^{init-u}}} {{mod=@{Selected|initiative_bonus}}} {{r1=[[@{Selected|initiative_style}+@{Selected|initiative_bonus}@{Selected|pbd_safe}[INIT] &{tracker}]]}} {{normal=1}} @{Selected|charname_output}
*Speed Racer* Whoa! thats awesome dude i appreciate you sending me your code!
Np! Happy gaming!