Skip to content

Managing the Compendium Spells

Brioche Masquée edited this page Aug 4, 2026 · 1 revision

Spells

Create one

In the Compendium section's title bar, click Create Spell. A prompt asks for a name (pre-filled with "New spell") — confirm it, and MPX creates spells/<slug>.json and opens it.

Fields

{
  "id": "",
  "name": "Mistward",
  "slug": "mistward",
  "attributes": { "measurement": "imperial", "ruleset": "5.5e" },
  "data": {
    "level": 2,
    "school": "abjuration",
    "ritual": false,
    "activation": { "time": 1, "unit": "action", "condition": "" },
    "rangeType": "self",
    "range": 0,
    "areaEffectShape": "sphere",
    "areaEffectSize": 15,
    "components": ["V", "S", "M"],
    "componentsDetail": "a pinch of dried kelp",
    "durationType": "concentration",
    "duration": 1,
    "durationUnit": "minute",
    "classes": ["Cleric", "Druid", "Wizard"]
  },
  "descr": "A curtain of silvery mist rises around you.",
  "image": "spells/mistward.png",
  "sources": [{ "name": "The Sunken Lighthouse", "page": 6 }],
  "tags": ["abjuration", "concentration"]
}

Only id, name, and slug are actually required — everything else is written empty and filled in as needed. id is generated for you; don't change it.

Top-level fields

Same as items: descr, image (spells/<file>), sources, tags.

data fields

Field Format Purpose
level Number, 0–9 0 is a cantrip.
school One of: (empty), abjuration, conjuration, divination, enchantment, evocation, illusion, necromancy, transmutation
ritual true/false
activation.time Number How many activation.units to cast.
activation.unit One of: (empty), action, bonusAction, reaction, hour, minute
activation.condition Text For a reaction, what triggers it.
rangeType One of: (empty), self, touch, sight, unlimited Mutually exclusive with range — set one or the other, never both.
range Number, in feet Only used when rangeType is empty. 0 is treated as not set.
areaEffectShape One of: (empty), cone, cube, cylinder, line, square, sphere, emanation
areaEffectSize Number, in feet 0 is treated as not set.
components Array, from: V, S, M
componentsDetail Text The material component, when M is set.
durationType One of: (empty), concentration, instantaneous, special, dispel, dispelOrTrigger Leave empty for a plain timed duration.
duration / durationUnit Number / one of: (empty), round, minute, hour, day Only used when durationType is empty or concentration.
classes Array of strings Which classes can cast it.

range and areaEffectSize are always authored in feet — MPX converts to meters for display when the resolved measurement is metric.

Inline authoring

Type mpx-spell and accept the snippet suggestion for the full template. Same flat shape as items — data fields at the top level, no data: wrapper.

Five show* toggles: showImage, showSchoolIcon, showAreaEffectIcon, showSources, showTags (project defaults: mpx.defaultShowSpellImage, mpx.defaultShowSpellSchoolIcon, mpx.defaultShowSpellAreaEffectIcon, mpx.defaultShowSpellSources, mpx.defaultShowSpellTags). The school icon and area-effect shape icon come from the current theme.

Next step

Roll Tables.

Clone this wiki locally