In Ranvier all npcs for an area are defined in a single file within the area folder: npcs.yml

Example File


- id: 1
  keywords: ['rat']
  name: 'Rat'
  level: 2
  description: "The rat's beady red eyes dart frantically, its mouth foaming as it scampers about."
  script: '1-rat'
  items: ['limbo:2']
  quests: ['limbo:2']
    health: 100
    speed: 2.5
  damage: 1-7
- id: 2
  keywords: ["wise", "old", "man"]
  name: "Wise Old Man"
    pacifist: true
  description: "A wise looking old man sits on the ground with legs crossed."
- id: 3
  keywords: ["dummy", "target", "practice"]
  level: 2
  name: "Training Dummy"
        "limbo:4": 50

Here we have two npcs. The rat can enter combat, has a custom script, a default inventory, hands out a quest and has some extra attributes. The old man is the most basic NPC you can have.

Definition Fields

field type (default)

id number
required NPC id unique among the npcs of the current area
name string
required String displayed the player sees the npc in the room
keywords string
required Keywords that the player can use to target this npc, does not need to be unique
description string
required String displayed when the player looks directly at the npc
script string
Name of custom script to attach to this npc (See Scripting)
behaviors Object<string,Object>
List of behaviors to attach to this npc. Key is the behavior name, the value is the configuration for that behavior. For boolean (on/off) behaviors, true suffices for the config. (See Scripting for creating behaviors)
attributes object
Arbitrary list of attributes to attach to this NPC. There are no constraints on this so you are free to assign basically anything here that you want to look for inside commands/scripts/etc.
items array<EntityReference>
List of Entity References representing the NPC's default inventory
quests array<EntityReference>
List of Entity References representing the quests that this character gives out (See Quests)