<p>All <em>users</em> (real people) that starts a game <aclass="reference internal"href="Sessions.html"><spanclass="doc std std-doc">Session</span></a> on Evennia are doing so through an
game account. In order to actually get on the game the Account must <em>puppet</em> an <aclass="reference internal"href="Objects.html"><spanclass="doc std std-doc">Object</span></a>
(normally a <aclass="reference internal"href="Objects.html#characters"><spanclass="std std-doc">Character</span></a>).</p>
chatting on <aclass="reference internal"href="Communications.html"><spanclass="doc std std-doc">Channels</span></a>. It is also a good place to store <aclass="reference internal"href="Locks.html"><spanclass="doc std std-doc">Permissions</span></a> to be
object also has its own <aclass="reference internal"href="Command-Sets.html"><spanclass="doc std std-doc">CmdSet</span></a>, the <codeclass="docutils literal notranslate"><spanclass="pre">AccountCmdSet</span></code>.</p>
<p>Logged into default evennia, you can use the <codeclass="docutils literal notranslate"><spanclass="pre">ooc</span></code> command to leave your current
<aclass="reference internal"href="Objects.html"><spanclass="doc std std-doc">character</span></a> and go into OOC mode. You are quite limited in this mode, basically it works
like a simple chat program. It acts as a staging area for switching between Characters (if your
game supports that) or as a safety mode if your Character gets deleted. Use <codeclass="docutils literal notranslate"><spanclass="pre">ic</span></code> to attempt to
(re)puppet a Character.</p>
<p>Note that the Account object can have, and often does have, a different set of
<aclass="reference internal"href="Permissions.html"><spanclass="doc std std-doc">Permissions</span></a> from the Character they control. Normally you should put your
permissions on the Account level - this will overrule permissions set on the Character level. For
the permissions of the Character to come into play the default <codeclass="docutils literal notranslate"><spanclass="pre">quell</span></code> command can be used. This
allows for exploring the game using a different permission set (but you can’t escalate your
permissions this way - for hierarchical permissions like <codeclass="docutils literal notranslate"><spanclass="pre">Builder</span></code>, <codeclass="docutils literal notranslate"><spanclass="pre">Admin</span></code> etc, the <em>lower</em> of the
permissions on the Character/Account will always be used).</p>
<h2>How to create your own Account types<aclass="headerlink"href="#how-to-create-your-own-account-types"title="Permalink to this headline">¶</a></h2>
<p>You will usually not want more than one Account typeclass for all new accounts (but you could in
principle create a system that changes an account’s typeclass dynamically).</p>
<p>An Evennia Account is, per definition, a Python class that includes <codeclass="docutils literal notranslate"><spanclass="pre">evennia.DefaultAccount</span></code> among
its parents. In <codeclass="docutils literal notranslate"><spanclass="pre">mygame/typeclasses/accounts.py</span></code> there is an empty class ready for you to modify.
Evennia defaults to using this (it inherits directly from <codeclass="docutils literal notranslate"><spanclass="pre">DefaultAccount</span></code>).</p>
<p>Here’s an example of modifying the default Account class in code:</p>
<spanclass="n">at_account_creation</span><spanclass="p">(</span><spanclass="bp">self</span><spanclass="p">):</span><spanclass="s2">"this is called only once, when account is first created"</span>
<spanclass="bp">self</span><spanclass="o">.</span><spanclass="n">db</span><spanclass="o">.</span><spanclass="n">real_name</span><spanclass="o">=</span><spanclass="kc">None</span><spanclass="c1"># this is set later self.db.real_address = None # "</span>
<p>… However, if you use <codeclass="docutils literal notranslate"><spanclass="pre">examine</span><spanclass="pre">*self</span></code> (the asterisk makes you examine your Account object rather
than your Character), you won’t see your new Attributes yet. This is because <codeclass="docutils literal notranslate"><spanclass="pre">at_account_creation</span></code>
is only called the very <em>first</em> time the Account is called and your Account object already exists
(any new Accounts that connect will see them though). To update yourself you need to make sure to
re-fire the hook on all the Accounts you have already created. Here is an example of how to do this
using <codeclass="docutils literal notranslate"><spanclass="pre">py</span></code>:</p>
<p>You should now see the Attributes on yourself.</p>
<blockquote>
<div><p>If you wanted Evennia to default to a completely <em>different</em> Account class located elsewhere, you
must point Evennia to it. Add <codeclass="docutils literal notranslate"><spanclass="pre">BASE_ACCOUNT_TYPECLASS</span></code> to your settings file, and give the python
path to your custom class as its value. By default this points to <codeclass="docutils literal notranslate"><spanclass="pre">typeclasses.accounts.Account</span></code>,
<p>Beyond those properties assigned to all typeclassed objects (see <aclass="reference internal"href="Typeclasses.html"><spanclass="doc std std-doc">Typeclasses</span></a>), the
Account also has the following custom properties:</p>
<ulclass="simple">
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">user</span></code> - a unique link to a <codeclass="docutils literal notranslate"><spanclass="pre">User</span></code> Django object, representing the logged-in user.</p></li>
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">obj</span></code> - an alias for <codeclass="docutils literal notranslate"><spanclass="pre">character</span></code>.</p></li>
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">name</span></code> - an alias for <codeclass="docutils literal notranslate"><spanclass="pre">user.username</span></code></p></li>
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">sessions</span></code> - an instance of
versions of Evennia, this was a list). The so-called <codeclass="docutils literal notranslate"><spanclass="pre">session-id</span></code> (used in many places) is found
a property <codeclass="docutils literal notranslate"><spanclass="pre">sessid</span></code> on each Session instance.</p></li>
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">is_superuser</span></code> (bool: True/False) - if this account is a superuser.</p></li>
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">cmdset</span></code> - This holds all the current <aclass="reference internal"href="Commands.html"><spanclass="doc std std-doc">Commands</span></a> of this Account. By default these are
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">nicks</span></code> - This stores and handles <aclass="reference internal"href="Nicks.html"><spanclass="doc std std-doc">Nicks</span></a>, in the same way as nicks it works on Objects.
<p>Selection of special methods (see <codeclass="docutils literal notranslate"><spanclass="pre">evennia.DefaultAccount</span></code> for details):</p>
<ulclass="simple">
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">get_puppet</span></code> - get a currently puppeted object connected to the Account and a given session id, if
any.</p></li>
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">puppet_object</span></code> - connect a session to a puppetable Object.</p></li>
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">unpuppet_object</span></code> - disconnect a session from a puppetable Object.</p></li>
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">msg</span></code> - send text to the Account</p></li>
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">execute_cmd</span></code> - runs a command as if this Account did it.</p></li>
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">search</span></code> - search for Accounts.</p></li>