evennia/evennia/contrib/tutorials/talking_npc
2022-02-08 13:03:52 +01:00
..
__init__.py Refactoring contribs 2021-12-18 18:02:37 +01:00
README.md Clean up contrib docs, autogeneration 2022-01-08 15:04:07 +01:00
talking_npc.py Run black reformatter on code 2022-02-08 13:03:52 +01:00
tests.py Refactor all test classes into evennia.utils.test_resources. Update docs. 2022-01-21 00:17:24 +01:00

Talkative NPC example

Contribution by Griatch 2011. Updated by grungies1138, 2016

This is an example of a static NPC object capable of holding a simple menu-driven conversation. Suitable for example as a quest giver or merchant.

Installation

Create the NPC by creating an object of typeclass contrib.tutorials.talking_npc.TalkingNPC, For example:

create/drop John : contrib.tutorials.talking_npc.TalkingNPC

Use talk in the same room as the NPC to start a conversation.

If there are many talkative npcs in the same room you will get to choose which one's talk command to call (Evennia handles this automatically).

This use of EvMenu is very simplistic; See EvMenu for a lot more complex possibilities.