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

Spell effect cap macros

How do I set up a spell effect once and not have to touch it again? For example in Pathfinder 1e: Cure Light Wounds heals 1d8+caster level to a max of 5. I found this somewhere years ago: Heal [[ 1d8 + ( { 5 , @{class1_level} }kl1) ]] How do I set it up for Burning Hands or Fireball with a cap on the number of dice? If there is a guide somewhere for this in the wiki, I haven't been able to find it. Thank you in advance.
1696241207

Edited 1696243061
Ziechael
Forum Champion
Sheet Author
API Scripter
It depends on how universal you want the macro to be? You could have queries that prompt for the number of dice (complete with specific choices to limit options), type of dice AND bonus/type of bonus... it could be quite arduous to account for every eventuality in a single macro though. Here is an example/starter: !?{Number of dice|1|2|3|4|5|6|7|8|9|10} ?{Type of dice|4|6|8|10|12|20} ?{Bonus|Flat,?{Flat bonus|0}|Level based,?{Capped|No,@{class1_level}|Yes,{@{class1_level},?{Level cap|0}}kl1}} [[ ?{Number of dice}d?{Type of dice} + ?{Bonus} ]] Side note: I've used the ! prefix trick to order and store the query values to make the actual macro itself easier to read and understand, the queries will gather your answers and insert them into the main macro. You could expand it further by added level options into the number of dice as well but as a proof of concept I haven't the time... also this is largely untested although morbid curiosity may force me to create a pf1e game to test it on!
1696243110
Ziechael
Forum Champion
Sheet Author
API Scripter
Tested and working... again you could add more functionality for different class levels (defaults to primary class currently) but couldn't be bothered lol
I just want to have it set up so what I click on the spell in my spellbook, it brings up the details in chat including the correct damage dice roll. I don't mind personalizing the formula for each individual spell, I just need to know how to. How do I use that formula, do I paste it into the spell effect field?
1696260488
Ziechael
Forum Champion
Sheet Author
API Scripter
It would work best as an attribute on the sheet which could then be a token action... no idea about on the sheet itself as I've never used the PF1e sheet sorry. Hopefully someone with more experience of the sheet will be able to help better.
1696305217

Edited 1696305277
So, I did get some help. For anyone else who needs the formula to tweak for other spells, here is the script for burning hands for their 1st caster class: [[[[{(1*@{caster1_level}),5}kl1]]d4]]