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

Nesting Macro Question

Macro Gurus: I've built a nesting macro for my AD&D (1e) game that creates a "spell book" for each classbut I feel like the buttons are pretty clunky. When I remove the "~" from the macro the spell name look is much cleaner, but when I click on it, a new window opens with a "page not found" message. Question 1: Is there a way to use the cleaner look (2nd option) to link to the spells? See macro script and screen shots below. &{template:general} {{name=The Spell Book of }} {{subtag=@{selected|character_name}}} {{**First Level**}} {{[@{selected|repeating_spells_$0_spell_name}](~selected|repeating_spells_$0_spell_roll) }} &{template:general} {{name=The Spell Book of }} {{subtag=@{selected|character_name}}} {{**First Level**}} {{[@{selected|repeating_spells_$0_spell_name}](selected|repeating_spells_$0_spell_roll) }} Question 2: I tried making a character sheet as a spell book for each caster class that the macro would point to. When I select the player token and link to a spell, it casts ok, but I am trying to have it calculate variable parameters, like range or area of effect. When I do so, the calculation is using the template, not the selected character token. Is there a fix for this? See script below. [[0.5*(@selected|level)]] Feet I always appreciate help from those with a higher wisdom (or intelligence???) than mine when it comes to script writing. I've figured out a good bit with macros, but haven't delved into API scripting yet - I've just used availble ones in my game. Thank you! ~Max
1714856529
Gauss
Forum Champion
Hi Maxwell,&nbsp; Instead of going for your option 2 I suggest presenting the buttons in a different way instead.&nbsp; Here is a guide on how to use CSS to style Chat Menus:&nbsp;<a href="https://wiki.roll20.net/Macros/Formatting#Styling_with_CSS" rel="nofollow">https://wiki.roll20.net/Macros/Formatting#Styling_with_CSS</a>
1714864041
vÍnce
Pro
Sheet Author
You should also include the curly brackets when trying to pull attribute data. Ie this [[0.5*(@selected|level)]] Should be; [[0.5*(@{selected|level})]]
Many thanks to you both! I will check this out and let you know how it goes! ~Max