evennia.contrib.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. Create it by creating an object of typeclass contrib.talking_npc.TalkingNPC, For example using @create:
@create/drop John : contrib.talking_npc.TalkingNPC
Walk up to it and give the talk command to strike up 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.talking_npc.
CmdTalk
(**kwargs)[source]¶ Bases:
evennia.commands.default.muxcommand.MuxCommand
Talks 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()'¶
-
class
evennia.contrib.talking_npc.
TalkingCmdSet
(cmdsetobj=None, key=None)[source]¶ Bases:
evennia.commands.cmdset.CmdSet
Stores the talk command.
-
key
= 'talkingcmdset'¶
-
path
= 'evennia.contrib.talking_npc.TalkingCmdSet'¶
-
-
class
evennia.contrib.talking_npc.
TalkingNPC
(*args, **kwargs)[source]¶ Bases:
evennia.objects.objects.DefaultObject
This implements a simple Object using the talk command and using the conversation defined above.
-
exception
DoesNotExist
¶
-
exception
MultipleObjectsReturned
¶ Bases:
evennia.objects.objects.DefaultObject.MultipleObjectsReturned
-
path
= 'evennia.contrib.talking_npc.TalkingNPC'¶
-
typename
= 'TalkingNPC'¶
-
exception