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

Tim's Spellbook Mod v3.0 (ScriptCards) D&D 5E 2014

1765399381

Edited 1765399410
Got it!  Thanks, Tim!
@Tim Thank you for your continuous pursuit of better ScriptCard macros.  I have been self learning Scripts/Macros/API stuff for past several years.  I am a hunt and peck typist, with bad comp skills.  So for me to say this was the least complicated Scripts I am using on 3 different games I run.  My Spellcaster players wish to express there thanks as well! KUDOS! 
Thanks Chris! I appreciate the feedback and am glad to hear that people are getting use out of them.
Love this new update. Just one thing that seems to be happening. My one player has their 9th level spells show up on the list 5 times. Not sure why.
1767441230

Edited 1767446209
Hi Ed, thanks for reporting the bug. Changelog v3.4.1 1. Fixed Level 9 Duplication Bug The 9th-level section was repeating because the script wasn't clearing the output string between levels and the "NextSpell" jumps were causing the loop to stutter on the last entry. I added a reset at the start of the subroutine and swapped the jumps for a standard conditional block to ensure a clean exit. 2. Removed Unnecessary Hash Clears Since each spell level uses its own unique hash name (like lvl1Hash , lvl2Hash ), there’s no risk of data mixing. I removed the hash;clear calls to trim down the script and speed up execution by cutting out redundant memory tasks. 3. Tooltip Style Change  Spell names will now show the "help" cursor when you mouseover them to indicate they have tooltips associated with them.
Changelog v3.5.0 Added Cache System When the Mod is run the first time it will write all spell information per level to attributes on the character sheet. This is significantly faster than reading the information from the repeating section each time. The only drawback is that if new spells are added then the cache will have to be reset. There are a number of features that already reset the cache automatically, like preparing spells. However, if you want to make sure your new spells show after levelling click the reset cache button in settings. You'll absolutely have to hit that button after a character level if your character isn't a caster that prepares spells, like a Warlock or Sorcerer. Small Refactor  Just a small rewrite of some of the subroutines, and removal of others. As well as some minor changes here or there. I can not stress enough how much faster the cache system is for characters with a large amount of spells. I have to give credit where credit is due, though. This idea was inspired by Kurt, the author of ScriptCards and how he's implemented a similar function into his Action Menu.
Changelog v3.5.1 Color System Refactor  The ChangeColor and ResetColor subroutines have been fully merged into a new unified UpdateColor subroutine. This significantly reduces duplicate code while preserving identical behavior. Color changes are now handled more consistently across spell text, icons, and action indicators. Color updates no longer rely on rewriting data to the ScriptCards_TemplateMule. All color changes are now written directly to character attributes, improving reliability and reducing unnecessary attribute writes. Settings Flow Consistency  All settings changes now follow the same navigation flow and return to the settings page. Previously, some settings would reload the spellbook while others reloaded settings, leading to inconsistent behavior. Cache Bug Fix  Fixed an issue where the Action Legend was not included in the cache system, causing action icons to occasionally not appear next to spell names. Minor Internal Refactors  Additional cleanup and internal logic simplifications to improve maintainability and reduce redundant conditionals. Sorry for almost back to back updates, but I found the Cache Bug Fix and it was so small a fix I'd figure I'd take the opportunity to fix the way the font colors are set. NOTE: If you find any strange behavior after updating, clear the cache in settings first. I don't see any strange behavior myself, but I can't account for everything, unfortunately.
I'm not going to update the version number as this is akin to a typo, I forgot the font color on the action legend title; Action, Bonus Action and Reaction. I updated the git with the fix.
1768556880

Edited 1768558135
Changelog v3.5.2 CSS Style Refactor Full separation of CSS string variables from the main spell book card and the settings card. Moved large amount of CSS that wasn't saved to variable strings into strings. Able to move one API lookup to settings page so it doesn't load every run of the script, not a huge gain but it's something. Style Changes A) Changed HTML output to use static dimensions and removed reliance on CSS relative position. This helps make the HTML render much closer between Chromium and Mozilla based browsers. B) Changed the font families and styles used in some places, most notably italicizing the Spell Names and adding a text shadow/glow to entire spell book card. C) Changed the blue dot HTML emoji that represented the prepared spell for an HTML symbol that changes color based on theme, to tie each theme together. String Naming Convention Changed a lot of string names to a standardized naming convention. This one is basically just for me so I don't have to come up with new names for strings and can, at a glance, know what each string is. It helps as this script is quite complicated at this point. Number of Minor Bug Fixes or Features A) In the spell book title, if a character's name ends in an "s" it will be grammatically correct when it comes to ownership(Telios's Spell Book vs. Telios' Spell Book). B) Changes to the Settings card in order to reload the correct colors when they are chosen, instead of having to run the script again to get them to display properly. C) The calculation for Maximum Prepared spells was using the caster_level character attribute. The script was calculating caster level for multi-class casters incorrectly because it assumed caster level needed to be calculated first, but the sheet was already doing this. This is been changed to calculate correctly. D) Changed the flow of the Settings card a bit again, when a new theme is chosen it now just displays the settings button as the Spell Book button is already at the bottom of the card. Four New Themes Added four new themes; Golden Quarry, Stonecut Vault, Feymist Bloom, and Circuit Tree. NOTE: Once you update the script, run it and go into settings and reload the cache.
Changelog V3.5.3 Roll Die Image Change  Changed from the Scriptcards dice parameter to the dicefontd20 font to get a little more control over the CSS styling. Also switched to the hollow die symbol, the filled die symbol looked like a blob in some of the themes. Cross Platform Compatibility  I use Linux as my daily driver and unfortunately, the one thing that Windows does better than Linux is it's robust font system. Linux is a little lacking here and it makes it difficult to use HTML symbols and emojis, especially when trying to use monochrome versions. I have attempted to make the Spell Book more compatible with Linux and I have partially succeeded. To make a long story short, depending on the browser on Linux, there will be various things that just won't render properly and those things depend on which browser you use. In the end, the spell book is still very usable in Linux. Other Style Changes  Redid the CSS for the header again, mostly as a result of 1 and 2. Ground up rewrite to rely even less on relative positioning and various other changes, which in Windows appears virtually identical on Chrome and Firefox. Ok, so I'm definitely going to slow down on working on this as there really isn't that much more to work on. I know people are probably getting tired updated every time I have a midnight epiphany. But, I seriously think I've run out of those for this script. So, hopefully this is the last one for a while. NOTE: don't forget to run the new version and then reset the cache in settings.
1770345673

Edited 1770345792
Looking for some Help. I installed this Script, but I'm getting this message and do not know why. If I try to cast a spell, I get the no ability selected message.  Any thoughts? Thanks in advance.