<p>It’s highly recommended that you jump in on the <aclass="reference internal"href="../Howto/Starting/Part1/Starting-Part1.html"><spanclass="doc">Starting Tutorial</span></a>. Even if
take a look at our <aclass="reference internal"href="../Howto/Starting/Part1/Python-basic-introduction.html"><spanclass="doc">Python introduction</span></a>.</p>
<p>That is, enter <codeclass="docutils literal notranslate"><spanclass="pre">evennia.</span></code> and press the <codeclass="docutils literal notranslate"><spanclass="pre"><TAB></span></code> key. This will show you all the resources made
available at the top level of Evennia’s “flat API”. See the <aclass="reference internal"href="../Evennia-API.html"><spanclass="doc">flat API</span></a> page for more
<h3>Jupyter Notebook Support<aclass="headerlink"href="#jupyter-notebook-support"title="Permalink to this headline">¶</a></h3>
<p>You can also explore evennia interactively in a <aclass="reference external"href="https://jupyter.readthedocs.io/en/latest/index.html#">Jupyter notebook</a>. This offers
an in-browser view of your code similar to Matlab or similar programs. There are
a few extra steps that must be taken in order for this to work:</p>
<divclass="highlight-default notranslate"><divclass="highlight"><pre><span></span><spanclass="c1"># [open a new console/terminal]</span>
<spanclass="c1"># [activate your evennia virtualenv in this console/terminal]</span>
<spanclass="n">pip</span><spanclass="n">install</span><spanclass="o">-</span><spanclass="n">r</span><spanclass="n">requirements_extra</span><spanclass="o">.</span><spanclass="n">txt</span><spanclass="c1"># if not done already above</span>
</pre></div>
</div>
<p>Next, <codeclass="docutils literal notranslate"><spanclass="pre">cd</span></code> to your game folder. <em>It’s important that you are in the <em>root</em> of this folder for the next command</em>:</p>
<p>The <codeclass="docutils literal notranslate"><spanclass="pre">&</span></code> at the end starts the process as a background process on Linux/Unix.
Skip it if your OS doesn’t support this syntax. Your browser should now open
with the Jupyter interface. If not, open a browser to the link given on the
command line.</p>
<p>In the window, open the <codeclass="docutils literal notranslate"><spanclass="pre">new</span></code> menu in the top right and start a <codeclass="docutils literal notranslate"><spanclass="pre">Django</span><spanclass="pre">Shell-Plus</span></code> notebook (or
open an existing one if you had one from before). In the first cell you must initialize
<p><em>Note that the above initialization must be run every time a new new notebook/kernel is started or restarted.</em></p>
<p>After this you can import and access all of the Evennia system, same as with <codeclass="docutils literal notranslate"><spanclass="pre">evennia</span><spanclass="pre">shell</span></code>.</p>
<p>You can complement your exploration by peeking at the sections of the much more detailed
<aclass="reference internal"href="../Components/Components-Overview.html"><spanclass="doc">Evennia Component overview</span></a>. The <aclass="reference internal"href="../Howto/Howto-Overview.html"><spanclass="doc">Tutorials</span></a> section also contains a growing collection
<p>Before you start coding away at your dream game, take a look at our <aclass="reference internal"href="../Howto/Starting/Part2/Game-Planning.html"><spanclass="doc">Game Planning</span></a>
<h2>Code in your game folder, not in the evennia/ repository<aclass="headerlink"href="#code-in-your-game-folder-not-in-the-evennia-repository"title="Permalink to this headline">¶</a></h2>
<p>As part of the Evennia setup you will create a game folder to host your game code. This is your
home. You should <em>never</em> need to modify anything in the <codeclass="docutils literal notranslate"><spanclass="pre">evennia</span></code> library (anything you download
from us, really). You import useful functionality from here and if you see code you like, copy&paste
it out into your game folder and edit it there.</p>
<p>If you find that Evennia doesn’t support some functionality you need, make a <aclass="reference external"href="https://github.com/evennia/evennia/issues/new/choose">Feature
<p>Python is very good at reporting when and where things go wrong. A <em>traceback</em> shows everything you
need to know about crashing code. The text can be pretty long, but you usually are only interested
in the last bit, where it says what the error is and at which module and line number it happened -
armed with this info you can resolve most problems.</p>
<p>Evennia will usually not show the full traceback in-game though. Instead the server outputs errors
to the terminal/console from which you started Evennia in the first place. If you want more to show
in-game you can add <codeclass="docutils literal notranslate"><spanclass="pre">IN_GAME_ERRORS</span><spanclass="pre">=</span><spanclass="pre">True</span></code> to your settings file. This will echo most (but not all)
tracebacks both in-game as well as to the terminal/console. This is a potential security problem
though, so don’t keep this active when your game goes into production.</p>
<div><p>A common confusing error is finding that objects in-game are suddenly of the type <codeclass="docutils literal notranslate"><spanclass="pre">DefaultObject</span></code>
rather than your custom typeclass. This happens when you introduce a critical Syntax error to the
module holding your custom class. Since such a module is not valid Python, Evennia can’t load it at
all. Instead of crashing, Evennia will then print the full traceback to the terminal/console and
temporarily fall back to the safe <codeclass="docutils literal notranslate"><spanclass="pre">DefaultObject</span></code> until you fix the problem and reload.</p>
<p>Some people find reading documentation extremely dull and shun it out of principle. That’s your
call, but reading docs really <em>does</em> help you, promise! Evennia’s documentation is pretty thorough
and knowing what is possible can often give you a lot of new cool game ideas. That said, if you
can’t find the answer in the docs, don’t be shy to ask questions! The <aclass="reference external"href="https://sites.google.com/site/evenniaserver/discussions">discussion
<li><aclass="reference internal"href="#use-a-python-syntax-checker">Use a python syntax checker</a></li>
<li><aclass="reference internal"href="#plan-before-you-code">Plan before you code</a></li>
<li><aclass="reference internal"href="#code-in-your-game-folder-not-in-the-evennia-repository">Code in your game folder, not in the evennia/ repository</a></li>
<li><aclass="reference internal"href="#learn-to-read-tracebacks">Learn to read tracebacks</a></li>
<li><aclass="reference internal"href="#docs-are-here-to-help-you">Docs are here to help you</a></li>
<li><aclass="reference internal"href="#the-most-important-point">The most important point</a></li>