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, …


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

aliases = []
help_category = 'general'
key = 'command'
lock_storage = 'cmd:all();'
class evennia.commands.default.building.CmdSetObjAlias(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

adding permanent aliases for object


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

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.

key = 'alias'
aliases = ['setobjalias']
switch_options = ('category',)
locks = 'cmd:perm(setobjalias) or perm(Builder)'
help_category = 'building'

Set the aliases.

lock_storage = 'cmd:perm(setobjalias) or perm(Builder)'
class evennia.commands.default.building.CmdCopy(**kwargs)[source]

Bases: evennia.commands.default.building.ObjManipCommand

copy an object and its properties


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.

key = 'copy'
locks = 'cmd:perm(copy) or perm(Builder)'
help_category = 'building'

Uses ObjManipCommand.parse()

aliases = []
lock_storage = 'cmd:perm(copy) or perm(Builder)'
class evennia.commands.default.building.CmdCpAttr(**kwargs)[source]

Bases: evennia.commands.default.building.ObjManipCommand

copy attributes between objects


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>,…]


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


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.

key = 'cpattr'
switch_options = ('move',)
locks = 'cmd:perm(cpattr) or perm(Builder)'
help_category = 'building'
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_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.

check_has_attr(obj, attr)[source]

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

get_attr(obj, attr)[source]

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


Do the copying.

aliases = []
lock_storage = 'cmd:perm(cpattr) or perm(Builder)'
class evennia.commands.default.building.CmdMvAttr(**kwargs)[source]

Bases: evennia.commands.default.building.ObjManipCommand

move attributes between objects


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>,…]


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.

key = 'mvattr'
switch_options = ('copy',)
locks = 'cmd:perm(mvattr) or perm(Builder)'
help_category = 'building'

Do the moving

aliases = []
lock_storage = 'cmd:perm(mvattr) or perm(Builder)'
class evennia.commands.default.building.CmdCreate(**kwargs)[source]

Bases: evennia.commands.default.building.ObjManipCommand

create new objects


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

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

key = 'create'
switch_options = ('drop',)
locks = 'cmd:perm(create) or perm(Builder)'
help_category = 'building'
new_obj_lockstring = 'control:id({id}) or perm(Admin);delete:id({id}) or perm(Admin)'

Creates the object.

