Adds import support from our other project.

This commit is contained in:
2026-09-07 21:57:59 -07:00
parent a3d1a139e9
commit a3dace36de
150 changed files with 17716 additions and 21 deletions

View File

@@ -0,0 +1,57 @@
{
"$schema": "../../../schema/entity-definition.json",
"id": "armor",
"name": "Armor",
"description": "Armor entity extending base item schema with AC base, dex cap, strength requirement, and stealth penalties.",
"ruleset_id": "open5e",
"version": "1.0.0",
"schema": {
"type": "object",
"required": ["name", "armor_category", "ac_base"],
"allOf": [
{
"$ref": "item.json#/schema"
},
{
"type": "object",
"properties": {
"armor_category": {
"type": "string",
"enum": ["light", "medium", "heavy"],
"description": "Classification of armor determining weight class and dexterity application."
},
"ac_base": {
"type": "integer",
"minimum": 0,
"description": "Base Armor Class provided by this armor (e.g. 11 for Leather, 14 for Breastplate, 18 for Plate)."
},
"ac_modifier": {
"type": "integer",
"description": "Armor Class modifier over the base 10 (e.g. +1 for Leather, +4 for Breastplate, +8 for Plate)."
},
"dex_cap": {
"type": ["integer", "null"],
"description": "Maximum dexterity modifier bonus allowed. null = uncapped (light armor), 2 = medium armor cap (+2), 0 = heavy armor (no dex bonus)."
},
"strength_requirement": {
"type": ["integer", "null"],
"description": "Minimum Strength score needed to wear without speed penalty. null or 0 if none."
},
"stealth_disadvantage": {
"type": "boolean",
"default": false,
"description": "Whether wearing this armor imposes disadvantage on Dexterity (Stealth) checks."
}
}
}
]
},
"default_values": {
"weight": 10,
"quantity": 1,
"equipped": false,
"rarity": "common",
"stealth_disadvantage": false,
"strength_requirement": null
}
}

View File

