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 NPC Stat Block Mod v5 (ScriptCards) D&D 5E 2014

1775192019

Edited 1788544140
Hi All, Version 5 of this ScriptCards Mod is here! With this Mod you'll never have to juggle NPC open character sheets again. Just select the NPC token and all their abilities are easily accessible. For other ScriptCards Mods check out my profile. *** Quick Copy and Paste Link *** *** Detailed User Instructions *** *** Experimental 2024 Beacon sheet support available, see the Detailed User Instructions *** Features List Displays an NPC's Stat Block in chat. Mimics the D&D 2014 and 2024 NPC stat blocks as closely as possible while still maintaining Roll20 functionality. Includes NPC information that would normally be available in the stat block, with buttons for Actions, Ability Rolls, Saving Throws, Skill Checks, Initiative and Spells . Includes roll mode controls directly on the card, allowing NPC rolls to be made with Disadvantage, Normal, or Advantage . Includes a Whisper to GM toggle, allowing the stat block, sheet rolls and spell outputs to be whispered to the GM when desired. Includes an Auto Roll Damage button, which when enabled rolls damage along with the attack roll. Includes Full and Combat modes . Full mode displays the complete NPC information, while Combat mode streamlines the card to focus on combat-related information. Supports both 2014 and 2024 Rules/Theme styles. Includes Recharge rolls for actions that have Recharge values. Includes token HP controls for rolling an NPC's HP formula or resetting the selected token to the sheet's HP value. Includes Manage Conditions for quickly applying and removing condition markers from the selected NPC token, with configurable marker mappings and automatic Condition Immunity filtering. NPC names link directly to their Roll20 Character Journal entry. Settings are stored in an automatically created NPC Stat Block Settings handout. Experimental support is also available for the Beacon character sheet when using the Beacon-compatible experimental version of ScriptCards. What's New? Version 5 is a major rewrite of the original NPC Stat Block Mod. All buttons now look and behave like actual buttons, and the overall stat block layout has been rebuilt to more closely resemble official D&D stat blocks. Major sections that were overlooked in earlier versions are now included. Initiative is now part of the Skills grid, uses the card's Disadvantage, Normal and Advantage controls, and automatically sends the result to the Turn Order. NPCs with spells now have a Spells button that opens a separate spell list. Spells, Traits and Actions include tooltips, allowing the GM to read their full descriptions without revealing that information to chat. Skill Checks, Saving Throws and Attack Rolls can use the card's built-in Disadvantage, Normal and Advantage controls instead of relying entirely on the character sheet's roll mode. Whisper to GM and Auto Roll Damage controls are available directly from the stat block. Full and Combat display modes allow the GM to switch between a complete stat block and a more compact combat-focused version. The existing Settings gear now opens an NPC Stat Block Settings handout instead of displaying the settings interface in chat. Version 5 also adds 2014 and 2024 Rules/Theme styles, Recharge rolls, token HP controls, Manage Conditions, configurable condition markers, Condition Immunity filtering, and direct Character Journal links from NPC names . Behind the scenes, the code has been extensively refactored and optimized, with repeated rendering logic consolidated and description handling improved for Traits, Actions and Spells. Experimental Beacon support has also been added, allowing the Mod to work with Beacon NPCs when using the Beacon-compatible experimental version of ScriptCards. For a first-hand look at the differences, here is the link to the previous version. How to Install Ensure that ScriptCards is installed in your game. Copy and paste the code here, or from the Easy Copy and Paste link above, into a new Macro. Call it whatever you like, for example NPC-Stat-Block , and paste the full code into it. Save the Macro. Select an NPC token and run it. This Mod is designed to be placed in the game's Macro section , not on individual character sheets. The first time it runs, the Mod will automatically create the NPC Stat Block Settings handout.
1777766958