aliases = []
lock_storage = 'cmd:perm(create) or perm(Builder)'
class evennia.commands.default.building.CmdDesc(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

describe an object or the current room.


desc [<obj> =] <description>


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.

key = 'desc'
aliases = ['describe']
switch_options = ('edit',)
locks = 'cmd:perm(desc) or perm(Builder)'
help_category = 'building'

Define command

lock_storage = 'cmd:perm(desc) or perm(Builder)'
class evennia.commands.default.building.CmdDestroy(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

permanently delete objects


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

override - The destroy command will usually avoid accidentally

destroying account objects. This switch overrides this safety.

force - destroy without confirmation.


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.

key = 'destroy'
aliases = ['delete', 'del']
switch_options = ('override', 'force')
locks = 'cmd:perm(destroy) or perm(Builder)'
help_category = 'building'
confirm = True
default_confirm = 'yes'

Implements the command.

lock_storage = 'cmd:perm(destroy) or perm(Builder)'
class evennia.commands.default.building.CmdDig(**kwargs)[source]

Bases: evennia.commands.default.building.ObjManipCommand

build new rooms and connect them to the current location

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

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


tel or teleport - move yourself to the new room


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’.

key = 'dig'
switch_options = ('teleport',)
locks = 'cmd:perm(dig) or perm(Builder)'
help_category = 'building'
new_room_lockstring = 'control:id({id}) or perm(Admin); delete:id({id}) or perm(Admin); edit:id({id}) or perm(Admin)'

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

aliases = []
lock_storage = 'cmd:perm(dig) or perm(Builder)'
class evennia.commands.default.building.CmdTunnel(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

create new rooms in cardinal directions only


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


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


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.

key = 'tunnel'
aliases = ['tun']
switch_options = ('oneway', 'tel')
locks = 'cmd: perm(tunnel) or perm(Builder)'
help_category = 'building'
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')}

Implements the tunnel command

lock_storage = 'cmd: perm(tunnel) or perm(Builder)'

Bases: evennia.commands.default.muxcommand.MuxCommand

link existing rooms together with exits


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

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.

key = 'link'
locks = 'cmd:perm(link) or perm(Builder)'
help_category = 'building'

Perform the link

aliases = []
lock_storage = 'cmd:perm(link) or perm(Builder)'

Bases: evennia.commands.default.building.CmdLink

remove exit-connections between rooms


unlink <Object>

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

key = 'unlink'
locks = 'cmd:perm(unlink) or perm(Builder)'
help_key = 'Building'

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

aliases = []
help_category = 'building'
lock_storage = 'cmd:perm(unlink) or perm(Builder)'
class evennia.commands.default.building.CmdSetHome(**kwargs)[source]

Bases: evennia.commands.default.building.CmdLink

set an object’s home location


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.

key = 'sethome'
locks = 'cmd:perm(sethome) or perm(Builder)'
help_category = 'building'

implement the command

aliases = []
lock_storage = 'cmd:perm(sethome) or perm(Builder)'
class evennia.commands.default.building.CmdListCmdSets(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

list command sets defined on an object


cmdsets <obj>

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

key = 'cmdsets'
aliases = ['listcmsets']
locks = 'cmd:perm(listcmdsets) or perm(Builder)'
help_category = 'building'

list the cmdsets

lock_storage = 'cmd:perm(listcmdsets) or perm(Builder)'
class evennia.commands.default.building.CmdName(**kwargs)[source]

Bases: evennia.commands.default.building.ObjManipCommand

change the name and/or aliases of an object


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

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

key = 'name'
aliases = ['rename']
locks = 'cmd:perm(rename) or perm(Builder)'
help_category = 'building'

change the name

lock_storage = 'cmd:perm(rename) or perm(Builder)'
class evennia.commands.default.building.CmdOpen(**kwargs)[source]

Bases: evennia.commands.default.building.ObjManipCommand

open a new exit from the current room


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.

key = 'open'
locks = 'cmd:perm(open) or perm(Builder)'
help_category = 'building'
new_obj_lockstring = 'control:id({id}) or perm(Admin);delete:id({id}) or perm(Admin)'
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


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

aliases = []
lock_storage = 'cmd:perm(open) or perm(Builder)'
class evennia.commands.default.building.CmdSetAttribute(**kwargs)[source]

Bases: evennia.commands.default.building.ObjManipCommand

set attribute on an object or account


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


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.

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

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.

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.


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]”, []),


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

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

rm_attr(obj, attr)[source]

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

set_attr(obj, attr, value)[source]
edit_handler(obj, attr)[source]

Activate the line editor


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


A typeclassed object, or None if nothing is found.


Implement the set attribute - a limited form of py.

aliases = []
lock_storage = 'cmd:perm(set) or perm(Builder)'
class evennia.commands.default.building.CmdTypeclass(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

set or change an object’s typeclass


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.

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.


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.

key = 'typeclass'
aliases = ['swap', 'parent', 'update', 'type']
switch_options = ('show', 'examine', 'update', 'reset', 'force', 'list', 'prototype')
locks = 'cmd:perm(typeclass) or perm(Builder)'
help_category = 'building'

Implements command

lock_storage = 'cmd:perm(typeclass) or perm(Builder)'
class evennia.commands.default.building.CmdWipe(**kwargs)[source]

Bases: evennia.commands.default.building.ObjManipCommand

clear all attributes from an object


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


wipe box wipe box/colour

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

key = 'wipe'
locks = 'cmd:perm(wipe) or perm(Builder)'
help_category = 'building'

inp is the dict produced in ObjManipCommand.parse()

aliases = []
lock_storage = 'cmd:perm(wipe) or perm(Builder)'
class evennia.commands.default.building.CmdLock(**kwargs)[source]

Bases: evennia.commands.default.building.ObjManipCommand

assign a lock definition to an object


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


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)’

key = 'lock'
aliases = ['locks']
locks = 'cmd: perm(locks) or perm(Builder)'
help_category = 'building'

Sets up the command

lock_storage = 'cmd: perm(locks) or perm(Builder)'
class evennia.commands.default.building.CmdExamine(**kwargs)[source]

Bases: evennia.commands.default.building.ObjManipCommand

get detailed information about an object


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


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.

key = 'examine'
aliases = ['ex', 'exam']
locks = 'cmd:perm(examine) or perm(Builder)'
help_category = 'building'
arg_regex = re.compile('(/\\w+?(\\s|$))|\\s|$', re.IGNORECASE)
account_mode = False
detail_color = '|c'
header_color = '|w'
quell_color = '|r'
separator = '-'
list_attribute(crop, attr, category, value)[source]

Formats a single attribute line.

  • crop (bool) – If output should be cropped if too long.

  • attr (str) – Attribute key.

  • category (str) – Attribute category.

  • value (any) – Attribute value.


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, current_cmdset)[source]

Helper function that creates a nice report about an object.

  • obj (any) – Object to analyze.

  • current_cmdset (CmdSet) – Current cmdset for object.


str – The formatted string.


Process command

lock_storage = 'cmd:perm(examine) or perm(Builder)'
class evennia.commands.default.building.CmdFind(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

search the database for objects


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


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.

key = 'find'
aliases = ['locate', 'search']
switch_options = ('room', 'exit', 'char', 'exact', 'loc', 'startswith')
locks = 'cmd:perm(find) or perm(Builder)'
help_category = 'building'

Search functionality

lock_storage = 'cmd:perm(find) or perm(Builder)'
class evennia.commands.default.building.CmdTeleport(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

teleport object to another location


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


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

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.

key = 'tel'
aliases = ['teleport']
switch_options = ('quiet', 'intoexit', 'tonone', 'loc')
rhs_split = ('=', ' to ')
locks = 'cmd:perm(teleport) or perm(Builder)'
help_category = 'building'

Performs the teleport

lock_storage = 'cmd:perm(teleport) or perm(Builder)'
class evennia.commands.default.building.CmdScript(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

attach a script to an object


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


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.

key = 'script'
aliases = ['addscript']
switch_options = ('start', 'stop')
locks = 'cmd:perm(script) or perm(Builder)'
help_category = 'building'

Do stuff

lock_storage = 'cmd:perm(script) or perm(Builder)'
class evennia.commands.default.building.CmdTag(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

handles the tags of an object


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


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.

key = 'tag'
aliases = ['tags']
options = ('search', 'del')
locks = 'cmd:perm(tag) or perm(Builder)'
help_category = 'building'
arg_regex = re.compile('(/\\w+?(\\s|$))|\\s|$', re.IGNORECASE)

Implement the tag functionality

lock_storage = 'cmd:perm(tag) or perm(Builder)'
class evennia.commands.default.building.CmdSpawn(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

spawn objects from prototype


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

spawn/search [prototype_keykey][;tag[,tag]] spawn/list [tag, tag, …] spawn/list modules - list only module-based prototypes spawn/show [<prototype_key>] spawn/update <prototype_key>

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

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.


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.

key = 'spawn'
aliases = ['olc']
switch_options = ('noloc', 'search', 'list', 'show', 'raw', 'examine', 'save', 'delete', 'menu', 'olc', 'update', 'edit')
locks = 'cmd:perm(spawn) or perm(Builder)'
help_category = 'building'

Implements the spawner

lock_storage = 'cmd:perm(spawn) or perm(Builder)'