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

Script(s) to improve 5E spell browsing

In 5E OGL Sheet, browsing through spells can be tedious and difficult, especially you have many spells. Between the long spell descriptions, small text area, it's just a constant pain. I'm wondering if there are script(s) / macros that can do the following: Print a list of currently prepared spells, with short descriptions. The short description would have to be manually typed somewhere (maybe in the first part of the spell description, delineated by some text marker?) Whisper the spell description to the current player, even if the player currently has 'never whisper' in their character sheet. At least this would allow the player to click through their spells without spamming the chat. Reading long spells inside the spell tab itself is very painful due to the tiny size of the spell textbox. Show the spell description when you hover over the spell - even if this needs a browser-side plugin it might be worth it. I looked at SpellMaster but it seems too heavy for what I need, and it's also not tied to the character sheet itself. Any ideas appreciated!
1677059983

Edited 1677060204
Gauss
Forum Champion
While I don't do API scripting I am curious about your problem. Which character sheet are you using? There is no "5e OGL Sheet", or do you mean the "5e by Roll20" character sheet? I think this can be done via macros (I have a macro setup that does much of this), although the short description part would require effort since it would require being written up. 
1677061307

Edited 1677061753
Gauss
Forum Champion
Did some playing around, with some modifications to existing macros (various people have spell macros out there that list your spells) you can use the "Innate" line to provide the short description function.  There are some drawbacks though.  1) Using the innate line would prevent ammo trackers from working (innate overrides them) 2) The text would show up next to the name in the spell page, although it would be faded.  Alternately, the "Class" line could be used, or the "Type" line. I don't think those are used for anything. Here are the attributes for each: Innate: @{selected|repeating_spell-3_$1_innate} Class: @{selected|repeating_spell-3_$1_spellclass} Type: @{selected|repeating_spell-3_$1_spellsource} So basically what you have is the following macro:  1) You push your spells button, this creates a Chat Menu (either #2 or directly to #3 below) 2) You select the level of spell you want to display (or the entire spell list). Note this step could be skipped if you don't want to subgroup spells this way.  3) You see your spells, with the short descriptions, push the name of the spell you want to cast.  Other than the short descriptions I know of at least two macros set up like this. Adding the short descriptions should be doable.  Edit: I just tested my own macro and yes, I can add short descriptions to it. But it would be a laborious process so, if you want the macro I'd show you how to change it to add the short descriptions.  Note: my macro is huge, too big to be shared via here, I can give it to you via Macro Mule though.
1677076371
timmaugh
Pro
API Scripter
Could a solution like this one help? You can designate the fields you want to include in the output. It, too, goes through the initial stage of being a chat menu (though a script generated one), before clicking on an entry to see what properties it has.
1677077678

Edited 1677078127
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
You might also be able to get some help from this approach . It creates a filter macro that lets you display a chat menu with only the spels that match a given set of criteria: Ritual, Concentration, Casting time, etc.
1677088604

Edited 1677088745
I'm working on an update to my ' D&D 5E Universal Statblock Macro Mule for NPCs and PCs ', which will list out all spells that a character has. I'm going through some bug testing with the help of a few other users before releasing it. Print a list of currently prepared spells, with short descriptions. The short description would have to be manually typed somewhere (maybe in the first part of the spell description, delineated by some text marker?) One of the new features is a small 'Info' icon next to each spell that can be clicked to provide the info output for that spell: Whisper the spell description to the current player, even if the player currently has 'never whisper' in their character sheet. At least this would allow the player to click through their spells without spamming the chat. Reading long spells inside the spell tab itself is very painful due to the tiny size of the spell textbox. Whisper settings are possible to be set per-player through a few different ways as well. Show the spell description when you hover over the spell - even if this needs a browser-side plugin it might be worth it. I haven't incorporated tooltip features yet, but that's something I can work on for a next iteration.  Here's an example with hovering over the 'Light' spell: The question will simply be: what information should be included in the tooltip? Some spells have a LOT of description text, which will be unreadable at some point.  And what other spell information is most important to include?  It's not possible to 'hide' information like it is with the chat menu, so you can see that it shows as 'Concentration: 0' for a non-concentration spell. For a short description, you could pretty easily use the 'type' field on any given spell, as I think that is always a manual entry anyways. The downside is you would have to manually do this for every spell on every character .  Copying 'The object sheds bright light in a 20-foot radius and dim light for an additional 20 feet.' from the 'Light' spell description and modifying the tooltip to reference the 'spellsource' instead of 'description' results in this: The cool part is that the macro does not require the API at all.  The negative part is that it is quite bloated now, so for a character sheet with a lot of elements it can sometimes take several seconds to run. I'm also testing a reduction in the total number of items included to help it run a little faster. However, since you are Pro subscriber, a Mod script approach will likely more adaptable, and run a little faster.
So many amazing responses ideas. Thank you all - I'll have to spend some time digesting and trying these out. Jarren - So is the hover info working? Is that a feature in your Universal Statblock?
The hover info works, with some limitations, mostly around description field length, and fields that have any closing parenthesis in them. Unfortunately there’s no real error checking available like there would be for an API script, but it does work. My current iteration is including the spell casting time, duration, and target info in the pop up. It would be pretty easy to add the spell source element (which I believe is unused unless entered manually) so that could be filled out manually if desired.