@@ -0,0 +1,375 @@
{
"$schema": "../../../schema/entity-definition.json",
"id": "character",
"name": "Player Character",
"description": "5e Player Character entity with ability scores, proficiencies, hit points, and inventory.",
"ruleset_id": "open5e",
"version": "1.0.0",
"default_template": "character_sheet",
"allowed_templates": [
"character_sheet",
"character_sheet_alt",
"spellcasting_sheet",
"stat_block",
"character_card",
"character_list_item"
],
"schema": {
"type": "object",
"required": ["level", "abilities", "hit_points"],
"properties": {
"level": {
"type": "integer",
"minimum": 1,
"maximum": 20,
"description": "Total character level."
},
"class": {
"type": "string",
"description": "Primary class of the character."
},
"race": {
"type": "string",
"description": "Character race / species."
},
"background": {
"type": "string",
"description": "Character background."
},
"alignment": {
"type": "string",
"description": "Ethical and moral alignment."
},
"experience_points": {
"type": "integer",
"minimum": 0
},
"armor_class": {
"type": ["integer", "object"],
"description": "Armor class value or extended property with shield/dex/item modifiers."
},
"equipped_armor": {
"type": ["object", "null"],
"description": "Currently equipped body armor item snapshot or reference. null if unarmored.",
"properties": {
"id": { "type": "string" },
"name": { "type": "string" },
"armor_category": {
"type": "string",
"enum": ["light", "medium", "heavy"]
},
"ac_base": { "type": "integer" },
"dex_cap": { "type": ["integer", "null"] },
"stealth_disadvantage": { "type": "boolean" },
"strength_requirement": { "type": ["integer", "null"] }
}
},
"equipped_shield": {
"type": ["object", "null"],
"description": "Currently equipped shield item snapshot or reference. null if no shield is equipped.",
"properties": {
"id": { "type": "string" },
"name": { "type": "string" },
"ac_bonus": { "type": "integer", "default": 2 },
"stealth_disadvantage": { "type": "boolean" },
"strength_requirement": { "type": ["integer", "null"] }
}
},
"speed": {
"type": "integer",
"description": "Base walking speed in feet."
},
"hit_points": {
"type": "object",
"required": ["current", "max"],
"properties": {
"current": { "type": "integer" },
"max": { "type": "integer" },
"temp": { "type": "integer", "default": 0 }
}
},
"abilities": {
"type": "object",
"description": "Core 5e ability scores.",
"required": [
"strength",
"dexterity",
"constitution",
"intelligence",
"wisdom",
"charisma"
],
"properties": {
"strength": { "type": ["integer", "object"] },
"dexterity": { "type": ["integer", "object"] },
"constitution": { "type": ["integer", "object"] },
"intelligence": { "type": ["integer", "object"] },
"wisdom": { "type": ["integer", "object"] },
"charisma": { "type": ["integer", "object"] }
}
},
"player_name": {
"type": "string",
"description": "Name of the player controlling this character."
},
"subclass": {
"type": "string",
"description": "Character archetype or subclass (e.g. Hunter, Champion, Evoker)."
},
"inspiration": {
"type": ["boolean", "integer"],
"default": false,
"description": "Heroic inspiration state or count."
},
"initiative": {
"type": ["integer", "object"],
"description": "Initiative modifier (typically dexterity modifier plus bonuses)."
},
"hit_dice": {
"type": "object",
"properties": {
"total": { "type": ["integer", "string"] },
"current": { "type": ["integer", "string"] },
"dice": { "type": "string" }
}
},
"death_saves": {
"type": "object",
"properties": {
"successes": {
"type": "integer",
"minimum": 0,
"maximum": 3,
"default": 0
},
"failures": {
"type": "integer",
"minimum": 0,
"maximum": 3,
"default": 0
}
}
},
"saving_throws": {
"type": ["array", "object"],
"description": "Saving throw proficiencies and bonuses."
},
"skills": {
"type": ["array", "object"],
"description": "Skill proficiencies and bonuses across the 18 standard 5e skills."
},
"passive_perception": {
"type": ["integer", "object"],
"description": "Passive Wisdom (Perception) score: typically 10 + perception bonus."
},
"other_proficiencies_and_languages": {
"type": "object",
"properties": {
"armor": { "type": "array", "items": { "type": "string" } },
"weapons": { "type": "array", "items": { "type": "string" } },
"tools": { "type": "array", "items": { "type": "string" } },
"languages": { "type": "array", "items": { "type": "string" } }
}
},
"attacks": {
"type": "array",
"description": "Weapons and spell attacks for the Attacks & Spellcasting section.",
"items": {
"type": "object",
"required": ["name"],
"properties": {
"name": { "type": "string" },
"atk_bonus": { "type": ["string", "integer"] },
"damage": { "type": "string" },
"damage_type": { "type": "string" },
"range": { "type": "string" },
"notes": { "type": "string" }
}
}
},
"currency": {
"type": "object",
"properties": {
"cp": { "type": "integer", "default": 0 },
"sp": { "type": "integer", "default": 0 },
"ep": { "type": "integer", "default": 0 },
"gp": { "type": "integer", "default": 0 },
"pp": { "type": "integer", "default": 0 }
}
},
"personality_traits": { "type": ["string", "array"] },
"ideals": { "type": ["string", "array"] },
"bonds": { "type": ["string", "array"] },
"flaws": { "type": ["string", "array"] },
"features_and_traits": {
"type": "array",
"description": "Class, racial, and background features.",
"items": {
"type": "object",
"required": ["name"],
"properties": {
"name": { "type": "string" },
"source": { "type": "string" },
"desc": { "type": "string" }
}
}
},
"character_details": {
"type": "object",
"properties": {
"age": { "type": ["integer", "string"] },
"height": { "type": "string" },
"weight": { "type": "string" },
"eyes": { "type": "string" },
"skin": { "type": "string" },
"hair": { "type": "string" },
"appearance": { "type": "string" },
"backstory": { "type": "string" },
"allies_and_organizations": { "type": ["string", "array"] },
"treasure": { "type": ["string", "array"] }
}
},
"spellcasting": {
"type": "object",
"properties": {
"class": { "type": "string" },
"ability": { "type": "string" },
"save_dc": { "type": ["integer", "object"] },
"attack_bonus": { "type": ["integer", "object"] },
"cantrips": {
"type": "array",
"items": { "type": ["string", "object"] }
},
"slots": {
"type": "object",
"description": "Spell slot counts per spell level 1-9.",
"additionalProperties": {
"type": "object",
"properties": {
"total": { "type": "integer" },
"expended": { "type": "integer", "default": 0 }
}
}
},
"spells": {
"type": "array",
"items": {
"type": "object",
"required": ["name"],
"properties": {
"name": { "type": "string" },
"level": { "type": "integer", "minimum": 0, "maximum": 9 },
"prepared": { "type": "boolean", "default": false },
"desc": { "type": "string" }
}
}
}
}
},
"inventory": {
"type": "array",
"description": "List of carried items.",
"items": {
"type": "object",
"required": ["id", "name"],
"properties": {
"id": { "type": "string" },
"entity_ref": {
"type": "string",
"description": "Optional relative path or identifier of the base item entity."
},
"name": { "type": "string" },
"quantity": { "type": "integer", "default": 1 },
"weight": { "type": "number", "default": 0 },
"equipped": { "type": "boolean", "default": false },
"ac_base": { "type": "integer" },
"dex_cap": { "type": ["integer", "null"] },
"ac_bonus": { "type": "integer" },
"grants_modifiers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"target": { "type": "string" },
"value": { "type": ["number", "string"] },
"type": { "type": "string" },
"source": { "type": "string" }
}
}
}
},
"additionalProperties": true
}
}
}
},
"calculated_properties": {
"armor_class": {
"expr": "10 + (equipped_armor ? (equipped_armor.ac_modifier !== undefined ? equipped_armor.ac_modifier : equipped_armor.ac_base - 10) : 0) + (equipped_armor && equipped_armor.dex_cap !== null ? (equipped_armor.dex_cap === 0 ? min(0, abilities.dexterity.modifier) : min(equipped_armor.dex_cap, abilities.dexterity.modifier)) : abilities.dexterity.modifier) + (equipped_shield ? equipped_shield.ac_bonus : 0) + sum(filter(armor_class.modifiers, m => m.active && m.type !== 'armor' && m.type !== 'ability'))",
"type": "integer",
"dependencies": [
"equipped_armor",
"equipped_shield",
"abilities.dexterity.modifier",
"armor_class.modifiers"
],
"description": "5e Armor Class calculation: base 10 + armor modifier (e.g. +1 for leather, +8 for plate) + dexterity modifier (capped by armor; heavy armor caps positive dex to 0 but allows negative penalties) + shield bonus + active external modifiers."
},
"proficiency_bonus": {
"expr": "floor((level - 1) / 4) + 2",
"type": "integer",
"dependencies": ["level"],
"description": "Standard 5e proficiency bonus calculation."
},
"ability_modifiers.strength": {
"expr": "floor((abilities.strength - 10) / 2)",
"type": "integer",
"dependencies": ["abilities.strength"]
},
"ability_modifiers.dexterity": {
"expr": "floor((abilities.dexterity - 10) / 2)",
"type": "integer",
"dependencies": ["abilities.dexterity"]
},
"ability_modifiers.constitution": {
"expr": "floor((abilities.constitution - 10) / 2)",
"type": "integer",
"dependencies": ["abilities.constitution"]
},
"ability_modifiers.intelligence": {
"expr": "floor((abilities.intelligence - 10) / 2)",
"type": "integer",
"dependencies": ["abilities.intelligence"]
},
"ability_modifiers.wisdom": {
"expr": "floor((abilities.wisdom - 10) / 2)",
"type": "integer",
"dependencies": ["abilities.wisdom"]
},
"ability_modifiers.charisma": {
"expr": "floor((abilities.charisma - 10) / 2)",
"type": "integer",
"dependencies": ["abilities.charisma"]
}
},
"default_values": {
"level": 1,
"equipped_armor": null,
"equipped_shield": null,
"abilities": {
"strength": 10,
"dexterity": 10,
"constitution": 10,
"intelligence": 10,
"wisdom": 10,
"charisma": 10
},
"hit_points": {
"current": 10,
"max": 10,
"temp": 0
},
"speed": 30,
"inventory": []
}
}

