Skip to content

LocationEnteredEvent

The party crossed a location boundary.

Full documentation: LocationEnteredEvent. Wire type: location_entered.

Default visibility: player

Message codes: exploration.location.entered

JSON Schema

{
  "$defs": {
    "Visibility": {
      "description": "Who may see an event.\n\nThe wire values are `\"player\"` and `\"referee\"` \u2014 lowercase, serialized into every\nevent; changing them is a `schema_version` bump.",
      "enum": [
        "player",
        "referee"
      ],
      "title": "Visibility",
      "type": "string"
    }
  },
  "description": "The party crossed a location boundary.\n\n`location_kind` is `area`, `level`, `dungeon`, or `town`; `location_id` is the\narea or dungeon id (`\"town\"` for town). `level_number` rides level and dungeon\nentries, and `dungeon_id` rides area entries \u2014 an area id is scoped to its\nlevel, so an area entry needs all three to name where the party is, while level\nand dungeon entries carry the dungeon id in `location_id` and town has neither.",
  "properties": {
    "code": {
      "default": "exploration.location.entered",
      "title": "Code",
      "type": "string"
    },
    "visibility": {
      "$ref": "#/$defs/Visibility",
      "default": "player"
    },
    "event_type": {
      "const": "location_entered",
      "default": "location_entered",
      "title": "Event Type",
      "type": "string"
    },
    "location_kind": {
      "title": "Location Kind",
      "type": "string"
    },
    "location_id": {
      "title": "Location Id",
      "type": "string"
    },
    "level_number": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Level Number"
    },
    "dungeon_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Dungeon Id"
    },
    "narrative": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Narrative"
    }
  },
  "required": [
    "location_kind",
    "location_id"
  ],
  "title": "LocationEnteredEvent",
  "type": "object"
}