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

Maximizing dice roll

Hello, In my pathfinder home rule some weapons do max damage on their dice roll instead of multiplying. Does someone know how to write a macro so as to maximizing such dice roll in an easier way as what I developed: &{template:pf_attack} {{character_name=@{character_name}}} {{character_id=@{character_id}}} {{name=@{name}}} {{attack=[[ 1d20cs>@{crit-target} + [[ @{total-attack} ]] ]]}} {{damage=[[ @{damage-dice-num}d@{damage-die} + [[ @{total-damage} ]] ]]}} {{crit_confirm=[[ 1d20   + [[ @{total-attack} ]] ]]}} {{crit_damage=[[ @{damage-die} + @{total-damage} ]]}} {{type=@{type}}} {{description=@{notes}}} @{iterative_attacks} @{macro_options} => I tell the macro not to roll critical but to take the type of die + additional damages (bold) Is there a "Max" function ? Thanks all.
1567845487
GiGs
Pro
Sheet Author
API Scripter
To get a max of a die roll, use keep highest, which on a simple roll would look like /roll {1d8,8+0d0}kh1 keep highest isnt able to compare numbers and dice rolls, you need to convert the number to a dice roll so they are both dice, which is why the second term is 8+0d0, and not just 8. Hopefully you can adapt that to your needs.
Hi Gigs, Thanks for your help. Good to remember that the function cannot compare different format of variables.