View File

@@ -0,0 +1,100 @@
{
"$schema": "../../../schema/entity-definition.json",
"id": "item",
"name": "Item / Gear",
"description": "Base entity schema for generic items, equipment, and gear in 5e.",
"ruleset_id": "open5e",
"version": "1.0.0",
"schema": {
"type": "object",
"required": ["name"],
"properties": {
"name": {
"type": "string",
"description": "The name of the item."
},
"description": {
"type": "string",
"description": "A description of the item."
},
"cost": {
"description": "The market value or cost of the item.",
"type": "object",
"properties": {
"quantity": { "type": "number", "minimum": 0 },
"unit": {
"type": "string",
"enum": ["cp", "sp", "ep", "gp", "pp"],
"default": "gp"
}
}
},
"weight": {
"type": "number",
"minimum": 0,
"description": "Weight in pounds (lbs)."
},
"rarity": {
"type": "string",
"enum": [
"common",
"uncommon",
"rare",
"very rare",
"legendary",
"artifact"
],
"default": "common"
},
"attunement": {
"type": "boolean",
"default": false,
"description": "Whether this item requires attunement."
},
"equipped": {
"type": "boolean",
"default": false,
"description": "Whether this item is currently equipped or worn."
},
"quantity": {
"type": "integer",
"minimum": 1,
"default": 1,
"description": "Number of copies carried in inventory."
},
"grants_modifiers": {
"type": "array",
"description": "Modifiers applied to the character when this item is equipped.",
"items": {
"type": "object",
"required": ["target", "value"],
"properties": {
"target": {
"type": "string",
"description": "The property path modified on the wearer (e.g. 'armor_class', 'saving_throws.all')."
},
"value": {
"type": ["number", "string"],
"description": "Modifier bonus value or expression."
},
"type": {
"type": "string",
"description": "Modifier type (e.g. 'bonus', 'base', 'override', 'advantage')."
},
"source": {
"type": "string",
"description": "Name or origin of the bonus."
}
}
}
}
}
},
"default_values": {
"weight": 0,
"quantity": 1,
"equipped": false,
"rarity": "common",
"attunement": false
}
}

