{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreielvmmyju2dfi6ulejzs34zmhqqynxeflo6ibkncym6laulhdb7uq",
"uri": "at://did:plc:nsfgazqhudwd5egnrbrykfca/app.bsky.feed.post/3mnbk7b66xaz2"
},
"path": "/posts/evennia-cheatsheet/",
"publishedAt": "2026-06-02T02:26:35.568Z",
"site": "https://tilde.club",
"tags": [
"MUD",
"Evennia",
"Evennia's list of access_types",
"Evennia docs on Django queries"
],
"textContent": "I'm creating a MUD using Evennia, a Python framework that is super powerful and extendable. I couldn't find a great cheat sheet online, so here's some notes from their tutorial series. I will update this as I go, and I may end up typesetting this into a PDF.\n\n# Evennia commands\n\nThese commands are done through the Evennia shell (i.e., through a MUD client). Typically, `items` can include `me` for oneself, `here` for the current location, or a database reference number like `#8`.\n\n## Basic interaction\n\nOperation | Code\n---|---\nGet help |\n\n\n help [item]\n\nLook around |\n\n\n look [item]\n\nGet detailed information |\n\n\n examine [item]\n\nPick up item |\n\n\n get [item]\n\nSee inventory |\n\n\n inventory\n\nUse a named exit |\n\n\n <exit>\n\nMove to a location |\n\n\n teleport <location>\n\nGlobal search for something |\n\n\n find <item/location/exit...>\n\n## Creating items\n\nOperation | Code\n---|---\nCreate an item (and drop it) |\n\n\n create[/drop] <item>[:<typeclass]\n\nAdd synonyms |\n\n\n name <item> = <alias>[;<alias>...]\n\nAdd descriptions |\n\n\n desc <item> = <details>\n\nMove item to a location |\n\n\n teleport <item> = <location>\n\nDelete item |\n\n\n destroy <item>\n\nSet attribute |\n\n\n set/<attribute> = <name>\n\n## Creating locations\n\nOperation | Code\n---|---\nAdd a named location from here |\n\n\n dig <location> = <exitname>[;<alias>...]\n\nAdd a cardinal direction |\n\n\n tunnel <n[orth]/s/e/w/nw/.../in/out/up/down> = <name>[;<alias>...]\n\nOpen from here to a previous location |\n\n\n open <exitname>[;<alias>...] = <location>\n\n## Administration\n\nOperation | Code\n---|---\nTemporarily decrease/restore permissions |\n\n\n quell/unquell\n\nAdd help entry |\n\n\n sethelp <entryname> = <details>\n\nReload world and code |\n\n\n reload\n\n## Locks and permissions\n\nLockfuncs can be defined in `server/conf/lockfuncs.py`. See Evennia's list of access_types.\n\nOperation | Code\n---|---\nAdd/remove lock |\n\n\n lock[/del] <object> = <lockstring>\n\nLockstring format |\n\n\n <accesstype>: [NOT] lockfunc() [[AND/OR] [NOT] lockfunc() ...]\n\nAdd/remove account permissions |\n\n\n perm/account[/del] <user> = <permission>\n\nAccount levels | Guest, Player, Helper, Builder, Admin, Developer\nAdd/remove object permissions |\n\n\n perm[/del] <object> = <permission>\n\n# Python commands\n\nThese commands can be used in the interactive Python shell (`py` within a MUD client) or through a Python script.\n\n## Creating things\n\nOperation | Code\n---|---\nCreate a character, room, exit, or object |\n\n\n evennia.create_object('<typeclass>', key='<database_key>', [location=...,] [permissions=...,] [locks=...,] [attributes=...,])\n\nStore persistent object values |\n\n\n <object>.db.<key> = ...\n\nCreating an account, channel, or script |\n\n\n evennia.create_<account/channel/script>(...)\n\nObject location |\n\n\n <object>.location\n\nObject contents |\n\n\n <object>.contents\n\nExit destination |\n\n\n <exit>.destination\n\nAdd tags |\n\n\n <object>.tags.add(\"<tag>\"[, category=\"<category>\"])\n\n## Creating commands\n\nOperation | Code\n---|---\nName of command |\n\n\n <Command>.key\n\nCommand function |\n\n\n <Command>.func()\n\nArgument string provided to command |\n\n\n <Command>.args\n\nHelp function for command | Defined in docstring of\n\n\n <Command>\n\nMessage command caller |\n\n\n <Command>.msg(\"<msg>\")\n\nAdd command to a commandset |\n\n\n self.add(Command)\n\nin\n\n\n <CmdSet>.at_cmdset_creation()\n\nRemove command from a commandset |\n\n\n self.remove(Command)\n\nin\n\n\n <CmdSet>.at_cmdset_creation()\n\n## Searching\n\nSee the Evennia docs on Django queries for an explanation on how powerful and flexible Django queries can be.\n\nOperation | Code\n---|---\nGlobal search for an object |\n\n\n evennia.search_object(\"<name>\")[0]\n\nSearch for an object relative to caller |\n\n\n <object>.search(\"<name>\")\n\nSearch by tag |\n\n\n evennia.search_tag(\"<tag>\")\n\nSearch by location |\n\n\n evennia.search_object(\"<name>\", candidate=<location>.contents)\n\nSearch by attribute |\n\n\n evennia.search_object(\"<name>\", attribute_name=\"<attribute>\")\n\nSearch by typeclass |\n\n\n evennia.search_object(\"<name>\", typeclass=\"<typeclass>\")\n\nSearch by Django query |\n\n\n <Typeclass>.objects.<all/filter/get/exclude(db_key=\"<name>\")>\n\nSearch by Django query (incl. subclasses) |\n\n\n <Typeclass>.objects.<all_family/filter_family/get_family/exclude_family(db_key=\"<name>\")>\n\n# Directories\n\nDirectory | Description\n---|---\n\n\n commands/\n\n| Commands and command sets\n\n\n server/\n\n| Server files, see settings at `server/conf/settings.py`\n\n\n typeclasses/\n\n| Templates for accounts, characters, scripts, rooms, etc.\n\n\n web/\n\n| Website and webclient files\n\n\n world/\n\n| Misc. files, useful for user-defined build scripts and modules",
"title": "Evennia cheat sheet",
"updatedAt": "2026-05-26T02:47:00.000Z"
}