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

How to add labels to Math-Only Rolls

So this was something I had resigned myself to not being able to do. That is, until I had this brilliant (I feel) idea tonight. In my various Pathfinder games, I will setup macros for attacks, something along the lines of this: /em @{Target|token_name} is attacked with a morningstar [[ 1d20 + @{BAB}[Base Attack Bonus] + @{STR}[Strength] +1[Weapon Focus] ]] Attack vs. AC [[ 20 + @{BAB} + @{STR} +1 ]] Minimum to crit [[ 1d8 + @{STR} ]] B/P Dmg [[ 1d20 + @{BAB} + @{STR} +1 ]] Crit Confirm [[ 1d8 + @{STR} ]] Crit Dmg I have all these setup as attributes instead of having to fill out a full character sheet. That way, if I drink say a Potion of Bull's Strength, I had 2 to my STR attribute (+4 to Strength = +2 to STR modifier), and my attack updates automatically without me having to remember to change the attack bonus and damage and all that Anyways, having the labels in there makes it easy to know what each bonus is when looking at the output in chat. The problem is, if you add the labels to the "Minimum to crit" roll, it fails with the following error: Could not determine result type of: [{"type":"M","expr":"10+7+1+2+0"},{"type":"L","text":"Size"}] This is because (my guess) the labels are not allowed on Math-Only rolls, for whatever reason (my guess is math-only can be easily calculated, where a dice roll would have to go through an algorithm to "roll" the die and that algorithm accounts for the labels). Anyways, I just figured I'd put the labels in the first roll and that's that, I could look it up there if I needed to. Well tonight I was writing a quick CMB/CMD macro like this: CMB: [[ 1d20+@{BAB} +@{STR} +0[Size] ]] CMD: [[ 10+@{BAB} +@{STR} +@{DEX} +1 ]] Makes it very easy to check CMB/CMD for a creature. The problem is, I may forget at some point in the future what that +1 is for, and I can't label it. Or can I? Turns out, I can. I thought "How can I make this a dice roll, to allow labels, without affecting the outcome?" And the answer is simple: CMD: [[ d0 + 10+@{BAB} +@{STR} +@{DEX} +1[Dodge] ]] Now this is a dice roll, so it is parsed differently, and I can use my label, and the outcome doesn't change, since it will always roll 0. :D Hope this helps!
1417795801

Edited 1417804677
vÍnce
Pro
Sheet Author
Thanks Mark. Have you looked at the Macros - Pathfinder Examples on the wiki? There are lot's of great examples of this. Edit/Update: Anyways, having the labels in there makes it easy to know what each bonus is when looking at the output in chat. The problem is, if you add the labels to the "Minimum to crit" roll, it fails with the following error: Oops. I just caught the point you were making, and; CMD: [[ d0 + 10+@{BAB} +@{STR} +@{DEX} +1[Dodge] ]] Now this is a dice roll, so it is parsed differently, and I can use my label, and the outcome doesn't change, since it will always roll 0. :D That's a cool trick. Thank you.
Irony: One Mark S. Illustrating a point that someone else refers to some examples written by a Mark G. Mark's of the world... UNITE!
Us Marks know what we're doing :)
1417834874
Gold
Forum Champion
I never had a use for my d0's until now