Summary
- Description
- Items available for purchase at shops
- Data path
- resources/data/shop_item.csv
- Schema
- https://poketools.gamestuff.info/data/schema/shop_item.json
Fields
version_group
Version Group identifier. A machine-usable name for the entity. This is usually a munged version of the entity name. An identifier must consist only of lowercase ASCII characters, 0-9, and/or a hyphen.
i.e. anything unique to the entity matching the regular expression
^[a-z0-9\-]+$ (Test it here)
- type
-
string
- pattern
-
^[a-z0-9\-]+$(Test) - required
location
Location identifier. A machine-usable name for the entity. This is usually a munged version of the entity name. An identifier must consist only of lowercase ASCII characters, 0-9, and/or a hyphen.
i.e. anything unique to the entity matching the regular expression
^[a-z0-9\-]+$ (Test it here)
- type
-
string
- pattern
-
^[a-z0-9\-]+$(Test) - required
area
Area identifier path.
This is written like a filesystem path, e.g. department-store/2f.
- type
- string
- pattern
-
^(?:[a-z0-9\-]+/?)+$(Test) - required
shop
Shop identifier A machine-usable name for the entity. This is usually a munged version of the entity name. An identifier must consist only of lowercase ASCII characters, 0-9, and/or a hyphen.
i.e. anything unique to the entity matching the regular expression
^[a-z0-9\-]+$ (Test it here)
- type
-
string
- pattern
-
^[a-z0-9\-]+$(Test) - required
item
Item identifier A machine-usable name for the entity. This is usually a munged version of the entity name. An identifier must consist only of lowercase ASCII characters, 0-9, and/or a hyphen.
i.e. anything unique to the entity matching the regular expression
^[a-z0-9\-]+$ (Test it here)
- type
-
string
- pattern
-
^[a-z0-9\-]+$(Test) - required
buy
Purchase price
- type
- integer
- minimum
- 1
- required
JSON Schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://poketools.gamestuff.info/data/schema/shop_item.json",
"title": "Shop Item",
"description": "Items available for purchase at shops",
"type": "object",
"properties": {
"version_group": {
"title": "Version Group identifier",
"allOf": [
{
"$ref": "types/identifier.json"
},
{
"type": "string",
"$filters": "versionGroupIdentifier"
}
]
},
"location": {
"title": "Location identifier",
"allOf": [
{
"$ref": "types/identifier.json"
},
{
"type": "string",
"$filters": [
"locationIdentifier",
{
"$func": "locationInVersionGroup",
"$vars": {
"versionGroup": {
"$ref": "1/version_group"
}
}
}
]
}
]
},
"area": {
"title": "Area identifier path",
"description": "Use \"/\" to specify the tree path.",
"type": "string",
"pattern": "^(?:[a-z0-9\\-]+/?)+$",
"$filters": {
"$func": "locationHasArea",
"$vars": {
"versionGroup": {
"$ref": "1/version_group"
},
"location": {
"$ref": "1/location"
}
}
}
},
"shop": {
"title": "Shop identifier",
"allOf": [
{
"$ref": "types/identifier.json"
},
{
"type": "string",
"$filters": {
"$func": "locationAreaHasShop",
"$vars": {
"versionGroup": {
"$ref": "1/version_group"
},
"location": {
"$ref": "1/location"
},
"area": {
"$ref": "1/area"
}
}
}
}
]
},
"item": {
"title": "Item identifier",
"allOf": [
{
"$ref": "types/identifier.json"
},
{
"type": "string",
"$filters": [
"itemIdentifier",
{
"$func": "itemInVersionGroup",
"$vars": {
"versionGroup": {
"$ref": "1/version_group"
}
}
}
]
}
]
},
"buy": {
"title": "Purchase price",
"oneOf": [
{
"type": "integer",
"minimum": 1
},
{
"type": "string",
"minLength": 0,
"maxLength": 0
}
]
}
},
"additionalProperties": false,
"required": [
"version_group",
"location",
"area",
"shop",
"item"
]
}