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

Help with a spellbook macro Please

Can I get a little Help with a spellbook macro see below: /w @{selected|token_name}&{template:npcatk} {{description=**CANTRIPS** [@{selected|repeating_spell-cantrip_$0_spellname}](~selected|repeating_spell-cantrip_$0_spell) --------------------- **LEVEL 1 SPELLS** (**@{selected|lvl1_slots_expended}**) [[1t[Prepared-@{repeating_spell-1_$0_spellprepared}]]][@{selected|repeating_spell-1_$0_spellname}](~selected|repeating_spell-1_$0_spell)[[1t[Ritual-@{repeating_spell-1_$0_spellritualflag}]]] }} I have 4 rollable tables Prepared-0 " " , Prepared-1" ¶ ", Ritual-0 " " , Ritual-1 " ® " Thank you to Scott C. for this however I cant seem to get the ritual part of the script to work. Thanks for any help this is a what I have so far its just missing the ritual tags
Are you trying to create a macro to display all of the spells on the character sheet, while also displaying those that are prepared? I have a macro for that: <a href="https://app.roll20.net/forum/post/9971626/universal-npc-statblock-abilities-and-spells-chat-menus-for-d-and-d-5e-sheet-no-api-or-stylus-required/?pageforid=10023706#post-10023706" rel="nofollow">https://app.roll20.net/forum/post/9971626/universal-npc-statblock-abilities-and-spells-chat-menus-for-d-and-d-5e-sheet-no-api-or-stylus-required/?pageforid=10023706#post-10023706</a> Make sure you read through the thread, as this requires you to create a character named 'DIV' and create an attribute named 'sel' with '@{selected' in the current value.&nbsp; And you'll have to call it from a macro in order to not get any error messages, because of Roll20 Order of Operations. If you want a version with Ritual tags, I can probably put that together as well.
1642918363

