Skip to content

EntityDefinition

EntityDefinition describes the structure, behavior, and resources associated with a type of game entity such as characters, monsters, spells, items, or custom game objects. It provides the blueprint for how entities are stored, displayed, edited, and organized within the application.

View JSON Schema

Property Type Required Description
name string Yes The internal programmatic name for this entity type. Used for code-level identification, inheritance relationships, and resource naming. Should be lowercase, singular, and contain no spaces (e.g., “character”, “spell”, “magic-item”). This is the canonical identifier for the entity type within the system.
title string No The localized display title for a single entity. This is the human-readable name for one instance of this entity type. Should be in singular form (e.g., “Character”, “Spell”, “Magic Item”). If nil, the title is automatically derived from the name using localization.
label string Yes The generic programmatic label for this entity type. Used to construct file paths and resource names. Typically matches name but can differ for entity variants or specialized types.
collection Collection Yes Metadata for the collection this entity type belongs to. Defines how groups of these entities are organized and displayed.
extends string No The parent entity type this entity extends. Enables entity type hierarchies where specialized entities inherit behavior from base types. For example, “dragon” might extend “monster”, or “longsword” might extend “weapon”. When set, this entity is treated as a specialized variant of the parent type, potentially inheriting its forms, views, and validation rules.
loadable boolean No Whether entities of this type can be loaded from data files. When true, the system can load entities from the collection JSON file. When false, entities are created programmatically or generated dynamically. Defaults to nil, which is typically interpreted as true for most entity types.
system string No The game system this entity type belongs to. Identifies the specific RPG system (e.g., “dnd5e”, “pathfinder2e”, “call-of-cthulhu”) that defines this entity type. Used to locate system-specific resources and data. If nil, the entity uses the currently active system’s resources.
standalone boolean No Whether this entity type has only one instance (singleton pattern). When true, the entity represents a unique object like a campaign, party, or game state, rather than a type that can have multiple instances. Standalone entities typically have specialized UI and data handling.
dynamic boolean No Whether entities of this type are generated dynamically. When true, entities may be created on-the-fly based on rules, calculations, or procedural generation rather than loaded from static data files. Examples include calculated spell slots, derived ability modifiers, or procedurally generated encounters.
custom Object No Custom metadata for extended entity behavior. Allows extensions and plugins to attach additional configuration without modifying the core structure. Keys and values are application-specific.

Metadata for organizing and displaying a collection of entities.

Collections group related entities together (e.g., all characters, all spells, all items) and define how they appear in list views and navigation interfaces.

Property Type Required Description
title string No The display title for the collection. This is the human-readable name shown in navigation and list headers. Should be in plural form (e.g., “Characters”, “Spells”, “Magic Items”). If nil, the title is derived from the entity’s localization key.
label string Yes The programmatic label for the collection. Used to construct file paths and resource identifiers. Should be lowercase, plural, and contain no spaces (e.g., “characters”, “spells”, “magic-items”).
icon string No An optional icon identifier for the collection. Can be an SF Symbol name (e.g., “person.3.fill”) or a path to a custom icon asset (e.g., “icons/spells.png”).