NPCs

NPCs are the main way that the server can interact with the player.

They can be used for quests, dialogue, giving spells and a number of other functions.

The first NPC ever created, the Guide.

The first NPC ever created, the Guide.

YAML Format

NPCs are created with YAML files.

An example of a YAML file would be the below file, which has a number of keys, some of which store objects.

# In a YAML file, the values are stored in the key: value format.
#
# An object can be stored as a value, by indending the keys inside the object 
#    with 2 spaces

key: value
key2: value2
key3:
  key3key: value3
  key3key2: value4
  key3key3: 
    key3key3key: value5

NPC Format

NPCs use the ability to nest objects mainly to create dialogue.

# The below dialogue would consists of the NPC saying to the player 'Hi there!', and
# then the Player could respond with 'Hello', which would then leave the dialogue.

dialogue:
  0:
    text: "Hi there!"
    options:
      "Hello":
        priority: LEAVE

Return to the top