<h2>Installation<aclass="headerlink"href="#installation"title="Permalink to this headline">¶</a></h2>
<p>In your game folder <codeclass="docutils literal notranslate"><spanclass="pre">commands/default_cmdsets.py</span></code>, import and add
<codeclass="docutils literal notranslate"><spanclass="pre">ContribCmdCharCreate</span></code> to your <codeclass="docutils literal notranslate"><spanclass="pre">AccountCmdSet</span></code>.</p>
<p>In your game folder <codeclass="docutils literal notranslate"><spanclass="pre">typeclasses/accounts.py</span></code>, import and inherit from <codeclass="docutils literal notranslate"><spanclass="pre">ContribChargenAccount</span></code>
on your Account class.</p>
<p>(Alternatively, you can copy the <codeclass="docutils literal notranslate"><spanclass="pre">at_look</span></code> method directly into your own class.)</p>
<sectionid="example">
<h3>Example:<aclass="headerlink"href="#example"title="Permalink to this headline">¶</a></h3>
<p>In your settings file <codeclass="docutils literal notranslate"><spanclass="pre">server/conf/settings.py</span></code>, add the following settings:</p>
<p>(If you want to allow players to create more than one character, you can
customize that with the setting <codeclass="docutils literal notranslate"><spanclass="pre">MAX_NR_CHARACTERS</span></code>.)</p>
<p>By default, the new <codeclass="docutils literal notranslate"><spanclass="pre">charcreate</span></code> command will reference the example menu
provided by the contrib, so you can test it out before building your own menu.
You can reference
<aclass="reference external"href="https://github.com/evennia/evennia/blob/develop/evennia/contrib/rpg/character_creator/example_menu.py">the example menu here</a> for
ideas on how to build your own.</p>
<p>Once you have your own menu, just add it to your settings to use it. e.g. if your menu is in
<codeclass="docutils literal notranslate"><spanclass="pre">mygame/word/chargen_menu.py</span></code>, you’d add the following to your settings file:</p>
<h2>Usage<aclass="headerlink"href="#usage"title="Permalink to this headline">¶</a></h2>
<sectionid="the-evmenu">
<h3>The EvMenu<aclass="headerlink"href="#the-evmenu"title="Permalink to this headline">¶</a></h3>
<p>In order to use the contrib, you will need to create your own chargen EvMenu.
The included <codeclass="docutils literal notranslate"><spanclass="pre">example_menu.py</span></code> gives a number of useful menu node techniques
with basic attribute examples for you to reference. It can be run as-is as a
tutorial for yourself/your devs, or used as base for your own menu.</p>
<p>The example menu includes code, tips, and instructions for the following types
of decision nodes:</p>
<sectionid="informational-pages">
<h4>Informational Pages<aclass="headerlink"href="#informational-pages"title="Permalink to this headline">¶</a></h4>
<p>A small set of nodes that let you page through information on different choices before committing to one.</p>
</section>
<sectionid="option-categories">
<h4>Option Categories<aclass="headerlink"href="#option-categories"title="Permalink to this headline">¶</a></h4>
<p>A pair of nodes which let you divide an arbitrary number of options into separate categories.</p>
<p>The base node has a list of categories as the options, and the child node displays the actual character choices.</p>
</section>
<sectionid="multiple-choice">
<h4>Multiple Choice<aclass="headerlink"href="#multiple-choice"title="Permalink to this headline">¶</a></h4>
<p>Allows players to select and deselect options from the list in order to choose more than one.</p>
</section>
<sectionid="starting-objects">
<h4>Starting Objects<aclass="headerlink"href="#starting-objects"title="Permalink to this headline">¶</a></h4>
<p>Allows players to choose from a selection of starting objects, which are then created on chargen completion.</p>
</section>
<sectionid="choosing-a-name">
<h4>Choosing a Name<aclass="headerlink"href="#choosing-a-name"title="Permalink to this headline">¶</a></h4>
<p>The contrib assumes the player will choose their name during character creation,
so the necessary code for doing so is of course included!</p>
</section>
</section>
<sectionid="charcreate-command">
<h3><codeclass="docutils literal notranslate"><spanclass="pre">charcreate</span></code> command<aclass="headerlink"href="#charcreate-command"title="Permalink to this headline">¶</a></h3>
<p>The contrib overrides the character creation command - <codeclass="docutils literal notranslate"><spanclass="pre">charcreate</span></code> - to use a
character creator menu, as well as supporting exiting/resuming the process. In
addition, unlike the core command, it’s designed for the character name to be
chosen later on via the menu, so it won’t parse any arguments passed to it.</p>
</section>
<sectionid="changes-to-account-at-look">
<h3>Changes to <codeclass="docutils literal notranslate"><spanclass="pre">Account.at_look</span></code><aclass="headerlink"href="#changes-to-account-at-look"title="Permalink to this headline">¶</a></h3>
<p>The contrib version works mostly the same as core evennia, but adds an
additional check to recognize an in-progress character. If you’ve modified your
own <codeclass="docutils literal notranslate"><spanclass="pre">at_look</span></code> hook, it’s an easy addition to make: just add this section to the
<spanclass="c1"># currently in-progress character; don't display placeholder names</span>
<spanclass="n">result</span><spanclass="o">.</span><spanclass="n">append</span><spanclass="p">(</span><spanclass="s2">"</span><spanclass="se">\n</span><spanclass="s2"> - |Yin progress|n (|wcharcreate|n to continue)"</span><spanclass="p">)</span>
<spanclass="k">continue</span>
<spanclass="c1"># the rest of your code continues here</span>
</pre></div>
</div>
<hrclass="docutils"/>
<p><small>This document page is generated from <codeclass="docutils literal notranslate"><spanclass="pre">evennia/contrib/rpg/character_creator/README.md</span></code>. Changes to this
file will be overwritten, so edit that file rather than this one.</small></p>