For the initial implementation, quests will have to be explicitly accepted to be active for a player.
A quest will be an array of quest steps. Each quest step will have defined preconditions to go to the next step. Quests will be processed in the global command handler, post command execution. That is, if a quest is active, it will be checked at the end of every player action.
Example precondition: "In a particular room, with a particular npc present, with item inventory."
Quest steps can be checked:
Post command processing on every command
When a mob dies
Quest step:
{
"roomId": "<some room id>",
"npc": "<npc id>",
"inventory": "<item id>",
"completionMessage", "The NPC looks at your and says, 'Nice work, now go meet my brother at the tavern in town.'"
}
Players will have a finite amount of quests that can be active. So if they do a trigger event for a quest they're not actively pursuing, nothing will happen (this also makes it so we don't have to check all quest triggers all the time).
For the initial implementation, quests will have to be explicitly accepted to be active for a player.
A quest will be an array of quest steps. Each quest step will have defined preconditions to go to the next step. Quests will be processed in the global command handler, post command execution. That is, if a quest is active, it will be checked at the end of every player action.
Example precondition: "In a particular room, with a particular npc present, with item inventory."
Quest steps can be checked:
Quest step:
Players will have a finite amount of quests that can be active. So if they do a trigger event for a quest they're not actively pursuing, nothing will happen (this also makes it so we don't have to check all quest triggers all the time).