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

?{Mod?|0} in a drop down macro

Note:  This is for 1st edition D&D .. so I am using Vince's 1st edition character sheet. I am trying to create a drop down menu for Attribute Checks (and Saving throws) and while I can get it to work correctly in a basic form, I would like to try and add the ability to have a Modifier entered due to various gameplay reasons. This is what I have so far for the basic Attribute Checks &{template:general}{{color=@{selected|color_option}}}{{subtag=Attribute Check}}{{name=@{selected|character_name}}}{{?{Attribute|Strength, @{selected|strength} Strength / Roll: [[1d20]] |Intelligence,@{selected|intelligence} Intelligence / Roll:  [[1d20]]|Wisdom,@{selected|wisdom} Wisdom / Roll:  [[1d20]]|Dexterity,@{selected|Dexterity} Dexterity / Roll:  [[1d20]]|Constitution,@{selected|constitution} Constitution / Roll:  [[1d20]]|Charisma,@{selected|charisma} Charisma / Roll:  [[1d20]]}}} I would like to add the Mod and have it added/subtracted from the roll that is made and display the result.    I have tried to add the Mod in there a few different ways, but anytime I do it breaks the drop down macro (assuming since it is also using the same type of code) Can anyone help me figure out how I can add it?    Thank you in advance
1674336429
GiGs
Pro
Sheet Author
API Scripter
If you don't need Modifier to have its own entry (like {{Mod=?{mod|0} }}, this should be fairlly straightforward. But you''ll need to move the inline roll brackets. Something like this will avoid the need for any special syntax: &{template:general}{{color=@{selected|color_option}}}{{subtag=Attribute Check}}{{name=@{selected|character_name}}}{{[[1d20 [Roll]+ ?{Attribute| Strength, @{selected|strength} [Strength]| Intelligence,@{selected|intelligence} [Intelligence]| Wisdom,@{selected|wisdom} [Wisdom]| Dexterity,@{selected|Dexterity} [Dexterity]| Constitution,@{selected|constitution} [Constitution]| Charisma,@{selected|charisma} [Charisma] }+ ?{Modifier?|0} [Modifier] ]]}}
I am trying to do something a little different, but your post did make me realize that I was over thinking this.   The only thing I need within my drop-down is pulling up the characters current attribute for whatever one I am rolling on.   I do not need any of my rolls in there, I can have those at the end of the code.    Thank you