evennia/docs/1.0-dev/Howto/Starting/Part1/Starting-Part1.html
2020-11-14 11:55:52 +01:00

258 lines
No EOL
15 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Starting Tutorial (Part 1) &#8212; Evennia 1.0-dev documentation</title>
<link rel="stylesheet" href="../../../_static/nature.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
<script id="documentation_options" data-url_root="../../../" src="../../../_static/documentation_options.js"></script>
<script src="../../../_static/jquery.js"></script>
<script src="../../../_static/underscore.js"></script>
<script src="../../../_static/doctools.js"></script>
<script src="../../../_static/language_data.js"></script>
<link rel="shortcut icon" href="../../../_static/favicon.ico"/>
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
<link rel="next" title="Using the game and building stuff" href="Building-Quickstart.html" />
<link rel="prev" title="Setup quickstart" href="../../../Setup/Setup-Quickstart.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="Building-Quickstart.html" title="Using the game and building stuff"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="../../../Setup/Setup-Quickstart.html" title="Setup quickstart"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../../../index.html">Evennia 1.0-dev</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Starting Tutorial (Part 1)</a></li>
</ul>
<div class="develop">develop branch</div>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="starting-tutorial-part-1">
<h1>Starting Tutorial (Part 1)<a class="headerlink" href="#starting-tutorial-part-1" title="Permalink to this headline"></a></h1>
<div class="sidebar">
<p class="sidebar-title">Tutorial Parts</p>
<dl class="simple">
<dt><strong>Part 1: What we have</strong></dt><dd><p>A tour of Evennia and how to use the tools, including an introduction to Python.</p>
</dd>
<dt>Part 2: <a class="reference external" href="../Part2/Starting-Part2.html">What we want</a></dt><dd><p>Planning our tutorial game and what to think about when planning your own in the future.</p>
</dd>
<dt>Part 3: <a class="reference external" href="../Part3/Starting-Part3.html">How we get there</a></dt><dd><p>Getting down to the meat of extending Evennia to make our game</p>
</dd>
<dt>Part 4: <a class="reference external" href="../Part4/Starting-Part4.html">Using what we created</a></dt><dd><p>Building a tech-demo and world content to go with our code</p>
</dd>
<dt>Part 5: <a class="reference external" href="../Part5/Starting-Part5.html">Showing the world</a></dt><dd><p>Taking our new game online and let players try it out</p>
</dd>
</dl>
</div>
<p>Welcome to Evennia! This multi-part Tutorial will help you get off the ground. It consists
of five parts, each with several lessons. You can pick what seems interesting, but if you
follow through to the end you will have created a little online game of your own to play
and share with others!</p>
<div class="section" id="lessons-of-part-1-what-we-have">
<h2>Lessons of Part 1 - “What we have”<a class="headerlink" href="#lessons-of-part-1-what-we-have" title="Permalink to this headline"></a></h2>
<ol class="simple">
<li><p>Introduction (you are here)</p></li>
<li><p><a class="reference internal" href="Building-Quickstart.html"><span class="doc">Building stuff</span></a></p></li>
<li><p><a class="reference internal" href="Tutorial-World-Introduction.html"><span class="doc">The Tutorial World</span></a></p></li>
<li><p><a class="reference internal" href="Python-basic-introduction.html"><span class="doc">Python basics</span></a></p></li>
<li><p><a class="reference internal" href="Gamedir-Overview.html"><span class="doc">Game dir overview</span></a></p></li>
<li><p><a class="reference internal" href="Python-classes-and-objects.html"><span class="doc">Python classes and objects</span></a></p></li>
<li><p><a class="reference internal" href="Evennia-Library-Overview.html"><span class="doc">Accessing the Evennia library</span></a></p></li>
<li><p><a class="reference internal" href="Learning-Typeclasses.html"><span class="doc">Typeclasses and Persistent objects</span></a></p></li>
<li><p><a class="reference internal" href="Adding-Commands.html"><span class="doc">Making first own Commands</span></a></p></li>
<li><p><a class="reference internal" href="More-on-Commands.html"><span class="doc">Parsing and replacing default Commands</span></a></p></li>
<li><p><a class="reference internal" href="Creating-Things.html"><span class="doc">Creating things</span></a></p></li>
<li><p><a class="reference internal" href="Searching-Things.html"><span class="doc">Searching for things</span></a></p></li>
<li><p><a class="reference internal" href="Django-queries.html"><span class="doc">Advanced searching with Django queries</span></a></p></li>
</ol>
<p>In this first part well focus on what we get out of the box in Evennia - well get used to the tools,
and how to find things we are looking for. We will also dive into some of things youll
need to know to fully utilize the system, including giving you a brief rundown of Python concepts. If you are
an experienced Python programmer, some sections may feel a bit basic, but you will at least not have seen
these concepts in the context of Evennia before.</p>
</div>
<div class="section" id="things-you-will-need">
<h2>Things you will need<a class="headerlink" href="#things-you-will-need" title="Permalink to this headline"></a></h2>
<div class="section" id="a-command-line">
<h3>A Command line<a class="headerlink" href="#a-command-line" title="Permalink to this headline"></a></h3>
<p>First of all, you need to know how to find your Terminal/Console in your OS. The Evennia server can be controlled
from in-game, but you <em>will</em> need to use the command-line to get anywhere. Here are some starters:</p>
<ul class="simple">
<li><p><a class="reference external" href="https://tutorial.djangogirls.org/en/intro_to_command_line/">Django-girls Intro to the Command line for different OS:es</a></p></li>
</ul>
<blockquote>
<div><p>Note that we only use forward-slashes <code class="docutils literal notranslate"><span class="pre">/</span></code> to show file system paths in this documentation. Windows users need
to convert this to back-slashes <code class="docutils literal notranslate"><span class="pre">\</span></code> in their heads.</p>
</div></blockquote>
</div>
<div class="section" id="a-mud-client">
<h3>A MUD client<a class="headerlink" href="#a-mud-client" title="Permalink to this headline"></a></h3>
<p>You might already have a MUD-client you prefer. Check out the <a class="reference internal" href="../../../Setup/Client-Support-Grid.html"><span class="doc">grid of supported clients</span></a> for aid.
If telnets not your thing, you can also just use Evennias web client in your browser.</p>
<blockquote>
<div><p>In this documentation we often use MUD and MU or MU* interchangeably
as labels to represent all the historically different forms of text-based multiplayer game-styles,
like MUD, MUX, MUSH, MUCK, MOO and others. Evennia can be used to create all those game-styles
and more.</p>
</div></blockquote>
</div>
<div class="section" id="an-editor">
<h3>An Editor<a class="headerlink" href="#an-editor" title="Permalink to this headline"></a></h3>
<p>You need a text-editor to edit Python source files. Most everything that can edit and output raw
text works (so not Word).</p>
<ul class="simple">
<li><p><a class="reference external" href="https://www.elegantthemes.com/blog/resources/best-code-editors">Heres a blog post summing up some of the alternatives</a> - these
things dont change much from year to year. Popular choices for Python are PyCharm, VSCode, Atom, Sublime Text and Notepad++.
Evennia is to a very large degree coded in VIM, but thats not suitable for beginners.</p></li>
</ul>
<blockquote>
<div><p>Hint: When setting up your editor, make sure that pressing TAB inserts <em>4 spaces</em> rather than a Tab-character. Since
Python is whitespace-aware, this will make your life a lot easier.</p>
</div></blockquote>
</div>
<div class="section" id="set-up-a-game-dir-for-the-tutorial">
<h3>Set up a game dir for the tutorial<a class="headerlink" href="#set-up-a-game-dir-for-the-tutorial" title="Permalink to this headline"></a></h3>
<p>Next you should make sure you have <a class="reference internal" href="../../../Setup/Setup-Quickstart.html"><span class="doc">installed Evennia</span></a>. If you followed the instructions
you will already have created a game-dir. You could use that for this tutorial or you may want to do the
tutorial in its own, isolated game dir; its up to you.</p>
<ul>
<li><p>If you want a new gamedir for the tutorial game and already have Evennia running with another gamedir,
first enter that gamedir and run</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span> <span class="n">evennia</span> <span class="n">stop</span>
</pre></div>
</div>
</li>
</ul>
<blockquote>
<div><p>If you want to run two parallel servers, thatd be fine too, but one would have to use
different ports from the defaults, or thered be a clash. We will go into changing settings later.</p>
</div></blockquote>
<ul>
<li><p>Now go to where you want to create your tutorial-game. We will always refer to it as <code class="docutils literal notranslate"><span class="pre">mygame</span></code> so
it may be convenient if you do too:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span> <span class="n">evennia</span> <span class="o">--</span><span class="n">init</span> <span class="n">mygame</span>
<span class="n">cd</span> <span class="n">mygame</span>
<span class="n">evennia</span> <span class="n">migrate</span>
<span class="n">evennia</span> <span class="n">start</span> <span class="o">--</span><span class="n">log</span>
</pre></div>
</div>
<p>Add your superuser name and password at the prompt (email is optional). Make sure you can
go to <code class="docutils literal notranslate"><span class="pre">localhost:4000</span></code> in your MUD client or to <a class="reference external" href="http://localhost:4001">http://localhost:4001</a>
in your web browser (Mac users: Try <code class="docutils literal notranslate"><span class="pre">127.0.0.1</span></code> instead of <code class="docutils literal notranslate"><span class="pre">localhost</span></code> if you have trouble).</p>
<p>The above <code class="docutils literal notranslate"><span class="pre">--log</span></code> flag will have Evennia output all its logs to the terminal. This will block
the terminal from other input. To leave the log-view, press <code class="docutils literal notranslate"><span class="pre">Ctrl-C</span></code> (<code class="docutils literal notranslate"><span class="pre">Cmd-C</span></code> on Mac). To see
the log again just run</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span> <span class="n">evennia</span> <span class="o">--</span><span class="n">log</span>
</pre></div>
</div>
</li>
</ul>
<p>You should now be good to go!</p>
<div class="toctree-wrapper compound">
</div>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../../../index.html">
<img class="logo" src="../../../_static/evennia_logo.png" alt="Logo"/>
</a></p>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>$('#searchbox').show(0);</script>
<p><h3><a href="../../../index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Starting Tutorial (Part 1)</a><ul>
<li><a class="reference internal" href="#lessons-of-part-1-what-we-have">Lessons of Part 1 - “What we have”</a></li>
<li><a class="reference internal" href="#things-you-will-need">Things you will need</a><ul>
<li><a class="reference internal" href="#a-command-line">A Command line</a></li>
<li><a class="reference internal" href="#a-mud-client">A MUD client</a></li>
<li><a class="reference internal" href="#an-editor">An Editor</a></li>
<li><a class="reference internal" href="#set-up-a-game-dir-for-the-tutorial">Set up a game dir for the tutorial</a></li>
</ul>
</li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="../../../Setup/Setup-Quickstart.html"
title="previous chapter">Setup quickstart</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="Building-Quickstart.html"
title="next chapter">Using the game and building stuff</a></p>
<div role="note" aria-label="source link">
<!--h3>This Page</h3-->
<ul class="this-page-menu">
<li><a href="../../../_sources/Howto/Starting/Part1/Starting-Part1.md.txt"
rel="nofollow">Show Page Source</a></li>
</ul>
</div>
<h3>Versions</h3>
<ul>
<li><a href="Starting-Part1.html">1.0-dev (develop branch)</a></li>
<li><a href="../../../../0.9.5/index.html">0.9.5 (master branch)</a></li>
</ul>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../../genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="../../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="Building-Quickstart.html" title="Using the game and building stuff"
>next</a> |</li>
<li class="right" >
<a href="../../../Setup/Setup-Quickstart.html" title="Setup quickstart"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../../../index.html">Evennia 1.0-dev</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Starting Tutorial (Part 1)</a></li>
</ul>
<div class="develop">develop branch</div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2020, The Evennia developer community.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.2.1.
</div>
</body>
</html>