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

X damage per 2 hit dice Macro (using Pathfinder community sheet)

1624241624

Edited 1624242508
(EDIT: I realize the title is wrong but I don't think I can change it. It should say "X damage per 2 Hit Dice" not "per 1/2 hit dice") I'm playing in a Pathfinder campaign that is using a lot of homebrew elements and I'm finally getting around to trying to make macros for some of my abilities despite having no experience with coding. I've managed to get a few working on my own with the help of wiki pages and trial and error, but I'm having some trouble figuring out how to code out the following: This deals 1d4 points of damage per 2 hit dice you possess... Additionally,  … dealing 1d2 points of Constitution damage … How do I make a template that has does damage equal to 1d4 per half my hit dice rounded down? What I have right now is: &{template:pf_attack} {{name=Bloodreach}} {{Damage= [[floor(@{Thyra|level}/2)d8]] CON= [[1d2]] }} which obviously isn't working or I wouldn't be here. (Bloodreach is the name of the ability, Thyra is the name of the character) EDIT: I have another ability that says  ...recover a number of hit points equal to 1d8 per 3 hit dice... How would I go about making a macro for that? I would assume something similar to above but with a division of 3 rather than 2. 
1624247873

Edited 1624248827
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
In order to have a number of dice calculate, you just need to have the calculation wrapped in a set of inline roll brackets. So for your d4/2hitdice, it'd be: &{template:pf_attack} {{name=Bloodreach}} {{Damage= [[ [[floor(@{Thyra|level}/2)]]d4]]}} {{CON= [[1d2]] }}