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 (ScriptCards) D&D 5E 2014

Hi All, This is the latest version of my Spell Book Mod for ScriptCards, built for the Roll20 D&D 5E 2014 character sheet. The current version number is 4.0.0 The Mod creates a compact, interactive spell book directly in Roll20 chat, with spell preparation, spell slot tracking, native Roll20 spell output, extensive visual customization, and support for custom spell macros. Find the Code HERE! Easy copy and paste link For more comprehensive instructions visit my Github here. Feature List Vital Character Stats: Displays the character's Spellcasting Ability, Spell Save DC, Spell Attack Bonus, and Maximum Prepared Spells at the top of the Spell Book. Spellcasting Ability is also a button. Clicking it displays all six ability scores, with the character's class and multiclass information shown beside the appropriate abilities. Selecting an ability changes the active Spellcasting Ability used by the Spell Book. Subclass Visualization: Displays a unique class or subclass icon in the Spell Book header. Complete Spell Management: The Spell Book normally displays prepared spells only. Click the arrow in the Cantrips header to open the character's full spell list. From the full list, spells can be prepared or unprepared directly from the Spell Book. Click the arrow again to return to the prepared spell list. Classes that do not use prepared spell selection, such as Warlocks, do not display the full-list toggle. Spell Slot Tracking: Each spell level header displays the character's remaining spell slots. Use the plus and minus buttons to manually adjust available slots. Several different spell slot icon styles are available in Settings. Pact Magic and Multiclass Support: Pact Magic slots are tracked separately from normal spell slots. If Pact Magic and normal spellcasting provide slots at the same spell level, the Spell Book displays a separate W slot row for the Warlock Pact Magic slots. Each slot pool has its own independent plus and minus controls.  Detailed Spell Entries: Each spell entry can display the spell school icon, spell name, action type, concentration or ritual status, and the spell's Innate field. Action, Bonus Action, and Reaction markers can be enabled or disabled individually. Interactive Controls: Spell entries include the appropriate Cast button, prepare or unprepare control, and Spell Details button. The Cast button uses the Roll20 character sheet's normal spell roll where applicable. Native Roll20 Spell Details: The open-book button displays the spell using Roll20's native spell output rather than a custom tooltip. Spell Details can be toggled between public output and a self-whisper directly from the Spell Book. Custom Spell Macros & Spell Mule: A Spell Mule can be configured separately for each character from the Settings card. The Spell Mule is a normal Roll20 character containing Abilities used as custom spell overrides. Ability names should match the spell name with spaces replaced by hyphens. For example: Cure Wounds → Cure-Wounds. If a matching Ability is found, the Spell Book uses that Ability for the spell's Cast and Spell Details buttons instead of the normal Roll20 spell output. This allows complex or custom spell macros to be kept on one dedicated character instead of cluttering player character sheets. High-Speed Per-Character Cache: The Spell Book uses a split handout-based cache created separately for each character. Prepared spell lists are cached for fast loading, while full spell lists are built and stored by spell level. Full-list cache handouts are created only when they are actually needed. The cache automatically detects spell rows being added, removed, reordered, or having their preparation state changed. Only affected spell levels are rebuilt instead of rebuilding the entire Spell Book. The first time a large full spell list is opened, the Spell Book may display a short cache-building message. Later runs use the saved cache. Per-Character Settings: Spell Book settings are stored separately for each character. Changing themes, UI styles, colours, or slot styles does not require rebuilding the spell cache. Theming and Customization: The Spell Book includes twenty built-in book themes. The Spell Book UI theme can be selected independently from the book theme, and the Settings card also allows customization of: Spell colour Icon colour Action colour Bonus Action colour Reaction colour Action markers Spell slot style Spell Mule What doesn't this Mod Do? This Mod does not automatically deduct spell slots when a spell is cast. The main reason is custom spell macro compatibility. Many custom spell Mods and macros already handle spell slot deduction, and automatically deducting another slot from the Spell Book could result in slots being deducted twice. For now, spell slots are adjusted manually using the plus and minus controls in each spell level header. Automatic slot deduction may become an optional setting in the future. Installation Instructions Ensure that the ScriptCards Mod/API script is installed in your Roll20 game. Create a new Roll20 Macro or Character Ability. Copy the complete Spell Book Mod script into the Macro or Ability. If using a Character Ability, enable Show as Token Action . Select the caster's token and run the Spell Book. On first run for a character, the Spell Book automatically creates the cache handout it needs. Additional cache handouts are created later only if the character's spell levels require them. To configure a Spell Mule, open the Settings card and enter the exact name of the Spell Mule character. The Spell Book automatically detects normal spell-list and preparation changes. A Clear Cache button is also available in Settings if a manual rebuild is ever needed. Requirements Roll20 Pro with Mod/API access ScriptCards The official Roll20 D&D 5E 2014 character sheet Check out my profile for my other ScriptCard Mods.
1784051003