Edited 1782851319
Changelog v5.0.1 Added NPC Token Validation The mod now checks that exactly one NPC token is selected before running. If no token is selected, multiple tokens are selected, or the selected token is not an NPC, the mod will now give a clear message instead of trying to build a stat block from the wrong character. Improved Text Cleanup Trait, action, spell, legendary action, and mythic action descriptions now run through better cleanup before being displayed in the stat block or tooltips. This should help prevent certain special characters or sheet formatting from breaking the chat output. Fixed Spell Tooltip Text Spell descriptions and At Higher Levels text are now cleaned before being added to spell tooltips. Spell components also display more cleanly, including spells that only have Somatic or Material components. Fixed Skill Name Formatting Skills with multi-word names, such as Animal Handling and Sleight of Hand, now display correctly in the Skills line instead of showing the raw sheet attribute format. Fixed Proficiency Bonus Display The Proficiency Bonus line will no longer appear when the NPC does not have a usable proficiency bonus value.
Changelog v5.1.0 Major Text Sanitization Refactor The CleanText logic has been heavily reworked and the script now sanitizes text more consistently before sending it to chat output or tooltips. This fixes the long-standing issue where certain sheet formatting, line breaks, HTML tags, quotes, commas, and special characters could break ScriptCards parsing or produce messy stat block text. Improved Description Cleanup Trait, action, spell, legendary action, and mythic action descriptions now pass through the improved cleanup process before being displayed. This should make monster descriptions much more reliable, especially for NPCs with complicated action text or copied/imported compendium formatting. Improved Stat Block Styling The NPC name and section headings have been reworked to display more consistently across Windows and Linux. The NPC name is now built directly into the stat block output instead of relying on the ScriptCards title card, which gives the script better control over the final appearance. Cleaned Up Stat Block Layout The internal CSS and table structure have been cleaned up and consolidated. This should make the stat block easier to maintain while preserving the same visual style and without requiring users to delete or recreate their existing template. Fixed PC Token Warning If a player character token is selected by mistake, the warning message now correctly includes the selected token’s name again. Fixed Initiative Skill Handling Initiative is now handled separately from NPC skills so the script no longer tries to look for a nonexistent npc_initiative_base attribute. This should prevent console errors when building the skill button section. Improved Action Display Weapon attack actions no longer display their generated attack text in italics, bringing them back in line with the rest of the stat block text. Improved Spell Component Handling Spell material components now use safer ScriptCards syntax internally. This should help prevent malformed output or parser issues when displaying spell component information. General Code Cleanup Several sections of the script were cleaned up and simplified, including repeated output blocks, stat block info rows, action handling, spell handling, and tooltip construction. These changes are mostly behind-the-scenes but should make the script easier to maintain going forward. This update won't appear to be a big change outwardly, but the bones of the script have been restructured to be more reliable. There were still some action/trait description out there that would randomly break the stat block styling and actually make it unusable, this should now account for all of those cases being fixed. As before, use the *** Quick Copy and Paste Link *** link in the first post to grab the updated version.
1782850740