View File

@@ -0,0 +1,45 @@
{
"$schema": "../../../schema/entity-definition.json",
"id": "shield",
"name": "Shield",
"description": "Shield entity extending base item schema with AC bonus and strength/stealth properties.",
"ruleset_id": "open5e",
"version": "1.0.0",
"schema": {
"type": "object",
"required": ["name", "ac_bonus"],
"allOf": [
{
"$ref": "item.json#/schema"
},
{
"type": "object",
"properties": {
"ac_bonus": {
"type": "integer",
"default": 2,
"description": "Armor Class bonus granted by wielding this shield (standard 5e shield is +2)."
},
"strength_requirement": {
"type": ["integer", "null"],
"description": "Minimum Strength score required to use without penalty."
},
"stealth_disadvantage": {
"type": "boolean",
"default": false,
"description": "Whether wielding this shield imposes disadvantage on Dexterity (Stealth) checks."
}
}
}
]
},
"default_values": {
"ac_bonus": 2,
"weight": 6,
"quantity": 1,
"equipped": false,
"rarity": "common",
"stealth_disadvantage": false,
"strength_requirement": null
}
}

View File

@@ -0,0 +1,92 @@
{
"$schema": "../../../schema/entity-definition.json",
"id": "spell",
"name": "Spell",
"description": "5e Spell entity definition declaring level, school, casting time, range, components, duration, and spell description.",
"ruleset_id": "open5e",
"version": "1.0.0",
"schema": {
"type": "object",
"required": [
"level",
"school",
"casting_time",
"range",
"duration",
"description"
],
"properties": {
"level": {
"type": "integer",
"minimum": 0,
"maximum": 9,
"description": "Spell level from 0 (cantrip) up to 9."
},
"school": {
"type": "string",
"enum": [
"abjuration",
"conjuration",
"divination",
"enchantment",
"evocation",
"illusion",
"necromancy",
"transmutation"
]
},
"casting_time": {
"type": "string",
"description": "e.g. 1 action, 1 bonus action, 1 reaction, 10 minutes."
},
"range": {
"type": "string",
"description": "e.g. Self, Touch, 30 feet, 60 feet, 120 feet."
},
"components": {
"type": "object",
"properties": {
"verbal": { "type": "boolean", "default": true },
"somatic": { "type": "boolean", "default": true },
"material": { "type": "boolean", "default": false },
"material_specified": { "type": "string" }
}
},
"duration": {
"type": "string",
"description": "e.g. Instantaneous, 1 round, 1 hour, Concentration up to 1 minute."
},
"concentration": {
"type": "boolean",
"default": false
},
"ritual": {
"type": "boolean",
"default": false
},
"description": {
"type": "string",
"description": "Rules text of the spell effect."
},
"higher_levels": {
"type": "string",
"description": "Rules text for casting at higher slot levels."
}
}
},
"default_values": {
"level": 0,
"school": "evocation",
"casting_time": "1 action",
"range": "60 feet",
"components": {
"verbal": true,
"somatic": true,
"material": false
},
"duration": "Instantaneous",
"concentration": false,
"ritual": false,
"description": ""
}
}

