Skip to main content

ADD_NPC

[[ADD_NPC(coordinate_cell, attributes)]]

This action adds a non-player character (NPC) to the specified cell. The character will be displayed with a default token on the map (a token with the letter X), and players will have to control it (movement, attack, defense).

Mandatory Parameters:

  • NAME: The proper name of the NPC.

Optional Parameter:

  • ON_DEATH: The event to trigger upon the NPC's death. Any event or message can be specified.

  • ICON: The custom icon to be associated with the NPC.

  • Parameters: (coordinate_cell, … )

Example 1: {[[(B), ON_SHOW]] [[ADD_NPC(E20, NAME=Prince Bart, ON_DEATH=[[QUEST_FAILED]])]]}

In this example, when the cell B is revealed (e.g., by opening the door or entering the room), an NPC named Prince Bart will appear in cell E20. If Prince Bart is killed, the quest will be failed.

Example 2: {{[[(B), ON_SHOW]] [[ADD_NPC(E20, NAME=Gerald, ICON=http://north-american.yeoldeinn.com/images/quest-design/usiak-mercenary-crossbowman.gif)]]}

In this example, when the cell B is revealed, an NPC named Gerald will appear in cell E20 with the specified custom icon (in this case, taken from the link http://north-american.yeoldeinn.com/images/quest-design/usiak-mercenary-crossbowman.gif).