Edited 1782851284
Changelog v5.2.0 Added a selected-token check to catch tokens that are not linked to a character sheet. Added roll mode buttons to the title bar: D for Disadvantage, N for Normal, A for Advantage and C for Classic sheet rolling. Added custom NPC roll handling for attack rolls, saving throws, skill checks and initiative when using Disadvantage, Normal or Advantage mode. Added turn order support for initiative when using Disadvantage, Normal or Advantage mode. Added a Whisper to GM toggle to the title bar. Added support for whispering the stat block and supported NPC sheet outputs to the GM when Whisper to GM is enabled. Added an archived NPC Stat Block Settings handout to store NPC Stat Block settings data. Do not manually edit this handout. Added persistent NPC Stat Block settings so roll mode and whisper preferences are remembered between uses. Improved spell button display so spell casting and spell description buttons are formatted more cleanly in the spell list. Performed general code cleanup and optimization to support the new title bar controls and custom roll handling.
Changelog v5.3.0 Rebuilt the stat block output as a self-contained custom ScriptCards card instead of using the old statblock template system. Removed the ScriptCards_TemplateMule requirement. NPC Stat Block no longer needs a template mule, statblockv4 template, overridetemplate setting or sc-reloadtemplates. Removed the Classic roll button from the title bar. Changed the D, N and A title bar buttons to use the NPC sheet’s classic roll style instead of the previous custom roll display. Reworked roll construction so supported stat block buttons now build Roll20 sheet-style NPC rolls instead of custom ScriptCards roll cards. Added syncing for wtype and dtype so the NPC sheet roll output follows the stat block’s Whisper to GM and DMG settings. Added the DMG title bar toggle to switch between automatic damage rolling and the sheet’s normal damage prompt behavior. Improved the stat block title area with compact right-side controls and better long-name wrapping. Improved action and trait row spacing for a tighter stat block display. Improved initiative handling so initiative rolls continue to support turn order while using the new sheet-style output. Updated the README for the rewritten no-template-mule version. Performed major code cleanup and layout refactoring to support the new self-contained stat block output and sheet-style roll handling. Apologies for the quick update after an already major update. I realized I could completely mimic the NPC sheet rolling instead of doing what I was doing. If you updated to 5.2.0, replace with this one, forget 5.2.0 ever existed.
Changelog v5.3.1 Fixed a formatting issue with the console buttons being too tall, which was breaking my long NPC formatting that wraps long NPC names under the buttons. Again, sorry for the torrent of updates, but I use Linux full time and forget to check formatting in Windows sometimes.
Changelog v5.4.0 v5.4.0 Redesigned the NPC name/title display. The NPC name now sits on its own line without the control buttons sharing the same space. Long NPC names automatically step down through smaller font sizes before wrapping. This gives short names a larger Monster Manual-style title while still keeping longer names readable and inside the card. Moved the card control buttons to the footer. Whisper, DMG, Disadvantage, Normal, and Advantage controls are now grouped at the bottom of the card. This keeps the title area clean and gives the NPC name room to display properly. Redesigned the action display. Traits, Actions, Bonus Actions, Reactions, Legendary Actions, and Mythic Actions now use a cleaner compact action list instead of the old long text-heavy layout. Action text is no longer packed into mouseover tooltips. Buttons now open or roll the relevant sheet output directly, so action details can be viewed normally in chat, including whispered output when whisper mode is enabled. Added Combat and Full card modes. Full mode shows the complete NPC stat block. Combat mode focuses the main card on combat-useful information while moving the full skill list into a separate Skills button. The selected mode is stored in the NPC Stat Block Settings handout. Added a footer button to switch between Combat and Full mode directly from the card. Added a separate Skills subcard for Combat mode, including Initiative and all NPC skill buttons. Improved card generation speed, especially in Combat mode. Updated the settings handout format to include card mode while preserving existing whisper, advantage, and damage settings. Updated the README with current installation, usage, mode, and troubleshooting information.
Changelog v5.4.1 Skill Button Width Fix  The skill button table width was incorrect and not properly sized. Set a proper width to match the other tables. Full and Combat Buttons  At some point the Full and Combat buttons broke. Clicking on Combat would switch to the combat style card, but clicking on the Full button would send an empty chat message. Functionality has been restored.
v5.5.0 Changelog Changes since v5.4.1 Features Added selectable 2014 and 2024 Rules/Theme styles. The selected theme is independent of the character sheet being used. Moved the existing Settings interface into the NPC Stat Block Settings handout . The existing Settings gear now opens the handout directly instead of displaying the settings interface in chat. Added Recharge rolls for actions with Recharge values. Added token-only HP controls for rolling an NPC's HP formula and resetting the selected token to the sheet's HP value. HP rolls have a minimum result of 1. Added Manage Conditions for quickly applying and removing condition markers from the selected NPC token. Added configurable Condition Marker mappings , with automatic matching of Roll20's default condition markers where possible. Added automatic Condition Immunity filtering so conditions an NPC is immune to are not offered in Manage Conditions. Added direct Character Journal links to NPC names. Added tooltip help icons for Legendary Action and Mythic Action introductory descriptions, keeping those sections compact while retaining the full rules text. Improved automatic NPC name sizing to better accommodate longer creature names. Updated and refined stat block styling, spacing and presentation. Extensively refactored and consolidated the source to reduce duplicated code and improve maintainability. Bug Fixes Fixed Deception being missing from the Skill grid and Skills card. Corrected the displayed capitalization of Sleight of Hand . Experimental Beacon Features Beacon support is experimental and requires the Beacon-compatible experimental version of ScriptCards. Added experimental support for the D&D 2024 Beacon character sheet . Added automatic detection of Beacon NPCs while retaining full support for the existing D&D 5E 2014 sheet. Added Beacon-compatible Ability Checks, Saving Throws, Skills, Initiative, Traits and Actions . Added Beacon support for NPC stat block information including AC, HP, ability scores, saves, skills, defenses, languages, Challenge Rating, XP and Proficiency Bonus . Added support for Beacon's typed Speed and Senses data, including Walk, Fly, Climb, Swim and Burrow speeds and Passive Perception. Added support for Beacon's 2024-style Initiative modifier and passive initiative score . Added support for Beacon-specific NPC information such as Gear, Habitat and Treasure when available. Added Beacon-compatible synchronization for Whisper, Auto Damage, Advantage and Disadvantage roll settings. Added support for running Beacon sheet actions without requiring the NPC Stat Block Mod to know their internal UUIDs. Beacon NPCs can use the same 2014/2024 Rules/Theme, Recharge, token HP and Manage Conditions features as supported 2014 NPCs.