<spanid="evennia-game-template-commands-package"></span><h1>evennia.game_template.commands package<aclass="headerlink"href="#module-evennia.game_template.commands"title="Permalink to this headline">¶</a></h1>
<divclass="section"id="submodules">
<h2>Submodules<aclass="headerlink"href="#submodules"title="Permalink to this headline">¶</a></h2>
<spanid="evennia-game-template-commands-command-module"></span><h2>evennia.game_template.commands.command module<aclass="headerlink"href="#module-evennia.game_template.commands.command"title="Permalink to this headline">¶</a></h2>
<p>Commands</p>
<p>Commands describe the input the account can do to the game.</p>
<emclass="property">class </em><codeclass="sig-prename descclassname">evennia.game_template.commands.command.</code><codeclass="sig-name descname">Command</code><spanclass="sig-paren">(</span><emclass="sig-param">**kwargs</em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/game_template/commands/command.html#Command"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.game_template.commands.command.Command"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">_keyaliases</code><emclass="property"> = ('command',)</em><aclass="headerlink"href="#evennia.game_template.commands.command.Command._keyaliases"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">_matchset</code><emclass="property"> = {'command'}</em><aclass="headerlink"href="#evennia.game_template.commands.command.Command._matchset"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">aliases</code><emclass="property"> = []</em><aclass="headerlink"href="#evennia.game_template.commands.command.Command.aliases"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">help_category</code><emclass="property"> = 'general'</em><aclass="headerlink"href="#evennia.game_template.commands.command.Command.help_category"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">key</code><emclass="property"> = 'command'</em><aclass="headerlink"href="#evennia.game_template.commands.command.Command.key"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">lock_storage</code><emclass="property"> = 'cmd:all();'</em><aclass="headerlink"href="#evennia.game_template.commands.command.Command.lock_storage"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">search_index_entry</code><emclass="property"> = {'aliases': '', 'category': 'general', 'key': 'command', 'tags': '', 'text': "\n Inherit from this if you want to create your own command styles\n from scratch. Note that Evennia's default commands inherits from\n MuxCommand instead.\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\n Each Command implements the following methods, called\n in this order (only func() is actually required):\n - at_pre_cmd(): If this returns anything truthy, execution is aborted.\n - parse(): Should perform any extra parsing needed on self.args\n and store the result on self.\n - func(): Performs the actual work.\n - at_post_cmd(): Extra actions, often things done after\n every command, like prompts.\n\n "}</em><aclass="headerlink"href="#evennia.game_template.commands.command.Command.search_index_entry"title="Permalink to this definition">¶</a></dt>
<spanid="evennia-game-template-commands-default-cmdsets-module"></span><h2>evennia.game_template.commands.default_cmdsets module<aclass="headerlink"href="#module-evennia.game_template.commands.default_cmdsets"title="Permalink to this headline">¶</a></h2>
<p>Command sets</p>
<p>All commands in the game must be grouped in a cmdset. A given command
can be part of any number of cmdsets and cmdsets can be added/removed
and merged onto entities at runtime.</p>
<p>To create new commands to populate the cmdset, see
<cite>commands/command.py</cite>.</p>
<p>This module wraps the default command sets of Evennia; overloads them
to add/remove commands from the default lineup. You can create your
own cmdsets by inheriting from them or directly from <cite>evennia.CmdSet</cite>.</p>
<emclass="property">class </em><codeclass="sig-prename descclassname">evennia.game_template.commands.default_cmdsets.</code><codeclass="sig-name descname">AccountCmdSet</code><spanclass="sig-paren">(</span><emclass="sig-param">cmdsetobj=None</em>, <emclass="sig-param">key=None</em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/game_template/commands/default_cmdsets.html#AccountCmdSet"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.game_template.commands.default_cmdsets.AccountCmdSet"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">at_cmdset_creation</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/game_template/commands/default_cmdsets.html#AccountCmdSet.at_cmdset_creation"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.game_template.commands.default_cmdsets.AccountCmdSet.at_cmdset_creation"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">key</code><emclass="property"> = 'DefaultAccount'</em><aclass="headerlink"href="#evennia.game_template.commands.default_cmdsets.AccountCmdSet.key"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">path</code><emclass="property"> = 'evennia.game_template.commands.default_cmdsets.AccountCmdSet'</em><aclass="headerlink"href="#evennia.game_template.commands.default_cmdsets.AccountCmdSet.path"title="Permalink to this definition">¶</a></dt>
<emclass="property">class </em><codeclass="sig-prename descclassname">evennia.game_template.commands.default_cmdsets.</code><codeclass="sig-name descname">CharacterCmdSet</code><spanclass="sig-paren">(</span><emclass="sig-param">cmdsetobj=None</em>, <emclass="sig-param">key=None</em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/game_template/commands/default_cmdsets.html#CharacterCmdSet"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.game_template.commands.default_cmdsets.CharacterCmdSet"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">at_cmdset_creation</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/game_template/commands/default_cmdsets.html#CharacterCmdSet.at_cmdset_creation"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.game_template.commands.default_cmdsets.CharacterCmdSet.at_cmdset_creation"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">key</code><emclass="property"> = 'DefaultCharacter'</em><aclass="headerlink"href="#evennia.game_template.commands.default_cmdsets.CharacterCmdSet.key"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">path</code><emclass="property"> = 'evennia.game_template.commands.default_cmdsets.CharacterCmdSet'</em><aclass="headerlink"href="#evennia.game_template.commands.default_cmdsets.CharacterCmdSet.path"title="Permalink to this definition">¶</a></dt>
<emclass="property">class </em><codeclass="sig-prename descclassname">evennia.game_template.commands.default_cmdsets.</code><codeclass="sig-name descname">SessionCmdSet</code><spanclass="sig-paren">(</span><emclass="sig-param">cmdsetobj=None</em>, <emclass="sig-param">key=None</em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/game_template/commands/default_cmdsets.html#SessionCmdSet"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.game_template.commands.default_cmdsets.SessionCmdSet"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">at_cmdset_creation</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/game_template/commands/default_cmdsets.html#SessionCmdSet.at_cmdset_creation"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.game_template.commands.default_cmdsets.SessionCmdSet.at_cmdset_creation"title="Permalink to this definition">¶</a></dt>
<dd><p>This is the only method defined in a cmdset, called during
its creation. It should populate the set with command instances.</p>
<p>As and example we just add the empty base <cite>Command</cite> object.
<codeclass="sig-name descname">key</code><emclass="property"> = 'DefaultSession'</em><aclass="headerlink"href="#evennia.game_template.commands.default_cmdsets.SessionCmdSet.key"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">path</code><emclass="property"> = 'evennia.game_template.commands.default_cmdsets.SessionCmdSet'</em><aclass="headerlink"href="#evennia.game_template.commands.default_cmdsets.SessionCmdSet.path"title="Permalink to this definition">¶</a></dt>
<emclass="property">class </em><codeclass="sig-prename descclassname">evennia.game_template.commands.default_cmdsets.</code><codeclass="sig-name descname">UnloggedinCmdSet</code><spanclass="sig-paren">(</span><emclass="sig-param">cmdsetobj=None</em>, <emclass="sig-param">key=None</em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/game_template/commands/default_cmdsets.html#UnloggedinCmdSet"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.game_template.commands.default_cmdsets.UnloggedinCmdSet"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">at_cmdset_creation</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/game_template/commands/default_cmdsets.html#UnloggedinCmdSet.at_cmdset_creation"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.game_template.commands.default_cmdsets.UnloggedinCmdSet.at_cmdset_creation"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">key</code><emclass="property"> = 'DefaultUnloggedin'</em><aclass="headerlink"href="#evennia.game_template.commands.default_cmdsets.UnloggedinCmdSet.key"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">path</code><emclass="property"> = 'evennia.game_template.commands.default_cmdsets.UnloggedinCmdSet'</em><aclass="headerlink"href="#evennia.game_template.commands.default_cmdsets.UnloggedinCmdSet.path"title="Permalink to this definition">¶</a></dt>