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

5e OGL - Add counter for number of spells prepared

Score + 27
1553933614
Kai
Sheet Author
My suggestion is for the 5e OGL sheet. I would like to have a field that shows the number of spells the character is allowed to prepare and that also shows the number of spells I have prepared (i.e. the number of red dots clicked). As the number of prepared spells grows it becomes harder to count the spells every time I change something about it. There should be also an option to have spells 'always prepared' like domain spells that do not count to your limit. I hope that other users miss this feature, too.
1554380033
Kai
Sheet Author
Thanks for the support so far.
I hate having to look it up each time, it should be listed on the spell sheet.
You could put the number as a calculation in the features & traits section of the character sheet. For example a cleric prepare's their Wisdom modifier plus their cleric level spells, so you could put [[@{wisdom_mod}+@{base_level}]] in the trait. Then we you need the calculated value you would print the trait to the chat window by clicking the chat bubble for the trait.
+1 to this idea!  My new players have a tough time with this, and it changes as they level up, so having a reference for them on their D&D 5e character sheet would be extremely good.
+1 Yes
I can think of a few issues with implementing this idea (which I do like): 1. Calculating the number of spells that can be prepared for a single-classed character isn't too difficult.  0.5 * Spellcasting Modifier + Level for full casters, 0.5 * Spellcasting Modifier + 0.5 * Level for half casters. So the sheet would just need to see which class is selected and do the calculation based on the spellcasting modifier.  (Cleric, Druid, and Wizard are full casters who prepare spells; Paladin is the only half caster that prepares spells; all other classes are 'known' casters and don't get to change their spells during a long rest.)  Certainly doable. 2. Calculating the number of spells that can be prepared for a multi-classed character is a little trickier.  Still doable, but now the sheet has to check for how many levels in each class and then do the calculation and sum. This also adds a wrinkle of whether there will be a check to make sure you have prepared the correct number of spells for each class .  3. There will also need to be a way to exclude spells that are known from non-spellcasting class features, such as Racial Traits (e.g. Tiefling's Hellish Rebuke  or the Hat of Disguise Disguise Self  spells).  For that case, it would already be nice if there was a different color dot or something to distinguish between spells that have been prepared for the class versus other features. With that, Kyle G's suggestion to add a calculation is a good workaround in the meantime. But I would simply use 'spellcasting_ability' instead of 'wisdom_mod' as it'll work for any base class. [[@{spellcasting_ability}@{base_level}]] If you want a better macro that shows how many spells are prepared per level with a total at the bottom, then here is a macro you can use: /w gm &{template:npcaction} &{noerror} {{rname=@{selected|character_name}}} {{name=Prepared Spells}} [[ [[0@{selected|repeating_spell-1_$0_spellprepared} + 0@{selected|repeating_spell-1_$1_spellprepared} + 0@{selected|repeating_spell-1_$2_spellprepared} + 0@{selected|repeating_spell-1_$3_spellprepared} + 0@{selected|repeating_spell-1_$4_spellprepared} + 0@{selected|repeating_spell-1_$5_spellprepared} + 0@{selected|repeating_spell-1_$6_spellprepared} + 0@{selected|repeating_spell-1_$7_spellprepared} + 0@{selected|repeating_spell-1_$8_spellprepared} + 0@{selected|repeating_spell-1_$9_spellprepared}]] + [[0@{selected|repeating_spell-2_$0_spellprepared} + 0@{selected|repeating_spell-2_$1_spellprepared} + 0@{selected|repeating_spell-2_$2_spellprepared} + 0@{selected|repeating_spell-2_$3_spellprepared} + 0@{selected|repeating_spell-2_$4_spellprepared} + 0@{selected|repeating_spell-2_$5_spellprepared} + 0@{selected|repeating_spell-2_$6_spellprepared} + 0@{selected|repeating_spell-2_$7_spellprepared} + 0@{selected|repeating_spell-2_$8_spellprepared} + 0@{selected|repeating_spell-2_$9_spellprepared}]] + [[0@{selected|repeating_spell-3_$0_spellprepared} + 0@{selected|repeating_spell-3_$1_spellprepared} + 0@{selected|repeating_spell-3_$2_spellprepared} + 0@{selected|repeating_spell-3_$3_spellprepared} + 0@{selected|repeating_spell-3_$4_spellprepared} + 0@{selected|repeating_spell-3_$5_spellprepared} + 0@{selected|repeating_spell-3_$6_spellprepared} + 0@{selected|repeating_spell-3_$7_spellprepared} + 0@{selected|repeating_spell-3_$8_spellprepared} + 0@{selected|repeating_spell-3_$9_spellprepared}]] + [[0@{selected|repeating_spell-4_$0_spellprepared} + 0@{selected|repeating_spell-4_$1_spellprepared} + 0@{selected|repeating_spell-4_$2_spellprepared} + 0@{selected|repeating_spell-4_$3_spellprepared} + 0@{selected|repeating_spell-4_$4_spellprepared} + 0@{selected|repeating_spell-4_$5_spellprepared} + 0@{selected|repeating_spell-4_$6_spellprepared} + 0@{selected|repeating_spell-4_$7_spellprepared} + 0@{selected|repeating_spell-4_$8_spellprepared} + 0@{selected|repeating_spell-4_$9_spellprepared}]] + [[0@{selected|repeating_spell-5_$0_spellprepared} + 0@{selected|repeating_spell-5_$1_spellprepared} + 0@{selected|repeating_spell-5_$2_spellprepared} + 0@{selected|repeating_spell-5_$3_spellprepared} + 0@{selected|repeating_spell-5_$4_spellprepared} + 0@{selected|repeating_spell-5_$5_spellprepared} + 0@{selected|repeating_spell-5_$6_spellprepared} + 0@{selected|repeating_spell-5_$7_spellprepared} + 0@{selected|repeating_spell-5_$8_spellprepared} + 0@{selected|repeating_spell-5_$9_spellprepared}]] + [[0@{selected|repeating_spell-6_$0_spellprepared} + 0@{selected|repeating_spell-6_$1_spellprepared} + 0@{selected|repeating_spell-6_$2_spellprepared} + 0@{selected|repeating_spell-6_$3_spellprepared} + 0@{selected|repeating_spell-6_$4_spellprepared}]] + [[0@{selected|repeating_spell-7_$0_spellprepared} + 0@{selected|repeating_spell-7_$1_spellprepared} + 0@{selected|repeating_spell-7_$2_spellprepared} + 0@{selected|repeating_spell-7_$3_spellprepared} + 0@{selected|repeating_spell-7_$4_spellprepared}]] + [[0@{selected|repeating_spell-8_$0_spellprepared} + 0@{selected|repeating_spell-8_$1_spellprepared} + 0@{selected|repeating_spell-8_$2_spellprepared} + 0@{selected|repeating_spell-8_$3_spellprepared} + 0@{selected|repeating_spell-8_$4_spellprepared}]] + [[0@{selected|repeating_spell-9_$0_spellprepared} + 0@{selected|repeating_spell-9_$1_spellprepared} + 0@{selected|repeating_spell-9_$2_spellprepared} + 0@{selected|repeating_spell-9_$3_spellprepared} + 0@{selected|repeating_spell-9_$4_spellprepared}]] ]] {{description=Lvl 1: $[[0.computed]] Lvl 2: $[[1.computed]] Lvl 3: $[[2.computed]] Lvl 4: $[[3.computed]] Lvl 5: $[[4.computed]] Lvl 6: $[[5.computed]] Lvl 7: $[[6.computed]] Lvl 8: $[[7.computed]] Lvl 9: $[[8.computed]] $[[9.computed]] / [[@{selected|spellcasting_ability}@{selected|base_level}]]}} Of if you want to add a Trait to your character that can be clicked on, it will look like this: Level 1: $[[1.computed]] Level 2: $[[2.computed]] Level 3: $[[3.computed]]  Level 4: $[[4.computed]] Level 5: $[[5.computed]] Level 6: $[[6.computed]]  Level 7: $[[7.computed]] Level 8: $[[8.computed]] Level 9: $[[9.computed]] Total: $[[10.computed]] / [[@{spellcasting_ability}@{base_level}]] }} {{{[[ [[0@{repeating_spell-1_$0_spellprepared} + 0@{repeating_spell-1_$1_spellprepared} + 0@{repeating_spell-1_$2_spellprepared} + 0@{repeating_spell-1_$3_spellprepared} + 0@{repeating_spell-1_$4_spellprepared} + 0@{repeating_spell-1_$5_spellprepared} + 0@{repeating_spell-1_$6_spellprepared} + 0@{repeating_spell-1_$7_spellprepared} + 0@{repeating_spell-1_$8_spellprepared} + 0@{repeating_spell-1_$9_spellprepared}]] + [[0@{repeating_spell-2_$0_spellprepared} + 0@{repeating_spell-2_$1_spellprepared} + 0@{repeating_spell-2_$2_spellprepared} + 0@{repeating_spell-2_$3_spellprepared} + 0@{repeating_spell-2_$4_spellprepared} + 0@{repeating_spell-2_$5_spellprepared} + 0@{repeating_spell-2_$6_spellprepared} + 0@{repeating_spell-2_$7_spellprepared} + 0@{repeating_spell-2_$8_spellprepared} + 0@{repeating_spell-2_$9_spellprepared}]] + [[0@{repeating_spell-3_$0_spellprepared} + 0@{repeating_spell-3_$1_spellprepared} + 0@{repeating_spell-3_$2_spellprepared} + 0@{repeating_spell-3_$3_spellprepared} + 0@{repeating_spell-3_$4_spellprepared} + 0@{repeating_spell-3_$5_spellprepared} + 0@{repeating_spell-3_$6_spellprepared} + 0@{repeating_spell-3_$7_spellprepared} + 0@{repeating_spell-3_$8_spellprepared} + 0@{repeating_spell-3_$9_spellprepared}]] + [[0@{repeating_spell-4_$0_spellprepared} + 0@{repeating_spell-4_$1_spellprepared} + 0@{repeating_spell-4_$2_spellprepared} + 0@{repeating_spell-4_$3_spellprepared} + 0@{repeating_spell-4_$4_spellprepared} + 0@{repeating_spell-4_$5_spellprepared} + 0@{repeating_spell-4_$6_spellprepared} + 0@{repeating_spell-4_$7_spellprepared} + 0@{repeating_spell-4_$8_spellprepared} + 0@{repeating_spell-4_$9_spellprepared}]] + [[0@{repeating_spell-5_$0_spellprepared} + 0@{repeating_spell-5_$1_spellprepared} + 0@{repeating_spell-5_$2_spellprepared} + 0@{repeating_spell-5_$3_spellprepared} + 0@{repeating_spell-5_$4_spellprepared} + 0@{repeating_spell-5_$5_spellprepared} + 0@{repeating_spell-5_$6_spellprepared} + 0@{repeating_spell-5_$7_spellprepared} + 0@{repeating_spell-5_$8_spellprepared} + 0@{repeating_spell-5_$9_spellprepared}]] + [[0@{repeating_spell-6_$0_spellprepared} + 0@{repeating_spell-6_$1_spellprepared} + 0@{repeating_spell-6_$2_spellprepared} + 0@{repeating_spell-6_$3_spellprepared} + 0@{repeating_spell-6_$4_spellprepared}]] + [[0@{repeating_spell-7_$0_spellprepared} + 0@{repeating_spell-7_$1_spellprepared} + 0@{repeating_spell-7_$2_spellprepared} + 0@{repeating_spell-7_$3_spellprepared} + 0@{repeating_spell-7_$4_spellprepared}]] + [[0@{repeating_spell-8_$0_spellprepared} + 0@{repeating_spell-8_$1_spellprepared} + 0@{repeating_spell-8_$2_spellprepared} + 0@{repeating_spell-8_$3_spellprepared} + 0@{repeating_spell-8_$4_spellprepared}]] + [[0@{repeating_spell-9_$0_spellprepared} + 0@{repeating_spell-9_$1_spellprepared} + 0@{repeating_spell-9_$2_spellprepared} + 0@{repeating_spell-9_$3_spellprepared} + 0@{repeating_spell-9_$4_spellprepared}]] ]] }}} &{noerror}
Hello Jarren, Your approach of the macro is very interesting. Thanks for this sharing! Consider however that if I copy/paste that in chat, it works like a charm. But if I create a macro with same syntax (whatever if generic or as a new attribute of the charcter sheet of DnD5e), I systematically gets the error on missing repeating_spell-xx (where they do not exist). In other words, when called from a macro (and not copied/pasted in chat), the  &{noerror} statement (whatever if placed where you suggest, or if syntax is a bit reworked to stay on a single row and placed at the end as example paste below) seems to be ignored. /w gm &{template:npcaction} &{noerror} {{rname=@{selected|character_name}}} {{name=Incantesimi Preparati}} [[ [[0@{selected|repeating_spell-1_$0_spellprepared} + 0@{selected|repeating_spell-1_$1_spellprepared} + 0@{selected|repeating_spell-1_$2_spellprepared} + 0@{selected|repeating_spell-1_$3_spellprepared} + 0@{selected|repeating_spell-1_$4_spellprepared} + 0@{selected|repeating_spell-1_$5_spellprepared} + 0@{selected|repeating_spell-1_$6_spellprepared} + 0@{selected|repeating_spell-1_$7_spellprepared} + 0@{selected|repeating_spell-1_$8_spellprepared} + 0@{selected|repeating_spell-1_$9_spellprepared}]] + [[0@{selected|repeating_spell-2_$0_spellprepared} + 0@{selected|repeating_spell-2_$1_spellprepared} + 0@{selected|repeating_spell-2_$2_spellprepared} + 0@{selected|repeating_spell-2_$3_spellprepared} + 0@{selected|repeating_spell-2_$4_spellprepared} + 0@{selected|repeating_spell-2_$5_spellprepared} + 0@{selected|repeating_spell-2_$6_spellprepared} + 0@{selected|repeating_spell-2_$7_spellprepared} + 0@{selected|repeating_spell-2_$8_spellprepared} + 0@{selected|repeating_spell-2_$9_spellprepared}]] + [[0@{selected|repeating_spell-3_$0_spellprepared} + 0@{selected|repeating_spell-3_$1_spellprepared} + 0@{selected|repeating_spell-3_$2_spellprepared} + 0@{selected|repeating_spell-3_$3_spellprepared} + 0@{selected|repeating_spell-3_$4_spellprepared} + 0@{selected|repeating_spell-3_$5_spellprepared} + 0@{selected|repeating_spell-3_$6_spellprepared} + 0@{selected|repeating_spell-3_$7_spellprepared} + 0@{selected|repeating_spell-3_$8_spellprepared} + 0@{selected|repeating_spell-3_$9_spellprepared}]] + [[0@{selected|repeating_spell-4_$0_spellprepared} + 0@{selected|repeating_spell-4_$1_spellprepared} + 0@{selected|repeating_spell-4_$2_spellprepared} + 0@{selected|repeating_spell-4_$3_spellprepared} + 0@{selected|repeating_spell-4_$4_spellprepared} + 0@{selected|repeating_spell-4_$5_spellprepared} + 0@{selected|repeating_spell-4_$6_spellprepared} + 0@{selected|repeating_spell-4_$7_spellprepared} + 0@{selected|repeating_spell-4_$8_spellprepared} + 0@{selected|repeating_spell-4_$9_spellprepared}]] + [[0@{selected|repeating_spell-5_$0_spellprepared} + 0@{selected|repeating_spell-5_$1_spellprepared} + 0@{selected|repeating_spell-5_$2_spellprepared} + 0@{selected|repeating_spell-5_$3_spellprepared} + 0@{selected|repeating_spell-5_$4_spellprepared} + 0@{selected|repeating_spell-5_$5_spellprepared} + 0@{selected|repeating_spell-5_$6_spellprepared} + 0@{selected|repeating_spell-5_$7_spellprepared} + 0@{selected|repeating_spell-5_$8_spellprepared} + 0@{selected|repeating_spell-5_$9_spellprepared}]] + [[0@{selected|repeating_spell-6_$0_spellprepared} + 0@{selected|repeating_spell-6_$1_spellprepared} + 0@{selected|repeating_spell-6_$2_spellprepared} + 0@{selected|repeating_spell-6_$3_spellprepared} + 0@{selected|repeating_spell-6_$4_spellprepared}]] + [[0@{selected|repeating_spell-7_$0_spellprepared} + 0@{selected|repeating_spell-7_$1_spellprepared} + 0@{selected|repeating_spell-7_$2_spellprepared} + 0@{selected|repeating_spell-7_$3_spellprepared} + 0@{selected|repeating_spell-7_$4_spellprepared}]] + [[0@{selected|repeating_spell-8_$0_spellprepared} + 0@{selected|repeating_spell-8_$1_spellprepared} + 0@{selected|repeating_spell-8_$2_spellprepared} + 0@{selected|repeating_spell-8_$3_spellprepared} + 0@{selected|repeating_spell-8_$4_spellprepared}]] + [[0@{selected|repeating_spell-9_$0_spellprepared} + 0@{selected|repeating_spell-9_$1_spellprepared} + 0@{selected|repeating_spell-9_$2_spellprepared} + 0@{selected|repeating_spell-9_$3_spellprepared} + 0@{selected|repeating_spell-9_$4_spellprepared}]] ]] {{description=Lvl 1: $[[0.computed]] Lvl 2: $[[1.computed]] Lvl 3: $[[2.computed]] %NEWLINE% Lvl 4: $[[3.computed]] Lvl 5: $[[4.computed]] Lvl 6: $[[5.computed]] %NEWLINE% Lvl 7: $[[6.computed]] Lvl 8: $[[7.computed]] Lvl 9: $[[8.computed]] %NEWLINE% Preparati: $[[9.computed]] / Preparabili: [[@{selected|spellcasting_ability}@{selected|base_level}]]}} &{noerror} Have you got any idea of why this occurs and how to avoid errors when calling this from macro? My purpose at the end is to propose this to my casters with a button using syntax looking like [Guarda Prepariti/Preparabili](~@{selected|Incantesimi_Preparati}) for instance. Thanks in advance for any views on this. P.S.: Your Macro Mule is just incredibily fantastic! I used it (and still get inspired a lot) when enhancing each time a bit more the macros I propose to my players (reworked a bit to structure things differently, for example accessing Spell information in handouts when clicking the infobutton in spells - instead of displaying info in chat - and especially also to propose italian language to my players). Just with to share here a big Kudo for you on this. You're really amazing!
1717252006

Edited 1717264148
The &amp;{noerror} doesn’t do anything in this macro when it's called by a second macro or through an Ability Button. You would need a second macro with the &amp;{noerror} that calls this macro.&nbsp; It’s the same concept that I explained here with the first iteration of the Statblock Macros:&nbsp; <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=10216449#post-10216449" 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=10216449#post-10216449</a> So put all of that code into a macro called ‘Incantesimi_Preparati_Macro’ , and create a second macro called ‘Incantesimi_Preparati’ and the code would be: (Collections tab macro): #Incantesimi_Preparati_Macro &amp;{noerror}&nbsp; (Or alternatively an Ability macro on a character named ‘CHARACTERNAME’): %{CHARACTERNAME| Incantesimi_Preparati_Macro } &amp;{noerror} As for why it works like that? That’s just a quirk of how the Roll20 chat works. The &amp;{noerror} has to process when&nbsp;the macro is called and before the error occurs.&nbsp;
Thank you very much Jarren! I just tested and confirm that both above approaches are working very well. Again, your work for the Mule Macro is just amazing, and the quality of your answers are chrystal clear.