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

Need Help with a dice roll in a macro:

Ok I want this to take the character level and divide it by 2 rounded down, then roll a D6 with the result to get the Hit Point damage. This is how I currently have it. It calculates the first part but will not do the D6 part: [[ floor(@{selected|level}/2)d6 ]] The full macro: Vampiric Touch: &{template:2Espell}{{title=@{selected|token_name}, casts a VAMPRIC TOUCH Spell upon @{target|token_name}!}}{{splevel=Level 3 Magic-User}}{{school=Alteration}}{{components=V,S,M}}{{time=[[3]] Segments}}{{range= 0}}{{duration= One Touch}}{{aoe= Caster}}{{save= None}}{{effects= When the caster touches an opponent in melee with a successful attack roll, the opponent losses 1d6 hit points for every 2 caster levels, to a maximum drain of 6d6 for a 12th level caster: [[ floor(@{selected|level}/2)d6 ]] Hit Points Damage to the victim, caster gains these Hit Points! The spell is expended when a successful touch is made or one turn passes. The Hit Points are added to the caster's total, with any hit points over the caster's normal total treated as temporary addition hit points. Any damage to the caster is subtracted from the temporary hit points first. After one hour, any extra hit points above the caster's normal total are lost. The creature originally losing hit points through this spell can regain them by magical or normal healing. Undead creatures are unaffected by this spell.}}
1501402712
Ziechael
Forum Champion
Sheet Author
API Scripter
Try wrapping the number of dice calculation in its own inline roll: [[ [[floor(@{selected|level}/2)]]d6 ]]