View File

@@ -0,0 +1,82 @@
{
"$schema": "../../../schema/entity-definition.json",
"id": "weapon",
"name": "Weapon",
"description": "5e Weapon entity definition inheriting from base item, specifying damage dice, damage type, and weapon properties.",
"ruleset_id": "open5e",
"version": "1.0.0",
"schema": {
"allOf": [
{
"$ref": "item.json#/schema"
},
{
"type": "object",
"required": ["damage_dice", "damage_type"],
"properties": {
"weapon_category": {
"type": "string",
"enum": ["simple", "martial"]
},
"weapon_range": {
"type": "string",
"enum": ["melee", "ranged"],
"default": "melee"
},
"damage_dice": {
"type": "string",
"description": "Damage formula e.g. 1d6, 1d8, 2d6."
},
"damage_type": {
"type": "string",
"enum": ["bludgeoning", "piercing", "slashing"]
},
"properties": {
"type": "array",
"description": "Standard 5e weapon properties.",
"items": {
"type": "string",
"enum": [
"ammunition",
"finesse",
"heavy",
"light",
"loading",
"range",
"reach",
"special",
"thrown",
"two-handed",
"versatile"
]
}
},
"range_normal": {
"type": ["integer", "null"],
"description": "Standard effective range in feet."
},
"range_long": {
"type": ["integer", "null"],
"description": "Long range with disadvantage in feet."
},
"versatile_dice": {
"type": ["string", "null"],
"description": "Two-handed damage dice when used versatile (e.g. 1d10 for a longsword)."
}
}
}
]
},
"default_values": {
"cost": {
"quantity": 10,
"unit": "gp"
},
"weight": 2.0,
"weapon_category": "simple",
"weapon_range": "melee",
"damage_dice": "1d6",
"damage_type": "slashing",
"properties": []
}
}