Summary

Description
A condition in the game world that affects Pokémon encounters, such as time of day.
Data path
resources/data/encounter_condition/
Schema
https://poketools.gamestuff.info/data/schema/encounter_condition.json

Filename

Condition 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

position

The sorting position for this entity.

type
integer
default
0

states

A map of possible states for this condition. The key for each mapping is used as the identifier for the state in places like the encounter list.

name

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

type

string

required

default

Is this entity the default in the collection?

type
boolean
default
false

JSON Schema

View raw

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://poketools.gamestuff.info/data/schema/encounter_condition.json",
  "title": "Encounter Condition",
  "description": "A condition in the game world that affects Pokémon encounters, such as time of day.",
  "type": "object",
  "properties": {
    "name": {
      "$ref": "types/name.json"
    },
    "position": {
      "$ref": "types/position.json"
    },
    "states": {
      "type": "object",
      "propertyNames": {
        "$ref": "types/identifier.json"
      },
      "additionalProperties": {
        "type": "object",
        "properties": {
          "name": {
            "$ref": "types/name.json"
          },
          "default": {
            "description": "Is this entity the default in the collection?",
            "title": "Is default",
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "name"
        ]
      },
      "minProperties": 1,
      "$filters": "singleDefault"
    }
  },
  "required": [
    "name",
    "position",
    "states"
  ]
}