Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Data Model

The hierarchy of entities in Mimir and how they relate to each other.

Entity Hierarchy

Campaign
├── Documents (campaign-level)
├── Maps (campaign-level)
├── Characters (PCs and NPCs)
│   ├── Classes (multiclass support)
│   ├── Inventory
│   ├── Spells
│   ├── Proficiencies
│   ├── Feats
│   └── Features
├── Modules
│   ├── Documents (module-level)
│   ├── Maps (module-level)
│   ├── Module Monsters (catalog references)
│   ├── Module NPCs
│   └── Token Placements
├── Homebrew Items
├── Homebrew Monsters
├── Homebrew Spells
└── Campaign Sources (enabled books)

Campaigns

The top-level container. A campaign represents a complete D&D game — the world, the story, the characters.

FieldDescription
idUUID, auto-generated
nameCampaign name (required)
descriptionOptional notes
archived_atSoft-delete timestamp (null = active)
created_atCreation timestamp
updated_atLast modification timestamp

Archiving a campaign hides it from the default list but preserves all data. Deleting a campaign is permanent and cascades to all children.

When you create a campaign, Mimir automatically generates 11 template documents (Campaign Pitch, Starting Scenario, World Primer, Character Guidelines, Table Expectations, Character Integration, Campaign Bible, Safety Tools, House Rules, Player Secrets, Faction Overview).

Characters

Both player characters (PCs) and non-player characters (NPCs) use the same data model. The is_npc flag distinguishes them.

FieldDescription
idUUID
campaign_idParent campaign
nameCharacter name (required)
is_npcInteger: 0 = PC, 1 = NPC
player_nameReal player name (PCs only)
race_nameRace name (references catalog)
race_sourceSource book for the race
background_nameBackground name (references catalog)
background_sourceSource book for the background
strengthStrength score (default 10)
dexterityDexterity score (default 10)
constitutionConstitution score (default 10)
intelligenceIntelligence score (default 10)
wisdomWisdom score (default 10)
charismaCharisma score (default 10)
cp, sp, ep, gp, ppCurrency in 5 denominations
traitsPersonality traits
idealsCharacter ideals
bondsCharacter bonds
flawsCharacter flaws
roleNPC role (NPC only)
locationNPC location (NPC only)
factionNPC faction (NPC only)
created_at, updated_atTimestamps

Character Classes

Characters support multiclassing. Each class entry tracks:

FieldDescription
character_idParent character
class_nameClass name (e.g., “Fighter”)
class_sourceSource book for the class
levelLevels in this class
subclass_nameSubclass (e.g., “Champion”)
subclass_sourceSource book for the subclass
starting_classWhether this is the character’s first class (for multiclass proficiency rules)

A level 5 Fighter / level 3 Wizard has two entries.

Character Inventory

FieldDescription
item_nameItem name (may reference catalog)
item_sourceSource book for the item
quantityNumber of items
equippedWhether the item is worn/held (integer: 0/1)
attunedWhether the item is attuned (integer: 0/1). Mimir counts attuned items but does not enforce the D&D 5e three-attunement rule
notesOptional notes about the item

Character Spells

FieldDescription
spell_nameSpell name (references catalog)
spell_sourceSource book for the spell
preparedWhether currently prepared (integer: 0/1)
source_classWhich class grants this spell

Character Proficiencies

FieldDescription
proficiency_typeskill, save, tool, weapon, armor, or language
nameProficiency name (e.g., “Perception”)
expertiseWhether the character has expertise (integer: 0/1)

Character Feats

FieldDescription
feat_nameFeat name
feat_sourceSource book for the feat
source_typeHow the feat was acquired: asi, race, class, or bonus

Character Features

FieldDescription
feature_typefighting_style, metamagic, maneuver, invocation, or pact_boon (see Characters)
feature_nameFeature name
feature_sourceSource book
source_classWhich class grants the feature

Character Sources

Optional per-character source filtering, separate from campaign sources.

FieldDescription
character_idParent character
source_codeEnabled source book code

Modules

Modules are adventure containers within a campaign — a dungeon, a town, a story arc.

FieldDescription
idUUID
campaign_idParent campaign
nameModule name (required)
descriptionOptional description
module_numberDisplay order
created_at, updated_atTimestamps

Module Monsters

References to catalog monsters (or homebrew monsters) used in this module’s encounters.

FieldDescription
module_idParent module
monster_nameCatalog monster name
monster_sourceSource book for the monster
homebrew_monster_idAlternative: reference to a homebrew monster
display_nameOptional custom name (e.g., “Goblin Boss Grix”)
quantityNumber of creatures
notesDM notes about this monster’s role

Module NPCs

NPCs created specifically for this module (distinct from campaign-level characters).

FieldDescription
nameNPC name
roleRole in the module
descriptionBackground and behavior
appearancePhysical description
personalityPersonality traits
motivationWhat drives this NPC
secretsHidden information about the NPC
stat_blockOptional JSON stat block
token_asset_idOptional custom token art

Documents

Flexible text content at either the campaign or module level.

