Pinacolada64 / NOW

A MUD under construction based on Evennia.
9 stars 8 forks source link

Menu-driven NPC conversation system #14

Open AmberFennek opened 7 years ago

AmberFennek commented 7 years ago

NPCs stand around locations, some can be run by players for RP purposes. But using the greet verb on an NPC should cause it to respond with a menu of topical dialog that gives hints, instructions, lore, and quest information, or perhaps trades in goods and currency exchange or directs the more adventurous characters toward mobs to fight by mentioning recent sightings of mobs.

For the simplest of functions - the conversation menu tree of choices and responses dialog can be set on the NPC so that characters can interact with its menu, thus builders can create an NPC and given it very basic dialog and place it in the world. To allow builders to do this, we will develop a system and tools for setting and testing menu-driven conversation.

tricuspa commented 7 years ago

Greet seems like a good use of a verb or perhaps Ask. Do we want to develop a standardized template of all NPCs similar to a mind map? Since players can control NPCs a fail result might be best when the character is inhabited by someone else.

AmberFennek commented 7 years ago
Alternate ways to implement conversation
  1. Standard to the IF genre is ASK <NPC>, <question>? or TELL <NPC>, <topic> in hopes of triggering a response that is helpful and advances the storyline. This is a keyword response match, requiring guessing what might trigger the NPC to revealing more details about a topic. It has several drawbacks.
  2. Then the side-scroller game types tend to use the menu-driven list of topics. Each visit to the NPC could result in new topics to appear based on contextual circumstances. This is what we're currently developing.
  3. Some of the more elaborate NPC interactions would write journal entries into a character-carried quest book so the information given by NPC interaction could be reviewed long afterward, and perhaps effectively narrate a story when the player would read it back. This is much more advanced. We could progress to this style if there was interest in using and developing it.
What if someone's puppeting the NPC?

As for engaging the NPC conversation when someone is puppeting it, that can easily be locked by a custom lock function that checks for a player attached to the NPC at the time. This might not be desirable, though, because the NPC should probably still have the intended conversation with the character (the puppeting player may or may not be an observer to the conversation, however) so as not to block or put on hold the quest that might require gaining the knowledge that the NPC had to impart on the character regarding the quest.