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

Call the choice, not the result

1636459500

Edited 1636459536
Hey I've made a macro that calls a skill and an ability and want the name the macro outputs to be the chosen ability and skill, not the result of what that choice does. For instance you chose Acrobatics which checks if you're proficient to add to the roll, then choose which ability mod to add, but I want the name the macro outputs to be "Dexterity Acrobatics Check" not "(4) (2\*1) Check". There's also some expertise/specialty buy just ignore that.     &{template:default} !     ?{     Skill     |Acrobatics, @{acrobatics_prof}     |Animal Handling, @{animal_handling_prof}     |Arcana, @{arcana_prof}     |Athletics, @{athletics_prof}                         [...]     }      ?{     Ability,     |Strength, @{strength_mod}     |Dexterity, @{dexterity_mod}     |Constitution, @{constitution_mod}     |Intelligence, @{intelligence_mod}     |Wisdom, @{wisdom_mod}     |Charisma, @charisma_mod}     }     ?{     Expertise/speciality     |0 dice, 0d4     |1 dice, 1d4     |2 dice, 1d6     |3 dice, 1d8     |4 dice, 1d10      }      {     {     name=?{Ability},?{Skill} Check ( ?{Speciality}?{Expertise/speciality} )     }     }     {     {     roll=[[1d20 + ?{Expertise/speciality}[Expertise/speciality] +?{Skill}[Proficiency] +?{Ability}[Ability Mod] ]]     }     } PS. what the fuck is up with it not being able to handle linebreaks and tabs....
1636471619

Edited 1636473982
Andreas J.
Forum Champion
Sheet Author
Translator
Roll20 macros aren't meant to do that, and the double bracket syntax should be kept together. {{ }} Linebreaks &amp; whitespaces matter a lot to roll20 macros, don't go and add all that into them. I know roll queries can somewhat handle linebreaks, but it also has it limits. And I'm not aware of any straightforward way of doing this roll/label selection, but could be possible with tricky stuff like @{?{attribute|Strength|Dexterity}_mod} Edit: Nevermind, <a href="https://wiki.roll20.net/Order_of_Operations" rel="nofollow">https://wiki.roll20.net/Order_of_Operations</a> says my trick isn't possible, but maybe works if the exist as macros or abilities...? This is the spaced out version of your macro that still works. So it seems inside roll queries is the only place where you can have line breaks, otherwise things break. &amp;{template:default}?{Skill| Acrobatics, 1| Animal Handling, 2| Arcana, 3| Athletics, 4 }?{Ability| Strength, @{a}| Dexterity,@{b}| Constitution, 3| Intelligence, 4| Wisdom, 5| Charisma, 5 }?{Expertise/speciality| 0 dice, 0d4| 1 dice, 1d4| 2 dice, 1d6| 3 dice, 1d8| 4 dice, 1d10 }{{name=?{Ability},?{Skill} Check ( ?{Speciality}?{Expertise/speciality} )}} {{roll=[[1d20 + ?{Expertise/speciality}[Expertise/speciality] +?{Skill}[Proficiency] +?{Ability}[Ability Mod] ]]}}
1636475348
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Andreas J. said: This is the spaced out version of your macro that still works. So it seems inside roll queries is the only place where you can have line breaks, otherwise things break. Well, and inside the double brackets denoting a template field as well, but yeah, the indentation of each bracket is going to play merry hell. As Andreas said, this isn't easily doable in a roll query, or even with a chat menu. It is possible &nbsp;by nesting the entire template output in each choice, but that way lies madness.
1636479016

Edited 1636479041
Yeah i resulted in just calling it Skill Check and for the calculation I added the name after each skill and ability.&nbsp; It's just so damn hard to bug fix when it's all in one line, but I guess I can live with that (I removed the spaces afterwards).