@datasworn/core
Version:
Typings and JSON schema common to Datasworn. This is a pre-release package, provided for developer feedback. It will almost certainly receive breaking changes.
1,694 lines • 253 kB
JSON
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://ironswornrpg.com/datasworn-source.schema.json",
"$ref": "#/definitions/SourceRoot",
"title": "DataswornSource v0.0.10",
"description": "Source data schema for Datasworn, which describes game rules compatible with the Ironsworn tabletop roleplaying game by Shawn Tomkin.\n\nThe source data omits IDs, and makes properties that provide a default value optional; these values are inserted during validation/processing to produce the JSON for distribution.",
"definitions": {
"SourceRoot": {
"title": "SourceRoot",
"description": "The root object for a Datasworn source file, whose schema is discriminated by the `type` property. Unlike the JSON schema for distribution, this may be a standalone object (Asset, Npc, Move, OracleRollable, DelveSite, DelveSiteTheme, DelveSiteDomain, or Rarity), but it still must specify its `ruleset` and `datasworn_version`.",
"anyOf": [
{
"$ref": "#/definitions/RulesPackage"
},
{
"allOf": [
{
"type": "object",
"remarks": "Deserialize as a discriminated union/polymorphic object type, using the `type` property as a discriminator.",
"required": ["type"],
"properties": {
"type": {
"enum": [
"asset",
"npc",
"move",
"oracle_rollable",
"delve_site",
"delve_site_theme",
"delve_site_domain",
"rarity"
]
}
},
"additionalProperties": true,
"allOf": [
{
"if": {
"properties": {
"type": {
"const": "asset",
"type": "string"
}
}
},
"then": {
"$ref": "#/definitions/Asset"
}
},
{
"if": {
"properties": {
"type": {
"const": "npc",
"type": "string"
}
}
},
"then": {
"$ref": "#/definitions/Npc"
}
},
{
"if": {
"properties": {
"type": {
"const": "move",
"type": "string"
}
}
},
"then": {
"$ref": "#/definitions/Move"
}
},
{
"if": {
"properties": {
"type": {
"const": "oracle_rollable",
"type": "string"
}
}
},
"then": {
"$ref": "#/definitions/OracleRollable"
}
},
{
"if": {
"properties": {
"type": {
"const": "delve_site",
"type": "string"
}
}
},
"then": {
"$ref": "#/definitions/DelveSite"
}
},
{
"if": {
"properties": {
"type": {
"const": "delve_site_theme",
"type": "string"
}
}
},
"then": {
"$ref": "#/definitions/DelveSiteTheme"
}
},
{
"if": {
"properties": {
"type": {
"const": "delve_site_domain",
"type": "string"
}
}
},
"then": {
"$ref": "#/definitions/DelveSiteDomain"
}
},
{
"if": {
"properties": {
"type": {
"const": "rarity",
"type": "string"
}
}
},
"then": {
"$ref": "#/definitions/Rarity"
}
}
]
},
{
"type": "object",
"required": ["datasworn_version", "ruleset"],
"properties": {
"datasworn_version": {
"type": "string",
"description": "The version of the Datasworn format used by this data.",
"const": "0.0.10",
"pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$"
},
"ruleset": {
"$ref": "#/definitions/RulesetId"
}
},
"additionalProperties": true
}
]
}
]
},
"RulesPackage": {
"title": "RulesPackage",
"type": "object",
"description": "Describes game rules compatible with the Ironsworn tabletop role-playing game by Shawn Tomkin.",
"remarks": "Deserialize as a discriminated union/polymorphic object type, using the `type` property as a discriminator.",
"required": ["type"],
"properties": {
"type": {
"enum": ["ruleset", "expansion"]
}
},
"additionalProperties": true,
"allOf": [
{
"if": {
"properties": {
"type": {
"const": "ruleset",
"type": "string"
}
}
},
"then": {
"$ref": "#/definitions/Ruleset"
}
},
{
"if": {
"properties": {
"type": {
"const": "expansion",
"type": "string"
}
}
},
"then": {
"$ref": "#/definitions/Expansion"
}
}
]
},
"Ruleset": {
"title": "Ruleset",
"type": "object",
"description": "A standalone Datasworn package that describes its own ruleset.",
"required": ["_id", "datasworn_version", "type"],
"properties": {
"_id": {
"$ref": "#/definitions/RulesetId"
},
"datasworn_version": {
"type": "string",
"description": "The version of the Datasworn format used by this data.",
"const": "0.0.10",
"pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$"
},
"type": {
"type": "string",
"const": "ruleset"
},
"title": {
"$ref": "#/definitions/SourceTitle"
},
"authors": {
"type": "array",
"description": "Lists authors credited by the source material.",
"items": {
"$ref": "#/definitions/AuthorInfo"
},
"minItems": 1
},
"date": {
"$ref": "#/definitions/Date",
"description": "The date of the source documents's last update, formatted YYYY-MM-DD. Required because it's used to determine whether the data needs updating."
},
"url": {
"$ref": "#/definitions/WebUrl",
"description": "A URL where the source document is available.",
"examples": ["https://ironswornrpg.com"]
},
"license": {
"$ref": "#/definitions/License"
},
"rules": {
"$ref": "#/definitions/Rules"
},
"description": {
"$ref": "#/definitions/MarkdownString"
},
"oracles": {
"type": "object",
"description": "A dictionary object containing oracle collections, which may contain oracle tables and/or oracle collections.",
"remarks": "Deserialize as a dictionary object.",
"patternProperties": {
"^([a-z][a-z_]*)$": {
"$ref": "#/definitions/OracleTablesCollection"
}
}
},
"assets": {
"type": "object",
"description": "A dictionary object containing asset collections, which contain assets.",
"remarks": "Deserialize as a dictionary object.",
"patternProperties": {
"^([a-z][a-z_]*)$": {
"$ref": "#/definitions/AssetCollection"
}
}
},
"atlas": {
"type": "object",
"description": "A dictionary object containing atlas collections, which contain atlas entries.",
"remarks": "Deserialize as a dictionary object.",
"patternProperties": {
"^([a-z][a-z_]*)$": {
"$ref": "#/definitions/AtlasCollection"
}
}
},
"moves": {
"type": "object",
"description": "A dictionary object containing move categories, which contain moves.",
"remarks": "Deserialize as a dictionary object.",
"patternProperties": {
"^([a-z][a-z_]*)$": {
"$ref": "#/definitions/MoveCategory"
}
}
},
"npcs": {
"type": "object",
"description": "A dictionary object containing NPC collections, which contain NPCs.",
"remarks": "Deserialize as a dictionary object.",
"patternProperties": {
"^([a-z][a-z_]*)$": {
"$ref": "#/definitions/NpcCollection"
}
}
},
"rarities": {
"type": "object",
"description": "A dictionary object containing rarities, like those presented in Ironsworn: Delve.",
"remarks": "Deserialize as a dictionary object.",
"patternProperties": {
"^([a-z][a-z_]*)$": {
"$ref": "#/definitions/Rarity"
}
}
},
"delve_sites": {
"type": "object",
"description": "A dictionary object of delve sites, like the premade delve sites presented in Ironsworn: Delve",
"remarks": "Deserialize as a dictionary object.",
"patternProperties": {
"^([a-z][a-z_]*)$": {
"$ref": "#/definitions/DelveSite"
}
}
},
"site_domains": {
"type": "object",
"description": "A dictionary object containing delve site domains.",
"remarks": "Deserialize as a dictionary object.",
"patternProperties": {
"^([a-z][a-z_]*)$": {
"$ref": "#/definitions/DelveSiteDomain"
}
}
},
"site_themes": {
"type": "object",
"description": "A dictionary object containing delve site themes.",
"remarks": "Deserialize as a dictionary object.",
"patternProperties": {
"^([a-z][a-z_]*)$": {
"$ref": "#/definitions/DelveSiteTheme"
}
}
},
"truths": {
"type": "object",
"description": "A dictionary object of truth categories.",
"remarks": "Deserialize as a dictionary object.",
"patternProperties": {
"^([a-z][a-z_]*)$": {
"$ref": "#/definitions/Truth"
}
}
}
},
"additionalProperties": true
},
"Expansion": {
"title": "Expansion",
"type": "object",
"description": "A Datasworn package that relies on an external package to provide its ruleset.",
"required": ["_id", "datasworn_version", "type", "ruleset"],
"properties": {
"_id": {
"$ref": "#/definitions/ExpansionId"
},
"datasworn_version": {
"type": "string",
"description": "The version of the Datasworn format used by this data.",
"const": "0.0.10",
"pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$"
},
"type": {
"type": "string",
"const": "expansion"
},
"ruleset": {
"$ref": "#/definitions/RulesetId"
},
"title": {
"$ref": "#/definitions/SourceTitle"
},
"authors": {
"type": "array",
"description": "Lists authors credited by the source material.",
"items": {
"$ref": "#/definitions/AuthorInfo"
},
"minItems": 1
},
"date": {
"$ref": "#/definitions/Date",
"description": "The date of the source documents's last update, formatted YYYY-MM-DD. Required because it's used to determine whether the data needs updating."
},
"url": {
"$ref": "#/definitions/WebUrl",
"description": "A URL where the source document is available.",
"examples": ["https://ironswornrpg.com"]
},
"license": {
"$ref": "#/definitions/License"
},
"rules": {
"$ref": "#/definitions/RulesExpansion"
},
"description": {
"$ref": "#/definitions/MarkdownString"
},
"oracles": {
"type": "object",
"description": "A dictionary object containing oracle collections, which may contain oracle tables and/or oracle collections.",
"remarks": "Deserialize as a dictionary object.",
"patternProperties": {
"^([a-z][a-z_]*)$": {
"$ref": "#/definitions/OracleTablesCollection"
}
}
},
"assets": {
"type": "object",
"description": "A dictionary object containing asset collections, which contain assets.",
"remarks": "Deserialize as a dictionary object.",
"patternProperties": {
"^([a-z][a-z_]*)$": {
"$ref": "#/definitions/AssetCollection"
}
}
},
"atlas": {
"type": "object",
"description": "A dictionary object containing atlas collections, which contain atlas entries.",
"remarks": "Deserialize as a dictionary object.",
"patternProperties": {
"^([a-z][a-z_]*)$": {
"$ref": "#/definitions/AtlasCollection"
}
}
},
"moves": {
"type": "object",
"description": "A dictionary object containing move categories, which contain moves.",
"remarks": "Deserialize as a dictionary object.",
"patternProperties": {
"^([a-z][a-z_]*)$": {
"$ref": "#/definitions/MoveCategory"
}
}
},
"npcs": {
"type": "object",
"description": "A dictionary object containing NPC collections, which contain NPCs.",
"remarks": "Deserialize as a dictionary object.",
"patternProperties": {
"^([a-z][a-z_]*)$": {
"$ref": "#/definitions/NpcCollection"
}
}
},
"rarities": {
"type": "object",
"description": "A dictionary object containing rarities, like those presented in Ironsworn: Delve.",
"remarks": "Deserialize as a dictionary object.",
"patternProperties": {
"^([a-z][a-z_]*)$": {
"$ref": "#/definitions/Rarity"
}
}
},
"delve_sites": {
"type": "object",
"description": "A dictionary object of delve sites, like the premade delve sites presented in Ironsworn: Delve",
"remarks": "Deserialize as a dictionary object.",
"patternProperties": {
"^([a-z][a-z_]*)$": {
"$ref": "#/definitions/DelveSite"
}
}
},
"site_domains": {
"type": "object",
"description": "A dictionary object containing delve site domains.",
"remarks": "Deserialize as a dictionary object.",
"patternProperties": {
"^([a-z][a-z_]*)$": {
"$ref": "#/definitions/DelveSiteDomain"
}
}
},
"site_themes": {
"type": "object",
"description": "A dictionary object containing delve site themes.",
"remarks": "Deserialize as a dictionary object.",
"patternProperties": {
"^([a-z][a-z_]*)$": {
"$ref": "#/definitions/DelveSiteTheme"
}
}
},
"truths": {
"type": "object",
"description": "A dictionary object of truth categories.",
"remarks": "Deserialize as a dictionary object.",
"patternProperties": {
"^([a-z][a-z_]*)$": {
"$ref": "#/definitions/Truth"
}
}
}
},
"additionalProperties": true
},
"AssetAbilityId": {
"title": "AssetAbilityId",
"type": "string",
"description": "A unique ID for an AssetAbility.",
"pattern": "^([a-z0-9_]{3,})\\/assets\\/([a-z][a-z_]*)\\/([a-z][a-z_]*)\\/abilities\\/(0|[1-9][0-9]*)$"
},
"AssetCollectionId": {
"title": "AssetCollectionId",
"type": "string",
"description": "A unique ID for an AssetCollection.",
"pattern": "^([a-z0-9_]{3,})\\/collections\\/assets\\/([a-z][a-z_]*)$"
},
"AssetCollectionIdWildcard": {
"title": "AssetCollectionIdWildcard",
"type": "string",
"description": "A wildcarded ID that can be used to match multiple AssetCollections.",
"pattern": "^(\\*|([a-z0-9_]{3,}))\\/collections\\/assets\\/(\\*|([a-z][a-z_]*))$"
},
"AssetId": {
"title": "AssetId",
"type": "string",
"description": "A unique ID for an Asset.",
"pattern": "^([a-z0-9_]{3,})\\/assets\\/([a-z][a-z_]*)\\/([a-z][a-z_]*)$"
},
"AssetIdWildcard": {
"title": "AssetIdWildcard",
"type": "string",
"description": "A wildcarded ID that can be used to match multiple Assets.",
"pattern": "^(\\*|([a-z0-9_]{3,}))\\/assets\\/(\\*|([a-z][a-z_]*))\\/(\\*|([a-z][a-z_]*))$"
},
"AtlasCollectionId": {
"title": "AtlasCollectionId",
"type": "string",
"description": "A unique ID for an AtlasCollection.",
"examples": ["classic/collections/atlas/ironlands"],
"pattern": "^([a-z0-9_]{3,})\\/collections\\/atlas\\/([a-z][a-z_]*)$"
},
"AtlasCollectionIdWildcard": {
"title": "AtlasCollectionIdWildcard",
"type": "string",
"description": "A wildcarded ID that can be used to match multiple AtlasCollections.",
"pattern": "^(\\*|([a-z0-9_]{3,}))\\/collections\\/atlas\\/(\\*|([a-z][a-z_]*))$"
},
"AtlasEntryId": {
"title": "AtlasEntryId",
"type": "string",
"description": "A unique ID for an AtlasEntry.",
"examples": ["classic/atlas/ironlands/hinterlands"],
"pattern": "^([a-z0-9_]{3,})\\/atlas\\/([a-z][a-z_]*)\\/([a-z][a-z_]*)$"
},
"AtlasEntryIdWildcard": {
"title": "AtlasEntryIdWildcard",
"type": "string",
"description": "A wildcarded ID that can be used to match multiple AtlasEntrys.",
"pattern": "^(\\*|([a-z0-9_]{3,}))\\/atlas\\/(\\*|([a-z][a-z_]*))\\/(\\*|([a-z][a-z_]*))$"
},
"ConditionMeterRuleId": {
"title": "ConditionMeterRuleId",
"type": "string",
"description": "A unique ID for a ConditionMeterRule.",
"examples": [
"classic/rules/condition_meters/health",
"starforged/rules/condition_meters/spirit"
],
"pattern": "^([a-z0-9_]{3,})\\/rules\\/condition_meters\\/([a-z][a-z_]*)$"
},
"DelveSiteDomainId": {
"title": "DelveSiteDomainId",
"type": "string",
"description": "A unique ID for a DelveSiteDomain.",
"examples": ["delve/site_domains/shadowfen"],
"pattern": "^([a-z0-9_]{3,})\\/site_domains\\/([a-z][a-z_]*)$"
},
"DelveSiteDomainIdWildcard": {
"title": "DelveSiteDomainIdWildcard",
"type": "string",
"description": "A wildcarded ID that can be used to match multiple DelveSiteDomains.",
"pattern": "^(\\*|([a-z0-9_]{3,}))\\/site_domains\\/(\\*|([a-z][a-z_]*))$"
},
"DelveSiteId": {
"title": "DelveSiteId",
"type": "string",
"description": "A unique ID for a DelveSite.",
"examples": ["delve/delve_sites/alvas_rest"],
"pattern": "^([a-z0-9_]{3,})\\/delve_sites\\/([a-z][a-z_]*)$"
},
"DelveSiteIdWildcard": {
"title": "DelveSiteIdWildcard",
"type": "string",
"description": "A wildcarded ID that can be used to match multiple DelveSites.",
"pattern": "^(\\*|([a-z0-9_]{3,}))\\/delve_sites\\/(\\*|([a-z][a-z_]*))$"
},
"DelveSiteThemeId": {
"title": "DelveSiteThemeId",
"type": "string",
"description": "A unique ID for a DelveSiteTheme.",
"examples": ["delve/site_themes/hallowed"],
"pattern": "^([a-z0-9_]{3,})\\/site_themes\\/([a-z][a-z_]*)$"
},
"DelveSiteThemeIdWildcard": {
"title": "DelveSiteThemeIdWildcard",
"type": "string",
"description": "A wildcarded ID that can be used to match multiple DelveSiteThemes.",
"pattern": "^(\\*|([a-z0-9_]{3,}))\\/site_themes\\/(\\*|([a-z][a-z_]*))$"
},
"DictKey": {
"title": "DictKey",
"type": "string",
"description": "A `snake_case` key used in a Datasworn dictionary object.",
"remarks": "If you need to generate a key from a user-provided label, it's recommended to use a 'slugify' function/library, e.g. https://www.npmjs.com/package/slugify for NodeJS.",
"pattern": "^([a-z][a-z_]*)$"
},
"ExpansionId": {
"title": "ExpansionId",
"type": "string",
"description": "The ID of a Datasworn package that relies on an external package to provide its ruleset.",
"examples": ["delve"],
"pattern": "^([a-z0-9_]{3,})$"
},
"ImpactRuleCollectionId": {
"title": "ImpactRuleCollectionId",
"type": "string",
"description": "A unique ID for an ImpactRuleCollection.",
"examples": [
"classic/collections/rules/impacts/conditions",
"starforged/collections/rules/impacts/vehicle_troubles"
],
"pattern": "^([a-z0-9_]{3,})\\/collections\\/rules\\/impacts\\/([a-z][a-z_]*)$"
},
"ImpactRuleId": {
"title": "ImpactRuleId",
"type": "string",
"description": "A unique ID for an ImpactRule.",
"examples": [
"classic/rules/impacts/conditions/wounded",
"starforged/rules/impacts/vehicle_troubles/battered"
],
"pattern": "^([a-z0-9_]{3,})\\/rules\\/impacts\\/([a-z][a-z_]*)\\/([a-z][a-z_]*)$"
},
"MoveCategoryId": {
"title": "MoveCategoryId",
"type": "string",
"description": "A unique ID for a MoveCategory.",
"examples": ["starforged/collections/moves/adventure"],
"pattern": "^([a-z0-9_]{3,})\\/collections\\/moves\\/([a-z][a-z_]*)$"
},
"MoveCategoryIdWildcard": {
"title": "MoveCategoryIdWildcard",
"type": "string",
"description": "A wildcarded ID that can be used to match multiple MoveCategorys.",
"pattern": "^(\\*|([a-z0-9_]{3,}))\\/collections\\/moves\\/(\\*|([a-z][a-z_]*))$"
},
"MoveId": {
"title": "MoveId",
"description": "A move ID, for a standard move or a unique asset move",
"examples": [
"classic/moves/combat/strike",
"starforged/assets/module/grappler/abilities/0/moves/ready_grappler"
],
"anyOf": [
{
"type": "string",
"description": "A move ID for a standard move.",
"pattern": "^([a-z0-9_]{3,})\\/moves\\/([a-z][a-z_]*)\\/([a-z][a-z_]*)$"
},
{
"type": "string",
"description": "A move ID for an asset move.",
"pattern": "^([a-z0-9_]{3,})\\/assets\\/([a-z][a-z_]*)\\/([a-z][a-z_]*)\\/abilities\\/(0|[1-9][0-9]*)\\/moves\\/([a-z][a-z_]*)$"
}
]
},
"MoveIdWildcard": {
"title": "MoveIdWildcard",
"description": "A move ID with wildcards.",
"examples": [
"*/moves/*/face_danger",
"*/assets/ritual/*/abilities/*/moves/*"
],
"anyOf": [
{
"type": "string",
"description": "A wildcarded ID that can be used to match multiple StandardMoves.",
"pattern": "^(\\*|([a-z0-9_]{3,}))\\/moves\\/(\\*|([a-z][a-z_]*))\\/(\\*|([a-z][a-z_]*))$"
},
{
"type": "string",
"description": "A wildcarded ID that can be used to match multiple AssetMoves.",
"pattern": "^(\\*|([a-z0-9_]{3,}))\\/assets\\/(\\*|([a-z][a-z_]*))\\/(\\*|([a-z][a-z_]*))\\/abilities\\/(\\*|(0|[1-9][0-9]*))\\/moves\\/(\\*|([a-z][a-z_]*))$"
}
]
},
"NpcCollectionId": {
"title": "NpcCollectionId",
"type": "string",
"description": "A unique ID for a NpcCollection.",
"examples": [
"classic/collections/npcs/firstborn",
"starforged/collections/npcs/sample_npcs"
],
"pattern": "^([a-z0-9_]{3,})\\/collections\\/npcs\\/([a-z][a-z_]*)$"
},
"NpcCollectionIdWildcard": {
"title": "NpcCollectionIdWildcard",
"type": "string",
"description": "A wildcarded ID that can be used to match multiple NpcCollections.",
"pattern": "^(\\*|([a-z0-9_]{3,}))\\/collections\\/npcs\\/(\\*|([a-z][a-z_]*))$"
},
"NpcId": {
"title": "NpcId",
"type": "string",
"description": "A unique ID for a Npc.",
"examples": [
"classic/npcs/firstborn/elf",
"starforged/npcs/sample_npcs/chiton"
],
"pattern": "^([a-z0-9_]{3,})\\/npcs\\/([a-z][a-z_]*)\\/([a-z][a-z_]*)$"
},
"NpcIdWildcard": {
"title": "NpcIdWildcard",
"type": "string",
"description": "A wildcarded ID that can be used to match multiple Npcs.",
"pattern": "^(\\*|([a-z0-9_]{3,}))\\/npcs\\/(\\*|([a-z][a-z_]*))\\/(\\*|([a-z][a-z_]*))$"
},
"NpcVariantId": {
"title": "NpcVariantId",
"type": "string",
"description": "A unique ID for a NpcVariant.",
"examples": [
"starforged/npcs/sample_npcs/chiton/variants/chiton_drone_pack"
],
"pattern": "^([a-z0-9_]{3,})\\/npcs\\/([a-z][a-z_]*)\\/([a-z][a-z_]*)\\/variants\\/([a-z][a-z_]*)$"
},
"OracleCollectionId": {
"title": "OracleCollectionId",
"type": "string",
"description": "A unique ID for an OracleCollection.",
"examples": [
"starforged/collections/oracles/core",
"starforged/collections/oracles/character/names",
"starforged/collections/oracles/planets/furnace/settlements"
],
"pattern": "^([a-z0-9_]{3,})\\/collections\\/oracles(\\/([a-z][a-z_]*)){1,3}$"
},
"OracleCollectionIdWildcard": {
"title": "OracleCollectionIdWildcard",
"type": "string",
"description": "A wildcarded ID that can be used to match multiple OracleCollections.",
"pattern": "^(\\*|([a-z0-9_]{3,}))\\/collections\\/oracles((\\/([a-z][a-z_]*)){1,3}|\\/\\*\\*|\\/\\*\\*\\/([a-z][a-z_]*)|\\/([a-z][a-z_]*)\\/\\*\\*)$"
},
"OracleRollableId": {
"title": "OracleRollableId",
"examples": [
"starforged/oracles/core/action",
"starforged/oracles/character/names/given",
"starforged/oracles/planets/furnace/settlements/terminus"
],
"anyOf": [
{
"title": "OracleRollableId",
"type": "string",
"description": "A unique ID for an OracleRollable.",
"examples": [
"starforged/oracles/core/action",
"starforged/oracles/character/names/given",
"starforged/oracles/planets/furnace/settlements/terminus"
],
"pattern": "^([a-z0-9_]{3,})\\/oracles(\\/([a-z][a-z_]*)){1,3}\\/([a-z][a-z_]*)$"
},
{
"title": "OracleRollableId",
"type": "string",
"description": "A unique ID for an OracleRollable.",
"examples": [
"starforged/oracles/core/action",
"starforged/oracles/character/names/given",
"starforged/oracles/planets/furnace/settlements/terminus"
],
"pattern": "^([a-z0-9_]{3,})\\/oracles(\\/([a-z][a-z_]*)){1,3}\\/([a-z][a-z_]*)$"
}
]
},
"OracleRollableIdWildcard": {
"title": "OracleRollableIdWildcard",
"type": "string",
"description": "Oracle table wildcards can also use '**' to represent any number of collection levels in the oracle tree.",
"examples": [
"*/oracles/**/peril",
"starforged/oracles/character/names/*",
"starforged/oracles/planets/*/settlements/*"
],
"pattern": "^(\\*|([a-z0-9_]{3,}))\\/oracles((\\/([a-z][a-z_]*)){1,3}|\\/\\*\\*|\\/\\*\\*\\/([a-z][a-z_]*)|\\/([a-z][a-z_]*)\\/\\*\\*)\\/(\\*|([a-z][a-z_]*))$"
},
"RarityId": {
"title": "RarityId",
"type": "string",
"description": "A unique ID for a Rarity.",
"examples": ["classic/rarities/ayethins_journal"],
"pattern": "^([a-z0-9_]{3,})\\/rarities\\/([a-z][a-z_]*)$"
},
"RarityIdWildcard": {
"title": "RarityIdWildcard",
"type": "string",
"description": "A wildcarded ID that can be used to match multiple Raritys.",
"pattern": "^(\\*|([a-z0-9_]{3,}))\\/rarities\\/(\\*|([a-z][a-z_]*))$"
},
"RulesetId": {
"title": "RulesetId",
"type": "string",
"description": "The ID of standalone Datasworn package that describes its own ruleset.",
"examples": ["classic", "starforged", "sundered_isles"],
"pattern": "^([a-z0-9_]{3,})$"
},
"SpecialTrackRuleId": {
"title": "SpecialTrackRuleId",
"type": "string",
"description": "A unique ID for a SpecialTrackRule.",
"examples": [
"classic/rules/special_tracks/bonds",
"delve/rules/special_tracks/failure",
"starforged/rules/special_tracks/bonds_legacy"
],
"pattern": "^([a-z0-9_]{3,})\\/rules\\/special_tracks\\/([a-z][a-z_]*)$"
},
"StatRuleId": {
"title": "StatRuleId",
"type": "string",
"description": "A unique ID for a StatRule.",
"pattern": "^([a-z0-9_]{3,})\\/rules\\/stats\\/([a-z][a-z_]*)$"
},
"TruthId": {
"title": "TruthId",
"type": "string",
"description": "A unique ID for a Truth.",
"examples": ["classic/truths/iron", "starforged/truths/iron"],
"pattern": "^([a-z0-9_]{3,})\\/truths\\/([a-z][a-z_]*)$"
},
"TruthIdWildcard": {
"title": "TruthIdWildcard",
"type": "string",
"description": "A wildcarded ID that can be used to match multiple Truths.",
"pattern": "^(\\*|([a-z0-9_]{3,}))\\/truths\\/(\\*|([a-z][a-z_]*))$"
},
"AuthorInfo": {
"title": "AuthorInfo",
"type": "object",
"description": "Information on the original creator of this material.",
"examples": [
{
"name": "Shawn Tomkin",
"url": "https://ironswornrpg.com"
}
],
"required": ["name"],
"properties": {
"name": {
"type": "string",
"examples": ["Shawn Tomkin"]
},
"url": {
"type": "string",
"description": "An optional URL for the author's website.",
"format": "uri"
},
"email": {
"title": "Email",
"type": "string",
"description": "An optional email contact for the author",
"format": "email"
}
},
"additionalProperties": false
},
"CssColor": {
"title": "CssColor",
"type": "string",
"description": "A CSS color value.",
"remarks": "See https://developer.mozilla.org/en-US/docs/Web/CSS/color_value"
},
"Date": {
"title": "Date",
"type": "string",
"description": "A date formatted YYYY-MM-DD.",
"remarks": "You may prefer to deserialize this as a Date object.",
"format": "date",
"pattern": "[0-9]{4}-((0[0-9])|(1[0-2]))-(([0-2][0-9])|(3[0-1]))"
},
"License": {
"title": "License",
"description": "An URL pointing to the location where this element's license can be found.\n\nA `null` here indicates that the content provides __no__ license, and is not intended for redistribution.",
"examples": [
"https://creativecommons.org/licenses/by/4.0",
"https://creativecommons.org/licenses/by-nc-sa/4.0"
],
"anyOf": [
{
"$ref": "#/definitions/WebUrl"
},
{
"type": "null"
}
]
},
"PageNumber": {
"title": "PageNumber",
"type": "integer",
"description": "Represents a page number in a book.",
"minimum": 1
},
"SourceInfo": {
"title": "SourceInfo",
"type": "object",
"description": "Metadata describing the original source of this item",
"required": ["title", "authors", "date", "url", "license"],
"properties": {
"title": {
"$ref": "#/definitions/SourceTitle"
},
"page": {
"$ref": "#/definitions/PageNumber",
"description": "The page number where this item is described in full."
},
"authors": {
"type": "array",
"description": "Lists authors credited by the source material.",
"items": {
"$ref": "#/definitions/AuthorInfo"
},
"minItems": 1
},
"date": {
"$ref": "#/definitions/Date",
"description": "The date of the source documents's last update, formatted YYYY-MM-DD. Required because it's used to determine whether the data needs updating."
},
"url": {
"$ref": "#/definitions/WebUrl",
"description": "A URL where the source document is available.",
"examples": ["https://ironswornrpg.com"]
},
"license": {
"$ref": "#/definitions/License"
}
},
"additionalProperties": false
},
"SourceTitle": {
"title": "SourceTitle",
"type": "string",
"description": "The title of the source document.",
"examples": [
"Ironsworn Rulebook",
"Ironsworn Assets Master Set",
"Ironsworn: Delve",
"Ironsworn: Starforged Rulebook",
"Ironsworn: Starforged Assets",
"Sundered Isles"
]
},
"Suggestions": {
"title": "Suggestions",
"type": "object",
"releaseStage": "experimental",
"properties": {
"oracles": {
"type": "array",
"items": {
"$ref": "#/definitions/OracleRollableId"
}
},
"assets": {
"type": "array",
"items": {
"$ref": "#/definitions/AssetId"
}
},
"atlas": {
"type": "array",
"items": {
"$ref": "#/definitions/AtlasEntryId"
}
},
"moves": {
"type": "array",
"items": {
"$ref": "#/definitions/MoveId"
}
},
"npcs": {
"type": "array",
"items": {
"$ref": "#/definitions/NpcId"
}
},
"rarities": {
"type": "array",
"items": {
"$ref": "#/definitions/RarityId"
}
},
"site_domains": {
"type": "array",
"items": {
"$ref": "#/definitions/DelveSiteDomainId"
}
},
"site_themes": {
"type": "array",
"items": {
"$ref": "#/definitions/DelveSiteThemeId"
}
}
},
"additionalProperties": false
},
"SvgImageUrl": {
"title": "SvgImageUrl",
"type": "string",
"description": "A relative (local) URL pointing to a vector image in the SVG format.",
"format": "uri-reference",
"pattern": "\\.svg$"
},
"WebUrl": {
"title": "WebUrl",
"type": "string",
"description": "An absolute URL pointing to a website.",
"format": "uri"
},
"WebpImageUrl": {
"title": "WebpImageUrl",
"type": "string",
"description": "A relative (local) URL pointing to a raster image in the WEBP format.",
"format": "uri-reference",
"pattern": "\\.webp$"
},
"I18nHint": {
"title": "I18nHint",
"type": "object",
"releaseStage": "experimental",
"properties": {
"part_of_speech": {
"$ref": "#/definitions/PartOfSpeech",
"description": "The part of speech for this string."
}
},
"additionalProperties": false
},
"I18nHints": {
"title": "I18nHints",
"type": "object",
"description": "Internationalization/localization hints for the text content of this object.",
"releaseStage": "experimental",
"properties": {
"text": {
"$ref": "#/definitions/I18nHint"
},
"text2": {
"$ref": "#/definitions/I18nHint"
},
"text3": {
"$ref": "#/definitions/I18nHint"
},
"template": {
"type": "object",
"properties": {
"text": {
"$ref": "#/definitions/I18nHint"
},
"text2": {
"$ref": "#/definitions/I18nHint"
},
"text3": {
"$ref": "#/definitions/I18nHint"
}
}
}
},
"additionalProperties": false
},
"InputLabel": {
"title": "InputLabel",
"type": "string",
"description": "A localized label for an input. In some contexts it may be undesirable to render this text, but it should always be exposed to assistive technology (e.g. with `aria-label` in HTML).",
"i18n": true,
"pattern": "^[^A-Z]+$"
},
"Label": {
"title": "Label",
"type": "string",
"description": "A localized plain text name or label.",
"i18n": true
},
"MarkdownString": {
"title": "MarkdownString",
"type": "string",
"description": "Localized text, formatted in Markdown.\n\nIt uses some custom syntax; e.g. `{{table:some_oracle_table_id}}` indicates that the referenced oracle table is rendered there in the source material.",
"i18n": true,
"format": "markdown"
},
"PartOfSpeech": {
"title": "PartOfSpeech",
"description": " - `common_noun`: A common noun.\n - `proper_noun`: A proper noun.\n - `adjunct_common_noun`: A common noun used as an adjective, to modify another noun.\n - `adjunct_proper_noun`: A proper noun used as an adjective, to modify another noun.\n - `verb`: A verb in present tense\n - `gerund`: Gerund or present participle of a verb, e.g. \"going\", \"seeing\", \"waving\". Can function as a noun, an adjective, or a progressive verb.\n - `adjective`: An adjective.\n - `attributive_verb`: A verb used as an adjective, to modify a noun.\n - `adjective_as_proper_noun`: An adjective used as a proper noun.\n - `common_noun_as_proper_noun`: An common noun used as a proper noun.",
"enum": [
"common_noun",
"proper_noun",
"adjunct_common_noun",
"adjunct_proper_noun",
"verb",
"gerund",
"adjective",
"attributive_verb",
"adjective_as_proper_noun",
"common_noun_as_proper_noun"
]
},
"TemplateString": {
"title": "TemplateString",
"type": "string",
"description": "A rich text string in Markdown with replaced values from oracle roll results.\n\nThe custom syntax `{{some_row_key:some_oracle_table_id}}` should be replaced by the `some_row_key` string of a rolled oracle table. This is usually the `result` key, for example `{{result:starforged/oracles/core/action}}`\n",
"releaseStage": "experimental",
"i18n": true,
"format": "markdown"
},
"CollectableType": {
"title": "CollectableType",
"enum": ["oracle_rollable", "move", "asset", "atlas_entry", "npc"]
},
"CollectionType": {
"title": "CollectionType",
"enum": [
"oracle_collection",
"move_category",
"asset_collection",
"atlas_collection",
"npc_collection"
]
},
"ConditionMeterRule": {
"title": "ConditionMeterRule",
"type": "object",
"description": "Describes a standard player character condition meter.",
"required": ["label", "max", "description"],
"properties": {
"label": {
"$ref": "#/definitions/InputLabel"
},
"rollable": {
"type": "boolean",
"description": "Is this meter's `value` usable as a stat in an action roll?",
"default": true,
"const": true
},
"min": {
"type": "integer",
"description": "The minimum value of this meter.",
"default": 0
},
"max": {
"type": "integer",
"description": "The maximum value of this meter."
},
"value": {
"type": "integer",
"description": "The current value of this meter.",
"default": 0
},
"shared": {
"type": "boolean",
"description": "Is this condition meter shared by all players?",
"default": false
},
"description": {
"$ref": "#/definitions/MarkdownString",
"description": "A description of this condition meter."
}
},
"additionalProperties": false
},
"ImpactCategory": {
"title": "ImpactCategory",
"type": "object",
"description": "Describes a category of standard impacts/debilities.",
"required": ["label", "description", "contents"],
"properties": {
"label": {
"$ref": "#/definitions/InputLabel",
"description": "A label for this impact category."
},
"description": {
"$ref": "#/definitions/MarkdownString",
"description": "A description of this impact category."
},
"contents": {
"type": "object",
"description": "A dictionary object of the Impacts in this category.",
"remarks": "Deserialize as a dictionary object.",
"patternProperties": {
"^([a-z][a-z_]*)$": {
"$ref": "#/definitions/ImpactRule"
}
}
}
},
"additionalProperties": false
},
"ImpactRule": {
"title": "ImpactRule",
"type": "object",
"description": "Describes a standard impact/debility.",
"required": ["label", "description"],
"properties": {
"label": {
"$ref": "#/definitions/InputLabel",
"description": "The label for this impact."
},
"prevents_recovery": {
"type": "array",
"description": "Any ruleset condition meters that can't recover when this impact is active.",
"default": [],
"items": {
"$ref": "#/definitions/ConditionMeterKey"
}
},
"permanent": {
"type": "boolean",
"description": "Is this impact permanent?",
"default": false
},
"shared": {
"type": "boolean",
"description": "Is this impact applied to all players at once?",
"default": false
},
"description": {
"$ref": "#/definitions/MarkdownString",
"description": "A description of this impact."
}
},
"additionalProperties": false
},
"NonCollectableType": {
"title": "NonCollectableType",
"enum": [
"delve_site",
"delve_site_theme",
"delve_site_domain",
"truth",
"rarity"
]
},
"ObjectType": {
"title": "ObjectType",
"anyOf": [
{
"$ref": "#/definitions/CollectableType"
},
{
"$ref": "#/definitions/NonCollectableType"
},
{
"$ref": "#/definitions/CollectionType"
}
]
},
"Rules": {
"title": "Rules",
"type": "object",
"description": "Describes rules for player characters in this ruleset, such as stats and condition meters.",
"releaseStage": "experimental",
"required": ["condition_meters", "stats", "impacts", "special_tracks"],
"properties": {
"condition_meters": {
"type": "object",
"description": "Describes the standard condition meters used by player characters in this ruleset.",
"remarks": "Deserialize as a dictionary object.",
"patternProperties": {
"^([a-z][a-z_]*)$": {
"$ref": "#/definitions/ConditionMeterRule"
}
}
},
"stats": {
"type": "object",
"description": "Describes the standard stats used by player characters in this ruleset.",
"remarks": "Deserialize as a dictionary object.",
"patternProperties": {
"^([a-z][a-z_]*)$": {
"$ref": "#/definitions/StatRule"
}
}
},
"impacts": {
"type": "object",
"description": "Describes the standard impacts/debilities used by player characters in this ruleset.",
"remarks": "Deserialize as a dictionary object.",
"patternProperties": {
"^([a-z][a-z_]*)$": {
"$ref": "#/definitions/ImpactCategory"
}
}
},
"special_tracks": {
"type": "object",
"description": "Describes the special tracks used by player characters in this ruleset, like Bonds (classic Ironsworn), Failure (Delve), or Legacies (Starforged).",
"remarks": "Deserialize as a dictionary object.",
"patternProperties": {
"^([a-z][a-z_]*)$": {
"$ref": "#/definitions/SpecialTrackRule"
}
}
},
"tags": {
"type": "object",
"remarks": "Deserialize as a dictionary object.",
"releaseStage": "experimental",
"default": {},
"patternProperties": {
"^([a-z][a-z_]*)$": {
"$ref": "#/definitions/TagRule"
}
}
}
},
"additionalProperties": false
},
"RulesExpansion": {
"title": "RulesExpansion",
"type": "object",
"description": "Describes rules for player characters in this ruleset, such as stats and condition meters.",
"releaseStage": "experimental",
"properties": {
"condition_meters": {
"type": "object",
"description": "Describes the standard condition meters used by player characters in this ruleset.",
"remarks": "Deserialize as a dictionary object.",
"patternProperties": {
"^([a-z][a-z_]*)$": {
"$ref": "#/definitions/ConditionMeterRule"
}
}
},
"stats": {
"type": "object",
"description": "Describes the standard stats used by player characters in this ruleset.",
"remarks": "Deserialize as a dictionary object.",
"patternProperties": {
"^([a-z][a-z_]*)$": {
"$ref": "#/definitions/StatRule"
}
}
},
"impacts": {
"type": "object",
"description": "Describes the standard impacts/debilities used by player characters in this ruleset.",
"remarks": "Deserialize as a dictionary object.",
"patternProperties": {
"^([a-z][a-z_]*)$": {
"$ref": "#/definitions/ImpactCategory"
}
}
},
"special_tracks": {
"type": "object",
"description": "Describes the special tracks used by player characters in this ruleset, like Bonds (classic Ironsworn), Failure (Delve), or Legacies (Starforged).",
"remarks": "Deserialize as a dictionary object.",
"patternProperties": {
"^([a-z][a-z_]*)$": {
"$ref": "#/definitions/SpecialTrackRule"
}
}
},
"tags": {
"type": "object",
"remarks": "Deserialize as a dictionary object.",
"releaseStage": "experimental",
"default": {},
"patternProperties": {
"^([a-z][a-z_]*)$": {
"$ref": "#/definitions/TagRule"
}
}
}
},
"additionalProperties": false
},
"SpecialTrackRule": {
"title": "SpecialTrackRule",
"type": "object",
"description": "Describes a special track like Bonds (classic Ironsworn), Failure (Delve), or Legacies (Starforged).",
"required": ["label", "description"],
"properties": {
"label": {
"$ref": "#/definitions/InputLabel",
"description": "A label for this special track."
},
"optional": {
"type": "boolean",
"description": "Is this track an optional rule?",
"default": false
},
"shared": {
"type": "boolean",
"description": "Is this track shared by all players?",
"default": false
},
"description": {
"$ref": "#/definitions/MarkdownString",
"description": "A description of this special track."
}
},
"additionalProperties": false
},
"StatRule": {
"title": "StatRule",
"type": "object",
"description": "Describes a standard player character stat.",
"required": ["label", "description"],
"properties": {
"label": {
"$ref": "#/definitions/InputLabel",
"description": "A label for this stat.",
"examples": ["edge"]
},
"description": {
"$ref": "#/definitions/MarkdownString",
"description": "A description of this stat.",
"examples": [
"Quickness, agility, and prowess when fighting at a distance."
]
}
},
"additionalProperties": false
},
"Tag": {
"title": "Tag",
"anyOf": [
{
"type": "boolean"
},
{
"type": "integer"
},
{
"$ref": "#/definitions/DictKey"
},
{
"$ref": "#/definitions/DiceExpression"
},
{
"$ref": "#/definitions/OracleRollableId"
},
{
"$ref": "#/definitions/MoveId"
},
{
"$ref": "#/definitions/AssetId"
},
{
"$ref": "#/definitions/AtlasEntryId"
},
{
"$ref": "#/definitions/NpcId"
},
{
"$ref": "#/definitions/OracleCollectionId"
},
{
"$ref": "#/definitions/MoveCategoryId"
},
{
"$ref": "#/definitions/AssetCollectionId"
},
{
"$ref": "#/definitions/AtlasCollectionId"
},
{
"$ref": "#/definitions/NpcCollectionId"
},
{
"$ref": "#/definitions/DelveSiteId"
},
{
"$ref": "#/definitions/DelveSiteThemeId"
},
{
"$ref": "#/definitions/DelveSiteDomainId"
},
{
"$ref": "#/definitions/TruthId"
},
{
"$ref": "#/definitions/RarityId"
},
{
"type": "array",
"items": {
"anyOf": [
{
"$ref": "#/definitions/OracleRollableIdWildcard"
},
{
"$ref": "#/definitions/MoveIdWildcard"
},
{
"$ref": "#/definitions/AssetIdWildcard"
},
{
"$ref": "#/definitions/AtlasEntryIdWildcard"
},
{
"$ref": "#/definitions/NpcIdWildcard"
},
{
"$ref": "#/definitions/OracleCollectionIdWildcard"
},
{
"$ref": "#/definitions/MoveCategoryIdWildcard"
},
{
"$ref": "#/definitions/AssetCollectionIdWildcard"
},
{
"$ref": "#/definitions/AtlasCollectionIdWildcard"
},
{
"$ref": "#/definitions/NpcCollectionIdWildcard"
},
{
"$ref": "#/definitions/DelveSiteIdWildcard"
},
{
"$ref": "#/definitions/DelveSiteThemeIdWildcard"
},
{
"$ref": "#/definitions/DelveSiteDomainIdWildcard"
},
{
"$ref": "#/definitions/TruthIdWildcard"
},
{
"$ref": "#/definitions/RarityIdWildcard"
}
]
}
}
]
},
"TagRule": {
"title": "TagRule",
"type": "object",
"remarks": "Deserialize as a discriminated union/polymorphic object type, using the `value_type` property as a discriminator.",
"required": ["value_type"],
"properties": {
"value_type": {
"enum": [
"boolean",
"integer",
"oracle_rollable",
"move",
"asset",
"atlas_entry",
"npc",
"oracle_collection",
"move_category",
"asset_collection",
"atlas_collection",
"npc_collection",
"delve_site",
"delve_site_theme",
"delve_site_domain",
"truth",
"rarity",
"enum"
]
}
},
"additionalProperties": true,
"allOf": [
{
"if": {
"properties": {
"value_type": {
"const": "boolean",
"type": "string"
}
}
},
"then": {
"type": "object",
"title": "TagRuleBoolean",
"properties": {
"applies_to": {
"default": null,
"description": "Types of object that can receive this tag, or `null` if any type of object accepts it.",
"anyOf": [
{
"type": "array",
"items": {
"$ref": "#/definitions/ObjectType"
}
},
{
"type": "null"
}
]
},
"description": {
"$ref": "#/definitions/MarkdownString"
},
"array": {
"default": false,
"type": "boolean"
},
"value_type": {
"const": "boolean",
"type": "string"
}
},
"required": ["description", "value_type"],
"additionalProperties": false
}
},
{
"if": {
"properties": {
"value_type": {
"const": "integer",
"type": "string"
}
}
},
"then": {
"type": "object",
"title": "TagRuleInteger",
"properties": {
"applies_to": {
"default": null,
"description": "Types of object that can receive this tag, or `null` if any type of object accepts it.",
"anyOf": [
{
"type": "array",
"items": {
"$ref": "#/definitions/ObjectType"
}
},
{
"type": "null"
}
]
},
"description": {
"$ref": "#/definitions/MarkdownString"
},
"array": {
"default": false,
"type": "boolean"
},
"value_type": {
"const": "integer",
"type": "string"
}
},
"required": ["description", "value_type"],
"additionalProperties": false
}
},
{
"if": {
"properties": {
"value_type": {
"const": "oracle_rollable",
"type": "string"
}
}
},
"then": {
"type": "object",
"title": "TagRuleOracleRollable",
"properties": {
"applies_to": {
"default": null,
"description": "Types of object that can receive this tag, or `null` if any type of object accepts it.",
"anyOf": [
{
"type": "array",
"items": {
"$ref": "#/definitions