Edited 1784519468
Updating from Version 3.6.0 to 4.0.0 Version 4.0.0 is a major rewrite of several core parts of the Spell Book Mod. Existing users should replace the entire contents of their current Spell Book macro with the new version rather than trying to merge the changes manually. ScriptCards_TemplateMule Is No Longer Required Spell Book Mod no longer uses ScriptCards_TemplateMule . All Spell Book themes, styles, images, and supporting data are now contained directly in the script. If another script in your game uses ScriptCards_TemplateMule , leave it in place. Spell Book Mod simply no longer requires or reads it. The Cache System Has Been Completely Reworked Version 4.0.0 uses a much more sophisticated per-character cache system designed to keep the Spell Book fast even on characters with very large spell lists. Spell Book data is now stored in automatically managed cache handouts instead of character-sheet cache attributes. The cache detects spell-list and preparation changes, refreshes only the spell data that needs updating, and reuses saved data whenever possible. In normal use, the Spell Book is extremely fast. Even characters with very large spell lists can open their Spell Book quickly, and cached full spell lists are dramatically faster than rebuilding the entire Spell Book every time. The first time a large full spell list is opened, the Spell Book may display a short Building Cache... Please Wait message while the required cache is created. A Cache Refresh message may also appear when changed spell data needs to be rebuilt. Cache handouts are created automatically as needed. Do not manually edit them. The Clear Cache button remains available in Settings if a manual rebuild is ever required. Spell Tooltips Have Been Replaced by Private Spell Details Version 3.6.0 displayed full spell information in mouseover tooltips on spell names. Those tooltips were originally included so players could check spell details without clicking the Spell Details button and publicly displaying the spell information in chat. Version 4.0.0 adds a public/self-whisper control for Spell Details, so the large hover tooltips are no longer necessary. Use the speech or whisper button beside the spell-list controls to switch between: Showing Spell Details publicly in chat Whispering Spell Details to yourself The open-book button still displays Roll20's native spell output, but players can now review that information privately when needed. The selected Spell Details mode is remembered separately for each character. Removing the large spell-description tooltips also significantly reduces the amount of spell data that must be processed and cached. Existing Spell Book Settings Are Not Imported Version 3.6.0 stored Spell Book settings in character-sheet attributes and on ScriptCards_TemplateMule . Version 4.0.0 uses a new per-character settings system stored with the character's Spell Book data. The first time you run version 4.0.0 for a character, the Spell Book starts with its default settings. Open the Settings card and restore any theme, UI, colour, action marker, slot style, Spell Mule, or other settings you previously used. The old Spell Book settings and cache attributes on the character sheet are no longer used by version 4.0.0. They do not need to be removed for the new version to work. Spell List Changes Are Now Detected Automatically Version 3.6.0 could require a manual cache reset after adding or changing spells. Version 4.0.0 automatically detects: Added spell rows Removed spell rows Reordered spell rows Preparation changes The Spell Book automatically refreshes the affected spell data when these changes are detected. For normal spell-list changes, manually clearing the cache should no longer be necessary. Full Spell Lists Now Have Controls at the Top and Bottom Long full spell lists now include a prepared-only return control at both the top and bottom of the Spell Book. You no longer need to scroll back to the Cantrips header to close a long full spell list. Pact Magic Tracking Has Been Reworked Version 4.0.0 tracks Pact Magic separately from normal spell slots when both slot pools exist at the same spell level. When separate pools need to be shown, the Spell Book displays a separate W row for Pact Magic. The normal spell level row and the W row have independent plus and minus controls. A character using only Pact Magic at that spell level does not display a duplicate second slot row. The Settings Card Has Been Redesigned The Settings card is significantly more compact. Opening Settings automatically takes you to the page containing the character's currently selected theme. Theme, UI theme, colour, action marker, spell slot style, Spell Mule, and cache controls remain available directly from the Settings card. Settings are stored separately for each character. Cast Button Tooltips Now Identify the Spell The Cast button mouseover text now includes the spell name. For example: Cast Guiding Bolt This makes closely packed Cast buttons easier to identify without adding additional spacing to the spell list. Migration Checklist Replace the complete version 3.6.0 script with version 4.0.0. Select a linked caster token and run the Spell Book. Open Settings and restore the character's preferred Spell Book settings. Re-enter the character's Spell Mule setting if one was previously configured. Open the full spell list once for characters that use prepared spell management and allow the initial cache to build. No ScriptCards_TemplateMule setup is required. No manual cache handout creation is required.