FieldDescription
idUUID
campaign_idParent campaign
module_idParent module (null for campaign-level docs)
titleDocument title
doc_typeType identifier (e.g., campaign_pitch, world_primer, character_guidelines, user_document)
contentFull text content
sort_orderDisplay ordering
created_at, updated_atTimestamps

A document belongs to a campaign, and optionally to a specific module within that campaign.

Maps

Battle maps with optional grid, wall, and lighting data.

FieldDescription
idUUID
campaign_idParent campaign
module_idOptional parent module
nameMap name
descriptionOptional description
sort_orderDisplay ordering
uvtt_asset_idReference to the uploaded map asset
lighting_modebright, dim, or dark
fog_enabledWhether fog of war is active (integer: 0/1)
created_at, updated_atTimestamps

Map Overlays

Maps support several overlay types:

Light Sources (light_sources table) — Dynamic lights with grid position, bright/dim radius, color, and active state.

Fog Revealed Areas (fog_revealed_areas table) — Rectangles tracking which map areas have been revealed to players (x, y, width, height). Written by the fog reveal commands (reveal_rect, reveal_circle, reveal_all); these are currently not surfaced in the UI — live fog rendering is computed from PC token vision instead (see Vision System).

Points of Interest (map_pois table) — Named markers with descriptions, icons, colors, and visibility at specific grid positions.

Traps (map_traps table) — Trap markers with name, description, trigger/effect descriptions, detection DC, triggered state, and visibility.

Token Placements (token_placements table) — Monster and NPC positions on the map.

FieldDescription
map_idParent map
module_monster_idReference to module monster (or null)
module_npc_idReference to module NPC (or null)
grid_x, grid_yGrid position
labelOptional display label
faction_colorToken border color
hiddenWhether hidden from players (integer: 0/1)
vision_bright_ftBright vision range in feet
vision_dim_ftDim vision range in feet
vision_dark_ftDarkvision range in feet
light_radius_ftLight emitted by this token
created_atPlacement timestamp

Homebrew Content

Custom content scoped to a campaign. Three types:

Homebrew Items

FieldDescription
nameItem name
item_typeweapon, armor, potion, etc.
raritycommon through legendary
dataFull item data as JSON
cloned_from_nameOriginal catalog item name (if cloned)
cloned_from_sourceOriginal catalog item source (if cloned)

Homebrew Monsters

FieldDescription
nameMonster name
crChallenge rating
creature_typebeast, fiend, undead, etc.
sizeTiny through Gargantuan
dataFull stat block as JSON
cloned_from_nameOriginal catalog monster name (if cloned)
cloned_from_sourceOriginal catalog monster source (if cloned)

Homebrew Spells

FieldDescription
nameSpell name
levelSpell level (0 for cantrips)
schoolSpell school
dataFull spell data as JSON
cloned_from_nameOriginal catalog spell name (if cloned)
cloned_from_sourceOriginal catalog spell source (if cloned)

Campaign Sources

Controls which D&D source books are active for a campaign.

FieldDescription
campaign_idCampaign this applies to
source_codeSource book abbreviation (e.g., “PHB”, “MM”, “XGE”)

Catalog searches filter results by the campaign’s enabled sources.

Campaign Assets

Uploaded files (map images, token art) stored as binary blobs.

FieldDescription
idUUID
campaign_idParent campaign (optional)
module_idParent module (optional)
filenameOriginal filename
descriptionOptional description
mime_typeFile MIME type
blob_pathStorage path relative to assets directory
file_sizeFile size in bytes
uploaded_atUpload timestamp

Assets are stored in the assets/ directory within the application data folder.

Catalog Data

Read-only D&D 5e reference data imported from external sources. Key tables:

TableContents
monstersCreature stat blocks with CR, type, size, token image path, full JSON
itemsEquipment and magic items with type, rarity
spellsSpells with level, school, ritual/concentration flags
racesPlayable races with traits
classesClasses with feature data
subclassesSubclasses linked to parent classes
class_featuresClass features by level
subclass_featuresSubclass features by level
backgroundsBackgrounds with proficiencies
featsFeats with prerequisites
conditionsStatus conditions (blinded, charmed, etc.)
languagesLanguages with type classification
deitiesDeities with pantheon grouping
diseasesDiseases and afflictions
hazardsEnvironmental hazards
trapsTrap definitions with tier
sensesSense types
skillsSkills with associated ability
objectsInteractive objects
vehiclesVehicles with type
rewardsRewards with type
psionicsPsionic abilities
optional_featuresOptional class features (invocations, maneuvers, etc.)
variant_rulesVariant and optional rules
actionsStandard actions
cultsCults and supernatural boons
booksSource book metadata with cover images
catalog_sourcesSource book registry with enabled/disabled state
spell_classesJoin table: which classes have access to which spells
spell_subclassesJoin table: subclass spell lists
item_attunement_classesJoin table: class-restricted attunement
catalog_tablesReference tables from source books

A full-text search index (catalog_fts, an FTS5 virtual table) provides fast search across all catalog entity types.

See The Catalog System for how this data is used.

See Also