Skip to content

ObjectiveCompletedEvent

One objective of a quest is done — including one nobody had announced yet.

Full documentation: ObjectiveCompletedEvent. Wire type: objective_completed.

Default visibility: player

Message codes: session.quest.objective_completed

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": "One objective of a quest is done \u2014 including one nobody had announced yet.\n\n`name` is the objective's display label \u2014 its authored name, or its id when the\ndocument authors none \u2014 and `quest_name` the owning quest's name, both resolved\nat emission so a renderer holds no document to look them up in. Both default\nempty only because an event logged before the fields existed still parses; the\nengine always fills them. `narrative` is the objective's authored progress beat,\n`None` when unauthored, and the journal carries the same line.",
  "properties": {
    "code": {
      "default": "session.quest.objective_completed",
      "title": "Code",
      "type": "string"
    },
    "visibility": {
      "$ref": "#/$defs/Visibility",
      "default": "player"
    },
    "event_type": {
      "const": "objective_completed",
      "default": "objective_completed",
      "title": "Event Type",
      "type": "string"
    },
    "quest_id": {
      "title": "Quest Id",
      "type": "string"
    },
    "quest_name": {
      "default": "",
      "title": "Quest Name",
      "type": "string"
    },
    "objective_id": {
      "title": "Objective Id",
      "type": "string"
    },
    "name": {
      "default": "",
      "title": "Name",
      "type": "string"
    },
    "narrative": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Narrative"
    }
  },
  "required": [
    "quest_id",
    "objective_id"
  ],
  "title": "ObjectiveCompletedEvent",
  "type": "object"
}