D&D 5.5e (2024) support - #357
Merged
Merged
Conversation
Adds bonus_actions as a fifth ability category for NPCs: - NPC schema: new optional bonus_actions array (same shape as actions) - NPC editor: Bonus Actions category plus a "Move to" control on every ability to safely move it between categories (handles legendary_cost when moving in/out of legendary actions, nothing persists until save) - Stat blocks: rendered between Actions and Legendary Actions - Combat tracker: shown in the monster card, actor actions dropdown and legacy roll tabs; included in turn-start recharge/limited-use checks and copied onto combat entities - Import/parse/admin/AI-generation paths updated to include the category https://claude.ai/code/session_01N8HrJuMgmYmG31sZr6LPX4
Updates all public-facing descriptions, titles, and meta tags to explicitly mention support for Dungeons & Dragons 5th Edition and 5.5th Edition.
5e routes stay the same as before, but for 5.5e we add the edition to the path
Covers design decisions (system-agnostic tracker, coexisting content, campaign edition prefilter, unified 2024 stat block layout), the HK API requirements (edition field, 5.5e/ slug prefix, SRD 5.2.1 import) and the phased implementation plan.
Campaigns get an edition field ("2014" | "2024") that decides which
rules text and default content filters apply:
- editions constant in generalConstants, edition in the campaign schema
- Edition select in the campaign create forms (defaults to 5.5e/2024)
and in the edit campaign dialog; campaign cards show the edition
- Campaigns from before edition support get a one-time prompt when
loaded in RunCampaign; the answer is persisted on the campaign and
until answered the campaign behaves as 2014
New optional NPC fields for 5.5e (2024) stat blocks:
- edition ("2014" | "2024"), used to prefilter NPC lists later
- initiative: flat initiative bonus override, defaults to the
dexterity modifier when absent
- gear: free-text description of carried equipment
Editable in the NPC builder (edition + gear in Basic info, initiative
in Ability Scores) and allowed in the admin monster update tool. The
import schema accepts the new fields.
All stat blocks use the 5.5e (2024) presentation regardless of the monster's edition: - Initiative uses the flat initiative override when present, else the dexterity modifier - New Gear line in the stats section - Damage and condition immunities merged into a single Immunities line (damage types; conditions), vulnerabilities/resistances lines renamed - Challenge rating line formatted as "CR 5 (XP 1,800; PB +3)"
- runEncounter stores the campaign edition (set in init_Encounter, "2014" fallback, demo runs on "2024") and exposes it as a getter - Conditions mixin holds both the 2014 (SRD 5.1) and 2024 (SRD 5.2.1) rules text; conditionList and the new exhaustionLevels are edition-aware computeds, so the condition drawers show the right text including the 2024 exhaustion table (-2 per level to d20 tests, -5 ft. speed per level, death at 6) - NPC initiative override and gear are copied onto combat entities; initiative rolls use the override instead of the dexterity modifier when present
Implement user interface elements and logic to allow users to view D&D 5e or 5.5e compendium content and switch between editions seamlessly. This includes: - Introducing an `otherEdition` utility to generate links for switching between 5e and 5.5e content. - Updating compendium list and detail views with edition labels, edition-specific resource links (SRD 5.1/5.2), and buttons to toggle between 5e and 5.5e views for lists and specific items. - Enhancing the `Crumble` breadcrumb component to support edition-aware paths within the compendium. - Refining meta titles and descriptions in routes for clarity on edition specificity.
Implement `meta.crumb` in route definitions to provide dedicated, concise names for breadcrumb navigation elements, distinct from page titles. Update the `Crumble` component to utilize this new `crumb` property for improved breadcrumb display. Adjust titles and descriptions within the "Tools" section to explicitly state support for both D&D 5e and 5.5e.
Dynamically replaces the generic "D&D 5e and 5.5e" text in page titles and meta descriptions with the specific edition (D&D 5e or D&D 5.5e) currently being viewed. This improves SEO and user clarity for compendium content.
Extracts the edition selection UI into a reusable component to ensure consistency and improve maintainability across the application.
This update integrates edition support throughout the compendium's data layer. * API service methods (`getItems`, `getItem`, etc.) now accept an `edition` parameter, dynamically constructing edition-specific API endpoints (e.g., `/monsters/5.5e`). * Vuex store actions and getters are updated to pass and utilize this `edition` parameter. * Caching logic is enhanced to use edition-prefixed keys, ensuring distinct storage and retrieval of 5e and 5.5e content. * Compendium list and detail views are updated to provide the current edition from route parameters to the data layer. This provides the foundational data handling for edition switching in the compendium.
Introduces a UI toggle for users to select between 5e and 5.5e monsters when browsing and adding entities in the encounter builder. The chosen edition affects the displayed list, filtering, and the detailed monster view.
Extends edition support to the conditions section of the compendium. * Condition API service methods (`getConditions`, `getCondition`) now accept an `edition` parameter to fetch edition-specific data. * Vuex store actions and getters are updated to pass and utilize the `edition` parameter for conditions. * Caching logic for conditions is enhanced to use edition-prefixed keys, ensuring distinct storage for 5e and 5.5e. * Compendium list and detail views for conditions now pass the current edition from route parameters to the data layer.
This migrates the handling of condition rules text in the encounter drawers (`Condition.vue`, `Conditions.vue`) to fetch data from the API. This enables dynamic display of edition-specific condition effects based on the campaign's chosen edition. The `src/mixins/conditions.js` file, which previously contained hardcoded condition rules, has been removed. Exhaustion level effects are now stored in `src/utils/generalConstants.js`. Other components (`Defenses.vue`, `Initiative.vue`) that previously relied on the local mixin have been updated to use the new API-driven condition store for non-edition-specific lookups. Additionally, edition identifiers throughout the application's schemas and the `runEncounter` store module have been standardized from "2014"/"2024" to "5e"/"5.5e".
* Enhance `CopyContent` with an action slot and `extra` payload parameter for the `copy` event, enabling custom actions and additional data. * Leverage this in `SpellCasting.vue` to provide `5.5e`-specific UI for adding innate spells, including level selection for leveled spells. * Adjust `5.5e` NPC spellcasting categories: rename "Innate spellcasting" to "Spellcasting" and remove the dedicated "Caster" category. * Display spell level for `5.5e` innate spells in the list. * Refactor NPC action buttons in `npcs/Actions.vue` to use `button` elements and consistent styling. * Remove automatic search result clearing from `CopyContent` after a copy operation, deferring this control to parent components.
…ility titles Converts the 'Special Abilities' category to 'Traits' for NPCs when the edition is set to 5.5e. Additionally, extracts complex monster ability title generation logic into a computed property, improving template readability and maintainability.
5.5e stat blocks can assign an explicit casting level to innate spells, but combat rolls previously defaulted to the spell's base level. This update ensures innate spells are cast at their specified level during encounters. * Add an optional `level` property to `innate_spells` in `hk-npc-schema.json`. * Update `RollSpells.vue` and `Spellcasting.vue` to fetch, display, and pass this `cast_level` to the roll action. * Modify `runEncounter.js` to use the assigned `cast_level` for innate spells, falling back to the base spell level if no override is defined. * Existing NPCs without an explicit innate spell level will continue to function as before.
* Rename "Special Abilities" to "Traits" and ensure its header is always visible for 5.5e entities. * Rename "Innate spellcasting" to "Spellcasting" and "Innate spells" to "Spells" for 5.5e entities. * Display explicit spell levels for 5.5e innate spells in the spell list. * Propagate the NPC's `edition` property to encounter entities to enable edition-specific UI logic.
Ensure compendium items (general items, spells, and monsters) are fetched and rendered according to the edition specified in the route. This enables edition-specific data retrieval and display. * Extract `edition` from route parameters in `Item.vue` and `Spell.vue` to pass to their respective API fetch actions. * Pass the `edition` from route parameters to the `ViewMonster` component in `Monsters.vue`.
…spell limit typo * Renames "Innate spellcasting" to "Spellcasting" for 5.5e monsters in the compendium viewer. * Adds a computed property `is55e` to dynamically apply 5.5e-specific display rules. * Fixes a typo in the innate spell filtering logic that incorrectly assigned `imit` instead of `limit`.
* Allow logged-in users to report mistakes in official SRD Spells, Monsters, and Items. * Display existing open reports on content views and provide an admin overview for report management. * Introduces new `ReportIssue` and `ReportIssueDialog` Vue components, a `contentReportServices` Firebase service, and a `contentReports` Vuex module. * Includes Firebase Realtime Database schema and security rules, with new report notifications delivered via a Cloud Function to Discord. * Excludes custom/homebrew content and Conditions from reporting.
* Adds `src/views/Admin/ContentReports.vue` page, route, and admin menu entry. * Allows filtering reports by type and status, with client-side sorting. * Provides actions to mark reports as `finished` or `false`. * Enables in-app viewing of reported monster stat blocks via a global drawer. * Formats dates consistently and truncates long issue descriptions with tooltips.
* Adjusts styling for monster stat block headers (`h1` and associated buttons) for a more compact and visually aligned presentation. * Restructures the 'Report Issue' component: reorders buttons, simplifies the open reports button with a tooltip, and enhances the visual display of reported issues within the dialog with new styling and date formatting. * Adds explicit `` wrapping to the innate spellcasting title for consistent emphasis.
* Unifies `initiative` (for NPCs) and `initiative_bonus` (for combat entities) to a single `initiative_modifier` property. * Resolves inconsistent naming that caused NPC initiative overrides to be silently ignored during combat encounters. * Fixes a typo (`initiative_bons`) that prevented player initiative bonuses from applying in test-mode rolls. * Simplifies entity hydration, UI display logic, and `entityFunctions` by using a consistent property for initiative overrides. * Updates NPC schema, editor, and compendium display to reflect the new property name. * Introduces a minor UI change where player initiative modifiers of `0` are now explicitly rendered in the entity view, rather than hiding the row.
* Ensure failed NPC save operations are communicated to the user by adding a catch block in `EditNpc.vue`. * Re-throw errors in `npcServices.js` to allow upstream components to handle service failures. * Enhance the `groups` property setter in `BasicInfo.vue` to safely handle `null` or `undefined` input and consistently set empty group lists to `null`.
* Users can now filter SRD monster and spell searches by edition (5e / 5.5e) in the `CopyContent` component. * The edition filter is pre-selected based on existing campaign or NPC context when available. * Result rows now display their edition to clearly indicate which version is being copied. * Fixes a bug where copying SRD content by ID would fail for 5.5e entries due to the `edition` parameter not being passed to the single-fetch API endpoints.
* Ensures the `edition` parameter is passed to the `fetch_api_spell` API endpoint when fetching SRD spells in the `RollSpells` component. * This prevents fetching failures for 5.5e spells and ensures the correct edition is retrieved, aligning with recent changes for copying SRD content.
* NPC entities now consistently store their edition (defaulting if not present) when added or fetched from SRD sources. * All API requests for monster data, used for adding NPCs, running encounters, and calculating difficulty, now explicitly pass the NPC's stored edition. * The encounter overview visually highlights NPCs whose edition differs from the campaign's edition, improving user clarity. * This ensures proper compatibility and functionality when integrating content from different D&D editions.
* The `Spell` component now accepts an `edition` prop, allowing it to fetch specific spell versions. * `CardSpellcasting` utilizes this by passing the combat entity's `edition` (or a default) to the `Spell` component when displaying spell details in popovers. * This ensures that the correct edition of a spell (e.g., 5e or 5.5e) is consistently displayed for NPCs and other entities, resolving potential discrepancies in mixed-edition campaigns.
* Integrates 2024 SRD 5.2.1 rules content into `generalConstants.js`, marked with `edition: "5.5e"`. * Updates `CheatSheet.vue` to filter rules based on a new `edition` prop, enabling edition-specific display. * Wires `Rules.vue` (compendium) and `resources/index.vue` (in-campaign) to pass the appropriate campaign or route edition to the cheat sheet. * Fixes `Rule.vue` to correctly retrieve and display edition-specific rule details for single-item views. * This completes the deferred follow-up for 5.5e rules content support.
# Conflicts: # src/views/UserContent/Campaigns/RunCampaign.vue
Added a hide-report prop to the Spell component so the Report Issue button is suppressed where a spell is rendered as a floating popover in a statblock or as an expanded description in the combat Spells action dropdown.
The debounce on the search inputs only delayed the model update, so pressing enter right after typing searched with a stale value, and the spells page had no enter handler at all. Moved the debounce into a debouncedSearch mixin, which searches 300ms after the last keystroke and lets enter and the search button flush the pending search immediately.
Spells belong to an edition, so they can't carry over when the edition of a custom monster changes. Ask for confirmation when the NPC has spells, and clear the caster and innate spells when it's confirmed.
The content API doesn't always filter out the __v property MongoDB adds to its documents, so it ended up in user content when copying a monster, spell or item. Our schemas don't allow the property, which fails validation on import and on the Firebase rules. Remove it, and anything nested carrying it, in CopyContent.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Adds support for D&D 5.5e (2024 rules, SRD 5.2) alongside the existing 5e (2014, SRD 5.1) content, and brings along the features that grew out of it: content issue reports, spell card downloads, and a set of smaller fixes.
The guiding principle: the tracker itself stays system-agnostic. Both editions track the same things (HP, AC, initiative, conditions, action economy), so there's no edition branching in combat logic — editions only decide which content you see and how a stat block is labelled.
Editions
edition("5e"/"5.5e") on monsters, spells, items and conditions, passed through the API services and Vuex content modules. Content missing an edition falls back to5e, so nothing that already exists changes meaning.hk-edition-selectcomponent, used everywhere an edition is picked.Compendium
Custom content
edition,initiative_modifierandgear, plus bonus actions and 5.5e spellcasting (thecastercategory collapses into a single "Spellcasting" block in 5.5e, with explicit cast levels for innate spells).hk-npc-schema.json,hk-spell-schema.json,hk-campaign-schema.json) updated to match the API.Content issue reports
Signed-in users can report mistakes in SRD spells, monsters and items, so we can find and fix errors in the content JSON:
content_reportsnode, indexed on a compositecontent_keyso a content view fetches only its own reports.Spell cards
Custom spells can be downloaded as a printable spell card — as an image from the spell view or editor, or as a batched A4 PDF with a full grid of cards from the spell list.
Smaller fixes
debounceonly delayed the model update, so Enter searched with a stale value.__v(MongoDB's version key) is stripped from copied content; the API doesn't always filter it, and our schemas reject unknown properties.Notes for review
.planning/—dnd-5.5e-support.mdis the umbrella one.editionfield and theedition=query param) lives in the HK API repo; its contract is documented indnd-5.5e-support.md.