Edited 1642918389
But to answer your question, the attribute you are looking for is: @{repeating_spell-1_$0_spellritual} instead of&nbsp; @{repeating_spell-1_$0_spellritualflag} However, the odd thing about the 'spellritual' attribute, is that a non-ritual spell has a value of '0', but a ritual spell has a value of 'Yes', which means it won't work with your rollable table approach.
I was using ritualflag in the hopes it was returning a 1 or 0 as its a toggle
Thank you Jarren I got it to work with a little trial and error. I changed the sepllritualflag to spellritual and I changed my roll-able table name to Ritual-Yes " " this is case sensitive so the Y needs to be capitalised. here is the code and results for anyone interested: /w @{selected|token_name}&amp;{template:npcatk} {{description=**CANTRIPS** [@{selected|repeating_spell-cantrip_$0_spellname}](~selected|repeating_spell-cantrip_$0_spell) [@{selected|repeating_spell-cantrip_$1_spellname}](~selected|repeating_spell-cantrip_$1_spell) [@{selected|repeating_spell-cantrip_$2_spellname}](~selected|repeating_spell-cantrip_$2_spell) --------------------- **LEVEL 1 SPELLS** (**@{selected|lvl1_slots_expended}**) [[1t[Prepared-@{repeating_spell-1_$0_spellprepared}]]][@{selected|repeating_spell-1_$0_spellname}](~selected|repeating_spell-1_$0_spell)[[1t[Ritual-@{repeating_spell-1_$0_spellritual}]]] [[1t[Prepared-@{repeating_spell-1_$1_spellprepared}]]] [@{selected|repeating_spell-1_$1_spellname}](~selected|repeating_spell-1_$1_spell)[[1t[Ritual-@{repeating_spell-1_$1_spellritual}]]] [[1t[Prepared-@{repeating_spell-1_$2_spellprepared}]]] [@{selected|repeating_spell-1_$2_spellname}](~selected|repeating_spell-1_$2_spell)[[1t[Ritual-@{repeating_spell-1_$2_spellritual}]]]&nbsp; [[1t[Prepared-@{repeating_spell-1_$3_spellprepared}]]] [@{selected|repeating_spell-1_$3_spellname}](~selected|repeating_spell-1_$3_spell)[[1t[Ritual-@{repeating_spell-1_$3_spellritual}]]] [[1t[Prepared-@{repeating_spell-1_$4_spellprepared}]]][@{selected|repeating_spell-1_$4_spellname}](~selected|repeating_spell-1_$4_spell)[[1t[Ritual-@{repeating_spell-1_$4_spellritual}]]]&nbsp; [[1t[Prepared-@{repeating_spell-1_$5_spellprepared}]]][@{selected|repeating_spell-1_$5_spellname}](~selected|repeating_spell-1_$5_spell)[[1t[Ritual-@{repeating_spell-1_$5_spellritual}]]] [[1t[Prepared-@{repeating_spell-1_$6_spellprepared}]]][@{selected|repeating_spell-1_$6_spellname}](~selected|repeating_spell-1_$6_spell)[[1t[Ritual-@{repeating_spell-1_$6_spellritual}]]] [[1t[Prepared-@{repeating_spell-1_$7_spellprepared}]]][@{selected|repeating_spell-1_$7_spellname}](~selected|repeating_spell-1_$7_spell)[[1t[Ritual-@{repeating_spell-1_$7_spellritual}]]] [[1t[Prepared-@{repeating_spell-1_$8_spellprepared}]]][@{selected|repeating_spell-1_$8_spellname}](~selected|repeating_spell-1_$8_spell)[[1t[Ritual-@{repeating_spell-1_$8_spellritual}]]]&nbsp; [[1t[Prepared-@{repeating_spell-1_$9_spellprepared}]]][@{selected|repeating_spell-1_$9_spellname}](~selected|repeating_spell-1_$9_spell)[[1t[Ritual-@{repeating_spell-1_$9_spellritual}]]]&nbsp; [[1t[Prepared-@{repeating_spell-1_$10_spellprepared}]]][@{selected|repeating_spell-1_$10_spellname}](~selected|repeating_spell-1_$10_spell)[[1t[Ritual-@{repeating_spell-1_$10_spellritual}]]]&nbsp; [[1t[Prepared-@{repeating_spell-1_$11_spellprepared}]]][@{selected|repeating_spell-1_$11_spellname}](~selected|repeating_spell-1_$11_spell)[[1t[Ritual-@{repeating_spell-1_$11_spellritual}]]]&nbsp; [[1t[Prepared-@{repeating_spell-1_$12_spellprepared}]]][@{selected|repeating_spell-1_$12_spellname}](~selected|repeating_spell-1_$12_spell)[[1t[Ritual-@{repeating_spell-1_$12_spellritual}]]]&nbsp; [[1t[Prepared-@{repeating_spell-1_$13_spellprepared}]]][@{selected|repeating_spell-1_$13_spellname}](~selected|repeating_spell-1_$13_spell)[[1t[Ritual-@{repeating_spell-1_$13_spellritual}]]]&nbsp; [[1t[Prepared-@{repeating_spell-1_$14_spellprepared}]]][@{selected|repeating_spell-1_$14_spellname}](~selected|repeating_spell-1_$14_spell)[[1t[Ritual-@{repeating_spell-1_$14_spellritual}]]]&nbsp; [[1t[Prepared-@{repeating_spell-1_$15_spellprepared}]]][@{selected|repeating_spell-1_$15_spellname}](~selected|repeating_spell-1_$15_spell)[[1t[Ritual-@{repeating_spell-1_$15_spellritual}]]]&nbsp; [[1t[Prepared-@{repeating_spell-1_$16_spellprepared}]]][@{selected|repeating_spell-1_$16_spellname}](~selected|repeating_spell-1_$16_spell)[[1t[Ritual-@{repeating_spell-1_$16_spellritual}]]]&nbsp; [[1t[Prepared-@{repeating_spell-1_$17_spellprepared}]]][@{selected|repeating_spell-1_$17_spellname}](~selected|repeating_spell-1_$17_spell)[[1t[Ritual-@{repeating_spell-1_$17_spellritual}]]]&nbsp; [[1t[Prepared-@{repeating_spell-1_$18_spellprepared}]]][@{selected|repeating_spell-1_$18_spellname}](~selected|repeating_spell-1_$18_spell)[[1t[Ritual-@{repeating_spell-1_$18_spellritual}]]]&nbsp; [[1t[Prepared-@{repeating_spell-1_$19_spellprepared}]]][@{selected|repeating_spell-1_$19_spellname}](~selected|repeating_spell-1_$19_spell)[[1t[Ritual-@{repeating_spell-1_$19_spellritual}]]] [[1t[Prepared-@{repeating_spell-1_$20_spellprepared}]]][@{selected|repeating_spell-1_$20_spellname}](~selected|repeating_spell-1_$20_spell)[[1t[Ritual-@{repeating_spell-1_$20_spellritual}]]] [[1t[Prepared-@{repeating_spell-1_$21_spellprepared}]]][@{selected|repeating_spell-1_$21_spellname}](~selected|repeating_spell-1_$21_spell)[[1t[Ritual-@{repeating_spell-1_$21_spellritual}]]] [[1t[Prepared-@{repeating_spell-1_$22_spellprepared}]]][@{selected|repeating_spell-1_$22_spellname}](~selected|repeating_spell-1_$22_spell)[[1t[Ritual-@{repeating_spell-1_$22_spellritual}]]]&nbsp; [[1t[Prepared-@{repeating_spell-1_$23_spellprepared}]]][@{selected|repeating_spell-1_$23_spellname}](~selected|repeating_spell-1_$23_spell)[[1t[Ritual-@{repeating_spell-1_$23_spellritual}]]]&nbsp; [[1t[Prepared-@{repeating_spell-1_$24_spellprepared}]]][@{selected|repeating_spell-1_$24_spellname}](~selected|repeating_spell-1_$24_spell)[[1t[Ritual-@{repeating_spell-1_$24_spellritual}]]]&nbsp;&nbsp; --------------------- }} Four rollable tables are needed Prepared-0 " " , Prepared-1" ¶ ", Ritual-0 " " , Ritual-Yes " ® " and only repeat the number of lines for the number of spells in your list or you will get errors.