Summary

Description
A location in the Pokemon world.
Data path
resources/data/location/
Schema
https://poketools.gamestuff.info/data/schema/location.json

Filename

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)

Top-level keys

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)

Fields

name

The entity’s user-facing name. All of UTF-8 is valid here, so use “é” where appropriate.

type

string

required

region

Region 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

description

If special conditions are required for access, describe them here.

A full description of the entity, usually used on entity pages.

Textual content formatted with Markdown. See the CommonMark Spec for details.

type
string

areas

A mapping describing the areas in this location. The keys are used as the area identifier when referring to that area from other entities.

Every location must have at least one area. By convention, if a location has only one area that area’s identifier is whole-area and name is Whole area.

type
mapping
minimum values
1
required

name

The entity’s user-facing name. All of UTF-8 is valid here, so use “é” where appropriate.

type

string

required

default

Every location must have exactly one default area. Is this entity the default in the collection?

type
boolean
default
false

shops

Shops (e.g. Poké Marts) inside this area. Keys are used as the shop identifier when setting Shop Items.

type
object

name

Shop name. The entity’s user-facing name. All of UTF-8 is valid here, so use “é” where appropriate.

type

string

required

default

If shops are defined, exactly one shop must be default. By convention, this is the Poke Mart if one is present.

type
boolean
default
false

children

Areas inside this area. Follows the same schema as areas. Infinite levels are possible, but consider if an area should really be a top-level location.

type
object

super

A parent location. A parent location is generally the location that contains this one entirely. For example, the Kanto Safari Zone would list fuchsia-city as it’s super.

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)

map

Map data. In general, every location should include map data if it has an explicit location on the in-game map. If no map data is defined but the parent location has map data, that will be used instead. If the location does not have a place on the in-game map (e.g. Distortion World), omit this information.

type
mapping

map

Identifier for the map to draw this overlay on. Maps are defined in Region data.

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

z

Items with a higher z-index will be drawn on top of items with a lower z-index. This could be helpful for a location in the middle of a route, for example.

type
integer
default
0

overlay

The SVG data that makes up the overlay. Do not enclose this in <svg> tags, as it may be embedded with other overlays.

type
string
required

JSON Schema

View raw

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://poketools.gamestuff.info/data/schema/location.json",
  "title": "Location",
  "description": "A location in the Pokemon world.",
  "type": "object",
  "propertyNames": {
    "title": "Version Group identifier",
    "allOf": [
      {
        "$ref": "types/identifier.json"
      },
      {
        "type": "string",
        "$filters": "versionGroupIdentifier"
      }
    ]
  },
  "minProperties": 1,
  "additionalProperties": {
    "type": "object",
    "properties": {
      "region": {
        "title": "Region identifier",
        "allOf": [
          {
            "$ref": "types/identifier.json"
          },
          {
            "type": "string",
            "$filters": [
              "regionIdentifier",
              {
                "$func": "regionInVersionGroup",
                "$vars": {
                  "versionGroup": {
                    "$ref": "1#"
                  }
                }
              }
            ]
          }
        ]
      },
      "name": {
        "$ref": "types/name.json"
      },
      "description": {
        "title": "Location description",
        "description": "If special conditions are required for access, describe them here.",
        "$ref": "types/markdown.json"
      },
      "areas": {
        "title": "Location Areas",
        "description": "Every location must have at least one area.  By convention, if a location has only one area that area's identifier is `whole-area` and name is `Whole area`.",
        "type": "object",
        "minProperties": 1,
        "propertyNames": {
          "title": "Area identifier",
          "$ref": "types/identifier.json"
        },
        "additionalProperties": {
          "type": "object",
          "properties": {
            "name": {
              "title": "Area name",
              "$ref": "types/name.json"
            },
            "default": {
              "title": "Is default area",
              "description": "Every location must have exactly one default area.",
              "type": "boolean",
              "default": false
            },
            "shops": {
              "title": "Shops",
              "type": "object",
              "propertyNames": {
                "$ref": "types/identifier.json"
              },
              "additionalProperties": {
                "type": "object",
                "properties": {
                  "name": {
                    "title": "Shop name",
                    "$ref": "types/name.json"
                  },
                  "default": {
                    "title": "Is default shop",
                    "description": "If shops are defined, exactly one shop must be default.  By convention, this is the Poke Mart if one is present.",
                    "type": "boolean",
                    "default": false
                  }
                },
                "required": [
                  "name"
                ]
              }
            },
            "children": {
              "title": "Sub areas",
              "$ref": "#/additionalProperties/properties/areas",
              "default": {}
            }
          },
          "additionalProperties": false,
          "required": [
            "name"
          ]
        },
        "$filters": "singleDefault",
        "default": {
          "whole-area": {
            "title": "Whole area",
            "default": true
          }
        }
      },
      "super": {
        "title": "Parent location",
        "description": "A parent location is generally the location that contains this one entirely.  For example, the Kanto Safari Zone would list `fuchsia-city` as it's super.",
        "allOf": [
          {
            "$ref": "types/identifier.json"
          },
          {
            "type": "string",
            "$filters": [
              "locationIdentifier",
              {
                "$func": "locationInVersionGroup",
                "$vars": {
                  "versionGroup": {
                    "$ref": "1#"
                  }
                }
              }
            ]
          }
        ]
      },
      "map": {
        "title": "Map data",
        "type": "object",
        "properties": {
          "map": {
            "title": "Map identifier",
            "description": "This is the map the overlay will be drawn on.",
            "allOf": [
              {
                "$ref": "types/identifier.json"
              },
              {
                "type": "string",
                "$filters": {
                  "$func": "regionHasMap",
                  "$vars": {
                    "versionGroup": {
                      "$ref": "2#"
                    },
                    "region": {
                      "$ref": "2/region"
                    }
                  }
                }
              }
            ]
          },
          "z": {
            "title": "Z-Index",
            "description": "Items with a higher z-index will be drawn on top of items with a lower z-index.  This could be helpful for a location in the middle of a route, for example.",
            "type": "integer",
            "default": 0
          },
          "overlay": {
            "title": "SVG Overlay",
            "description": "The SVG data that makes up the overlay.  Do not enclose this in `` tags.",
            "type": "string",
            "contentMediaType": "image/svg+xml"
          }
        },
        "additionalProperties": false,
        "required": [
          "map",
          "overlay"
        ]
      }
    },
    "additionalProperties": false,
    "required": [
      "region",
      "name",
      "areas"
    ]
  }
}