evennia.contrib.game_systems.multidescer.multidescer¶
Evennia Multidescer
Contrib - Griatch 2016
A “multidescer” is a concept from the MUSH world. It allows for creating, managing and switching between multiple character descriptions. This multidescer will not require any changes to the Character class, rather it will use the multidescs Attribute (a list) and create it if it does not exist.
This contrib also works well together with the rpsystem contrib (which also adds the short descriptions and the sdesc command).
Installation:
Edit mygame/commands/default_cmdsets.py and add from evennia.contrib.game_systems.multidescer import CmdMultiDesc to the top.
Next, look up the at_cmdset_create method of the CharacterCmdSet class and add a line self.add(CmdMultiDesc()) to the end of it.
Reload the server and you should have the +desc command available (it will replace the default desc command).
-
exception
evennia.contrib.game_systems.multidescer.multidescer.
DescValidateError
[source]¶ Bases:
ValueError
Used for tracebacks from desc systems
-
class
evennia.contrib.game_systems.multidescer.multidescer.
CmdMultiDesc
(**kwargs)[source]¶ Bases:
evennia.commands.default.muxcommand.MuxCommand
Manage multiple descriptions
- Usage:
+desc [key] - show current desc desc with <key> +desc <key> = <text> - add/replace desc with <key> +desc/list - list descriptions (abbreviated) +desc/list/full - list descriptions (full texts) +desc/edit <key> - add/edit desc <key> in line editor +desc/del <key> - delete desc <key> +desc/swap <key1>-<key2> - swap positions of <key1> and <key2> in list +desc/set <key> [+key+…] - set desc as default or combine multiple descs
Notes
When combining multiple descs with +desc/set <key> + <key2> + …, any keys not matching an actual description will be inserted as plain text. Use e.g. ansi line break ||/ to add a new paragraph and + + or ansi space ||_ to add extra whitespace.
-
key
= '+desc'¶
-
aliases
= ['desc']¶
-
locks
= 'cmd:all()'¶
-
help_category
= 'general'¶
-
func
()[source]¶ Implements the multidescer. We will use db.desc for the description in use and db.multidesc to store all descriptions.
-
lock_storage
= 'cmd:all()'¶
-
search_index_entry
= {'aliases': 'desc', 'category': 'general', 'key': '+desc', 'no_prefix': 'desc desc', 'tags': '', 'text': '\n Manage multiple descriptions\n\n Usage:\n +desc [key] - show current desc desc with <key>\n +desc <key> = <text> - add/replace desc with <key>\n +desc/list - list descriptions (abbreviated)\n +desc/list/full - list descriptions (full texts)\n +desc/edit <key> - add/edit desc <key> in line editor\n +desc/del <key> - delete desc <key>\n +desc/swap <key1>-<key2> - swap positions of <key1> and <key2> in list\n +desc/set <key> [+key+...] - set desc as default or combine multiple descs\n\n Notes:\n When combining multiple descs with +desc/set <key> + <key2> + ...,\n any keys not matching an actual description will be inserted\n as plain text. Use e.g. ansi line break ||/ to add a new\n paragraph and + + or ansi space ||_ to add extra whitespace.\n\n '}¶