evennia.contrib.tutorials.talking_npc.talking_npc¶
Evennia Talkative NPC
Contribution - Griatch 2011, grungies1138, 2016
This is a static NPC object capable of holding a simple menu-driven conversation. It’s just meant as an example.
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.
- class evennia.contrib.tutorials.talking_npc.talking_npc.CmdTalk(**kwargs)[source]¶
Bases:
MuxCommandTalks to an npc
- Usage:
talk
This command is only available if a talkative non-player-character (NPC) is actually present. It will strike up a conversation with that NPC and give you options on what to talk about.
- key = 'talk'¶
- locks = 'cmd:all()'¶
- help_category = 'general'¶
- aliases = []¶
- lock_storage = 'cmd:all()'¶
- search_index_entry = {'aliases': '', 'category': 'general', 'key': 'talk', 'no_prefix': ' ', 'tags': '', 'text': '\nTalks to an npc\n\nUsage:\n talk\n\nThis command is only available if a talkative non-player-character\n(NPC) is actually present. It will strike up a conversation with\nthat NPC and give you options on what to talk about.\n'}¶
- class evennia.contrib.tutorials.talking_npc.talking_npc.TalkingCmdSet(cmdsetobj=None, key=None)[source]¶
Bases:
CmdSetStores the talk command.
- key = 'talkingcmdset'¶
- path = 'evennia.contrib.tutorials.talking_npc.talking_npc.TalkingCmdSet'¶
- class evennia.contrib.tutorials.talking_npc.talking_npc.TalkingNPC(*args, **kwargs)[source]¶
Bases:
DefaultObjectThis implements a simple Object using the talk command and using the conversation defined above.
- exception DoesNotExist¶
Bases:
DoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- path = 'evennia.contrib.tutorials.talking_npc.talking_npc.TalkingNPC'¶
- typename = 'TalkingNPC'¶