evennia.commands.default package

This package contains all default commands of Evennia, grouped after category.

Submodules

evennia.commands.default.account module

Account (OOC) commands. These are stored on the Account object and self.caller is thus always an Account, not an Object/Character.

These commands go in the AccountCmdset and are accessible also when puppeting a Character (although with lower priority)

These commands use the account_caller property which tells the command parent (MuxCommand, usually) to setup caller correctly. They use self.account to make sure to always use the account object rather than self.caller (which change depending on the level you are calling from) The property self.character can be used to access the character when these commands are triggered with a connected character (such as the case of the ooc command), it is None if we are OOC.

Note that under MULTISESSION_MODE > 2, Account commands should use self.msg() and similar methods to reroute returns to the correct method. Otherwise all text will be returned to all connected sessions.

class evennia.commands.default.account.CmdOOCLook(**kwargs)[source]

Bases: evennia.commands.default.account.MuxAccountLookCommand

look while out-of-character

Usage:

look

Look in the ooc state.

_keyaliases = ('look', 'l', 'ls')
_matchset = {'l', 'look', 'ls'}
account_caller = True
aliases = ['l', 'ls']
func()[source]

implement the ooc look command

help_category = 'general'
key = 'look'
lock_storage = 'cmd:all()'
locks = 'cmd:all()'
search_index_entry = {'aliases': 'l ls', 'category': 'general', 'key': 'look', 'tags': '', 'text': '\n look while out-of-character\n\n Usage:\n look\n\n Look in the ooc state.\n '}
class evennia.commands.default.account.CmdIC(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

control an object you have permission to puppet

Usage:

ic <character>

Go in-character (IC) as a given Character.

This will attempt to “become” a different object assuming you have the right to do so. Note that it’s the ACCOUNT character that puppets characters/objects and which needs to have the correct permission!

You cannot become an object that is already controlled by another account. In principle <character> can be any in-game object as long as you the account have access right to puppet it.

_keyaliases = ('puppet', 'ic')
_matchset = {'ic', 'puppet'}
account_caller = True
aliases = ['puppet']
func()[source]

Main puppet method

help_category = 'general'
key = 'ic'
lock_storage = 'cmd:all()'
locks = 'cmd:all()'
search_index_entry = {'aliases': 'puppet', 'category': 'general', 'key': 'ic', 'tags': '', 'text': '\n control an object you have permission to puppet\n\n Usage:\n ic <character>\n\n Go in-character (IC) as a given Character.\n\n This will attempt to "become" a different object assuming you have\n the right to do so. Note that it\'s the ACCOUNT character that puppets\n characters/objects and which needs to have the correct permission!\n\n You cannot become an object that is already controlled by another\n account. In principle <character> can be any in-game object as long\n as you the account have access right to puppet it.\n '}
class evennia.commands.default.account.CmdOOC(**kwargs)[source]

Bases: evennia.commands.default.account.MuxAccountLookCommand

stop puppeting and go ooc

Usage:

ooc

Go out-of-character (OOC).

This will leave your current character and put you in a incorporeal OOC state.

_keyaliases = ('unpuppet', 'ooc')
_matchset = {'ooc', 'unpuppet'}
account_caller = True
aliases = ['unpuppet']
func()[source]

Implement function

help_category = 'general'
key = 'ooc'
lock_storage = 'cmd:pperm(Player)'
locks = 'cmd:pperm(Player)'
search_index_entry = {'aliases': 'unpuppet', 'category': 'general', 'key': 'ooc', 'tags': '', 'text': '\n stop puppeting and go ooc\n\n Usage:\n ooc\n\n Go out-of-character (OOC).\n\n This will leave your current character and put you in a incorporeal OOC state.\n '}
class evennia.commands.default.account.CmdPassword(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

change your password

Usage:

password <old password> = <new password>

Changes your password. Make sure to pick a safe one.

_keyaliases = ('password',)
_matchset = {'password'}
account_caller = True
aliases = []
func()[source]

hook function.

help_category = 'general'
key = 'password'
lock_storage = 'cmd:pperm(Player)'
locks = 'cmd:pperm(Player)'
search_index_entry = {'aliases': '', 'category': 'general', 'key': 'password', 'tags': '', 'text': '\n change your password\n\n Usage:\n password <old password> = <new password>\n\n Changes your password. Make sure to pick a safe one.\n '}
class evennia.commands.default.account.CmdQuit(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

quit the game

Usage:

quit

Switch:

all - disconnect all connected sessions

Gracefully disconnect your current session from the game. Use the /all switch to disconnect from all sessions.

_keyaliases = ('quit',)
_matchset = {'quit'}
account_caller = True
aliases = []
func()[source]

hook function

help_category = 'general'
key = 'quit'
lock_storage = 'cmd:all()'
locks = 'cmd:all()'
search_index_entry = {'aliases': '', 'category': 'general', 'key': 'quit', 'tags': '', 'text': '\n quit the game\n\n Usage:\n quit\n\n Switch:\n all - disconnect all connected sessions\n\n Gracefully disconnect your current session from the\n game. Use the /all switch to disconnect from all sessions.\n '}
switch_options = ('all',)
class evennia.commands.default.account.CmdCharCreate(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

create a new character

Usage:

charcreate <charname> [= desc]

Create a new character, optionally giving it a description. You may use upper-case letters in the name - you will nevertheless always be able to access your character using lower-case letters if you want.

_keyaliases = ('charcreate',)
_matchset = {'charcreate'}
account_caller = True
aliases = []
func()[source]

create the new character

help_category = 'general'
key = 'charcreate'
lock_storage = 'cmd:pperm(Player)'
locks = 'cmd:pperm(Player)'
search_index_entry = {'aliases': '', 'category': 'general', 'key': 'charcreate', 'tags': '', 'text': '\n create a new character\n\n Usage:\n charcreate <charname> [= desc]\n\n Create a new character, optionally giving it a description. You\n may use upper-case letters in the name - you will nevertheless\n always be able to access your character using lower-case letters\n if you want.\n '}
class evennia.commands.default.account.CmdOption(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

Set an account option

Usage:

option[/save] [name = value]

Switches:

save - Save the current option settings for future logins. clear - Clear the saved options.

This command allows for viewing and setting client interface settings. Note that saved options may not be able to be used if later connecting with a client with different capabilities.

_keyaliases = ('option', 'options')
_matchset = {'option', 'options'}
account_caller = True
aliases = ['options']
func()[source]

Implements the command

help_category = 'general'
key = 'option'
lock_storage = 'cmd:all()'
locks = 'cmd:all()'
search_index_entry = {'aliases': 'options', 'category': 'general', 'key': 'option', 'tags': '', 'text': '\n Set an account option\n\n Usage:\n option[/save] [name = value]\n\n Switches:\n save - Save the current option settings for future logins.\n clear - Clear the saved options.\n\n This command allows for viewing and setting client interface\n settings. Note that saved options may not be able to be used if\n later connecting with a client with different capabilities.\n\n\n '}
switch_options = ('save', 'clear')
class evennia.commands.default.account.CmdSessions(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

check your connected session(s)

Usage:

sessions

Lists the sessions currently connected to your account.

_keyaliases = ('sessions',)
_matchset = {'sessions'}
account_caller = True
aliases = []
func()[source]

Implement function

help_category = 'general'
key = 'sessions'
lock_storage = 'cmd:all()'
locks = 'cmd:all()'
search_index_entry = {'aliases': '', 'category': 'general', 'key': 'sessions', 'tags': '', 'text': '\n check your connected session(s)\n\n Usage:\n sessions\n\n Lists the sessions currently connected to your account.\n\n '}
class evennia.commands.default.account.CmdWho(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

list who is currently online

Usage:

who doing

Shows who is currently online. Doing is an alias that limits info also for those with all permissions.

_keyaliases = ('doing', 'who')
_matchset = {'doing', 'who'}
account_caller = True
aliases = ['doing']
func()[source]

Get all connected accounts by polling session.

help_category = 'general'
key = 'who'
lock_storage = 'cmd:all()'
locks = 'cmd:all()'
search_index_entry = {'aliases': 'doing', 'category': 'general', 'key': 'who', 'tags': '', 'text': '\n list who is currently online\n\n Usage:\n who\n doing\n\n Shows who is currently online. Doing is an alias that limits info\n also for those with all permissions.\n '}
class evennia.commands.default.account.CmdColorTest(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

testing which colors your client support

Usage:

color ansi||xterm256

Prints a color map along with in-mud color codes to use to produce them. It also tests what is supported in your client. Choices are 16-color ansi (supported in most muds) or the 256-color xterm256 standard. No checking is done to determine your client supports color - if not you will see rubbish appear.

_keyaliases = ('color',)
_matchset = {'color'}
account_caller = True
aliases = []
func()[source]

Show color tables

help_category = 'general'
key = 'color'
lock_storage = 'cmd:all()'
locks = 'cmd:all()'
search_index_entry = {'aliases': '', 'category': 'general', 'key': 'color', 'tags': '', 'text': '\n testing which colors your client support\n\n Usage:\n color ansi||xterm256\n\n Prints a color map along with in-mud color codes to use to produce\n them. It also tests what is supported in your client. Choices are\n 16-color ansi (supported in most muds) or the 256-color xterm256\n standard. No checking is done to determine your client supports\n color - if not you will see rubbish appear.\n '}
slice_bright_bg = slice(None, None, None)
slice_bright_fg = slice(7, 15, None)
slice_dark_bg = slice(-8, None, None)
slice_dark_fg = slice(15, 23, None)
table_format(table)[source]

Helper method to format the ansi/xterm256 tables. Takes a table of columns [[val,val,…],[val,val,…],…]

class evennia.commands.default.account.CmdQuell(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

use character’s permissions instead of account’s

Usage:

quell unquell

Normally the permission level of the Account is used when puppeting a Character/Object to determine access. This command will switch the lock system to make use of the puppeted Object’s permissions instead. This is useful mainly for testing. Hierarchical permission quelling only work downwards, thus an Account cannot use a higher-permission Character to escalate their permission level. Use the unquell command to revert back to normal operation.

_keyaliases = ('unquell', 'quell')
_matchset = {'quell', 'unquell'}
_recache_locks(account)[source]

Helper method to reset the lockhandler on an already puppeted object

account_caller = True
aliases = ['unquell']
func()[source]

Perform the command

help_category = 'general'
key = 'quell'
lock_storage = 'cmd:pperm(Player)'
locks = 'cmd:pperm(Player)'
search_index_entry = {'aliases': 'unquell', 'category': 'general', 'key': 'quell', 'tags': '', 'text': "\n use character's permissions instead of account's\n\n Usage:\n quell\n unquell\n\n Normally the permission level of the Account is used when puppeting a\n Character/Object to determine access. This command will switch the lock\n system to make use of the puppeted Object's permissions instead. This is\n useful mainly for testing.\n Hierarchical permission quelling only work downwards, thus an Account cannot\n use a higher-permission Character to escalate their permission level.\n Use the unquell command to revert back to normal operation.\n "}
class evennia.commands.default.account.CmdCharDelete(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

delete a character - this cannot be undone!

Usage:

chardelete <charname>

Permanently deletes one of your characters.

_keyaliases = ('chardelete',)
_matchset = {'chardelete'}
aliases = []
func()[source]

delete the character

help_category = 'general'
key = 'chardelete'
lock_storage = 'cmd:pperm(Player)'
locks = 'cmd:pperm(Player)'
search_index_entry = {'aliases': '', 'category': 'general', 'key': 'chardelete', 'tags': '', 'text': '\n delete a character - this cannot be undone!\n\n Usage:\n chardelete <charname>\n\n Permanently deletes one of your characters.\n '}
class evennia.commands.default.account.CmdStyle(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

In-game style options

Usage:

style style <option> = <value>

Configure stylings for in-game display elements like table borders, help entriest etc. Use without arguments to see all available options.

_keyaliases = ('style',)
_matchset = {'style'}
aliases = []
func()[source]

This is the hook function that actually does all the work. It is called by the cmdhandler right after self.parser() finishes, and so has access to all the variables defined therein.

help_category = 'general'
key = 'style'
list_styles()[source]
lock_storage = 'cmd:all();'
search_index_entry = {'aliases': '', 'category': 'general', 'key': 'style', 'tags': '', 'text': '\n In-game style options\n\n Usage:\n style\n style <option> = <value>\n\n Configure stylings for in-game display elements like table borders, help\n entriest etc. Use without arguments to see all available options.\n\n '}
set()[source]
switch_options = ['clear']

evennia.commands.default.admin module

Admin commands

class evennia.commands.default.admin.CmdBoot(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

kick an account from the server.

Usage

boot[/switches] <account obj> [: reason]

Switches:

quiet - Silently boot without informing account sid - boot by session id instead of name or dbref

Boot an account object from the server. If a reason is supplied it will be echoed to the user unless /quiet is set.

_keyaliases = ('boot',)
_matchset = {'boot'}
aliases = []
func()[source]

Implementing the function

help_category = 'admin'
key = 'boot'
lock_storage = 'cmd:perm(boot) or perm(Admin)'
locks = 'cmd:perm(boot) or perm(Admin)'
search_index_entry = {'aliases': '', 'category': 'admin', 'key': 'boot', 'tags': '', 'text': '\n kick an account from the server.\n\n Usage\n boot[/switches] <account obj> [: reason]\n\n Switches:\n quiet - Silently boot without informing account\n sid - boot by session id instead of name or dbref\n\n Boot an account object from the server. If a reason is\n supplied it will be echoed to the user unless /quiet is set.\n '}
switch_options = ('quiet', 'sid')
class evennia.commands.default.admin.CmdBan(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

ban an account from the server

Usage:

ban [<name or ip> [: reason]]

Without any arguments, shows numbered list of active bans.

This command bans a user from accessing the game. Supply an optional reason to be able to later remember why the ban was put in place.

It is often preferable to ban an account from the server than to delete an account with accounts/delete. If banned by name, that account account can no longer be logged into.

IP (Internet Protocol) address banning allows blocking all access from a specific address or subnet. Use an asterisk (*) as a wildcard.

Examples

ban thomas - ban account ‘thomas’ ban/ip 134.233.2.111 - ban specific ip address ban/ip 134.233.2.* - ban all in a subnet ban/ip 134.233.*.* - even wider ban

A single IP filter can be easy to circumvent by changing computers or requesting a new IP address. Setting a wide IP block filter with wildcards might be tempting, but remember that it may also accidentally block innocent users connecting from the same country or region.

_keyaliases = ('ban', 'bans')
_matchset = {'ban', 'bans'}
aliases = ['bans']
func()[source]

Bans are stored in a serverconf db object as a list of dictionaries:

[ (name, ip, ipregex, date, reason),

(name, ip, ipregex, date, reason),… ]

where name and ip are set by the user and are shown in lists. ipregex is a converted form of ip where the * is replaced by an appropriate regex pattern for fast matching. date is the time stamp the ban was instigated and ‘reason’ is any optional info given to the command. Unset values in each tuple is set to the empty string.

help_category = 'admin'
key = 'ban'
lock_storage = 'cmd:perm(ban) or perm(Developer)'
locks = 'cmd:perm(ban) or perm(Developer)'
search_index_entry = {'aliases': 'bans', 'category': 'admin', 'key': 'ban', 'tags': '', 'text': "\n ban an account from the server\n\n Usage:\n ban [<name or ip> [: reason]]\n\n Without any arguments, shows numbered list of active bans.\n\n This command bans a user from accessing the game. Supply an optional\n reason to be able to later remember why the ban was put in place.\n\n It is often preferable to ban an account from the server than to\n delete an account with accounts/delete. If banned by name, that account\n account can no longer be logged into.\n\n IP (Internet Protocol) address banning allows blocking all access\n from a specific address or subnet. Use an asterisk (*) as a\n wildcard.\n\n Examples:\n ban thomas - ban account 'thomas'\n ban/ip 134.233.2.111 - ban specific ip address\n ban/ip 134.233.2.* - ban all in a subnet\n ban/ip 134.233.*.* - even wider ban\n\n A single IP filter can be easy to circumvent by changing computers\n or requesting a new IP address. Setting a wide IP block filter with\n wildcards might be tempting, but remember that it may also\n accidentally block innocent users connecting from the same country\n or region.\n\n "}
class evennia.commands.default.admin.CmdUnban(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

remove a ban from an account

Usage:

unban <banid>

This will clear an account name/ip ban previously set with the ban command. Use this command without an argument to view a numbered list of bans. Use the numbers in this list to select which one to unban.

_keyaliases = ('unban',)
_matchset = {'unban'}
aliases = []
func()[source]

Implement unbanning

help_category = 'admin'
key = 'unban'
lock_storage = 'cmd:perm(unban) or perm(Developer)'
locks = 'cmd:perm(unban) or perm(Developer)'
search_index_entry = {'aliases': '', 'category': 'admin', 'key': 'unban', 'tags': '', 'text': '\n remove a ban from an account\n\n Usage:\n unban <banid>\n\n This will clear an account name/ip ban previously set with the ban\n command. Use this command without an argument to view a numbered\n list of bans. Use the numbers in this list to select which one to\n unban.\n\n '}
class evennia.commands.default.admin.CmdEmit(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

admin command for emitting message to multiple objects

Usage:

emit[/switches] [<obj>, <obj>, … =] <message> remit [<obj>, <obj>, … =] <message> pemit [<obj>, <obj>, … =] <message>

Switches:

room - limit emits to rooms only (default) accounts - limit emits to accounts only contents - send to the contents of matched objects too

Emits a message to the selected objects or to your immediate surroundings. If the object is a room, send to its contents. remit and pemit are just limited forms of emit, for sending to rooms and to accounts respectively.

_keyaliases = ('emit', 'remit', 'pemit')
_matchset = {'emit', 'pemit', 'remit'}
aliases = ['remit', 'pemit']
func()[source]

Implement the command

help_category = 'admin'
key = 'emit'
lock_storage = 'cmd:perm(emit) or perm(Builder)'
locks = 'cmd:perm(emit) or perm(Builder)'
search_index_entry = {'aliases': 'remit pemit', 'category': 'admin', 'key': 'emit', 'tags': '', 'text': '\n admin command for emitting message to multiple objects\n\n Usage:\n emit[/switches] [<obj>, <obj>, ... =] <message>\n remit [<obj>, <obj>, ... =] <message>\n pemit [<obj>, <obj>, ... =] <message>\n\n Switches:\n room - limit emits to rooms only (default)\n accounts - limit emits to accounts only\n contents - send to the contents of matched objects too\n\n Emits a message to the selected objects or to\n your immediate surroundings. If the object is a room,\n send to its contents. remit and pemit are just\n limited forms of emit, for sending to rooms and\n to accounts respectively.\n '}
switch_options = ('room', 'accounts', 'contents')
class evennia.commands.default.admin.CmdNewPassword(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

change the password of an account

Usage:

userpassword <user obj> = <new password>

Set an account’s password.

_keyaliases = ('userpassword',)
_matchset = {'userpassword'}
aliases = []
func()[source]

Implement the function.

help_category = 'admin'
key = 'userpassword'
lock_storage = 'cmd:perm(newpassword) or perm(Admin)'
locks = 'cmd:perm(newpassword) or perm(Admin)'
search_index_entry = {'aliases': '', 'category': 'admin', 'key': 'userpassword', 'tags': '', 'text': "\n change the password of an account\n\n Usage:\n userpassword <user obj> = <new password>\n\n Set an account's password.\n "}
class evennia.commands.default.admin.CmdPerm(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

set the permissions of an account/object

Usage:

perm[/switch] <object> [= <permission>[,<permission>,…]] perm[/switch] *<account> [= <permission>[,<permission>,…]]

Switches:

del - delete the given permission from <object> or <account>. account - set permission on an account (same as adding * to name)

This command sets/clears individual permission strings on an object or account. If no permission is given, list all permissions on <object>.

_keyaliases = ('perm', 'setperm')
_matchset = {'perm', 'setperm'}
aliases = ['setperm']
func()[source]

Implement function

help_category = 'admin'
key = 'perm'
lock_storage = 'cmd:perm(perm) or perm(Developer)'
locks = 'cmd:perm(perm) or perm(Developer)'
search_index_entry = {'aliases': 'setperm', 'category': 'admin', 'key': 'perm', 'tags': '', 'text': '\n set the permissions of an account/object\n\n Usage:\n perm[/switch] <object> [= <permission>[,<permission>,...]]\n perm[/switch] *<account> [= <permission>[,<permission>,...]]\n\n Switches:\n del - delete the given permission from <object> or <account>.\n account - set permission on an account (same as adding * to name)\n\n This command sets/clears individual permission strings on an object\n or account. If no permission is given, list all permissions on <object>.\n '}
switch_options = ('del', 'account')
class evennia.commands.default.admin.CmdWall(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

make an announcement to all

Usage:

wall <message>

Announces a message to all connected sessions including all currently unlogged in.

_keyaliases = ('wall',)
_matchset = {'wall'}
aliases = []
func()[source]

Implements command

help_category = 'admin'
key = 'wall'
lock_storage = 'cmd:perm(wall) or perm(Admin)'
locks = 'cmd:perm(wall) or perm(Admin)'
search_index_entry = {'aliases': '', 'category': 'admin', 'key': 'wall', 'tags': '', 'text': '\n make an announcement to all\n\n Usage:\n wall <message>\n\n Announces a message to all connected sessions\n including all currently unlogged in.\n '}
class evennia.commands.default.admin.CmdForce(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

forces an object to execute a command

Usage:

force <object>=<command string>

Example

force bob=get stick

_keyaliases = ('force',)
_matchset = {'force'}
aliases = []
func()[source]

Implements the force command

help_category = 'building'
key = 'force'
lock_storage = 'cmd:perm(spawn) or perm(Builder)'
locks = 'cmd:perm(spawn) or perm(Builder)'
perm_used = 'edit'
search_index_entry = {'aliases': '', 'category': 'building', 'key': 'force', 'tags': '', 'text': '\n forces an object to execute a command\n\n Usage:\n force <object>=<command string>\n\n Example:\n force bob=get stick\n '}

evennia.commands.default.batchprocess module

Batch processors

These commands implements the ‘batch-command’ and ‘batch-code’ processors, using the functionality in evennia.utils.batchprocessors. They allow for offline world-building.

Batch-command is the simpler system. This reads a file (*.ev) containing a list of in-game commands and executes them in sequence as if they had been entered in the game (including permission checks etc).

Batch-code is a full-fledged python code interpreter that reads blocks of python code (*.py) and executes them in sequence. This allows for much more power than Batch-command, but requires knowing Python and the Evennia API. It is also a severe security risk and should therefore always be limited to superusers only.

class evennia.commands.default.batchprocess.CmdBatchCommands(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

build from batch-command file

Usage:

batchcommands[/interactive] <python.path.to.file>

Switch:
interactive - this mode will offer more control when

executing the batch file, like stepping, skipping, reloading etc.

Runs batches of commands from a batch-cmd text file (*.ev).

_keyaliases = ('batchcommands', 'batchcmd', 'batchcommand')
_matchset = {'batchcmd', 'batchcommand', 'batchcommands'}
aliases = ['batchcmd', 'batchcommand']
func()[source]

Starts the processor.

help_category = 'building'
key = 'batchcommands'
lock_storage = 'cmd:perm(batchcommands) or perm(Developer)'
locks = 'cmd:perm(batchcommands) or perm(Developer)'
search_index_entry = {'aliases': 'batchcmd batchcommand', 'category': 'building', 'key': 'batchcommands', 'tags': '', 'text': '\n build from batch-command file\n\n Usage:\n batchcommands[/interactive] <python.path.to.file>\n\n Switch:\n interactive - this mode will offer more control when\n executing the batch file, like stepping,\n skipping, reloading etc.\n\n Runs batches of commands from a batch-cmd text file (*.ev).\n\n '}
switch_options = ('interactive',)
class evennia.commands.default.batchprocess.CmdBatchCode(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

build from batch-code file

Usage:

batchcode[/interactive] <python path to file>

Switch:
interactive - this mode will offer more control when

executing the batch file, like stepping, skipping, reloading etc.

debug - auto-delete all objects that has been marked as

deletable in the script file (see example files for syntax). This is useful so as to to not leave multiple object copies behind when testing out the script.

Runs batches of commands from a batch-code text file (*.py).

_keyaliases = ('batchcode', 'batchcodes')
_matchset = {'batchcode', 'batchcodes'}
aliases = ['batchcodes']
func()[source]

Starts the processor.

help_category = 'building'
key = 'batchcode'
lock_storage = 'cmd:superuser()'
locks = 'cmd:superuser()'
search_index_entry = {'aliases': 'batchcodes', 'category': 'building', 'key': 'batchcode', 'tags': '', 'text': '\n build from batch-code file\n\n Usage:\n batchcode[/interactive] <python path to file>\n\n Switch:\n interactive - this mode will offer more control when\n executing the batch file, like stepping,\n skipping, reloading etc.\n debug - auto-delete all objects that has been marked as\n deletable in the script file (see example files for\n syntax). This is useful so as to to not leave multiple\n object copies behind when testing out the script.\n\n Runs batches of commands from a batch-code text file (*.py).\n\n '}
switch_options = ('interactive', 'debug')

evennia.commands.default.building module

Building and world design commands

class evennia.commands.default.building.ObjManipCommand(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

This is a parent class for some of the defining objmanip commands since they tend to have some more variables to define new objects.

Each object definition can have several components. First is always a name, followed by an optional alias list and finally an some optional data, such as a typeclass or a location. A comma ‘,’ separates different objects. Like this:

name1;alias;alias;alias:option, name2;alias;alias …

Spaces between all components are stripped.

A second situation is attribute manipulation. Such commands are simpler and offer combinations

objname/attr/attr/attr, objname/attr, …

_keyaliases = ('command',)
_matchset = {'command'}
aliases = []
help_category = 'general'
key = 'command'
lock_storage = 'cmd:all();'
parse()[source]

We need to expand the default parsing to get all the cases, see the module doc.

search_index_entry = {'aliases': '', 'category': 'general', 'key': 'command', 'tags': '', 'text': "\n This is a parent class for some of the defining objmanip commands\n since they tend to have some more variables to define new objects.\n\n Each object definition can have several components. First is\n always a name, followed by an optional alias list and finally an\n some optional data, such as a typeclass or a location. A comma ','\n separates different objects. Like this:\n\n name1;alias;alias;alias:option, name2;alias;alias ...\n\n Spaces between all components are stripped.\n\n A second situation is attribute manipulation. Such commands\n are simpler and offer combinations\n\n objname/attr/attr/attr, objname/attr, ...\n\n "}
class evennia.commands.default.building.CmdSetObjAlias(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

adding permanent aliases for object

Usage:

alias <obj> [= [alias[,alias,alias,…]]] alias <obj> = alias/category <obj> = [alias[,alias,…]:<category>

Switches:
category - requires ending input with :category, to store the

given aliases with the given category.

Assigns aliases to an object so it can be referenced by more than one name. Assign empty to remove all aliases from object. If assigning a category, all aliases given will be using this category.

Observe that this is not the same thing as personal aliases created with the ‘nick’ command! Aliases set with alias are changing the object in question, making those aliases usable by everyone.

_keyaliases = ('alias', 'setobjalias')
_matchset = {'alias', 'setobjalias'}
aliases = ['setobjalias']
func()[source]

Set the aliases.

help_category = 'building'
key = 'alias'
lock_storage = 'cmd:perm(setobjalias) or perm(Builder)'
locks = 'cmd:perm(setobjalias) or perm(Builder)'
search_index_entry = {'aliases': 'setobjalias', 'category': 'building', 'key': 'alias', 'tags': '', 'text': "\n adding permanent aliases for object\n\n Usage:\n alias <obj> [= [alias[,alias,alias,...]]]\n alias <obj> =\n alias/category <obj> = [alias[,alias,...]:<category>\n\n Switches:\n category - requires ending input with :category, to store the\n given aliases with the given category.\n\n Assigns aliases to an object so it can be referenced by more\n than one name. Assign empty to remove all aliases from object. If\n assigning a category, all aliases given will be using this category.\n\n Observe that this is not the same thing as personal aliases\n created with the 'nick' command! Aliases set with alias are\n changing the object in question, making those aliases usable\n by everyone.\n "}
switch_options = ('category',)
class evennia.commands.default.building.CmdCopy(**kwargs)[source]

Bases: evennia.commands.default.building.ObjManipCommand

copy an object and its properties

Usage:

copy <original obj> [= <new_name>][;alias;alias..] [:<new_location>] [,<new_name2> …]

Create one or more copies of an object. If you don’t supply any targets, one exact copy of the original object will be created with the name *_copy.

_keyaliases = ('copy',)
_matchset = {'copy'}
aliases = []
func()[source]

Uses ObjManipCommand.parse()

help_category = 'building'
key = 'copy'
lock_storage = 'cmd:perm(copy) or perm(Builder)'
locks = 'cmd:perm(copy) or perm(Builder)'
search_index_entry = {'aliases': '', 'category': 'building', 'key': 'copy', 'tags': '', 'text': "\n copy an object and its properties\n\n Usage:\n copy <original obj> [= <new_name>][;alias;alias..]\n [:<new_location>] [,<new_name2> ...]\n\n Create one or more copies of an object. If you don't supply any targets,\n one exact copy of the original object will be created with the name *_copy.\n "}
class evennia.commands.default.building.CmdCpAttr(**kwargs)[source]

Bases: evennia.commands.default.building.ObjManipCommand

copy attributes between objects

Usage:

cpattr[/switch] <obj>/<attr> = <obj1>/<attr1> [,<obj2>/<attr2>,<obj3>/<attr3>,…] cpattr[/switch] <obj>/<attr> = <obj1> [,<obj2>,<obj3>,…] cpattr[/switch] <attr> = <obj1>/<attr1> [,<obj2>/<attr2>,<obj3>/<attr3>,…] cpattr[/switch] <attr> = <obj1>[,<obj2>,<obj3>,…]

Switches:

move - delete the attribute from the source object after copying.

Example

cpattr coolness = Anna/chillout, Anna/nicety, Tom/nicety -> copies the coolness attribute (defined on yourself), to attributes on Anna and Tom.

Copy the attribute one object to one or more attributes on another object. If you don’t supply a source object, yourself is used.

_keyaliases = ('cpattr',)
_matchset = {'cpattr'}
aliases = []
check_from_attr(obj, attr, clear=False)[source]

Hook for overriding on subclassed commands. Checks to make sure a caller can copy the attr from the object in question. If not, return a false value and the command will abort. An error message should be provided by this function.

If clear is True, user is attempting to move the attribute.

check_has_attr(obj, attr)[source]

Hook for overriding on subclassed commands. Do any preprocessing required and verify an object has an attribute.

check_to_attr(obj, attr)[source]

Hook for overriding on subclassed commands. Checks to make sure a caller can write to the specified attribute on the specified object. If not, return a false value and the attribute will be skipped. An error message should be provided by this function.

func()[source]

Do the copying.

get_attr(obj, attr)[source]

Hook for overriding on subclassed commands. Do any preprocessing required and get the attribute from the object.

help_category = 'building'
key = 'cpattr'
lock_storage = 'cmd:perm(cpattr) or perm(Builder)'
locks = 'cmd:perm(cpattr) or perm(Builder)'
search_index_entry = {'aliases': '', 'category': 'building', 'key': 'cpattr', 'tags': '', 'text': "\n copy attributes between objects\n\n Usage:\n cpattr[/switch] <obj>/<attr> = <obj1>/<attr1> [,<obj2>/<attr2>,<obj3>/<attr3>,...]\n cpattr[/switch] <obj>/<attr> = <obj1> [,<obj2>,<obj3>,...]\n cpattr[/switch] <attr> = <obj1>/<attr1> [,<obj2>/<attr2>,<obj3>/<attr3>,...]\n cpattr[/switch] <attr> = <obj1>[,<obj2>,<obj3>,...]\n\n Switches:\n move - delete the attribute from the source object after copying.\n\n Example:\n cpattr coolness = Anna/chillout, Anna/nicety, Tom/nicety\n ->\n copies the coolness attribute (defined on yourself), to attributes\n on Anna and Tom.\n\n Copy the attribute one object to one or more attributes on another object.\n If you don't supply a source object, yourself is used.\n "}
switch_options = ('move',)
class evennia.commands.default.building.CmdMvAttr(**kwargs)[source]

Bases: evennia.commands.default.building.ObjManipCommand

move attributes between objects

Usage:

mvattr[/switch] <obj>/<attr> = <obj1>/<attr1> [,<obj2>/<attr2>,<obj3>/<attr3>,…] mvattr[/switch] <obj>/<attr> = <obj1> [,<obj2>,<obj3>,…] mvattr[/switch] <attr> = <obj1>/<attr1> [,<obj2>/<attr2>,<obj3>/<attr3>,…] mvattr[/switch] <attr> = <obj1>[,<obj2>,<obj3>,…]

Switches:

copy - Don’t delete the original after moving.

Move an attribute from one object to one or more attributes on another object. If you don’t supply a source object, yourself is used.

_keyaliases = ('mvattr',)
_matchset = {'mvattr'}
aliases = []
func()[source]

Do the moving

help_category = 'building'
key = 'mvattr'
lock_storage = 'cmd:perm(mvattr) or perm(Builder)'
locks = 'cmd:perm(mvattr) or perm(Builder)'
search_index_entry = {'aliases': '', 'category': 'building', 'key': 'mvattr', 'tags': '', 'text': "\n move attributes between objects\n\n Usage:\n mvattr[/switch] <obj>/<attr> = <obj1>/<attr1> [,<obj2>/<attr2>,<obj3>/<attr3>,...]\n mvattr[/switch] <obj>/<attr> = <obj1> [,<obj2>,<obj3>,...]\n mvattr[/switch] <attr> = <obj1>/<attr1> [,<obj2>/<attr2>,<obj3>/<attr3>,...]\n mvattr[/switch] <attr> = <obj1>[,<obj2>,<obj3>,...]\n\n Switches:\n copy - Don't delete the original after moving.\n\n Move an attribute from one object to one or more attributes on another\n object. If you don't supply a source object, yourself is used.\n "}
switch_options = ('copy',)
class evennia.commands.default.building.CmdCreate(**kwargs)[source]

Bases: evennia.commands.default.building.ObjManipCommand

create new objects

Usage:

create[/drop] <objname>[;alias;alias…][:typeclass], <objname>…

switch:
drop - automatically drop the new object into your current

location (this is not echoed). This also sets the new object’s home to the current location rather than to you.

Creates one or more new objects. If typeclass is given, the object is created as a child of this typeclass. The typeclass script is assumed to be located under types/ and any further directory structure is given in Python notation. So if you have a correct typeclass ‘RedButton’ defined in types/examples/red_button.py, you could create a new object of this type like this:

create/drop button;red : examples.red_button.RedButton

_keyaliases = ('create',)
_matchset = {'create'}
aliases = []
func()[source]

Creates the object.

help_category = 'building'
key = 'create'
lock_storage = 'cmd:perm(create) or perm(Builder)'
locks = 'cmd:perm(create) or perm(Builder)'
new_obj_lockstring = 'control:id({id}) or perm(Admin);delete:id({id}) or perm(Admin)'
search_index_entry = {'aliases': '', 'category': 'building', 'key': 'create', 'tags': '', 'text': "\n create new objects\n\n Usage:\n create[/drop] <objname>[;alias;alias...][:typeclass], <objname>...\n\n switch:\n drop - automatically drop the new object into your current\n location (this is not echoed). This also sets the new\n object's home to the current location rather than to you.\n\n Creates one or more new objects. If typeclass is given, the object\n is created as a child of this typeclass. The typeclass script is\n assumed to be located under types/ and any further\n directory structure is given in Python notation. So if you have a\n correct typeclass 'RedButton' defined in\n types/examples/red_button.py, you could create a new\n object of this type like this:\n\n create/drop button;red : examples.red_button.RedButton\n\n "}
switch_options = ('drop',)
class evennia.commands.default.building.CmdDesc(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

describe an object or the current room.

Usage:

desc [<obj> =] <description>

Switches:

edit - Open up a line editor for more advanced editing.

Sets the “desc” attribute on an object. If an object is not given, describe the current room.

_keyaliases = ('describe', 'desc')
_matchset = {'desc', 'describe'}
aliases = ['describe']
edit_handler()[source]
func()[source]

Define command

help_category = 'building'
key = 'desc'
lock_storage = 'cmd:perm(desc) or perm(Builder)'
locks = 'cmd:perm(desc) or perm(Builder)'
search_index_entry = {'aliases': 'describe', 'category': 'building', 'key': 'desc', 'tags': '', 'text': '\n describe an object or the current room.\n\n Usage:\n desc [<obj> =] <description>\n\n Switches:\n edit - Open up a line editor for more advanced editing.\n\n Sets the "desc" attribute on an object. If an object is not given,\n describe the current room.\n '}
switch_options = ('edit',)
class evennia.commands.default.building.CmdDestroy(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

permanently delete objects

Usage:

destroy[/switches] [obj, obj2, obj3, [dbref-dbref], …]

Switches:
override - The destroy command will usually avoid accidentally

destroying account objects. This switch overrides this safety.

force - destroy without confirmation.

Examples

destroy house, roof, door, 44-78 destroy 5-10, flower, 45 destroy/force north

Destroys one or many objects. If dbrefs are used, a range to delete can be given, e.g. 4-10. Also the end points will be deleted. This command displays a confirmation before destroying, to make sure of your choice. You can specify the /force switch to bypass this confirmation.

_keyaliases = ('delete', 'destroy', 'del')
_matchset = {'del', 'delete', 'destroy'}
aliases = ['del', 'delete']
confirm = True
default_confirm = 'yes'
func()[source]

Implements the command.

help_category = 'building'
key = 'destroy'
lock_storage = 'cmd:perm(destroy) or perm(Builder)'
locks = 'cmd:perm(destroy) or perm(Builder)'
search_index_entry = {'aliases': 'del delete', 'category': 'building', 'key': 'destroy', 'tags': '', 'text': '\n permanently delete objects\n\n Usage:\n destroy[/switches] [obj, obj2, obj3, [dbref-dbref], ...]\n\n Switches:\n override - The destroy command will usually avoid accidentally\n destroying account objects. This switch overrides this safety.\n force - destroy without confirmation.\n Examples:\n destroy house, roof, door, 44-78\n destroy 5-10, flower, 45\n destroy/force north\n\n Destroys one or many objects. If dbrefs are used, a range to delete can be\n given, e.g. 4-10. Also the end points will be deleted. This command\n displays a confirmation before destroying, to make sure of your choice.\n You can specify the /force switch to bypass this confirmation.\n '}
switch_options = ('override', 'force')
class evennia.commands.default.building.CmdDig(**kwargs)[source]

Bases: evennia.commands.default.building.ObjManipCommand

build new rooms and connect them to the current location

Usage:
dig[/switches] <roomname>[;alias;alias…][:typeclass]
[= <exit_to_there>[;alias][:typeclass]]

[, <exit_to_here>[;alias][:typeclass]]

Switches:

tel or teleport - move yourself to the new room

Examples

dig kitchen = north;n, south;s dig house:myrooms.MyHouseTypeclass dig sheer cliff;cliff;sheer = climb up, climb down

This command is a convenient way to build rooms quickly; it creates the new room and you can optionally set up exits back and forth between your current room and the new one. You can add as many aliases as you like to the name of the room and the exits in question; an example would be ‘north;no;n’.

_keyaliases = ('dig',)
_matchset = {'dig'}
aliases = []
func()[source]

Do the digging. Inherits variables from ObjManipCommand.parse()

help_category = 'building'
key = 'dig'
lock_storage = 'cmd:perm(dig) or perm(Builder)'
locks = 'cmd:perm(dig) or perm(Builder)'
new_room_lockstring = 'control:id({id}) or perm(Admin); delete:id({id}) or perm(Admin); edit:id({id}) or perm(Admin)'
search_index_entry = {'aliases': '', 'category': 'building', 'key': 'dig', 'tags': '', 'text': "\n build new rooms and connect them to the current location\n\n Usage:\n dig[/switches] <roomname>[;alias;alias...][:typeclass]\n [= <exit_to_there>[;alias][:typeclass]]\n [, <exit_to_here>[;alias][:typeclass]]\n\n Switches:\n tel or teleport - move yourself to the new room\n\n Examples:\n dig kitchen = north;n, south;s\n dig house:myrooms.MyHouseTypeclass\n dig sheer cliff;cliff;sheer = climb up, climb down\n\n This command is a convenient way to build rooms quickly; it creates the\n new room and you can optionally set up exits back and forth between your\n current room and the new one. You can add as many aliases as you\n like to the name of the room and the exits in question; an example\n would be 'north;no;n'.\n "}
switch_options = ('teleport',)
class evennia.commands.default.building.CmdTunnel(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

create new rooms in cardinal directions only

Usage:

tunnel[/switch] <direction>[:typeclass] [= <roomname>[;alias;alias;…][:typeclass]]

Switches:

oneway - do not create an exit back to the current location tel - teleport to the newly created room

Example

tunnel n tunnel n = house;mike’s place;green building

This is a simple way to build using pre-defined directions:

|wn,ne,e,se,s,sw,w,nw|n (north, northeast etc) |wu,d|n (up and down) |wi,o|n (in and out)

The full names (north, in, southwest, etc) will always be put as main name for the exit, using the abbreviation as an alias (so an exit will always be able to be used with both “north” as well as “n” for example). Opposite directions will automatically be created back from the new room unless the /oneway switch is given. For more flexibility and power in creating rooms, use dig.

_keyaliases = ('tun', 'tunnel')
_matchset = {'tun', 'tunnel'}
aliases = ['tun']
directions = {'d': ('down', 'u'), 'e': ('east', 'w'), 'i': ('in', 'o'), 'n': ('north', 's'), 'ne': ('northeast', 'sw'), 'nw': ('northwest', 'se'), 'o': ('out', 'i'), 's': ('south', 'n'), 'se': ('southeast', 'nw'), 'sw': ('southwest', 'ne'), 'u': ('up', 'd'), 'w': ('west', 'e')}
func()[source]

Implements the tunnel command

help_category = 'building'
key = 'tunnel'
lock_storage = 'cmd: perm(tunnel) or perm(Builder)'
locks = 'cmd: perm(tunnel) or perm(Builder)'
search_index_entry = {'aliases': 'tun', 'category': 'building', 'key': 'tunnel', 'tags': '', 'text': '\n create new rooms in cardinal directions only\n\n Usage:\n tunnel[/switch] <direction>[:typeclass] [= <roomname>[;alias;alias;...][:typeclass]]\n\n Switches:\n oneway - do not create an exit back to the current location\n tel - teleport to the newly created room\n\n Example:\n tunnel n\n tunnel n = house;mike\'s place;green building\n\n This is a simple way to build using pre-defined directions:\n |wn,ne,e,se,s,sw,w,nw|n (north, northeast etc)\n |wu,d|n (up and down)\n |wi,o|n (in and out)\n The full names (north, in, southwest, etc) will always be put as\n main name for the exit, using the abbreviation as an alias (so an\n exit will always be able to be used with both "north" as well as\n "n" for example). Opposite directions will automatically be\n created back from the new room unless the /oneway switch is given.\n For more flexibility and power in creating rooms, use dig.\n '}
switch_options = ('oneway', 'tel')

Bases: evennia.commands.default.muxcommand.MuxCommand

link existing rooms together with exits

Usage:

link[/switches] <object> = <target> link[/switches] <object> = link[/switches] <object>

Switch:
twoway - connect two exits. For this to work, BOTH <object>

and <target> must be exit objects.

If <object> is an exit, set its destination to <target>. Two-way operation instead sets the destination to the locations of the respective given arguments. The second form (a lone =) sets the destination to None (same as the unlink command) and the third form (without =) just shows the currently set destination.

_keyaliases = ('link',)
_matchset = {'link'}
aliases = []
func()[source]

Perform the link

help_category = 'building'
key = 'link'
lock_storage = 'cmd:perm(link) or perm(Builder)'
locks = 'cmd:perm(link) or perm(Builder)'
search_index_entry = {'aliases': '', 'category': 'building', 'key': 'link', 'tags': '', 'text': '\n link existing rooms together with exits\n\n Usage:\n link[/switches] <object> = <target>\n link[/switches] <object> =\n link[/switches] <object>\n\n Switch:\n twoway - connect two exits. For this to work, BOTH <object>\n and <target> must be exit objects.\n\n If <object> is an exit, set its destination to <target>. Two-way operation\n instead sets the destination to the *locations* of the respective given\n arguments.\n The second form (a lone =) sets the destination to None (same as\n the unlink command) and the third form (without =) just shows the\n currently set destination.\n '}

Bases: evennia.commands.default.building.CmdLink

remove exit-connections between rooms

Usage:

unlink <Object>

Unlinks an object, for example an exit, disconnecting it from whatever it was connected to.

_keyaliases = ('unlink',)
_matchset = {'unlink'}
aliases = []
func()[source]

All we need to do here is to set the right command and call func in CmdLink

help_category = 'building'
help_key = 'Building'
key = 'unlink'
lock_storage = 'cmd:perm(unlink) or perm(Builder)'
locks = 'cmd:perm(unlink) or perm(Builder)'
search_index_entry = {'aliases': '', 'category': 'building', 'key': 'unlink', 'tags': '', 'text': '\n remove exit-connections between rooms\n\n Usage:\n unlink <Object>\n\n Unlinks an object, for example an exit, disconnecting\n it from whatever it was connected to.\n '}
class evennia.commands.default.building.CmdSetHome(**kwargs)[source]

Bases: evennia.commands.default.building.CmdLink

set an object’s home location

Usage:

sethome <obj> [= <home_location>] sethom <obj>

The “home” location is a “safety” location for objects; they will be moved there if their current location ceases to exist. All objects should always have a home location for this reason. It is also a convenient target of the “home” command.

If no location is given, just view the object’s home location.

_keyaliases = ('sethome',)
_matchset = {'sethome'}
aliases = []
func()[source]

implement the command

help_category = 'building'
key = 'sethome'
lock_storage = 'cmd:perm(sethome) or perm(Builder)'
locks = 'cmd:perm(sethome) or perm(Builder)'
search_index_entry = {'aliases': '', 'category': 'building', 'key': 'sethome', 'tags': '', 'text': '\n set an object\'s home location\n\n Usage:\n sethome <obj> [= <home_location>]\n sethom <obj>\n\n The "home" location is a "safety" location for objects; they\n will be moved there if their current location ceases to exist. All\n objects should always have a home location for this reason.\n It is also a convenient target of the "home" command.\n\n If no location is given, just view the object\'s home location.\n '}
class evennia.commands.default.building.CmdListCmdSets(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

list command sets defined on an object

Usage:

cmdsets <obj>

This displays all cmdsets assigned to a user. Defaults to yourself.

_keyaliases = ('cmdsets', 'listcmsets')
_matchset = {'cmdsets', 'listcmsets'}
aliases = ['listcmsets']
func()[source]

list the cmdsets

help_category = 'building'
key = 'cmdsets'
lock_storage = 'cmd:perm(listcmdsets) or perm(Builder)'
locks = 'cmd:perm(listcmdsets) or perm(Builder)'
search_index_entry = {'aliases': 'listcmsets', 'category': 'building', 'key': 'cmdsets', 'tags': '', 'text': '\n list command sets defined on an object\n\n Usage:\n cmdsets <obj>\n\n This displays all cmdsets assigned\n to a user. Defaults to yourself.\n '}
class evennia.commands.default.building.CmdName(**kwargs)[source]

Bases: evennia.commands.default.building.ObjManipCommand

change the name and/or aliases of an object

Usage:

name <obj> = <newname>;alias1;alias2

Rename an object to something new. Use *obj to rename an account.

_keyaliases = ('rename', 'name')
_matchset = {'name', 'rename'}
aliases = ['rename']
func()[source]

change the name

help_category = 'building'
key = 'name'
lock_storage = 'cmd:perm(rename) or perm(Builder)'
locks = 'cmd:perm(rename) or perm(Builder)'
search_index_entry = {'aliases': 'rename', 'category': 'building', 'key': 'name', 'tags': '', 'text': '\n change the name and/or aliases of an object\n\n Usage:\n name <obj> = <newname>;alias1;alias2\n\n Rename an object to something new. Use *obj to\n rename an account.\n\n '}
class evennia.commands.default.building.CmdOpen(**kwargs)[source]

Bases: evennia.commands.default.building.ObjManipCommand

open a new exit from the current room

Usage:

open <new exit>[;alias;alias..][:typeclass] [,<return exit>[;alias;..][:typeclass]]] = <destination>

Handles the creation of exits. If a destination is given, the exit will point there. The <return exit> argument sets up an exit at the destination leading back to the current room. Destination name can be given both as a #dbref and a name, if that name is globally unique.

_keyaliases = ('open',)
_matchset = {'open'}
aliases = []
create_exit(exit_name, location, destination, exit_aliases=None, typeclass=None)[source]

Helper function to avoid code duplication. At this point we know destination is a valid location

func()[source]

This is where the processing starts. Uses the ObjManipCommand.parser() for pre-processing as well as the self.create_exit() method.

help_category = 'building'
key = 'open'
lock_storage = 'cmd:perm(open) or perm(Builder)'
locks = 'cmd:perm(open) or perm(Builder)'
search_index_entry = {'aliases': '', 'category': 'building', 'key': 'open', 'tags': '', 'text': '\n open a new exit from the current room\n\n Usage:\n open <new exit>[;alias;alias..][:typeclass] [,<return exit>[;alias;..][:typeclass]]] = <destination>\n\n Handles the creation of exits. If a destination is given, the exit\n will point there. The <return exit> argument sets up an exit at the\n destination leading back to the current room. Destination name\n can be given both as a #dbref and a name, if that name is globally\n unique.\n\n '}
class evennia.commands.default.building.CmdSetAttribute(**kwargs)[source]

Bases: evennia.commands.default.building.ObjManipCommand

set attribute on an object or account

Usage:

set <obj>/<attr> = <value> set <obj>/<attr> = set <obj>/<attr> set *<account>/<attr> = <value>

Switch:

edit: Open the line editor (string values only) script: If we’re trying to set an attribute on a script channel: If we’re trying to set an attribute on a channel account: If we’re trying to set an attribute on an account room: Setting an attribute on a room (global search) exit: Setting an attribute on an exit (global search) char: Setting an attribute on a character (global search) character: Alias for char, as above.

Sets attributes on objects. The second example form above clears a previously set attribute while the third form inspects the current value of the attribute (if any). The last one (with the star) is a shortcut for operating on a player Account rather than an Object.

The most common data to save with this command are strings and numbers. You can however also set Python primitives such as lists, dictionaries and tuples on objects (this might be important for the functionality of certain custom objects). This is indicated by you starting your value with one of |c’|n, |c”|n, |c(|n, |c[|n or |c{ |n.

Once you have stored a Python primitive as noted above, you can include |c[<key>]|n in <attr> to reference nested values in e.g. a list or dict.

Remember that if you use Python primitives like this, you must write proper Python syntax too - notably you must include quotes around your strings or you will get an error.

_keyaliases = ('set',)
_matchset = {'set'}
aliases = []
check_attr(obj, attr_name)[source]

This may be overridden by subclasses in case restrictions need to be placed on what attributes can be set by who beyond the normal lock.

This functions is expected to display its own error message. It is run once for every attribute that is checked, blocking only those attributes which are not permitted and letting the others through.

check_obj(obj)[source]

This may be overridden by subclasses in case restrictions need to be placed on whether certain objects can have attributes set by certain accounts.

This function is expected to display its own error message.

Returning False will abort the command.

do_nested_lookup(value, *keys)[source]
edit_handler(obj, attr)[source]

Activate the line editor

func()[source]

Implement the set attribute - a limited form of py.

help_category = 'building'
key = 'set'
lock_storage = 'cmd:perm(set) or perm(Builder)'
locks = 'cmd:perm(set) or perm(Builder)'
nested_re = re.compile('\\[.*?\\]')
not_found = <object object>
rm_attr(obj, attr)[source]

Remove an attribute from the object, or a nested data structure, and report back.

search_for_obj(objname)[source]

Searches for an object matching objname. The object may be of different typeclasses. :param objname: Name of the object we’re looking for

Returns

A typeclassed object, or None if nothing is found.

search_index_entry = {'aliases': '', 'category': 'building', 'key': 'set', 'tags': '', 'text': '\n set attribute on an object or account\n\n Usage:\n set <obj>/<attr> = <value>\n set <obj>/<attr> =\n set <obj>/<attr>\n set *<account>/<attr> = <value>\n\n Switch:\n edit: Open the line editor (string values only)\n script: If we\'re trying to set an attribute on a script\n channel: If we\'re trying to set an attribute on a channel\n account: If we\'re trying to set an attribute on an account\n room: Setting an attribute on a room (global search)\n exit: Setting an attribute on an exit (global search)\n char: Setting an attribute on a character (global search)\n character: Alias for char, as above.\n\n Sets attributes on objects. The second example form above clears a\n previously set attribute while the third form inspects the current value of\n the attribute (if any). The last one (with the star) is a shortcut for\n operating on a player Account rather than an Object.\n\n The most common data to save with this command are strings and\n numbers. You can however also set Python primitives such as lists,\n dictionaries and tuples on objects (this might be important for\n the functionality of certain custom objects). This is indicated\n by you starting your value with one of |c\'|n, |c"|n, |c(|n, |c[|n\n or |c{ |n.\n\n Once you have stored a Python primitive as noted above, you can include\n |c[<key>]|n in <attr> to reference nested values in e.g. a list or dict.\n\n Remember that if you use Python primitives like this, you must\n write proper Python syntax too - notably you must include quotes\n around your strings or you will get an error.\n\n '}
set_attr(obj, attr, value)[source]
split_nested_attr(attr)[source]

Yields tuples of (possible attr name, nested keys on that attr). For performance, this is biased to the deepest match, but allows compatability with older attrs that might have been named with []’s.

> list(split_nested_attr(“nested[‘asdf’][0]”)) [

(‘nested’, [‘asdf’, 0]), (“nested[‘asdf’]”, [0]), (“nested[‘asdf’][0]”, []),

]

view_attr(obj, attr)[source]

Look up the value of an attribute and return a string displaying it.

class evennia.commands.default.building.CmdTypeclass(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

set or change an object’s typeclass

Usage:

typeclass[/switch] <object> [= typeclass.path] typeclass/prototype <object> = prototype_key

typeclass/list/show [typeclass.path] swap - this is a shorthand for using /force/reset flags. update - this is a shorthand for using the /force/reload flag.

Switch:
show, examine - display the current typeclass of object (default) or, if

given a typeclass path, show the docstring of that typeclass.

update - only re-run at_object_creation on this object

meaning locks or other properties set later may remain.

reset - clean out all the attributes and properties on the

object - basically making this a new clean object.

force - change to the typeclass also if the object

already has a typeclass of the same name.

list - show available typeclasses. Only typeclasses in modules actually

imported or used from somewhere in the code will show up here (those typeclasses are still available if you know the path)

prototype - clean and overwrite the object with the specified

prototype key - effectively making a whole new object.

Example

type button = examples.red_button.RedButton type/prototype button=a red button

If the typeclass_path is not given, the current object’s typeclass is assumed.

View or set an object’s typeclass. If setting, the creation hooks of the new typeclass will be run on the object. If you have clashing properties on the old class, use /reset. By default you are protected from changing to a typeclass of the same name as the one you already have - use /force to override this protection.

The given typeclass must be identified by its location using python dot-notation pointing to the correct module and class. If no typeclass is given (or a wrong typeclass is given). Errors in the path or new typeclass will lead to the old typeclass being kept. The location of the typeclass module is searched from the default typeclass directory, as defined in the server settings.

_keyaliases = ('swap', 'type', 'parent', 'typeclass', 'update')
_matchset = {'parent', 'swap', 'type', 'typeclass', 'update'}
aliases = ['parent', 'type', 'update', 'swap']
func()[source]

Implements command

help_category = 'building'
key = 'typeclass'
lock_storage = 'cmd:perm(typeclass) or perm(Builder)'
locks = 'cmd:perm(typeclass) or perm(Builder)'
search_index_entry = {'aliases': 'parent type update swap', 'category': 'building', 'key': 'typeclass', 'tags': '', 'text': "\n set or change an object's typeclass\n\n Usage:\n typeclass[/switch] <object> [= typeclass.path]\n typeclass/prototype <object> = prototype_key\n\n typeclass/list/show [typeclass.path]\n swap - this is a shorthand for using /force/reset flags.\n update - this is a shorthand for using the /force/reload flag.\n\n Switch:\n show, examine - display the current typeclass of object (default) or, if\n given a typeclass path, show the docstring of that typeclass.\n update - *only* re-run at_object_creation on this object\n meaning locks or other properties set later may remain.\n reset - clean out *all* the attributes and properties on the\n object - basically making this a new clean object.\n force - change to the typeclass also if the object\n already has a typeclass of the same name.\n list - show available typeclasses. Only typeclasses in modules actually\n imported or used from somewhere in the code will show up here\n (those typeclasses are still available if you know the path)\n prototype - clean and overwrite the object with the specified\n prototype key - effectively making a whole new object.\n\n Example:\n type button = examples.red_button.RedButton\n type/prototype button=a red button\n\n If the typeclass_path is not given, the current object's typeclass is\n assumed.\n\n View or set an object's typeclass. If setting, the creation hooks of the\n new typeclass will be run on the object. If you have clashing properties on\n the old class, use /reset. By default you are protected from changing to a\n typeclass of the same name as the one you already have - use /force to\n override this protection.\n\n The given typeclass must be identified by its location using python\n dot-notation pointing to the correct module and class. If no typeclass is\n given (or a wrong typeclass is given). Errors in the path or new typeclass\n will lead to the old typeclass being kept. The location of the typeclass\n module is searched from the default typeclass directory, as defined in the\n server settings.\n\n "}
switch_options = ('show', 'examine', 'update', 'reset', 'force', 'list', 'prototype')
class evennia.commands.default.building.CmdWipe(**kwargs)[source]

Bases: evennia.commands.default.building.ObjManipCommand

clear all attributes from an object

Usage:

wipe <object>[/<attr>[/<attr>…]]

Example

wipe box wipe box/colour

Wipes all of an object’s attributes, or optionally only those matching the given attribute-wildcard search string.

_keyaliases = ('wipe',)
_matchset = {'wipe'}
aliases = []
func()[source]

inp is the dict produced in ObjManipCommand.parse()

help_category = 'building'
key = 'wipe'
lock_storage = 'cmd:perm(wipe) or perm(Builder)'
locks = 'cmd:perm(wipe) or perm(Builder)'
search_index_entry = {'aliases': '', 'category': 'building', 'key': 'wipe', 'tags': '', 'text': "\n clear all attributes from an object\n\n Usage:\n wipe <object>[/<attr>[/<attr>...]]\n\n Example:\n wipe box\n wipe box/colour\n\n Wipes all of an object's attributes, or optionally only those\n matching the given attribute-wildcard search string.\n "}
class evennia.commands.default.building.CmdLock(**kwargs)[source]

Bases: evennia.commands.default.building.ObjManipCommand

assign a lock definition to an object

Usage:

lock <object or *account>[ = <lockstring>] or lock[/switch] <object or *account>/<access_type>

Switch:

del - delete given access type view - view lock associated with given access type (default)

If no lockstring is given, shows all locks on object.

Lockstring is of the form

access_type:[NOT] func1(args)[ AND|OR][ NOT] func2(args) …]

Where func1, func2 … valid lockfuncs with or without arguments. Separator expressions need not be capitalized.

For example:

‘get: id(25) or perm(Admin)’

The ‘get’ lock access_type is checked e.g. by the ‘get’ command. An object locked with this example lock will only be possible to pick up by Admins or by an object with id=25.

You can add several access_types after one another by separating them by ‘;’, i.e:

‘get:id(25); delete:perm(Builder)’

_keyaliases = ('locks', 'lock')
_matchset = {'lock', 'locks'}
aliases = ['locks']
func()[source]

Sets up the command

help_category = 'building'
key = 'lock'
lock_storage = 'cmd: perm(locks) or perm(Builder)'
locks = 'cmd: perm(locks) or perm(Builder)'
search_index_entry = {'aliases': 'locks', 'category': 'building', 'key': 'lock', 'tags': '', 'text': "\n assign a lock definition to an object\n\n Usage:\n lock <object or *account>[ = <lockstring>]\n or\n lock[/switch] <object or *account>/<access_type>\n\n Switch:\n del - delete given access type\n view - view lock associated with given access type (default)\n\n If no lockstring is given, shows all locks on\n object.\n\n Lockstring is of the form\n access_type:[NOT] func1(args)[ AND|OR][ NOT] func2(args) ...]\n Where func1, func2 ... valid lockfuncs with or without arguments.\n Separator expressions need not be capitalized.\n\n For example:\n 'get: id(25) or perm(Admin)'\n The 'get' lock access_type is checked e.g. by the 'get' command.\n An object locked with this example lock will only be possible to pick up\n by Admins or by an object with id=25.\n\n You can add several access_types after one another by separating\n them by ';', i.e:\n 'get:id(25); delete:perm(Builder)'\n "}
class evennia.commands.default.building.CmdExamine(**kwargs)[source]

Bases: evennia.commands.default.building.ObjManipCommand

get detailed information about an object

Usage:

examine [<object>[/attrname]] examine [*<account>[/attrname]]

Switch:

account - examine an Account (same as adding *) object - examine an Object (useful when OOC)

The examine command shows detailed game info about an object and optionally a specific attribute on it. If object is not specified, the current location is examined.

Append a * before the search string to examine an account.

_keyaliases = ('examine', 'exam', 'ex')
_matchset = {'ex', 'exam', 'examine'}
account_mode = False
aliases = ['exam', 'ex']
arg_regex = re.compile('(/\\w+?(\\s|$))|\\s|$', re.IGNORECASE)
format_attributes(obj, attrname=None, crop=True)[source]

Helper function that returns info about attributes and/or non-persistent data stored on object

format_output(obj, avail_cmdset)[source]

Helper function that creates a nice report about an object.

returns a string.

func()[source]

Process command

help_category = 'building'
key = 'examine'
list_attribute(crop, attr, category, value)[source]

Formats a single attribute line.

lock_storage = 'cmd:perm(examine) or perm(Builder)'
locks = 'cmd:perm(examine) or perm(Builder)'
search_index_entry = {'aliases': 'exam ex', 'category': 'building', 'key': 'examine', 'tags': '', 'text': '\n get detailed information about an object\n\n Usage:\n examine [<object>[/attrname]]\n examine [*<account>[/attrname]]\n\n Switch:\n account - examine an Account (same as adding *)\n object - examine an Object (useful when OOC)\n\n The examine command shows detailed game info about an\n object and optionally a specific attribute on it.\n If object is not specified, the current location is examined.\n\n Append a * before the search string to examine an account.\n\n '}
class evennia.commands.default.building.CmdFind(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

search the database for objects

Usage:

find[/switches] <name or dbref or *account> [= dbrefmin[-dbrefmax]] locate - this is a shorthand for using the /loc switch.

Switches:

room - only look for rooms (location=None) exit - only look for exits (destination!=None) char - only look for characters (BASE_CHARACTER_TYPECLASS) exact - only exact matches are returned. loc - display object location if exists and match has one result startswith - search for names starting with the string, rather than containing

Searches the database for an object of a particular name or exact #dbref. Use *accountname to search for an account. The switches allows for limiting object matches to certain game entities. Dbrefmin and dbrefmax limits matches to within the given dbrefs range, or above/below if only one is given.

_keyaliases = ('search', 'find', 'locate')
_matchset = {'find', 'locate', 'search'}
aliases = ['search', 'locate']
func()[source]

Search functionality

help_category = 'building'
key = 'find'
lock_storage = 'cmd:perm(find) or perm(Builder)'
locks = 'cmd:perm(find) or perm(Builder)'
search_index_entry = {'aliases': 'search locate', 'category': 'building', 'key': 'find', 'tags': '', 'text': '\n search the database for objects\n\n Usage:\n find[/switches] <name or dbref or *account> [= dbrefmin[-dbrefmax]]\n locate - this is a shorthand for using the /loc switch.\n\n Switches:\n room - only look for rooms (location=None)\n exit - only look for exits (destination!=None)\n char - only look for characters (BASE_CHARACTER_TYPECLASS)\n exact - only exact matches are returned.\n loc - display object location if exists and match has one result\n startswith - search for names starting with the string, rather than containing\n\n Searches the database for an object of a particular name or exact #dbref.\n Use *accountname to search for an account. The switches allows for\n limiting object matches to certain game entities. Dbrefmin and dbrefmax\n limits matches to within the given dbrefs range, or above/below if only\n one is given.\n '}
switch_options = ('room', 'exit', 'char', 'exact', 'loc', 'startswith')
class evennia.commands.default.building.CmdTeleport(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

teleport object to another location

Usage:

tel/switch [<object> to||=] <target location>

Examples

tel Limbo tel/quiet box = Limbo tel/tonone box

Switches:
quiet - don’t echo leave/arrive messages to the source/target

locations for the move.

intoexit - if target is an exit, teleport INTO

the exit object instead of to its destination

tonone - if set, teleport the object to a None-location. If this

switch is set, <target location> is ignored. Note that the only way to retrieve an object from a None location is by direct #dbref reference. A puppeted object cannot be moved to None.

loc - teleport object to the target’s location instead of its contents

Teleports an object somewhere. If no object is given, you yourself are teleported to the target location.

_keyaliases = ('teleport', 'tel')
_matchset = {'tel', 'teleport'}
aliases = ['teleport']
func()[source]

Performs the teleport

help_category = 'building'
key = 'tel'
lock_storage = 'cmd:perm(teleport) or perm(Builder)'
locks = 'cmd:perm(teleport) or perm(Builder)'
rhs_split = ('=', ' to ')
search_index_entry = {'aliases': 'teleport', 'category': 'building', 'key': 'tel', 'tags': '', 'text': "\n teleport object to another location\n\n Usage:\n tel/switch [<object> to||=] <target location>\n\n Examples:\n tel Limbo\n tel/quiet box = Limbo\n tel/tonone box\n\n Switches:\n quiet - don't echo leave/arrive messages to the source/target\n locations for the move.\n intoexit - if target is an exit, teleport INTO\n the exit object instead of to its destination\n tonone - if set, teleport the object to a None-location. If this\n switch is set, <target location> is ignored.\n Note that the only way to retrieve\n an object from a None location is by direct #dbref\n reference. A puppeted object cannot be moved to None.\n loc - teleport object to the target's location instead of its contents\n\n Teleports an object somewhere. If no object is given, you yourself are\n teleported to the target location.\n "}
switch_options = ('quiet', 'intoexit', 'tonone', 'loc')
class evennia.commands.default.building.CmdScript(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

attach a script to an object

Usage:

script[/switch] <obj> [= script_path or <scriptkey>]

Switches:

start - start all non-running scripts on object, or a given script only stop - stop all scripts on objects, or a given script only

If no script path/key is given, lists all scripts active on the given object. Script path can be given from the base location for scripts as given in settings. If adding a new script, it will be started automatically (no /start switch is needed). Using the /start or /stop switches on an object without specifying a script key/path will start/stop ALL scripts on the object.

_keyaliases = ('addscript', 'script')
_matchset = {'addscript', 'script'}
aliases = ['addscript']
func()[source]

Do stuff

help_category = 'building'
key = 'script'
lock_storage = 'cmd:perm(script) or perm(Builder)'
locks = 'cmd:perm(script) or perm(Builder)'
search_index_entry = {'aliases': 'addscript', 'category': 'building', 'key': 'script', 'tags': '', 'text': '\n attach a script to an object\n\n Usage:\n script[/switch] <obj> [= script_path or <scriptkey>]\n\n Switches:\n start - start all non-running scripts on object, or a given script only\n stop - stop all scripts on objects, or a given script only\n\n If no script path/key is given, lists all scripts active on the given\n object.\n Script path can be given from the base location for scripts as given in\n settings. If adding a new script, it will be started automatically\n (no /start switch is needed). Using the /start or /stop switches on an\n object without specifying a script key/path will start/stop ALL scripts on\n the object.\n '}
switch_options = ('start', 'stop')
class evennia.commands.default.building.CmdTag(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

handles the tags of an object

Usage:

tag[/del] <obj> [= <tag>[:<category>]] tag/search <tag>[:<category]

Switches:

search - return all objects with a given Tag del - remove the given tag. If no tag is specified,

clear all tags on object.

Manipulates and lists tags on objects. Tags allow for quick grouping of and searching for objects. If only <obj> is given, list all tags on the object. If /search is used, list objects with the given tag. The category can be used for grouping tags themselves, but it should be used with restrain - tags on their own are usually enough to for most grouping schemes.

_keyaliases = ('tag', 'tags')
_matchset = {'tag', 'tags'}
aliases = ['tags']
arg_regex = re.compile('(/\\w+?(\\s|$))|\\s|$', re.IGNORECASE)
func()[source]

Implement the tag functionality

help_category = 'building'
key = 'tag'
lock_storage = 'cmd:perm(tag) or perm(Builder)'
locks = 'cmd:perm(tag) or perm(Builder)'
options = ('search', 'del')
search_index_entry = {'aliases': 'tags', 'category': 'building', 'key': 'tag', 'tags': '', 'text': '\n handles the tags of an object\n\n Usage:\n tag[/del] <obj> [= <tag>[:<category>]]\n tag/search <tag>[:<category]\n\n Switches:\n search - return all objects with a given Tag\n del - remove the given tag. If no tag is specified,\n clear all tags on object.\n\n Manipulates and lists tags on objects. Tags allow for quick\n grouping of and searching for objects. If only <obj> is given,\n list all tags on the object. If /search is used, list objects\n with the given tag.\n The category can be used for grouping tags themselves, but it\n should be used with restrain - tags on their own are usually\n enough to for most grouping schemes.\n '}
class evennia.commands.default.building.CmdSpawn(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

spawn objects from prototype

Usage:

spawn[/noloc] <prototype_key> spawn[/noloc] <prototype_dict>

spawn/search [prototype_keykey][;tag[,tag]] spawn/list [tag, tag, …] spawn/show [<prototype_key>] spawn/update <prototype_key>

spawn/save <prototype_dict> spawn/edit [<prototype_key>] olc - equivalent to spawn/edit

Switches:
noloc - allow location to be None if not specified explicitly. Otherwise,

location will default to caller’s current location.

search - search prototype by name or tags. list - list available prototypes, optionally limit by tags. show, examine - inspect prototype by key. If not given, acts like list. raw - show the raw dict of the prototype as a one-line string for manual editing. save - save a prototype to the database. It will be listable by /list. delete - remove a prototype from database, if allowed to. update - find existing objects with the same prototype_key and update

them with latest version of given prototype. If given with /save, will auto-update all objects with the old version of the prototype without asking first.

edit, menu, olc - create/manipulate prototype in a menu interface.

Example

spawn GOBLIN spawn {“key”:”goblin”, “typeclass”:”monster.Monster”, “location”:”#2”} spawn/save {“key”: “grunt”, prototype: “goblin”};;mobs;edit:all()

Dictionary keys:
|wprototype_parent |n - name of parent prototype to use. Required if typeclass is

not set. Can be a path or a list for multiple inheritance (inherits left to right). If set one of the parents must have a typeclass.

|wtypeclass |n - string. Required if prototype_parent is not set. |wkey |n - string, the main object identifier |wlocation |n - this should be a valid object or #dbref |whome |n - valid object or #dbref |wdestination|n - only valid for exits (object or dbref) |wpermissions|n - string or list of permission strings |wlocks |n - a lock-string |waliases |n - string or list of strings. |wndb_|n<name> - value of a nattribute (ndb_ is stripped)

|wprototype_key|n - name of this prototype. Unique. Used to store/retrieve from db

and update existing prototyped objects if desired.

|wprototype_desc|n - desc of this prototype. Used in listings |wprototype_locks|n - locks of this prototype. Limits who may use prototype |wprototype_tags|n - tags of this prototype. Used to find prototype

any other keywords are interpreted as Attributes and their values.

The available prototypes are defined globally in modules set in settings.PROTOTYPE_MODULES. If spawn is used without arguments it displays a list of available prototypes.

_get_prototype_detail(query=None, prototypes=None)[source]

Display the detailed specs of one or more prototypes.

Parameters
  • query (str, optional) – If this is given and prototypes is not, search for the prototype(s) by this query. This may be a partial query which may lead to multiple matches, all being displayed.

  • prototypes (list, optional) – If given, ignore query and only show these prototype-details.

Returns

A formatted string of one or more prototype details.

If None, the caller was already informed of the error.

Return type

display (str, None)

_keyaliases = ('spawn', 'olc')
_list_prototypes(key=None, tags=None)[source]

Display prototypes as a list, optionally limited by key/tags.

_matchset = {'olc', 'spawn'}
_parse_key_desc_tags(argstring, desc=True)[source]

Parse ;-separated input list.

_parse_prototype(inp, expect=<class 'dict'>)[source]

Parse a prototype dict or key from the input and convert it safely into a dict if appropriate.

Parameters
  • inp (str) – The input from user.

  • expect (type, optional) –

Returns

The parsed prototype. If None, the error

was already reported.

Return type

prototype (dict, str or None)

_search_prototype(prototype_key, quiet=False)[source]

Search for prototype and handle no/multi-match and access.

Returns a single found prototype or None - in the case, the caller has already been informed of the search error we need not do any further action.

_update_existing_objects(**kwargs)
aliases = ['olc']
func()[source]

Implements the spawner

help_category = 'building'
key = 'spawn'
lock_storage = 'cmd:perm(spawn) or perm(Builder)'
locks = 'cmd:perm(spawn) or perm(Builder)'
search_index_entry = {'aliases': 'olc', 'category': 'building', 'key': 'spawn', 'tags': '', 'text': '\n spawn objects from prototype\n\n Usage:\n spawn[/noloc] <prototype_key>\n spawn[/noloc] <prototype_dict>\n\n spawn/search [prototype_keykey][;tag[,tag]]\n spawn/list [tag, tag, ...]\n spawn/show [<prototype_key>]\n spawn/update <prototype_key>\n\n spawn/save <prototype_dict>\n spawn/edit [<prototype_key>]\n olc - equivalent to spawn/edit\n\n Switches:\n noloc - allow location to be None if not specified explicitly. Otherwise,\n location will default to caller\'s current location.\n search - search prototype by name or tags.\n list - list available prototypes, optionally limit by tags.\n show, examine - inspect prototype by key. If not given, acts like list.\n raw - show the raw dict of the prototype as a one-line string for manual editing.\n save - save a prototype to the database. It will be listable by /list.\n delete - remove a prototype from database, if allowed to.\n update - find existing objects with the same prototype_key and update\n them with latest version of given prototype. If given with /save,\n will auto-update all objects with the old version of the prototype\n without asking first.\n edit, menu, olc - create/manipulate prototype in a menu interface.\n\n Example:\n spawn GOBLIN\n spawn {"key":"goblin", "typeclass":"monster.Monster", "location":"#2"}\n spawn/save {"key": "grunt", prototype: "goblin"};;mobs;edit:all()\n \x0c\n Dictionary keys:\n |wprototype_parent |n - name of parent prototype to use. Required if typeclass is\n not set. Can be a path or a list for multiple inheritance (inherits\n left to right). If set one of the parents must have a typeclass.\n |wtypeclass |n - string. Required if prototype_parent is not set.\n |wkey |n - string, the main object identifier\n |wlocation |n - this should be a valid object or #dbref\n |whome |n - valid object or #dbref\n |wdestination|n - only valid for exits (object or dbref)\n |wpermissions|n - string or list of permission strings\n |wlocks |n - a lock-string\n |waliases |n - string or list of strings.\n |wndb_|n<name> - value of a nattribute (ndb_ is stripped)\n\n |wprototype_key|n - name of this prototype. Unique. Used to store/retrieve from db\n and update existing prototyped objects if desired.\n |wprototype_desc|n - desc of this prototype. Used in listings\n |wprototype_locks|n - locks of this prototype. Limits who may use prototype\n |wprototype_tags|n - tags of this prototype. Used to find prototype\n\n any other keywords are interpreted as Attributes and their values.\n\n The available prototypes are defined globally in modules set in\n settings.PROTOTYPE_MODULES. If spawn is used without arguments it\n displays a list of available prototypes.\n\n '}
switch_options = ('noloc', 'search', 'list', 'show', 'raw', 'examine', 'save', 'delete', 'menu', 'olc', 'update', 'edit')

evennia.commands.default.cmdset_account module

This is the cmdset for Account (OOC) commands. These are stored on the Account object and should thus be able to handle getting an Account object as caller rather than a Character.

Note - in order for session-rerouting (in MULTISESSION_MODE=2) to function, all commands in this cmdset should use the self.msg() command method rather than caller.msg().

class evennia.commands.default.cmdset_account.AccountCmdSet(cmdsetobj=None, key=None)[source]

Bases: evennia.commands.cmdset.CmdSet

Implements the account command set.

at_cmdset_creation()[source]

Populates the cmdset

key = 'DefaultAccount'
path = 'evennia.commands.default.cmdset_account.AccountCmdSet'
priority = -10

evennia.commands.default.cmdset_character module

This module ties together all the commands default Character objects have available (i.e. IC commands). Note that some commands, such as communication-commands are instead put on the account level, in the Account cmdset. Account commands remain available also to Characters.

class evennia.commands.default.cmdset_character.CharacterCmdSet(cmdsetobj=None, key=None)[source]

Bases: evennia.commands.cmdset.CmdSet

Implements the default command set.

at_cmdset_creation()[source]

Populates the cmdset

key = 'DefaultCharacter'
path = 'evennia.commands.default.cmdset_character.CharacterCmdSet'
priority = 0

evennia.commands.default.cmdset_session module

This module stores session-level commands.

class evennia.commands.default.cmdset_session.SessionCmdSet(cmdsetobj=None, key=None)[source]

Bases: evennia.commands.cmdset.CmdSet

Sets up the unlogged cmdset.

at_cmdset_creation()[source]

Populate the cmdset

key = 'DefaultSession'
path = 'evennia.commands.default.cmdset_session.SessionCmdSet'
priority = -20

evennia.commands.default.cmdset_unloggedin module

This module describes the unlogged state of the default game. The setting STATE_UNLOGGED should be set to the python path of the state instance in this module.

class evennia.commands.default.cmdset_unloggedin.UnloggedinCmdSet(cmdsetobj=None, key=None)[source]

Bases: evennia.commands.cmdset.CmdSet

Sets up the unlogged cmdset.

at_cmdset_creation()[source]

Populate the cmdset

key = 'DefaultUnloggedin'
path = 'evennia.commands.default.cmdset_unloggedin.UnloggedinCmdSet'
priority = 0

evennia.commands.default.comms module

Comsystem command module.

Comm commands are OOC commands and intended to be made available to the Account at all times (they go into the AccountCmdSet). So we make sure to homogenize self.caller to always be the account object for easy handling.

class evennia.commands.default.comms.CmdAddCom(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

add a channel alias and/or subscribe to a channel

Usage:

addcom [alias=] <channel>

Joins a given channel. If alias is given, this will allow you to refer to the channel by this alias rather than the full channel name. Subsequent calls of this command can be used to add multiple aliases to an already joined channel.

_keyaliases = ('aliaschan', 'addcom', 'chanalias')
_matchset = {'addcom', 'aliaschan', 'chanalias'}
account_caller = True
aliases = ['aliaschan', 'chanalias']
func()[source]

Implement the command

help_category = 'comms'
key = 'addcom'
lock_storage = 'cmd:not pperm(channel_banned)'
locks = 'cmd:not pperm(channel_banned)'
search_index_entry = {'aliases': 'aliaschan chanalias', 'category': 'comms', 'key': 'addcom', 'tags': '', 'text': '\n add a channel alias and/or subscribe to a channel\n\n Usage:\n addcom [alias=] <channel>\n\n Joins a given channel. If alias is given, this will allow you to\n refer to the channel by this alias rather than the full channel\n name. Subsequent calls of this command can be used to add multiple\n aliases to an already joined channel.\n '}
class evennia.commands.default.comms.CmdDelCom(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

remove a channel alias and/or unsubscribe from channel

Usage:

delcom <alias or channel> delcom/all <channel>

If the full channel name is given, unsubscribe from the channel. If an alias is given, remove the alias but don’t unsubscribe. If the ‘all’ switch is used, remove all aliases for that channel.

_keyaliases = ('delchanalias', 'delcom', 'delaliaschan')
_matchset = {'delaliaschan', 'delchanalias', 'delcom'}
account_caller = True
aliases = ['delchanalias', 'delaliaschan']
func()[source]

Implementing the command.

help_category = 'comms'
key = 'delcom'
lock_storage = 'cmd:not perm(channel_banned)'
locks = 'cmd:not perm(channel_banned)'
search_index_entry = {'aliases': 'delchanalias delaliaschan', 'category': 'comms', 'key': 'delcom', 'tags': '', 'text': "\n remove a channel alias and/or unsubscribe from channel\n\n Usage:\n delcom <alias or channel>\n delcom/all <channel>\n\n If the full channel name is given, unsubscribe from the\n channel. If an alias is given, remove the alias but don't\n unsubscribe. If the 'all' switch is used, remove all aliases\n for that channel.\n "}
class evennia.commands.default.comms.CmdAllCom(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

perform admin operations on all channels

Usage:

allcom [on | off | who | destroy]

Allows the user to universally turn off or on all channels they are on, as well as perform a ‘who’ for all channels they are on. Destroy deletes all channels that you control.

Without argument, works like comlist.

_keyaliases = ('allcom',)
_matchset = {'allcom'}
account_caller = True
aliases = []
func()[source]

Runs the function

help_category = 'comms'
key = 'allcom'
lock_storage = 'cmd: not pperm(channel_banned)'
locks = 'cmd: not pperm(channel_banned)'
search_index_entry = {'aliases': '', 'category': 'comms', 'key': 'allcom', 'tags': '', 'text': "\n perform admin operations on all channels\n\n Usage:\n allcom [on | off | who | destroy]\n\n Allows the user to universally turn off or on all channels they are on, as\n well as perform a 'who' for all channels they are on. Destroy deletes all\n channels that you control.\n\n Without argument, works like comlist.\n "}
class evennia.commands.default.comms.CmdChannels(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

list all channels available to you

Usage:

channels clist comlist

Lists all channels available to you, whether you listen to them or not. Use ‘comlist’ to only view your current channel subscriptions. Use addcom/delcom to join and leave channels

_keyaliases = ('channels', 'clist', 'all channels', 'comlist', 'channellist', 'chanlist')
_matchset = {'all channels', 'chanlist', 'channellist', 'channels', 'clist', 'comlist'}
account_caller = True
aliases = ['clist', 'all channels', 'comlist', 'channellist', 'chanlist']
func()[source]

Implement function

help_category = 'comms'
key = 'channels'
lock_storage = 'cmd: not pperm(channel_banned)'
locks = 'cmd: not pperm(channel_banned)'
search_index_entry = {'aliases': 'clist all channels comlist channellist chanlist', 'category': 'comms', 'key': 'channels', 'tags': '', 'text': "\n list all channels available to you\n\n Usage:\n channels\n clist\n comlist\n\n Lists all channels available to you, whether you listen to them or not.\n Use 'comlist' to only view your current channel subscriptions.\n Use addcom/delcom to join and leave channels\n "}
class evennia.commands.default.comms.CmdCdestroy(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

destroy a channel you created

Usage:

cdestroy <channel>

Destroys a channel that you control.

_keyaliases = ('cdestroy',)
_matchset = {'cdestroy'}
account_caller = True
aliases = []
func()[source]

Destroy objects cleanly.

help_category = 'comms'
key = 'cdestroy'
lock_storage = 'cmd: not pperm(channel_banned)'
locks = 'cmd: not pperm(channel_banned)'
search_index_entry = {'aliases': '', 'category': 'comms', 'key': 'cdestroy', 'tags': '', 'text': '\n destroy a channel you created\n\n Usage:\n cdestroy <channel>\n\n Destroys a channel that you control.\n '}
class evennia.commands.default.comms.CmdCBoot(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

kick an account from a channel you control

Usage:

cboot[/quiet] <channel> = <account> [:reason]

Switch:

quiet - don’t notify the channel

Kicks an account or object from a channel you control.

_keyaliases = ('cboot',)
_matchset = {'cboot'}
account_caller = True
aliases = []
func()[source]

implement the function

help_category = 'comms'
key = 'cboot'
lock_storage = 'cmd: not pperm(channel_banned)'
locks = 'cmd: not pperm(channel_banned)'
search_index_entry = {'aliases': '', 'category': 'comms', 'key': 'cboot', 'tags': '', 'text': "\n kick an account from a channel you control\n\n Usage:\n cboot[/quiet] <channel> = <account> [:reason]\n\n Switch:\n quiet - don't notify the channel\n\n Kicks an account or object from a channel you control.\n\n "}
switch_options = ('quiet',)
class evennia.commands.default.comms.CmdCemit(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

send an admin message to a channel you control

Usage:

cemit[/switches] <channel> = <message>

Switches:

sendername - attach the sender’s name before the message quiet - don’t echo the message back to sender

Allows the user to broadcast a message over a channel as long as they control it. It does not show the user’s name unless they provide the /sendername switch.

_keyaliases = ('cmsg', 'cemit')
_matchset = {'cemit', 'cmsg'}
account_caller = True
aliases = ['cmsg']
func()[source]

Implement function

help_category = 'comms'
key = 'cemit'
lock_storage = 'cmd: not pperm(channel_banned) and pperm(Player)'
locks = 'cmd: not pperm(channel_banned) and pperm(Player)'
search_index_entry = {'aliases': 'cmsg', 'category': 'comms', 'key': 'cemit', 'tags': '', 'text': "\n send an admin message to a channel you control\n\n Usage:\n cemit[/switches] <channel> = <message>\n\n Switches:\n sendername - attach the sender's name before the message\n quiet - don't echo the message back to sender\n\n Allows the user to broadcast a message over a channel as long as\n they control it. It does not show the user's name unless they\n provide the /sendername switch.\n\n "}
switch_options = ('sendername', 'quiet')
class evennia.commands.default.comms.CmdCWho(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

show who is listening to a channel

Usage:

cwho <channel>

List who is connected to a given channel you have access to.

_keyaliases = ('cwho',)
_matchset = {'cwho'}
account_caller = True
aliases = []
func()[source]

implement function

help_category = 'comms'
key = 'cwho'
lock_storage = 'cmd: not pperm(channel_banned)'
locks = 'cmd: not pperm(channel_banned)'
search_index_entry = {'aliases': '', 'category': 'comms', 'key': 'cwho', 'tags': '', 'text': '\n show who is listening to a channel\n\n Usage:\n cwho <channel>\n\n List who is connected to a given channel you have access to.\n '}
class evennia.commands.default.comms.CmdChannelCreate(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

create a new channel

Usage:

ccreate <new channel>[;alias;alias…] = description

Creates a new channel owned by you.

_keyaliases = ('channelcreate', 'ccreate')
_matchset = {'ccreate', 'channelcreate'}
account_caller = True
aliases = ['channelcreate']
func()[source]

Implement the command

help_category = 'comms'
key = 'ccreate'
lock_storage = 'cmd:not pperm(channel_banned) and pperm(Player)'
locks = 'cmd:not pperm(channel_banned) and pperm(Player)'
search_index_entry = {'aliases': 'channelcreate', 'category': 'comms', 'key': 'ccreate', 'tags': '', 'text': '\n create a new channel\n\n Usage:\n ccreate <new channel>[;alias;alias...] = description\n\n Creates a new channel owned by you.\n '}
class evennia.commands.default.comms.CmdClock(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

change channel locks of a channel you control

Usage:

clock <channel> [= <lockstring>]

Changes the lock access restrictions of a channel. If no lockstring was given, view the current lock definitions.

_keyaliases = ('clock',)
_matchset = {'clock'}
account_caller = True
aliases = []
func()[source]

run the function

help_category = 'comms'
key = 'clock'
lock_storage = 'cmd:not pperm(channel_banned)'
locks = 'cmd:not pperm(channel_banned)'
search_index_entry = {'aliases': '', 'category': 'comms', 'key': 'clock', 'tags': '', 'text': '\n change channel locks of a channel you control\n\n Usage:\n clock <channel> [= <lockstring>]\n\n Changes the lock access restrictions of a channel. If no\n lockstring was given, view the current lock definitions.\n '}
class evennia.commands.default.comms.CmdCdesc(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

describe a channel you control

Usage:

cdesc <channel> = <description>

Changes the description of the channel as shown in channel lists.

_keyaliases = ('cdesc',)
_matchset = {'cdesc'}
account_caller = True
aliases = []
func()[source]

Implement command

help_category = 'comms'
key = 'cdesc'
lock_storage = 'cmd:not pperm(channel_banned)'
locks = 'cmd:not pperm(channel_banned)'
search_index_entry = {'aliases': '', 'category': 'comms', 'key': 'cdesc', 'tags': '', 'text': '\n describe a channel you control\n\n Usage:\n cdesc <channel> = <description>\n\n Changes the description of the channel as shown in\n channel lists.\n '}
class evennia.commands.default.comms.CmdPage(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

send a private message to another account

Usage:

page[/switches] [<account>,<account>,… = <message>] tell ‘’ page <number>

Switch:

last - shows who you last messaged list - show your last <number> of tells/pages (default)

Send a message to target user (if online). If no argument is given, you will get a list of your latest messages.

_keyaliases = ('page', 'tell')
_matchset = {'page', 'tell'}
account_caller = True
aliases = ['tell']
func()[source]

Implement function using the Msg methods

help_category = 'comms'
key = 'page'
lock_storage = 'cmd:not pperm(page_banned)'
locks = 'cmd:not pperm(page_banned)'
search_index_entry = {'aliases': 'tell', 'category': 'comms', 'key': 'page', 'tags': '', 'text': "\n send a private message to another account\n\n Usage:\n page[/switches] [<account>,<account>,... = <message>]\n tell ''\n page <number>\n\n Switch:\n last - shows who you last messaged\n list - show your last <number> of tells/pages (default)\n\n Send a message to target user (if online). If no\n argument is given, you will get a list of your latest messages.\n "}
switch_options = ('last', 'list')
class evennia.commands.default.comms.CmdIRC2Chan(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

Link an evennia channel to an external IRC channel

Usage:

irc2chan[/switches] <evennia_channel> = <ircnetwork> <port> <#irchannel> <botname>[:typeclass] irc2chan/delete botname|#dbid

Switches:
/delete
  • this will delete the bot and remove the irc connection

to the channel. Requires the botname or #dbid as input.

/remove
  • alias to /delete

/disconnect - alias to /delete /list - show all irc<->evennia mappings /ssl - use an SSL-encrypted connection

Example

irc2chan myircchan = irc.dalnet.net 6667 #mychannel evennia-bot irc2chan public = irc.freenode.net 6667 #evgaming #evbot:accounts.mybot.MyBot

This creates an IRC bot that connects to a given IRC network and channel. If a custom typeclass path is given, this will be used instead of the default bot class. The bot will relay everything said in the evennia channel to the IRC channel and vice versa. The bot will automatically connect at server start, so this command need only be given once. The /disconnect switch will permanently delete the bot. To only temporarily deactivate it, use the |wservices|n command instead. Provide an optional bot class path to use a custom bot.

_keyaliases = ('irc2chan',)
_matchset = {'irc2chan'}
aliases = []
func()[source]

Setup the irc-channel mapping

help_category = 'comms'
key = 'irc2chan'
lock_storage = 'cmd:serversetting(IRC_ENABLED) and pperm(Developer)'
locks = 'cmd:serversetting(IRC_ENABLED) and pperm(Developer)'
search_index_entry = {'aliases': '', 'category': 'comms', 'key': 'irc2chan', 'tags': '', 'text': '\n Link an evennia channel to an external IRC channel\n\n Usage:\n irc2chan[/switches] <evennia_channel> = <ircnetwork> <port> <#irchannel> <botname>[:typeclass]\n irc2chan/delete botname|#dbid\n\n Switches:\n /delete - this will delete the bot and remove the irc connection\n to the channel. Requires the botname or #dbid as input.\n /remove - alias to /delete\n /disconnect - alias to /delete\n /list - show all irc<->evennia mappings\n /ssl - use an SSL-encrypted connection\n\n Example:\n irc2chan myircchan = irc.dalnet.net 6667 #mychannel evennia-bot\n irc2chan public = irc.freenode.net 6667 #evgaming #evbot:accounts.mybot.MyBot\n\n This creates an IRC bot that connects to a given IRC network and\n channel. If a custom typeclass path is given, this will be used\n instead of the default bot class.\n The bot will relay everything said in the evennia channel to the\n IRC channel and vice versa. The bot will automatically connect at\n server start, so this command need only be given once. The\n /disconnect switch will permanently delete the bot. To only\n temporarily deactivate it, use the |wservices|n command instead.\n Provide an optional bot class path to use a custom bot.\n '}
switch_options = ('delete', 'remove', 'disconnect', 'list', 'ssl')
class evennia.commands.default.comms.CmdRSS2Chan(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

link an evennia channel to an external RSS feed

Usage:

rss2chan[/switches] <evennia_channel> = <rss_url>

Switches:
/disconnect - this will stop the feed and remove the connection to the

channel.

/remove
/list
  • show all rss->evennia mappings

Example

rss2chan rsschan = http://code.google.com/feeds/p/evennia/updates/basic

This creates an RSS reader that connects to a given RSS feed url. Updates will be echoed as a title and news link to the given channel. The rate of updating is set with the RSS_UPDATE_INTERVAL variable in settings (default is every 10 minutes).

When disconnecting you need to supply both the channel and url again so as to identify the connection uniquely.

_keyaliases = ('rss2chan',)
_matchset = {'rss2chan'}
aliases = []
func()[source]

Setup the rss-channel mapping

help_category = 'comms'
key = 'rss2chan'
lock_storage = 'cmd:serversetting(RSS_ENABLED) and pperm(Developer)'
locks = 'cmd:serversetting(RSS_ENABLED) and pperm(Developer)'
search_index_entry = {'aliases': '', 'category': 'comms', 'key': 'rss2chan', 'tags': '', 'text': '\n link an evennia channel to an external RSS feed\n\n Usage:\n rss2chan[/switches] <evennia_channel> = <rss_url>\n\n Switches:\n /disconnect - this will stop the feed and remove the connection to the\n channel.\n /remove - "\n /list - show all rss->evennia mappings\n\n Example:\n rss2chan rsschan = http://code.google.com/feeds/p/evennia/updates/basic\n\n This creates an RSS reader that connects to a given RSS feed url. Updates\n will be echoed as a title and news link to the given channel. The rate of\n updating is set with the RSS_UPDATE_INTERVAL variable in settings (default\n is every 10 minutes).\n\n When disconnecting you need to supply both the channel and url again so as\n to identify the connection uniquely.\n '}
switch_options = ('disconnect', 'remove', 'list')

evennia.commands.default.general module

General Character commands usually available to all characters

class evennia.commands.default.general.CmdHome(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

move to your character’s home location

Usage:

home

Teleports you to your home location.

_keyaliases = ('home',)
_matchset = {'home'}
aliases = []
arg_regex = re.compile('$', re.IGNORECASE)
func()[source]

Implement the command

help_category = 'general'
key = 'home'
lock_storage = 'cmd:perm(home) or perm(Builder)'
locks = 'cmd:perm(home) or perm(Builder)'
search_index_entry = {'aliases': '', 'category': 'general', 'key': 'home', 'tags': '', 'text': "\n move to your character's home location\n\n Usage:\n home\n\n Teleports you to your home location.\n "}
class evennia.commands.default.general.CmdLook(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

look at location or object

Usage:

look look <obj> look *<account>

Observes your location or objects in your vicinity.

_keyaliases = ('look', 'l', 'ls')
_matchset = {'l', 'look', 'ls'}
aliases = ['l', 'ls']
arg_regex = re.compile('\\s|$', re.IGNORECASE)
func()[source]

Handle the looking.

help_category = 'general'
key = 'look'
lock_storage = 'cmd:all()'
locks = 'cmd:all()'
search_index_entry = {'aliases': 'l ls', 'category': 'general', 'key': 'look', 'tags': '', 'text': '\n look at location or object\n\n Usage:\n look\n look <obj>\n look *<account>\n\n Observes your location or objects in your vicinity.\n '}
class evennia.commands.default.general.CmdNick(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

define a personal alias/nick by defining a string to match and replace it with another on the fly

Usage:

nick[/switches] <string> [= [replacement_string]] nick[/switches] <template> = <replacement_template> nick/delete <string> or number nicks

Switches:

inputline - replace on the inputline (default) object - replace on object-lookup account - replace on account-lookup list - show all defined aliases (also “nicks” works) delete - remove nick by index in /list clearall - clear all nicks

Examples

nick hi = say Hello, I’m Sarah! nick/object tom = the tall man nick build $1 $2 = create/drop $1;$2 nick tell $1 $2=page $1=$2 nick tm?$1=page tallman=$1 nick tm=$1=page tallman=$1

A ‘nick’ is a personal string replacement. Use $1, $2, … to catch arguments. Put the last $-marker without an ending space to catch all remaining text. You can also use unix-glob matching for the left-hand side <string>:

    • matches everything

? - matches 0 or 1 single characters [abcd] - matches these chars in any order [!abcd] - matches everything not among these chars = - escape literal ‘=’ you want in your <string>

Note that no objects are actually renamed or changed by this command - your nicks are only available to you. If you want to permanently add keywords to an object for everyone to use, you need build privileges and the alias command.

_keyaliases = ('nickname', 'nick', 'nicks')
_matchset = {'nick', 'nickname', 'nicks'}
aliases = ['nickname', 'nicks']
func()[source]

Create the nickname

help_category = 'general'
key = 'nick'
lock_storage = 'cmd:all()'
locks = 'cmd:all()'
parse()[source]

Support escaping of = with =

search_index_entry = {'aliases': 'nickname nicks', 'category': 'general', 'key': 'nick', 'tags': '', 'text': '\n define a personal alias/nick by defining a string to\n match and replace it with another on the fly\n\n Usage:\n nick[/switches] <string> [= [replacement_string]]\n nick[/switches] <template> = <replacement_template>\n nick/delete <string> or number\n nicks\n\n Switches:\n inputline - replace on the inputline (default)\n object - replace on object-lookup\n account - replace on account-lookup\n list - show all defined aliases (also "nicks" works)\n delete - remove nick by index in /list\n clearall - clear all nicks\n\n Examples:\n nick hi = say Hello, I\'m Sarah!\n nick/object tom = the tall man\n nick build $1 $2 = create/drop $1;$2\n nick tell $1 $2=page $1=$2\n nick tm?$1=page tallman=$1\n nick tm\\=$1=page tallman=$1\n\n A \'nick\' is a personal string replacement. Use $1, $2, ... to catch arguments.\n Put the last $-marker without an ending space to catch all remaining text. You\n can also use unix-glob matching for the left-hand side <string>:\n\n * - matches everything\n ? - matches 0 or 1 single characters\n [abcd] - matches these chars in any order\n [!abcd] - matches everything not among these chars\n \\= - escape literal \'=\' you want in your <string>\n\n Note that no objects are actually renamed or changed by this command - your nicks\n are only available to you. If you want to permanently add keywords to an object\n for everyone to use, you need build privileges and the alias command.\n\n '}
switch_options = ('inputline', 'object', 'account', 'list', 'delete', 'clearall')
class evennia.commands.default.general.CmdInventory(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

view inventory

Usage:

inventory inv

Shows your inventory.

_keyaliases = ('inv', 'i', 'inventory')
_matchset = {'i', 'inv', 'inventory'}
aliases = ['inv', 'i']
arg_regex = re.compile('$', re.IGNORECASE)
func()[source]

check inventory

help_category = 'general'
key = 'inventory'
lock_storage = 'cmd:all()'
locks = 'cmd:all()'
search_index_entry = {'aliases': 'inv i', 'category': 'general', 'key': 'inventory', 'tags': '', 'text': '\n view inventory\n\n Usage:\n inventory\n inv\n\n Shows your inventory.\n '}
class evennia.commands.default.general.CmdSetDesc(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

describe yourself

Usage:

setdesc <description>

Add a description to yourself. This will be visible to people when they look at you.

_keyaliases = ('setdesc',)
_matchset = {'setdesc'}
aliases = []
arg_regex = re.compile('\\s|$', re.IGNORECASE)
func()[source]

add the description

help_category = 'general'
key = 'setdesc'
lock_storage = 'cmd:all()'
locks = 'cmd:all()'
search_index_entry = {'aliases': '', 'category': 'general', 'key': 'setdesc', 'tags': '', 'text': '\n describe yourself\n\n Usage:\n setdesc <description>\n\n Add a description to yourself. This\n will be visible to people when they\n look at you.\n '}
class evennia.commands.default.general.CmdGet(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

pick up something

Usage:

get <obj>

Picks up an object from your location and puts it in your inventory.

_keyaliases = ('get', 'grab')
_matchset = {'get', 'grab'}
aliases = ['grab']
arg_regex = re.compile('\\s|$', re.IGNORECASE)
func()[source]

implements the command.

help_category = 'general'
key = 'get'
lock_storage = 'cmd:all()'
locks = 'cmd:all()'
search_index_entry = {'aliases': 'grab', 'category': 'general', 'key': 'get', 'tags': '', 'text': '\n pick up something\n\n Usage:\n get <obj>\n\n Picks up an object from your location and puts it in\n your inventory.\n '}
class evennia.commands.default.general.CmdDrop(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

drop something

Usage:

drop <obj>

Lets you drop an object from your inventory into the location you are currently in.

_keyaliases = ('drop',)
_matchset = {'drop'}
aliases = []
arg_regex = re.compile('\\s|$', re.IGNORECASE)
func()[source]

Implement command

help_category = 'general'
key = 'drop'
lock_storage = 'cmd:all()'
locks = 'cmd:all()'
search_index_entry = {'aliases': '', 'category': 'general', 'key': 'drop', 'tags': '', 'text': '\n drop something\n\n Usage:\n drop <obj>\n\n Lets you drop an object from your inventory into the\n location you are currently in.\n '}
class evennia.commands.default.general.CmdGive(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

give away something to someone

Usage:

give <inventory obj> <to||=> <target>

Gives an items from your inventory to another character, placing it in their inventory.

_keyaliases = ('give',)
_matchset = {'give'}
aliases = []
arg_regex = re.compile('\\s|$', re.IGNORECASE)
func()[source]

Implement give

help_category = 'general'
key = 'give'
lock_storage = 'cmd:all()'
locks = 'cmd:all()'
rhs_split = ('=', ' to ')
search_index_entry = {'aliases': '', 'category': 'general', 'key': 'give', 'tags': '', 'text': '\n give away something to someone\n\n Usage:\n give <inventory obj> <to||=> <target>\n\n Gives an items from your inventory to another character,\n placing it in their inventory.\n '}
class evennia.commands.default.general.CmdSay(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

speak as your character

Usage:

say <message>

Talk to those in your current location.

_keyaliases = ('say', '"', "'")
_matchset = {'"', "'", 'say'}
aliases = ['"', "'"]
func()[source]

Run the say command

help_category = 'general'
key = 'say'
lock_storage = 'cmd:all()'
locks = 'cmd:all()'
search_index_entry = {'aliases': '" \'', 'category': 'general', 'key': 'say', 'tags': '', 'text': '\n speak as your character\n\n Usage:\n say <message>\n\n Talk to those in your current location.\n '}
class evennia.commands.default.general.CmdWhisper(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

Speak privately as your character to another

Usage:

whisper <character> = <message> whisper <char1>, <char2> = <message>

Talk privately to one or more characters in your current location, without others in the room being informed.

_keyaliases = ('whisper',)
_matchset = {'whisper'}
aliases = []
func()[source]

Run the whisper command

help_category = 'general'
key = 'whisper'
lock_storage = 'cmd:all()'
locks = 'cmd:all()'
search_index_entry = {'aliases': '', 'category': 'general', 'key': 'whisper', 'tags': '', 'text': '\n Speak privately as your character to another\n\n Usage:\n whisper <character> = <message>\n whisper <char1>, <char2> = <message>\n\n Talk privately to one or more characters in your current location, without\n others in the room being informed.\n '}
class evennia.commands.default.general.CmdPose(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

strike a pose

Usage:

pose <pose text> pose’s <pose text>

Example

pose is standing by the wall, smiling.

-> others will see:

Tom is standing by the wall, smiling.

Describe an action being taken. The pose text will automatically begin with your name.

_keyaliases = ('pose', ':', 'emote')
_matchset = {':', 'emote', 'pose'}
aliases = [':', 'emote']
func()[source]

Hook function

help_category = 'general'
key = 'pose'
lock_storage = 'cmd:all()'
locks = 'cmd:all()'
parse()[source]

Custom parse the cases where the emote starts with some special letter, such as ‘s, at which we don’t want to separate the caller’s name and the emote with a space.

search_index_entry = {'aliases': ': emote', 'category': 'general', 'key': 'pose', 'tags': '', 'text': "\n strike a pose\n\n Usage:\n pose <pose text>\n pose's <pose text>\n\n Example:\n pose is standing by the wall, smiling.\n -> others will see:\n Tom is standing by the wall, smiling.\n\n Describe an action being taken. The pose text will\n automatically begin with your name.\n "}
class evennia.commands.default.general.CmdAccess(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

show your current game access

Usage:

access

This command shows you the permission hierarchy and which permission groups you are a member of.

_keyaliases = ('access', 'groups', 'hierarchy')
_matchset = {'access', 'groups', 'hierarchy'}
aliases = ['groups', 'hierarchy']
arg_regex = re.compile('$', re.IGNORECASE)
func()[source]

Load the permission groups

help_category = 'general'
key = 'access'
lock_storage = 'cmd:all()'
locks = 'cmd:all()'
search_index_entry = {'aliases': 'groups hierarchy', 'category': 'general', 'key': 'access', 'tags': '', 'text': '\n show your current game access\n\n Usage:\n access\n\n This command shows you the permission hierarchy and\n which permission groups you are a member of.\n '}

evennia.commands.default.help module

The help command. The basic idea is that help texts for commands are best written by those that write the commands - the admins. So command-help is all auto-loaded and searched from the current command set. The normal, database-tied help system is used for collaborative creation of other help topics such as RP help or game-world aides.

class evennia.commands.default.help.CmdHelp(**kwargs)[source]

Bases: evennia.commands.command.Command

View help or a list of topics

Usage:

help <topic or command> help list help all

This will search for help on commands and other topics related to the game.

_keyaliases = ('help', '?')
_matchset = {'?', 'help'}
aliases = ['?']
arg_regex = re.compile('\\s|$', re.IGNORECASE)
check_show_help(cmd, caller)[source]

Helper method. If this return True, the given cmd auto-help will be viewable in the help listing. Override this to easily select what is shown to the account. Note that only commands available in the caller’s merged cmdset are available.

Parameters
  • cmd (Command) – Command class from the merged cmdset

  • caller (Character, Account or Session) – The current caller executing the help command.

static format_help_entry(title, help_text, aliases=None, suggested=None)[source]

This visually formats the help entry. This method can be overriden to customize the way a help entry is displayed.

Parameters
  • title (str) – the title of the help entry.

  • help_text (str) – the text of the help entry.

  • aliases (list of str or None) – the list of aliases.

  • suggested (list of str or None) – suggested reading.

Returns the formatted string, ready to be sent.

format_help_list(hdict_cmds, hdict_db)[source]

Output a category-ordered list. The input are the pre-loaded help files for commands and database-helpfiles respectively. You can override this method to return a custom display of the list of commands and topics.

func()[source]

Run the dynamic help entry creator.

help_category = 'general'
help_more = True
key = 'help'
lock_storage = 'cmd:all()'
locks = 'cmd:all()'
msg_help(text)[source]

messages text to the caller, adding an extra oob argument to indicate that this is a help command result and could be rendered in a separate help window

parse()[source]

input is a string containing the command or topic to match.

return_cmdset = True
search_index_entry = {'aliases': '?', 'category': 'general', 'key': 'help', 'tags': '', 'text': '\n View help or a list of topics\n\n Usage:\n help <topic or command>\n help list\n help all\n\n This will search for help on commands and other\n topics related to the game.\n '}
should_list_cmd(cmd, caller)[source]

Should the specified command appear in the help table?

This method only checks whether a specified command should appear in the table of topics/commands. The command can be used by the caller (see the ‘check_show_help’ method) and the command will still be available, for instance, if a character type ‘help name of the command’. However, if you return False, the specified command will not appear in the table. This is sometimes useful to “hide” commands in the table, but still access them through the help system.

Parameters
  • cmd – the command to be tested.

  • caller – the caller of the help system.

Returns

the command should appear in the table. False: the command shouldn’t appear in the table.

Return type

True

suggestion_cutoff = 0.6
suggestion_maxnum = 5
class evennia.commands.default.help.CmdSetHelp(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

Edit the help database.

Usage:

help[/switches] <topic>[[;alias;alias][,category[,locks]] [= <text>]

Switches:

edit - open a line editor to edit the topic’s help text. replace - overwrite existing help topic. append - add text to the end of existing topic with a newline between. extend - as append, but don’t add a newline. delete - remove help topic.

Examples

sethelp throw = This throws something at … sethelp/append pickpocketing,Thievery = This steals … sethelp/replace pickpocketing, ,attr(is_thief) = This steals … sethelp/edit thievery

This command manipulates the help database. A help entry can be created, appended/merged to and deleted. If you don’t assign a category, the “General” category will be used. If no lockstring is specified, default is to let everyone read the help file.

_keyaliases = ('sethelp',)
_matchset = {'sethelp'}
aliases = []
func()[source]

Implement the function

help_category = 'building'
key = 'sethelp'
lock_storage = 'cmd:perm(Helper)'
locks = 'cmd:perm(Helper)'
search_index_entry = {'aliases': '', 'category': 'building', 'key': 'sethelp', 'tags': '', 'text': '\n Edit the help database.\n\n Usage:\n help[/switches] <topic>[[;alias;alias][,category[,locks]] [= <text>]\n\n Switches:\n edit - open a line editor to edit the topic\'s help text.\n replace - overwrite existing help topic.\n append - add text to the end of existing topic with a newline between.\n extend - as append, but don\'t add a newline.\n delete - remove help topic.\n\n Examples:\n sethelp throw = This throws something at ...\n sethelp/append pickpocketing,Thievery = This steals ...\n sethelp/replace pickpocketing, ,attr(is_thief) = This steals ...\n sethelp/edit thievery\n\n This command manipulates the help database. A help entry can be created,\n appended/merged to and deleted. If you don\'t assign a category, the\n "General" category will be used. If no lockstring is specified, default\n is to let everyone read the help file.\n\n '}
switch_options = ('edit', 'replace', 'append', 'extend', 'delete')

evennia.commands.default.muxcommand module

The command template for the default MUX-style command set. There is also an Account/OOC version that makes sure caller is an Account object.

class evennia.commands.default.muxcommand.MuxCommand(**kwargs)[source]

Bases: evennia.commands.command.Command

This sets up the basis for a MUX command. The idea is that most other Mux-related commands should just inherit from this and don’t have to implement much parsing of their own unless they do something particularly advanced.

Note that the class’s __doc__ string (this text) is used by Evennia to create the automatic help entry for the command, so make sure to document consistently here.

_keyaliases = ('command',)
_matchset = {'command'}
aliases = []
at_post_cmd()[source]

This hook is called after the command has finished executing (after self.func()).

at_pre_cmd()[source]

This hook is called before self.parse() on all commands

func()[source]
This is the hook function that actually does all the work. It is called

by the cmdhandler right after self.parser() finishes, and so has access to all the variables defined therein.

get_command_info()[source]

Update of parent class’s get_command_info() for MuxCommand.

has_perm(srcobj)[source]

This is called by the cmdhandler to determine if srcobj is allowed to execute this command. We just show it here for completeness - we are satisfied using the default check in Command.

help_category = 'general'
key = 'command'
lock_storage = 'cmd:all();'
parse()[source]

This method is called by the cmdhandler once the command name has been identified. It creates a new set of member variables that can be later accessed from self.func() (see below)

The following variables are available for our use when entering this method (from the command definition, and assigned on the fly by the cmdhandler):

self.key - the name of this command (‘look’) self.aliases - the aliases of this cmd (‘l’) self.permissions - permission string for this command self.help_category - overall category of command

self.caller - the object calling this command self.cmdstring - the actual command name used to call this

(this allows you to know which alias was used,

for example)

self.args - the raw input; everything following self.cmdstring. self.cmdset - the cmdset from which this command was picked. Not

often used (useful for commands like ‘help’ or to list all available commands etc)

self.obj - the object on which this command was defined. It is often

the same as self.caller.

A MUX command has the following possible syntax:

name[ with several words][/switch[/switch..]] arg1[,arg2,…] [[=|,] arg[,..]]

The ‘name[ with several words]’ part is already dealt with by the cmdhandler at this point, and stored in self.cmdname (we don’t use it here). The rest of the command is stored in self.args, which can start with the switch indicator /.

Optional variables to aid in parsing, if set:
self.switch_options - (tuple of valid /switches expected by this

command (without the /))

self.rhs_split - Alternate string delimiter or tuple of strings

to separate left/right hand sides. tuple form gives priority split to first string delimiter.

This parser breaks self.args into its constituents and stores them in the following variables:

self.switches = [list of /switches (without the /)] self.raw = This is the raw argument input, including switches self.args = This is re-defined to be everything except the switches self.lhs = Everything to the left of = (lhs:’left-hand side’). If

no = is found, this is identical to self.args.

self.rhs: Everything to the right of = (rhs:’right-hand side’).

If no ‘=’ is found, this is None.

self.lhslist - [self.lhs split into a list by comma] self.rhslist - [list of self.rhs split into a list by comma] self.arglist = [list of space-separated args (stripped, including ‘=’ if it exists)]

All args and list members are stripped of excess whitespace around the strings, but case is preserved.

search_index_entry = {'aliases': '', 'category': 'general', 'key': 'command', 'tags': '', 'text': "\n This sets up the basis for a MUX command. The idea\n is that most other Mux-related commands should just\n inherit from this and don't have to implement much\n parsing of their own unless they do something particularly\n advanced.\n\n Note that the class's __doc__ string (this text) is\n used by Evennia to create the automatic help entry for\n the command, so make sure to document consistently here.\n "}
class evennia.commands.default.muxcommand.MuxAccountCommand(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

This is an on-Account version of the MuxCommand. Since these commands sit on Accounts rather than on Characters/Objects, we need to check this in the parser.

Account commands are available also when puppeting a Character, it’s just that they are applied with a lower priority and are always available, also when disconnected from a character (i.e. “ooc”).

This class makes sure that caller is always an Account object, while creating a new property “character” that is set only if a character is actually attached to this Account and Session.

_keyaliases = ('command',)
_matchset = {'command'}
account_caller = True
aliases = []
help_category = 'general'
key = 'command'
lock_storage = 'cmd:all();'
search_index_entry = {'aliases': '', 'category': 'general', 'key': 'command', 'tags': '', 'text': '\n This is an on-Account version of the MuxCommand. Since these commands sit\n on Accounts rather than on Characters/Objects, we need to check\n this in the parser.\n\n Account commands are available also when puppeting a Character, it\'s\n just that they are applied with a lower priority and are always\n available, also when disconnected from a character (i.e. "ooc").\n\n This class makes sure that caller is always an Account object, while\n creating a new property "character" that is set only if a\n character is actually attached to this Account and Session.\n '}

evennia.commands.default.syscommands module

System commands

These are the default commands called by the system commandhandler when various exceptions occur. If one of these commands are not implemented and part of the current cmdset, the engine falls back to a default solution instead.

Some system commands are shown in this module as a REFERENCE only (they are not all added to Evennia’s default cmdset since they don’t currently do anything differently from the default backup systems hard-wired in the engine).

Overloading these commands in a cmdset can be used to create interesting effects. An example is using the NoMatch system command to implement a line-editor where you don’t have to start each line with a command (if there is no match to a known command, the line is just added to the editor buffer).

class evennia.commands.default.syscommands.SystemMultimatch(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

Multiple command matches.

The cmdhandler adds a special attribute ‘matches’ to this system command.

matches = [(cmdname, args, cmdobj, cmdlen, mratio, raw_cmdname) , (cmdname, …), …]

Here, cmdname is the command’s name and args the rest of the incoming string, without said command name. cmdobj is the Command instance, the cmdlen is the same as len(cmdname) and mratio is a measure of how big a part of the full input string the cmdname takes up - an exact match would be 1.0. Finally, the raw_cmdname is the cmdname unmodified by eventual prefix-stripping.

_keyaliases = ('__multimatch_command',)
_matchset = {'__multimatch_command'}
aliases = []
func()[source]

Handle multiple-matches by using the at_search_result default handler.

help_category = 'general'
key = '__multimatch_command'
lock_storage = 'cmd:all()'
locks = 'cmd:all()'
search_index_entry = {'aliases': '', 'category': 'general', 'key': '__multimatch_command', 'tags': '', 'text': "\n Multiple command matches.\n\n The cmdhandler adds a special attribute 'matches' to this\n system command.\n\n matches = [(cmdname, args, cmdobj, cmdlen, mratio, raw_cmdname) , (cmdname, ...), ...]\n\n Here, `cmdname` is the command's name and `args` the rest of the incoming string,\n without said command name. `cmdobj` is the Command instance, the cmdlen is\n the same as len(cmdname) and mratio is a measure of how big a part of the\n full input string the cmdname takes up - an exact match would be 1.0. Finally,\n the `raw_cmdname` is the cmdname unmodified by eventual prefix-stripping.\n\n "}
class evennia.commands.default.syscommands.SystemNoInput(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

This is called when there is no input given

_keyaliases = ('__noinput_command',)
_matchset = {'__noinput_command'}
aliases = []
func()[source]

Do nothing.

help_category = 'general'
key = '__noinput_command'
lock_storage = 'cmd:all()'
locks = 'cmd:all()'
search_index_entry = {'aliases': '', 'category': 'general', 'key': '__noinput_command', 'tags': '', 'text': '\n This is called when there is no input given\n '}
class evennia.commands.default.syscommands.SystemNoMatch(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

No command was found matching the given input.

_keyaliases = ('__nomatch_command',)
_matchset = {'__nomatch_command'}
aliases = []
func()[source]

This is given the failed raw string as input.

help_category = 'general'
key = '__nomatch_command'
lock_storage = 'cmd:all()'
locks = 'cmd:all()'
search_index_entry = {'aliases': '', 'category': 'general', 'key': '__nomatch_command', 'tags': '', 'text': '\n No command was found matching the given input.\n '}
class evennia.commands.default.syscommands.SystemSendToChannel(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

This is a special command that the cmdhandler calls when it detects that the command given matches an existing Channel object key (or alias).

_keyaliases = ('__send_to_channel_command',)
_matchset = {'__send_to_channel_command'}
aliases = []
func()[source]

Create a new message and send it to channel, using the already formatted input.

help_category = 'general'
key = '__send_to_channel_command'
lock_storage = 'cmd:all()'
locks = 'cmd:all()'
parse()[source]

This method is called by the cmdhandler once the command name has been identified. It creates a new set of member variables that can be later accessed from self.func() (see below)

The following variables are available for our use when entering this method (from the command definition, and assigned on the fly by the cmdhandler):

self.key - the name of this command (‘look’) self.aliases - the aliases of this cmd (‘l’) self.permissions - permission string for this command self.help_category - overall category of command

self.caller - the object calling this command self.cmdstring - the actual command name used to call this

(this allows you to know which alias was used,

for example)

self.args - the raw input; everything following self.cmdstring. self.cmdset - the cmdset from which this command was picked. Not

often used (useful for commands like ‘help’ or to list all available commands etc)

self.obj - the object on which this command was defined. It is often

the same as self.caller.

A MUX command has the following possible syntax:

name[ with several words][/switch[/switch..]] arg1[,arg2,…] [[=|,] arg[,..]]

The ‘name[ with several words]’ part is already dealt with by the cmdhandler at this point, and stored in self.cmdname (we don’t use it here). The rest of the command is stored in self.args, which can start with the switch indicator /.

Optional variables to aid in parsing, if set:
self.switch_options - (tuple of valid /switches expected by this

command (without the /))

self.rhs_split - Alternate string delimiter or tuple of strings

to separate left/right hand sides. tuple form gives priority split to first string delimiter.

This parser breaks self.args into its constituents and stores them in the following variables:

self.switches = [list of /switches (without the /)] self.raw = This is the raw argument input, including switches self.args = This is re-defined to be everything except the switches self.lhs = Everything to the left of = (lhs:’left-hand side’). If

no = is found, this is identical to self.args.

self.rhs: Everything to the right of = (rhs:’right-hand side’).

If no ‘=’ is found, this is None.

self.lhslist - [self.lhs split into a list by comma] self.rhslist - [list of self.rhs split into a list by comma] self.arglist = [list of space-separated args (stripped, including ‘=’ if it exists)]

All args and list members are stripped of excess whitespace around the strings, but case is preserved.

search_index_entry = {'aliases': '', 'category': 'general', 'key': '__send_to_channel_command', 'tags': '', 'text': '\n This is a special command that the cmdhandler calls\n when it detects that the command given matches\n an existing Channel object key (or alias).\n '}

evennia.commands.default.system module

System commands

class evennia.commands.default.system.CmdReload(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

reload the server

Usage:

reload [reason]

This restarts the server. The Portal is not affected. Non-persistent scripts will survive a reload (use reset to purge) and at_reload() hooks will be called.

_keyaliases = ('restart', 'reload')
_matchset = {'reload', 'restart'}
aliases = ['restart']
func()[source]

Reload the system.

help_category = 'system'
key = 'reload'
lock_storage = 'cmd:perm(reload) or perm(Developer)'
locks = 'cmd:perm(reload) or perm(Developer)'
search_index_entry = {'aliases': 'restart', 'category': 'system', 'key': 'reload', 'tags': '', 'text': '\n reload the server\n\n Usage:\n reload [reason]\n\n This restarts the server. The Portal is not\n affected. Non-persistent scripts will survive a reload (use\n reset to purge) and at_reload() hooks will be called.\n '}
class evennia.commands.default.system.CmdReset(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

reset and reboot the server

Usage:

reset

Notes

For normal updating you are recommended to use reload rather than this command. Use shutdown for a complete stop of everything.

This emulates a cold reboot of the Server component of Evennia. The difference to shutdown is that the Server will auto-reboot and that it does not affect the Portal, so no users will be disconnected. Contrary to reload however, all shutdown hooks will be called and any non-database saved scripts, ndb-attributes, cmdsets etc will be wiped.

_keyaliases = ('reset', 'reboot')
_matchset = {'reboot', 'reset'}
aliases = ['reboot']
func()[source]

Reload the system.

help_category = 'system'
key = 'reset'
lock_storage = 'cmd:perm(reload) or perm(Developer)'
locks = 'cmd:perm(reload) or perm(Developer)'
search_index_entry = {'aliases': 'reboot', 'category': 'system', 'key': 'reset', 'tags': '', 'text': '\n reset and reboot the server\n\n Usage:\n reset\n\n Notes:\n For normal updating you are recommended to use reload rather\n than this command. Use shutdown for a complete stop of\n everything.\n\n This emulates a cold reboot of the Server component of Evennia.\n The difference to shutdown is that the Server will auto-reboot\n and that it does not affect the Portal, so no users will be\n disconnected. Contrary to reload however, all shutdown hooks will\n be called and any non-database saved scripts, ndb-attributes,\n cmdsets etc will be wiped.\n\n '}
class evennia.commands.default.system.CmdShutdown(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

stop the server completely

Usage:

shutdown [announcement]

Gracefully shut down both Server and Portal.

_keyaliases = ('shutdown',)
_matchset = {'shutdown'}
aliases = []
func()[source]

Define function

help_category = 'system'
key = 'shutdown'
lock_storage = 'cmd:perm(shutdown) or perm(Developer)'
locks = 'cmd:perm(shutdown) or perm(Developer)'
search_index_entry = {'aliases': '', 'category': 'system', 'key': 'shutdown', 'tags': '', 'text': '\n stop the server completely\n\n Usage:\n shutdown [announcement]\n\n Gracefully shut down both Server and Portal.\n '}
class evennia.commands.default.system.CmdPy(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

execute a snippet of python code

Usage:

py [cmd] py/edit py/time <cmd> py/clientraw <cmd> py/noecho

Switches:

time - output an approximate execution time for <cmd> edit - open a code editor for multi-line code experimentation clientraw - turn off all client-specific escaping. Note that this may

lead to different output depending on prototocol (such as angular brackets being parsed as HTML in the webclient but not in telnet clients)

noecho - in Python console mode, turn off the input echo (e.g. if your client

does this for you already)

Without argument, open a Python console in-game. This is a full console, accepting multi-line Python code for testing and debugging. Type exit() to return to the game. If Evennia is reloaded, the console will be closed.

Enter a line of instruction after the ‘py’ command to execute it immediately. Separate multiple commands by ‘;’ or open the code editor using the /edit switch (all lines added in editor will be executed immediately when closing or using the execute command in the editor).

A few variables are made available for convenience in order to offer access to the system (you can import more at execution time).

Available variables in py environment:

self, me : caller here : caller.location evennia : the evennia API inherits_from(obj, parent) : check object inheritance

You can explore The evennia API from inside the game by calling the __doc__ property on entities:

py evennia.__doc__ py evennia.managers.__doc__

|rNote: In the wrong hands this command is a severe security risk. It should only be accessible by trusted server admins/superusers.|n

_keyaliases = ('!', 'py')
_matchset = {'!', 'py'}
aliases = ['!']
func()[source]

hook function

help_category = 'system'
key = 'py'
lock_storage = 'cmd:perm(py) or perm(Developer)'
locks = 'cmd:perm(py) or perm(Developer)'
search_index_entry = {'aliases': '!', 'category': 'system', 'key': 'py', 'tags': '', 'text': "\n execute a snippet of python code\n\n Usage:\n py [cmd]\n py/edit\n py/time <cmd>\n py/clientraw <cmd>\n py/noecho\n\n Switches:\n time - output an approximate execution time for <cmd>\n edit - open a code editor for multi-line code experimentation\n clientraw - turn off all client-specific escaping. Note that this may\n lead to different output depending on prototocol (such as angular brackets\n being parsed as HTML in the webclient but not in telnet clients)\n noecho - in Python console mode, turn off the input echo (e.g. if your client\n does this for you already)\n\n Without argument, open a Python console in-game. This is a full console,\n accepting multi-line Python code for testing and debugging. Type `exit()` to\n return to the game. If Evennia is reloaded, the console will be closed.\n\n Enter a line of instruction after the 'py' command to execute it\n immediately. Separate multiple commands by ';' or open the code editor\n using the /edit switch (all lines added in editor will be executed\n immediately when closing or using the execute command in the editor).\n\n A few variables are made available for convenience in order to offer access\n to the system (you can import more at execution time).\n\n Available variables in py environment:\n self, me : caller\n here : caller.location\n evennia : the evennia API\n inherits_from(obj, parent) : check object inheritance\n\n You can explore The evennia API from inside the game by calling\n the `__doc__` property on entities:\n py evennia.__doc__\n py evennia.managers.__doc__\n\n |rNote: In the wrong hands this command is a severe security risk. It\n should only be accessible by trusted server admins/superusers.|n\n\n "}
switch_options = ('time', 'edit', 'clientraw', 'noecho')
class evennia.commands.default.system.CmdScripts(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

list and manage all running scripts

Usage:

scripts[/switches] [#dbref, key, script.path or <obj>]

Switches:

start - start a script (must supply a script path) stop - stops an existing script kill - kills a script - without running its cleanup hooks validate - run a validation on the script(s)

If no switches are given, this command just views all active scripts. The argument can be either an object, at which point it will be searched for all scripts defined on it, or a script name or #dbref. For using the /stop switch, a unique script #dbref is required since whole classes of scripts often have the same name.

Use script for managing commands on objects.

_keyaliases = ('scripts', 'globalscript', 'listscripts')
_matchset = {'globalscript', 'listscripts', 'scripts'}
aliases = ['globalscript', 'listscripts']
excluded_typeclass_paths = ['evennia.prototypes.prototypes.DbPrototype']
func()[source]

implement method

help_category = 'system'
key = 'scripts'
lock_storage = 'cmd:perm(listscripts) or perm(Admin)'
locks = 'cmd:perm(listscripts) or perm(Admin)'
search_index_entry = {'aliases': 'globalscript listscripts', 'category': 'system', 'key': 'scripts', 'tags': '', 'text': '\n list and manage all running scripts\n\n Usage:\n scripts[/switches] [#dbref, key, script.path or <obj>]\n\n Switches:\n start - start a script (must supply a script path)\n stop - stops an existing script\n kill - kills a script - without running its cleanup hooks\n validate - run a validation on the script(s)\n\n If no switches are given, this command just views all active\n scripts. The argument can be either an object, at which point it\n will be searched for all scripts defined on it, or a script name\n or #dbref. For using the /stop switch, a unique script #dbref is\n required since whole classes of scripts often have the same name.\n\n Use script for managing commands on objects.\n '}
switch_options = ('start', 'stop', 'kill', 'validate')
class evennia.commands.default.system.CmdObjects(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

statistics on objects in the database

Usage:

objects [<nr>]

Gives statictics on objects in database as well as a list of <nr> latest objects in database. If not given, <nr> defaults to 10.

_keyaliases = ('objects', 'listobjs', 'listobjects', 'stats', 'db')
_matchset = {'db', 'listobjects', 'listobjs', 'objects', 'stats'}
aliases = ['stats', 'listobjects', 'listobjs', 'db']
func()[source]

Implement the command

help_category = 'system'
key = 'objects'
lock_storage = 'cmd:perm(listobjects) or perm(Builder)'
locks = 'cmd:perm(listobjects) or perm(Builder)'
search_index_entry = {'aliases': 'stats listobjects listobjs db', 'category': 'system', 'key': 'objects', 'tags': '', 'text': '\n statistics on objects in the database\n\n Usage:\n objects [<nr>]\n\n Gives statictics on objects in database as well as\n a list of <nr> latest objects in database. If not\n given, <nr> defaults to 10.\n '}
class evennia.commands.default.system.CmdService(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

manage system services

Usage:

service[/switch] <service>

Switches:

list - shows all available services (default) start - activates or reactivate a service stop - stops/inactivate a service (can often be restarted) delete - tries to permanently remove a service

Service management system. Allows for the listing, starting, and stopping of services. If no switches are given, services will be listed. Note that to operate on the service you have to supply the full (green or red) name as given in the list.

_keyaliases = ('service', 'services')
_matchset = {'service', 'services'}
aliases = ['services']
func()[source]

Implement command

help_category = 'system'
key = 'service'
lock_storage = 'cmd:perm(service) or perm(Developer)'
locks = 'cmd:perm(service) or perm(Developer)'
search_index_entry = {'aliases': 'services', 'category': 'system', 'key': 'service', 'tags': '', 'text': '\n manage system services\n\n Usage:\n service[/switch] <service>\n\n Switches:\n list - shows all available services (default)\n start - activates or reactivate a service\n stop - stops/inactivate a service (can often be restarted)\n delete - tries to permanently remove a service\n\n Service management system. Allows for the listing,\n starting, and stopping of services. If no switches\n are given, services will be listed. Note that to operate on the\n service you have to supply the full (green or red) name as given\n in the list.\n '}
switch_options = ('list', 'start', 'stop', 'delete')
class evennia.commands.default.system.CmdAbout(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

show Evennia info

Usage:

about

Display info about the game engine.

_keyaliases = ('about', 'version')
_matchset = {'about', 'version'}
aliases = ['version']
func()[source]

Display information about server or target

help_category = 'system'
key = 'about'
lock_storage = 'cmd:all()'
locks = 'cmd:all()'
search_index_entry = {'aliases': 'version', 'category': 'system', 'key': 'about', 'tags': '', 'text': '\n show Evennia info\n\n Usage:\n about\n\n Display info about the game engine.\n '}
class evennia.commands.default.system.CmdTime(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

show server time statistics

Usage:

time

List Server time statistics such as uptime and the current time stamp.

_keyaliases = ('time', 'uptime')
_matchset = {'time', 'uptime'}
aliases = ['uptime']
func()[source]

Show server time data in a table.

help_category = 'system'
key = 'time'
lock_storage = 'cmd:perm(time) or perm(Player)'
locks = 'cmd:perm(time) or perm(Player)'
search_index_entry = {'aliases': 'uptime', 'category': 'system', 'key': 'time', 'tags': '', 'text': '\n show server time statistics\n\n Usage:\n time\n\n List Server time statistics such as uptime\n and the current time stamp.\n '}
class evennia.commands.default.system.CmdServerLoad(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

show server load and memory statistics

Usage:

server[/mem]

Switches:

mem - return only a string of the current memory usage flushmem - flush the idmapper cache

This command shows server load statistics and dynamic memory usage. It also allows to flush the cache of accessed database objects.

Some Important statistics in the table:

|wServer load|n is an average of processor usage. It’s usually between 0 (no usage) and 1 (100% usage), but may also be temporarily higher if your computer has multiple CPU cores.

The |wResident/Virtual memory|n displays the total memory used by the server process.

Evennia |wcaches|n all retrieved database entities when they are loaded by use of the idmapper functionality. This allows Evennia to maintain the same instances of an entity and allowing non-persistent storage schemes. The total amount of cached objects are displayed plus a breakdown of database object types.

The |wflushmem|n switch allows to flush the object cache. Please note that due to how Python’s memory management works, releasing caches may not show you a lower Residual/Virtual memory footprint, the released memory will instead be re-used by the program.

_keyaliases = ('serverprocess', 'serverload', 'server')
_matchset = {'server', 'serverload', 'serverprocess'}
aliases = ['serverload', 'serverprocess']
func()[source]

Show list.

help_category = 'system'
key = 'server'
lock_storage = 'cmd:perm(list) or perm(Developer)'
locks = 'cmd:perm(list) or perm(Developer)'
search_index_entry = {'aliases': 'serverload serverprocess', 'category': 'system', 'key': 'server', 'tags': '', 'text': "\n show server load and memory statistics\n\n Usage:\n server[/mem]\n\n Switches:\n mem - return only a string of the current memory usage\n flushmem - flush the idmapper cache\n\n This command shows server load statistics and dynamic memory\n usage. It also allows to flush the cache of accessed database\n objects.\n\n Some Important statistics in the table:\n\n |wServer load|n is an average of processor usage. It's usually\n between 0 (no usage) and 1 (100% usage), but may also be\n temporarily higher if your computer has multiple CPU cores.\n\n The |wResident/Virtual memory|n displays the total memory used by\n the server process.\n\n Evennia |wcaches|n all retrieved database entities when they are\n loaded by use of the idmapper functionality. This allows Evennia\n to maintain the same instances of an entity and allowing\n non-persistent storage schemes. The total amount of cached objects\n are displayed plus a breakdown of database object types.\n\n The |wflushmem|n switch allows to flush the object cache. Please\n note that due to how Python's memory management works, releasing\n caches may not show you a lower Residual/Virtual memory footprint,\n the released memory will instead be re-used by the program.\n\n "}
switch_options = ('mem', 'flushmem')

evennia.commands.default.tests module

This is part of the Evennia unittest framework, for testing the stability and integrity of the codebase during updates. This module test the default command set. It is instantiated by the evennia/objects/tests.py module, which in turn is run by as part of the main test suite started with

> python game/manage.py test.

class evennia.commands.default.tests.CmdInterrupt(**kwargs)[source]

Bases: evennia.commands.command.Command

Base command

Usage:

command [args]

This is the base command class. Inherit from this to create new commands.

The cmdhandler makes the following variables available to the command methods (so you can always assume them to be there): self.caller - the game object calling the command self.cmdstring - the command name used to trigger this command (allows

you to know which alias was used, for example)

cmd.args - everything supplied to the command following the cmdstring

(this is usually what is parsed in self.parse())

cmd.cmdset - the cmdset from which this command was matched (useful only

seldomly, notably for help-type commands, to create dynamic help entries and lists)

cmd.obj - the object on which this command is defined. If a default command,

this is usually the same as caller.

cmd.rawstring - the full raw string input, including any args and no parsing.

The following class properties can/should be defined on your child class:

key - identifier for command (e.g. “look”) aliases - (optional) list of aliases (e.g. [“l”, “loo”]) locks - lock string (default is “cmd:all()”) help_category - how to organize this help entry in help system

(default is “General”)

auto_help - defaults to True. Allows for turning off auto-help generation arg_regex - (optional) raw string regex defining how the argument part of

the command should look in order to match for this command (e.g. must it be a space between cmdname and arg?)

(Note that if auto_help is on, this initial string is also used by the system to create the help entry for the command, so it’s a good idea to format it similar to this one). This behavior can be changed by overriding the method ‘get_help’ of a command: by default, this method returns cmd.__doc__ (that is, this very docstring, or the docstring of your command). You can, however, extend or replace this without disabling auto_help.

_keyaliases = ('interrupt',)
_matchset = {'interrupt'}
aliases = []
func()[source]

This is the actual executing part of the command. It is called directly after self.parse(). See the docstring of this module for which object properties are available (beyond those set in self.parse())

help_category = 'general'
key = 'interrupt'
lock_storage = 'cmd:all();'
parse()[source]

Once the cmdhandler has identified this as the command we want, this function is run. If many of your commands have a similar syntax (for example ‘cmd arg1 = arg2’) you should simply define this once and just let other commands of the same form inherit from this. See the docstring of this module for which object properties are available to use (notably self.args).

search_index_entry = {'aliases': '', 'category': 'general', 'key': 'interrupt', 'tags': '', 'text': '\n Base command\n\n Usage:\n command [args]\n\n This is the base command class. Inherit from this\n to create new commands.\n\n The cmdhandler makes the following variables available to the\n command methods (so you can always assume them to be there):\n self.caller - the game object calling the command\n self.cmdstring - the command name used to trigger this command (allows\n you to know which alias was used, for example)\n cmd.args - everything supplied to the command following the cmdstring\n (this is usually what is parsed in self.parse())\n cmd.cmdset - the cmdset from which this command was matched (useful only\n seldomly, notably for help-type commands, to create dynamic\n help entries and lists)\n cmd.obj - the object on which this command is defined. If a default command,\n this is usually the same as caller.\n cmd.rawstring - the full raw string input, including any args and no parsing.\n\n The following class properties can/should be defined on your child class:\n\n key - identifier for command (e.g. "look")\n aliases - (optional) list of aliases (e.g. ["l", "loo"])\n locks - lock string (default is "cmd:all()")\n help_category - how to organize this help entry in help system\n (default is "General")\n auto_help - defaults to True. Allows for turning off auto-help generation\n arg_regex - (optional) raw string regex defining how the argument part of\n the command should look in order to match for this command\n (e.g. must it be a space between cmdname and arg?)\n\n (Note that if auto_help is on, this initial string is also used by the\n system to create the help entry for the command, so it\'s a good idea to\n format it similar to this one). This behavior can be changed by\n overriding the method \'get_help\' of a command: by default, this\n method returns cmd.__doc__ (that is, this very docstring, or\n the docstring of your command). You can, however, extend or\n replace this without disabling auto_help.\n '}
class evennia.commands.default.tests.CommandTest(methodName='runTest')[source]

Bases: evennia.utils.test_resources.EvenniaTest

Tests a command

call(cmdobj, args, msg=None, cmdset=None, noansi=True, caller=None, receiver=None, cmdstring=None, obj=None, inputs=None, raw_string=None)[source]

Test a command by assigning all the needed properties to cmdobj and running

cmdobj.at_pre_cmd() cmdobj.parse() cmdobj.func() cmdobj.at_post_cmd()

The msgreturn value is compared to eventual output sent to caller.msg in the game

Returns

The received message that was sent to the caller.

Return type

msg (str)

class evennia.commands.default.tests.TestAccount(methodName='runTest')[source]

Bases: evennia.commands.default.tests.CommandTest

test_char_create()[source]
test_char_delete()[source]
test_color_test()[source]
test_ic()[source]
test_ooc()[source]
test_ooc_look()[source]
test_option()[source]
test_password()[source]
test_quell()[source]
test_quit()[source]
test_sessions()[source]
test_who()[source]
class evennia.commands.default.tests.TestAdmin(methodName='runTest')[source]

Bases: evennia.commands.default.tests.CommandTest

test_ban()[source]
test_emit()[source]
test_force()[source]
test_perm()[source]
test_wall()[source]
class evennia.commands.default.tests.TestBatchProcess(methodName='runTest')[source]

Bases: evennia.commands.default.tests.CommandTest

test_batch_commands()[source]
class evennia.commands.default.tests.TestBuilding(methodName='runTest')[source]

Bases: evennia.commands.default.tests.CommandTest

test_attribute_commands()[source]
test_copy()[source]
test_create()[source]
test_desc()[source]
test_desc_default_to_room()[source]

no rhs changes room’s desc

test_destroy()[source]
test_destroy_sequence()[source]
test_dig()[source]
test_do_nested_lookup()[source]
test_empty_desc()[source]

empty desc sets desc as ‘’

test_examine()[source]
test_exit_commands()[source]
test_find()[source]
test_list_cmdsets()[source]
test_lock()[source]
test_name()[source]
test_nested_attribute_commands()[source]
test_script()[source]
test_set_home()[source]
test_set_obj_alias()[source]
test_spawn()[source]
test_split_nested_attr()[source]
test_tag()[source]
test_teleport()[source]
test_tunnel()[source]
test_tunnel_exit_typeclass()[source]
test_typeclass()[source]
class evennia.commands.default.tests.TestComms(methodName='runTest')[source]

Bases: evennia.commands.default.tests.CommandTest

setUp()[source]

Sets up testing environment

test_all_com()[source]
test_cboot()[source]
test_cdesc()[source]
test_cdestroy()[source]
test_cemit()[source]
test_channels()[source]
test_clock()[source]
test_cwho()[source]
test_page()[source]
test_toggle_com()[source]
class evennia.commands.default.tests.TestGeneral(methodName='runTest')[source]

Bases: evennia.commands.default.tests.CommandTest

test_access()[source]
test_get_and_drop()[source]
test_give()[source]
test_home()[source]
test_inventory()[source]
test_look()[source]
test_mux_command()[source]
test_nick()[source]
test_pose()[source]
test_say()[source]
test_whisper()[source]
class evennia.commands.default.tests.TestHelp(methodName='runTest')[source]

Bases: evennia.commands.default.tests.CommandTest

setUp()[source]

Sets up testing environment

tearDown()[source]

Hook method for deconstructing the test fixture after testing it.

test_help()[source]
test_set_help()[source]
class evennia.commands.default.tests.TestInterruptCommand(methodName='runTest')[source]

Bases: evennia.commands.default.tests.CommandTest

test_interrupt_command()[source]
class evennia.commands.default.tests.TestSystem(methodName='runTest')[source]

Bases: evennia.commands.default.tests.CommandTest

test_about()[source]
test_objects()[source]
test_py()[source]
test_scripts()[source]
test_server_load()[source]
class evennia.commands.default.tests.TestSystemCommands(methodName='runTest')[source]

Bases: evennia.commands.default.tests.CommandTest

test_channelcommand(mock_channeldb)[source]
test_multimatch()[source]
test_simple_defaults()[source]
class evennia.commands.default.tests.TestUnconnectedCommand(methodName='runTest')[source]

Bases: evennia.commands.default.tests.CommandTest

test_info_command()[source]

evennia.commands.default.unloggedin module

Commands that are available from the connect screen.

class evennia.commands.default.unloggedin.CmdUnconnectedConnect(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

connect to the game

Usage (at login screen):

connect accountname password connect “account name” “pass word”

Use the create command to first create an account before logging in.

If you have spaces in your name, enclose it in double quotes.

_keyaliases = ('connect', 'co', 'conn', 'con')
_matchset = {'co', 'con', 'conn', 'connect'}
aliases = ['co', 'conn', 'con']
arg_regex = re.compile('\\s.*?|$', re.IGNORECASE)
func()[source]

Uses the Django admin api. Note that unlogged-in commands have a unique position in that their func() receives a session object instead of a source_object like all other types of logged-in commands (this is because there is no object yet before the account has logged in)

help_category = 'general'
key = 'connect'
lock_storage = 'cmd:all()'
locks = 'cmd:all()'
search_index_entry = {'aliases': 'co conn con', 'category': 'general', 'key': 'connect', 'tags': '', 'text': '\n connect to the game\n\n Usage (at login screen):\n connect accountname password\n connect "account name" "pass word"\n\n Use the create command to first create an account before logging in.\n\n If you have spaces in your name, enclose it in double quotes.\n '}
class evennia.commands.default.unloggedin.CmdUnconnectedCreate(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

create a new account account

Usage (at login screen):

create <accountname> <password> create “account name” “pass word”

This creates a new account account.

If you have spaces in your name, enclose it in double quotes.

_keyaliases = ('cr', 'cre', 'create')
_matchset = {'cr', 'cre', 'create'}
aliases = ['cre', 'cr']
arg_regex = re.compile('\\s.*?|$', re.IGNORECASE)
func()[source]

Do checks and create account

help_category = 'general'
key = 'create'
lock_storage = 'cmd:all()'
locks = 'cmd:all()'
search_index_entry = {'aliases': 'cre cr', 'category': 'general', 'key': 'create', 'tags': '', 'text': '\n create a new account account\n\n Usage (at login screen):\n create <accountname> <password>\n create "account name" "pass word"\n\n This creates a new account account.\n\n If you have spaces in your name, enclose it in double quotes.\n '}
class evennia.commands.default.unloggedin.CmdUnconnectedQuit(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

quit when in unlogged-in state

Usage:

quit

We maintain a different version of the quit command here for unconnected accounts for the sake of simplicity. The logged in version is a bit more complicated.

_keyaliases = ('q', 'quit', 'qu')
_matchset = {'q', 'qu', 'quit'}
aliases = ['q', 'qu']
func()[source]

Simply close the connection.

help_category = 'general'
key = 'quit'
lock_storage = 'cmd:all()'
locks = 'cmd:all()'
search_index_entry = {'aliases': 'q qu', 'category': 'general', 'key': 'quit', 'tags': '', 'text': '\n quit when in unlogged-in state\n\n Usage:\n quit\n\n We maintain a different version of the quit command\n here for unconnected accounts for the sake of simplicity. The logged in\n version is a bit more complicated.\n '}
class evennia.commands.default.unloggedin.CmdUnconnectedLook(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

look when in unlogged-in state

Usage:

look

This is an unconnected version of the look command for simplicity.

This is called by the server and kicks everything in gear. All it does is display the connect screen.

_keyaliases = ('look', '__unloggedin_look_command', 'l')
_matchset = {'__unloggedin_look_command', 'l', 'look'}
aliases = ['look', 'l']
func()[source]

Show the connect screen.

help_category = 'general'
key = '__unloggedin_look_command'
lock_storage = 'cmd:all()'
locks = 'cmd:all()'
search_index_entry = {'aliases': 'look l', 'category': 'general', 'key': '__unloggedin_look_command', 'tags': '', 'text': '\n look when in unlogged-in state\n\n Usage:\n look\n\n This is an unconnected version of the look command for simplicity.\n\n This is called by the server and kicks everything in gear.\n All it does is display the connect screen.\n '}
class evennia.commands.default.unloggedin.CmdUnconnectedHelp(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

get help when in unconnected-in state

Usage:

help

This is an unconnected version of the help command, for simplicity. It shows a pane of info.

_keyaliases = ('help', 'h', '?')
_matchset = {'?', 'h', 'help'}
aliases = ['h', '?']
func()[source]

Shows help

help_category = 'general'
key = 'help'
lock_storage = 'cmd:all()'
locks = 'cmd:all()'
search_index_entry = {'aliases': 'h ?', 'category': 'general', 'key': 'help', 'tags': '', 'text': '\n get help when in unconnected-in state\n\n Usage:\n help\n\n This is an unconnected version of the help command,\n for simplicity. It shows a pane of info.\n '}