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 .
×

Macro help- selecting result, variable inline roll

I'm trying to do 2 different things with this single spell: /em casts Searing Channeled Pyroburst! as a swift: [[{{@{casterlevel}-1}/2}]]d4 to a single target as a standard: [[10d6]] in a 10' radius as a full round: [[10d8]] in a 15' radius as 2 full rounds: [[10d10]] in a 20' radius Spell Pen: [[1d20+{@{spellpen}}+1]] Reflex DC: [[10+{@{INT-mod}}+{@{sf-evocation}}+5]] I'm not sure this can all be in one macro, I can do one of four four different effects based on time spent casting. What do I need to add in order to select which effect I want to display? I can't seem to make the "swift" line act as an inline roll. I can't seem to get any macro with a modified casterlevel to work as an inline roll. Another example that works as normal, but I somehow can't change it to an inline display: /roll ([[{@{casterlevel},15}dh1]])d6
You have the [[ ]] in the wrong place. instead of [[ { { @{casterlevel}-1 } /2 } ]]d4 I think you want [[ ( (@{casterlevel}-1 )/2 )d4 ]] ( I could be a little off; I haven't tested this) As far as choosing which one to display? Aside from making a separate macro for each one you really can't. The macro system doesn't have any capacity for If/Then/Else conditionals That being said; that all fits in one macro, but just barely.
Doesn't work. Comes back with a syntax error. I didn't think if/then was an option, but I wasn't certain. Thanks for the info!
1401518100

Edited 1401518106
Gauss
Forum Champion
Ian , I checked Mark's solution and it worked for me. Could you copy/paste what isn't working?
My apologies Mark, transcription error on my part. Your code works perfectly. Any chance I can get you to work your magic on the other example I'm having trouble converting to an inline code? :) /roll ([[{@{casterlevel},15}dh1]])d6
1401527668

Edited 1401527880
Gauss
Forum Champion
What you posted should work, what is @{casterlevel} value? The value can break things.
As it is now the code works fine, but my dm wants everything to be inline. Whenever I try to convert it the code to inline I get an output that tells me the number of dice to roll, not not the value of the rolled dice. Aka it gives "10d6" rather than "35" @{casterlevel} is the generic value for caster level from the pathfinder character sheets.
1401566577
Gauss
Forum Champion
There is no way to convert " /roll ([[{@{casterlevel},15}dh1]])d6 " into an inline roll because you cannot nest inline rolls at this time.
Thanks for your help.
As far as putting it all into one Macro, you can try something like this (I know this is really complicated, but you might like it) The first line is an emote. Within this emote it will ask the user to enter a number based on the radius of the spell and type of action. If you just hit enter it will default to "1 square" for the Swift Action option. The second line has 2 queries inside the inline roll: The first one asks how many dice based on the type of action. If you just hit enter it will default to the Swift Action "4" - the second query asks for how many dice, if you just hit enter it defaults to the Swift Action option of "4" ---------------------- /em casts Searing Channeled Pyroburst to a ?{Enter Effect Radius: Swift Action: Hit Enter, Standard Action: Enter 10, Full-Round Action: Enter 15, 2 Full Round Actions: Enter 20|1 square}' radius! [[?{Enter # of dice: Swift Action: Hit Enter, otherwise Enter 10|((@{caster level}-1)/2)}d?{Enter type of die to be rolled: Swift Action: Hit Enter, Standard Action: Enter 6, Full-Round Action: Enter 8, 2 Full-Round Actions: Enter 10|4}]] ----------------------