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 Page Attributes

I created a spellbook for my characters so they can have a chat menu rather than having to jump back and forth to the character sheet (5e OGL) when they want to just look to see what their spell does. This is what I currently have for presenting the 2nd level-First position: [@{selected|repeating_spell-2_$0_spellname} ](~@{selected|character_name}|repeating_spell-2_$0_ spell ) While this is great, my problem is sometimes the spell does not present the description when the button is clicked.  It actually tries to cast the spell.  I am assuming  repeating_spell-2_$0_ spell actually is the button that comes up in the spell section of the character sheet to cast the spell. But what I would really like is the speech bubble button. I have tried this: [@{selected|repeating_spell-2_$0_spellname} ](~@{selected|character_name}|repeating_spell-2_$0_ spelldescription ) but it gives me an error telling me no attribute exists when it seems like it does exist in the html code on the github page.  Can someone point me to the correct attribute I am looking for?
You might be interested in using my Universal D&amp;D 5E MacroMule, as it includes a spellbook chat menu (as well as menus for stats, rolls, equipment, etc.). Since you have a Plus subscription, you can import the MacroMule character from my shared MacroMule game and have it set up in just a few minutes. <a href="https://app.roll20.net/forum/post/11344849/update-d-and-d-5e-statblock-macro-mule-v3/?pagenum=1" rel="nofollow">https://app.roll20.net/forum/post/11344849/update-d-and-d-5e-statblock-macro-mule-v3/?pagenum=1</a> To answer your question: the issue is an order of operations, because you'll need to defer the ~ character until after the @{selected|charactername} has processed. In order to do that, you'll have to use html replacements, and switch to a % instead of ~. &amp;percnt;{@{selected|character_name}|repeating_spell-1_$0_spelldescription} Also, instead of using the 'spelldescription', you could use the 'output' from the spell:&nbsp; &amp;percnt;{@{selected|character_name}|repeating_spell-1_$0_output}
Thanks.&nbsp; I don't think the percent is going to work for me because each character has their own custom spellbook so I have made it a token action for each of them.&nbsp; While a lot of the code is copy/paste there is a lot of customization in each one as well. I.e. the spellbook is in the abilities section of their character sheet. When I try the percent it sends me to a "400 bad request" page
I also do not fully understand how _spell works but _spelldescription &nbsp;doesn't
Welp, I think you were right about the _output.&nbsp; When I change _spell to _output &nbsp;it works exactly how I want it to. The tilde still works just fine Thanks.
FoxRobinHood said: I also do not fully understand how _spell works but _spelldescription &nbsp;doesn't Welp, I think you were right about the _output.&nbsp; When I change _spell to _output &nbsp;it works exactly how I want it to. The tilde still works just fine _spell and _output are roll commands .&nbsp; Those are the same as clicking on the spell from the character sheet.&nbsp; _spelldescription &nbsp;is simply an attribute that has a text value. When you click on the spell from the sheet or click on the button with the _spell &nbsp;roll command, the character sheet has an output of something like this: @{wtype}&amp;{template:spelloutput} {{level=@{spellschool} @{spelllevel}}} {{name=@{spellname}}} {{castingtime=@{spellcastingtime}}} {{range=@{spellrange}}} {{target=@{spelltarget}}} @{spellcomp_v} @{spellcomp_s} @{spellcomp_m} {{material=@{spellcomp_materials}}} {{duration=@{spellduration}}} {{description=@{spelldescription}}} {{athigherlevels=@{spellathigherlevels}}} @{spellritual} {{innate=@{innate}}} {{savedc=@{roll_output_dc}}} @{spellconcentration} @{charname_output} One &nbsp;of the things that is included in the spell output is the _spelldescription, as well as all the other spell information.&nbsp; Depending on whether the spell output is set to 'Spellcard' or 'Attack' will determine if what is shown in chat is the 'spell' template or 'atkdmg' template. Attributes are called using @{CharacterReference|AttributeName} , while roll commands are called using either %{CharacterReference|AbilityName} or an Ability Button [Button Name](~CharacterReference|AbilityName) . Have you looked at the MacroMule approach? It sounds like you're trying to recreate the same thing. This is the 'spellbook' chat menu that is created for a PC: Features: The chat menu will list up to 15 spells per level The small 'Info' icon to the left of each spell can be clicked to whisper the _output&nbsp;from the spell to the player The range will be shown to the right in parentheses If there is information in the 'Innate' field, that will be shown in blue to the right of the range information Casting time, duration, and target information will be shown in a tooltip if the mouse hovers over the 'Info' icon The PCs Spell Attack and Spell Save DC is shown in the menu The spell slots per level are shown Clicking on the name of the spell will cast the spell, just the same as clicking on the spell from the character sheet If you don't want to use all of the features of the entire MacroMule, it would be pretty simple to remove the 'footer' from the bottom and only give your players a 'Spellbook' macro on their character sheets as a token action.