Updated HTML docs.

This commit is contained in:
Evennia docbuilder action 2022-11-23 20:20:36 +00:00
parent a6076aff42
commit 64849b32e2
146 changed files with 1903 additions and 2426 deletions

View file

@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: ff994fe83233749663200558bc3cc4fd
config: 9c39b81134271f9469ce985ba44341c4
tags: 645f666f9bcd5a90fca523b33c5a78b7

View file

@ -122,7 +122,7 @@ need to adopt some best practices as well as find a good place to start to learn
<p>Here are some pointers to get you going.</p>
<section id="start-with-the-tutorial">
<h2>Start with the tutorial<a class="headerlink" href="#start-with-the-tutorial" title="Permalink to this headline"></a></h2>
<p>Its highly recommended that you jump in on the <a class="reference internal" href="../Howtos/Beginner-Tutorial/Part1/Beginner-Tutorial-Part1-Intro.html"><span class="doc std std-doc">Starting Tutorial</span></a>. Even if
<p>Its highly recommended that you jump in on the <a class="reference internal" href="../Howtos/Beginner-Tutorial/Part1/Beginner-Tutorial-Part1-Overview.html"><span class="doc std std-doc">Starting Tutorial</span></a>. Even if
you only the beginning or some part of it, it covers much of the things needed to get started, including giving you are first introduction to Python.</p>
</section>
<section id="explore-evennia-interactively">

View file

@ -111,7 +111,7 @@
make your game, also if you never coded before. If you are an experienced coder, much of this will be familiar to you, but some things may still be useful.</p>
<section id="setting-up-a-workflow">
<h2>Setting up a workflow<a class="headerlink" href="#setting-up-a-workflow" title="Permalink to this headline"></a></h2>
<p>See also the <a class="reference internal" href="../Howtos/Beginner-Tutorial/Beginner-Tutorial-Intro.html"><span class="doc std std-doc">Beginner Tutorial</span></a>.</p>
<p>See also the <a class="reference internal" href="../Howtos/Beginner-Tutorial/Beginner-Tutorial-Overview.html"><span class="doc std std-doc">Beginner Tutorial</span></a>.</p>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="Version-Control.html">Version Control</a><ul>

View file

@ -191,7 +191,7 @@ may store.</p>
</div></blockquote>
<p>When testing, you can stop all tickers in the entire game with <code class="docutils literal notranslate"><span class="pre">tickerhandler.clear()</span></code>. You can also
view the currently subscribed objects with <code class="docutils literal notranslate"><span class="pre">tickerhandler.all()</span></code>.</p>
<p>See the <a class="reference internal" href="../Howtos/Weather-Tutorial.html"><span class="doc std std-doc">Weather Tutorial</span></a> for an example of using the TickerHandler.</p>
<p>See the <a class="reference internal" href="../Howtos/Tutorial-Weather-Effects.html"><span class="doc std std-doc">Weather Tutorial</span></a> for an example of using the TickerHandler.</p>
<section id="when-not-to-use-tickerhandler">
<h3>When <em>not</em> to use TickerHandler<a class="headerlink" href="#when-not-to-use-tickerhandler" title="Permalink to this headline"></a></h3>
<p>Using the TickerHandler may sound very useful but it is important to consider when not to use it.

View file

@ -148,7 +148,7 @@ change from the <code class="docutils literal notranslate"><span class="pre">web
<p>Example: To override or modify <code class="docutils literal notranslate"><span class="pre">evennia/web/website/template/website/index.html</span></code> you need to
add/modify <code class="docutils literal notranslate"><span class="pre">mygame/web/template_overrides/website/index.html</span></code>.</p>
<p>The detailed description on how to customize the website is best described in tutorial form. See the
<a class="reference internal" href="../Howtos/Beginner-Tutorial/Part5/Web-Tutorial.html"><span class="doc std std-doc">Web Tutorial</span></a> for more information.</p>
<a class="reference internal" href="../Howtos/Web-Changing-Webpage.html"><span class="doc std std-doc">Web Tutorial</span></a> for more information.</p>
</section>
<section id="overloading-django-views">
<h3>Overloading Django views<a class="headerlink" href="#overloading-django-views" title="Permalink to this headline"></a></h3>

View file

@ -6,7 +6,7 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<title>Static In Game Map &#8212; Evennia 1.0-dev documentation</title>
<title>Creating rooms from an ascii map &#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>
@ -17,8 +17,8 @@
<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="Tutorial Tweeting Game Stats" href="Tutorial-Tweeting-Game-Stats.html" />
<link rel="prev" title="Dynamic In Game Map" href="Dynamic-In-Game-Map.html" />
<link rel="next" title="SimpleDoor" href="Contrib-Simpledoor.html" />
<link rel="prev" title="Map Builder" href="Contrib-Mapbuilder.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
@ -30,14 +30,15 @@
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="Tutorial-Tweeting-Game-Stats.html" title="Tutorial Tweeting Game Stats"
<a href="Contrib-Simpledoor.html" title="SimpleDoor"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="Dynamic-In-Game-Map.html" title="Dynamic In Game Map"
<a href="Contrib-Mapbuilder.html" title="Map Builder"
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-1"><a href="Howtos-Overview.html" accesskey="U">Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Static In Game Map</a></li>
<li class="nav-item nav-item-1"><a href="Contribs-Overview.html" >Contribs</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="Contrib-Mapbuilder.html" accesskey="U">Map Builder</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Creating rooms from an ascii map</a></li>
</ul>
<div class="develop">develop branch</div>
</div>
@ -62,8 +63,7 @@
<script>$('#searchbox').show(0);</script>
<h3><a href="../index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Static In Game Map</a><ul>
<li><a class="reference internal" href="#introduction">Introduction</a></li>
<li><a class="reference internal" href="#">Creating rooms from an ascii map</a><ul>
<li><a class="reference internal" href="#planning-the-map">Planning the Map</a></li>
<li><a class="reference internal" href="#creating-a-map-object">Creating a Map Object</a></li>
<li><a class="reference internal" href="#building-the-map-areas">Building the map areas</a></li>
@ -74,15 +74,15 @@
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="Dynamic-In-Game-Map.html"
title="previous chapter">Dynamic In Game Map</a></p>
<p class="topless"><a href="Contrib-Mapbuilder.html"
title="previous chapter">Map Builder</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="Tutorial-Tweeting-Game-Stats.html"
title="next chapter">Tutorial Tweeting Game Stats</a></p>
<p class="topless"><a href="Contrib-Simpledoor.html"
title="next chapter">SimpleDoor</a></p>
<div role="note" aria-label="source link">
<!--h3>This Page</h3-->
<ul class="this-page-menu">
<li><a href="../_sources/Howtos/Static-In-Game-Map.md.txt"
<li><a href="../_sources/Contribs/Contrib-Mapbuilder-Tutorial.md.txt"
rel="nofollow">Show Page Source</a></li>
</ul>
</div><h3>Links</h3>
@ -98,7 +98,7 @@
</ul>
<h3>Versions</h3>
<ul>
<li><a href="Static-In-Game-Map.html">1.0-dev (develop branch)</a></li>
<li><a href="Contrib-Mapbuilder-Tutorial.html">1.0-dev (develop branch)</a></li>
<ul>
<li><a href="../0.9.5/index.html">0.9.5 (v0.9.5 branch)</a></li>
@ -109,14 +109,9 @@
<div class="bodywrapper">
<div class="body" role="main">
<section class="tex2jax_ignore mathjax_ignore" id="static-in-game-map">
<h1>Static In Game Map<a class="headerlink" href="#static-in-game-map" title="Permalink to this headline"></a></h1>
<section id="introduction">
<h2>Introduction<a class="headerlink" href="#introduction" title="Permalink to this headline"></a></h2>
<p>This tutorial describes the creation of an in-game map display based on a pre-drawn map. It also
details how to use the <a class="reference internal" href="../Components/Batch-Code-Processor.html"><span class="doc std std-doc">Batch code processor</span></a> for advanced building. There is
also the <a class="reference internal" href="Dynamic-In-Game-Map.html"><span class="doc std std-doc">Dynamic in-game map tutorial</span></a> that works in the opposite direction,
by generating a map from an existing grid of rooms.</p>
<section class="tex2jax_ignore mathjax_ignore" id="creating-rooms-from-an-ascii-map">
<h1>Creating rooms from an ascii map<a class="headerlink" href="#creating-rooms-from-an-ascii-map" title="Permalink to this headline"></a></h1>
<p>This tutorial describes the creation of an in-game map display based on a pre-drawn map. It goes with the <a class="reference internal" href="Contrib-Mapbuilder.html"><span class="doc std std-doc">Mapbuilder contrib</span></a>. It also details how to use the <a class="reference internal" href="../Components/Batch-Code-Processor.html"><span class="doc std std-doc">Batch code processor</span></a> for advanced building.</p>
<p>Evennia does not require its rooms to be positioned in a “logical” way. Your exits could be named
anything. You could make an exit “west” that leads to a room described to be in the far north. You
could have rooms inside one another, exits leading back to the same room or describing spatial
@ -148,9 +143,8 @@ Exits: north(#8), east(#9), south(#10), west(#11)
</li>
</ol>
<p>We will henceforth assume your game folder is name named <code class="docutils literal notranslate"><span class="pre">mygame</span></code> and that you havent modified the
default commands. We will also not be using <a class="reference internal" href="../Concepts/Colors.html"><span class="doc std std-doc">Colors</span></a> for our map since they
dkefault commands. We will also not be using <a class="reference internal" href="../Concepts/Colors.html"><span class="doc std std-doc">Colors</span></a> for our map since they
dont show in the documentation wiki.</p>
</section>
<section id="planning-the-map">
<h2>Planning the Map<a class="headerlink" href="#planning-the-map" title="Permalink to this headline"></a></h2>
<p>Lets begin with the fun part! Maps in MUDs come in many different [shapes and
@ -187,7 +181,7 @@ planning at this stage can solve many problems before they happen.</p>
<p>In this section we will try to create an actual “map” object that an account can pick up and look
at.</p>
<p>Evennia offers a range of <a class="reference internal" href="../Components/Default-Commands.html"><span class="doc std std-doc">default commands</span></a> for
<a class="reference internal" href="Beginner-Tutorial/Part1/Beginner-Tutorial-Building-Quickstart.html"><span class="doc std std-doc">creating objects and rooms in-game</span></a>. While readily accessible, these commands are made to do very
<a class="reference internal" href="../Howtos/Beginner-Tutorial/Part1/Beginner-Tutorial-Building-Quickstart.html"><span class="doc std std-doc">creating objects and rooms in-game</span></a>. While readily accessible, these commands are made to do very
specific, restricted things and will thus not offer as much flexibility to experiment (for an
advanced exception see <a class="reference internal" href="../Components/FuncParser.html"><span class="doc std std-doc">the FuncParser</span></a>). Additionally, entering long
descriptions and properties over and over in the game client can become tedious; especially when
@ -494,8 +488,8 @@ Prompt use <code class="docutils literal notranslate"><span class="pre">evennia<
easily new game defining features can be added to Evennia.</p>
<p>You can easily build from this tutorial by expanding the map and creating more rooms to explore. Why
not add more features to your game by trying other tutorials: [Add weather to your world](Weather-
Tutorial), <a class="reference internal" href="Tutorial-NPC-Reacting.html"><span class="doc std std-doc">fill your world with NPCs</span></a> or
<a class="reference internal" href="Turn-based-Combat-System.html"><span class="doc std std-doc">implement a combat system</span></a>.</p>
Tutorial), <a class="reference internal" href="../Howtos/Tutorial-NPC-Reacting.html"><span class="doc std std-doc">fill your world with NPCs</span></a> or
<a class="reference internal" href="../Howtos/Turn-based-Combat-System.html"><span class="doc std std-doc">implement a combat system</span></a>.</p>
</section>
</section>
@ -515,14 +509,15 @@ Tutorial), <a class="reference internal" href="Tutorial-NPC-Reacting.html"><span
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="Tutorial-Tweeting-Game-Stats.html" title="Tutorial Tweeting Game Stats"
<a href="Contrib-Simpledoor.html" title="SimpleDoor"
>next</a> |</li>
<li class="right" >
<a href="Dynamic-In-Game-Map.html" title="Dynamic In Game Map"
<a href="Contrib-Mapbuilder.html" title="Map Builder"
>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-1"><a href="Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Static In Game Map</a></li>
<li class="nav-item nav-item-1"><a href="Contribs-Overview.html" >Contribs</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="Contrib-Mapbuilder.html" >Map Builder</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Creating rooms from an ascii map</a></li>
</ul>
<div class="develop">develop branch</div>
</div>

View file

@ -17,7 +17,7 @@
<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="SimpleDoor" href="Contrib-Simpledoor.html" />
<link rel="next" title="Creating rooms from an ascii map" href="Contrib-Mapbuilder-Tutorial.html" />
<link rel="prev" title="Basic Map" href="Contrib-Ingame-Map-Display.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
@ -30,7 +30,7 @@
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="Contrib-Simpledoor.html" title="SimpleDoor"
<a href="Contrib-Mapbuilder-Tutorial.html" title="Creating rooms from an ascii map"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="Contrib-Ingame-Map-Display.html" title="Basic Map"
@ -78,8 +78,8 @@
<p class="topless"><a href="Contrib-Ingame-Map-Display.html"
title="previous chapter">Basic Map</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="Contrib-Simpledoor.html"
title="next chapter">SimpleDoor</a></p>
<p class="topless"><a href="Contrib-Mapbuilder-Tutorial.html"
title="next chapter">Creating rooms from an ascii map</a></p>
<div role="note" aria-label="source link">
<!--h3>This Page</h3-->
<ul class="this-page-menu">
@ -159,6 +159,7 @@ be used on the second iteration. The iteration number and a dictionary of
references to rooms previously created is passed to the build commands.</p>
<p>You then call the command in-game using the path to the MAP and MAP_LEGEND vars
The path you provide is relative to the evennia or mygame folder.</p>
<p>See also the <a class="reference internal" href="Contrib-Mapbuilder-Tutorial.html"><span class="doc std std-doc">separate tutorial in the docs</span></a>.</p>
<section id="installation">
<h2>Installation<a class="headerlink" href="#installation" title="Permalink to this headline"></a></h2>
<p>Use by importing and including the command in your default_cmdsets module.
@ -383,6 +384,8 @@ convenience The below example code should be in <a class="reference external" hr
</pre></div>
</div>
<div class="toctree-wrapper compound">
</div>
<hr class="docutils" />
<p><small>This document page is generated from <code class="docutils literal notranslate"><span class="pre">evennia/contrib/grid/mapbuilder/README.md</span></code>. Changes to this
file will be overwritten, so edit that file rather than this one.</small></p>
@ -406,7 +409,7 @@ file will be overwritten, so edit that file rather than this one.</small></p>
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="Contrib-Simpledoor.html" title="SimpleDoor"
<a href="Contrib-Mapbuilder-Tutorial.html" title="Creating rooms from an ascii map"
>next</a> |</li>
<li class="right" >
<a href="Contrib-Ingame-Map-Display.html" title="Basic Map"

View file

@ -18,7 +18,7 @@
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Slow Exit" href="Contrib-Slow-Exit.html" />
<link rel="prev" title="Map Builder" href="Contrib-Mapbuilder.html" />
<link rel="prev" title="Creating rooms from an ascii map" href="Contrib-Mapbuilder-Tutorial.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
@ -33,7 +33,7 @@
<a href="Contrib-Slow-Exit.html" title="Slow Exit"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="Contrib-Mapbuilder.html" title="Map Builder"
<a href="Contrib-Mapbuilder-Tutorial.html" title="Creating rooms from an ascii map"
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-1"><a href="Contribs-Overview.html" accesskey="U">Contribs</a> &#187;</li>
@ -70,8 +70,8 @@
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="Contrib-Mapbuilder.html"
title="previous chapter">Map Builder</a></p>
<p class="topless"><a href="Contrib-Mapbuilder-Tutorial.html"
title="previous chapter">Creating rooms from an ascii map</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="Contrib-Slow-Exit.html"
title="next chapter">Slow Exit</a></p>
@ -172,7 +172,7 @@ file will be overwritten, so edit that file rather than this one.</small></p>
<a href="Contrib-Slow-Exit.html" title="Slow Exit"
>next</a> |</li>
<li class="right" >
<a href="Contrib-Mapbuilder.html" title="Map Builder"
<a href="Contrib-Mapbuilder-Tutorial.html" title="Creating rooms from an ascii map"
>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-1"><a href="Contribs-Overview.html" >Contribs</a> &#187;</li>

View file

@ -62,74 +62,75 @@
<h3><a href="../index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Contribs</a><ul>
<li><a class="reference internal" href="#index">Index</a></li>
<li><a class="reference internal" href="#base-systems">base_systems</a><ul>
<li><a class="reference internal" href="#contrib-awsstorage">Contrib: <code class="docutils literal notranslate"><span class="pre">awsstorage</span></code></a></li>
<li><a class="reference internal" href="#contrib-building-menu">Contrib: <code class="docutils literal notranslate"><span class="pre">building_menu</span></code></a></li>
<li><a class="reference internal" href="#contrib-color-markups">Contrib: <code class="docutils literal notranslate"><span class="pre">color_markups</span></code></a></li>
<li><a class="reference internal" href="#contrib-components">Contrib: <code class="docutils literal notranslate"><span class="pre">components</span></code></a></li>
<li><a class="reference internal" href="#awsstorage"><code class="docutils literal notranslate"><span class="pre">awsstorage</span></code></a></li>
<li><a class="reference internal" href="#building-menu"><code class="docutils literal notranslate"><span class="pre">building_menu</span></code></a></li>
<li><a class="reference internal" href="#color-markups"><code class="docutils literal notranslate"><span class="pre">color_markups</span></code></a></li>
<li><a class="reference internal" href="#components"><code class="docutils literal notranslate"><span class="pre">components</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li><a class="reference internal" href="#the-components-contrib">The Components Contrib</a><ul>
<li><a class="reference internal" href="#contrib-custom-gametime">Contrib: <code class="docutils literal notranslate"><span class="pre">custom_gametime</span></code></a></li>
<li><a class="reference internal" href="#contrib-email-login">Contrib: <code class="docutils literal notranslate"><span class="pre">email_login</span></code></a></li>
<li><a class="reference internal" href="#contrib-ingame-python">Contrib: <code class="docutils literal notranslate"><span class="pre">ingame_python</span></code></a></li>
<li><a class="reference internal" href="#contrib-menu-login">Contrib: <code class="docutils literal notranslate"><span class="pre">menu_login</span></code></a></li>
<li><a class="reference internal" href="#contrib-mux-comms-cmds">Contrib: <code class="docutils literal notranslate"><span class="pre">mux_comms_cmds</span></code></a></li>
<li><a class="reference internal" href="#contrib-unixcommand">Contrib: <code class="docutils literal notranslate"><span class="pre">unixcommand</span></code></a></li>
<li><a class="reference internal" href="#custom-gametime"><code class="docutils literal notranslate"><span class="pre">custom_gametime</span></code></a></li>
<li><a class="reference internal" href="#email-login"><code class="docutils literal notranslate"><span class="pre">email_login</span></code></a></li>
<li><a class="reference internal" href="#ingame-python"><code class="docutils literal notranslate"><span class="pre">ingame_python</span></code></a></li>
<li><a class="reference internal" href="#menu-login"><code class="docutils literal notranslate"><span class="pre">menu_login</span></code></a></li>
<li><a class="reference internal" href="#mux-comms-cmds"><code class="docutils literal notranslate"><span class="pre">mux_comms_cmds</span></code></a></li>
<li><a class="reference internal" href="#unixcommand"><code class="docutils literal notranslate"><span class="pre">unixcommand</span></code></a></li>
<li><a class="reference internal" href="#full-systems">full_systems</a><ul>
<li><a class="reference internal" href="#contrib-evscaperoom">Contrib: <code class="docutils literal notranslate"><span class="pre">evscaperoom</span></code></a></li>
<li><a class="reference internal" href="#evscaperoom"><code class="docutils literal notranslate"><span class="pre">evscaperoom</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#game-systems">game_systems</a><ul>
<li><a class="reference internal" href="#contrib-barter">Contrib: <code class="docutils literal notranslate"><span class="pre">barter</span></code></a></li>
<li><a class="reference internal" href="#contrib-clothing">Contrib: <code class="docutils literal notranslate"><span class="pre">clothing</span></code></a></li>
<li><a class="reference internal" href="#contrib-cooldowns">Contrib: <code class="docutils literal notranslate"><span class="pre">cooldowns</span></code></a></li>
<li><a class="reference internal" href="#contrib-crafting">Contrib: <code class="docutils literal notranslate"><span class="pre">crafting</span></code></a></li>
<li><a class="reference internal" href="#contrib-gendersub">Contrib: <code class="docutils literal notranslate"><span class="pre">gendersub</span></code></a></li>
<li><a class="reference internal" href="#contrib-mail">Contrib: <code class="docutils literal notranslate"><span class="pre">mail</span></code></a></li>
<li><a class="reference internal" href="#contrib-multidescer">Contrib: <code class="docutils literal notranslate"><span class="pre">multidescer</span></code></a></li>
<li><a class="reference internal" href="#contrib-puzzles">Contrib: <code class="docutils literal notranslate"><span class="pre">puzzles</span></code></a></li>
<li><a class="reference internal" href="#contrib-turnbattle">Contrib: <code class="docutils literal notranslate"><span class="pre">turnbattle</span></code></a></li>
<li><a class="reference internal" href="#barter"><code class="docutils literal notranslate"><span class="pre">barter</span></code></a></li>
<li><a class="reference internal" href="#clothing"><code class="docutils literal notranslate"><span class="pre">clothing</span></code></a></li>
<li><a class="reference internal" href="#cooldowns"><code class="docutils literal notranslate"><span class="pre">cooldowns</span></code></a></li>
<li><a class="reference internal" href="#crafting"><code class="docutils literal notranslate"><span class="pre">crafting</span></code></a></li>
<li><a class="reference internal" href="#gendersub"><code class="docutils literal notranslate"><span class="pre">gendersub</span></code></a></li>
<li><a class="reference internal" href="#mail"><code class="docutils literal notranslate"><span class="pre">mail</span></code></a></li>
<li><a class="reference internal" href="#multidescer"><code class="docutils literal notranslate"><span class="pre">multidescer</span></code></a></li>
<li><a class="reference internal" href="#puzzles"><code class="docutils literal notranslate"><span class="pre">puzzles</span></code></a></li>
<li><a class="reference internal" href="#turnbattle"><code class="docutils literal notranslate"><span class="pre">turnbattle</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#grid">grid</a><ul>
<li><a class="reference internal" href="#contrib-extended-room">Contrib: <code class="docutils literal notranslate"><span class="pre">extended_room</span></code></a></li>
<li><a class="reference internal" href="#contrib-ingame-map-display">Contrib: <code class="docutils literal notranslate"><span class="pre">ingame_map_display</span></code></a></li>
<li><a class="reference internal" href="#contrib-mapbuilder">Contrib: <code class="docutils literal notranslate"><span class="pre">mapbuilder</span></code></a></li>
<li><a class="reference internal" href="#contrib-simpledoor">Contrib: <code class="docutils literal notranslate"><span class="pre">simpledoor</span></code></a></li>
<li><a class="reference internal" href="#contrib-slow-exit">Contrib: <code class="docutils literal notranslate"><span class="pre">slow_exit</span></code></a></li>
<li><a class="reference internal" href="#contrib-wilderness">Contrib: <code class="docutils literal notranslate"><span class="pre">wilderness</span></code></a></li>
<li><a class="reference internal" href="#contrib-xyzgrid">Contrib: <code class="docutils literal notranslate"><span class="pre">xyzgrid</span></code></a></li>
<li><a class="reference internal" href="#extended-room"><code class="docutils literal notranslate"><span class="pre">extended_room</span></code></a></li>
<li><a class="reference internal" href="#ingame-map-display"><code class="docutils literal notranslate"><span class="pre">ingame_map_display</span></code></a></li>
<li><a class="reference internal" href="#mapbuilder"><code class="docutils literal notranslate"><span class="pre">mapbuilder</span></code></a></li>
<li><a class="reference internal" href="#simpledoor"><code class="docutils literal notranslate"><span class="pre">simpledoor</span></code></a></li>
<li><a class="reference internal" href="#slow-exit"><code class="docutils literal notranslate"><span class="pre">slow_exit</span></code></a></li>
<li><a class="reference internal" href="#wilderness"><code class="docutils literal notranslate"><span class="pre">wilderness</span></code></a></li>
<li><a class="reference internal" href="#xyzgrid"><code class="docutils literal notranslate"><span class="pre">xyzgrid</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#rpg">rpg</a><ul>
<li><a class="reference internal" href="#contrib-buffs">Contrib: <code class="docutils literal notranslate"><span class="pre">buffs</span></code></a></li>
<li><a class="reference internal" href="#contrib-character-creator">Contrib: <code class="docutils literal notranslate"><span class="pre">character_creator</span></code></a></li>
<li><a class="reference internal" href="#contrib-dice">Contrib: <code class="docutils literal notranslate"><span class="pre">dice</span></code></a></li>
<li><a class="reference internal" href="#contrib-health-bar">Contrib: <code class="docutils literal notranslate"><span class="pre">health_bar</span></code></a></li>
<li><a class="reference internal" href="#contrib-rpsystem">Contrib: <code class="docutils literal notranslate"><span class="pre">rpsystem</span></code></a></li>
<li><a class="reference internal" href="#contrib-traits">Contrib: <code class="docutils literal notranslate"><span class="pre">traits</span></code></a></li>
<li><a class="reference internal" href="#buffs"><code class="docutils literal notranslate"><span class="pre">buffs</span></code></a></li>
<li><a class="reference internal" href="#character-creator"><code class="docutils literal notranslate"><span class="pre">character_creator</span></code></a></li>
<li><a class="reference internal" href="#dice"><code class="docutils literal notranslate"><span class="pre">dice</span></code></a></li>
<li><a class="reference internal" href="#health-bar"><code class="docutils literal notranslate"><span class="pre">health_bar</span></code></a></li>
<li><a class="reference internal" href="#rpsystem"><code class="docutils literal notranslate"><span class="pre">rpsystem</span></code></a></li>
<li><a class="reference internal" href="#traits"><code class="docutils literal notranslate"><span class="pre">traits</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#tutorials">tutorials</a><ul>
<li><a class="reference internal" href="#contrib-batchprocessor">Contrib: <code class="docutils literal notranslate"><span class="pre">batchprocessor</span></code></a></li>
<li><a class="reference internal" href="#contrib-bodyfunctions">Contrib: <code class="docutils literal notranslate"><span class="pre">bodyfunctions</span></code></a></li>
<li><a class="reference internal" href="#contrib-evadventure">Contrib: <code class="docutils literal notranslate"><span class="pre">evadventure</span></code></a></li>
<li><a class="reference internal" href="#contrib-mirror">Contrib: <code class="docutils literal notranslate"><span class="pre">mirror</span></code></a></li>
<li><a class="reference internal" href="#contrib-red-button">Contrib: <code class="docutils literal notranslate"><span class="pre">red_button</span></code></a></li>
<li><a class="reference internal" href="#contrib-talking-npc">Contrib: <code class="docutils literal notranslate"><span class="pre">talking_npc</span></code></a></li>
<li><a class="reference internal" href="#contrib-tutorial-world">Contrib: <code class="docutils literal notranslate"><span class="pre">tutorial_world</span></code></a></li>
<li><a class="reference internal" href="#batchprocessor"><code class="docutils literal notranslate"><span class="pre">batchprocessor</span></code></a></li>
<li><a class="reference internal" href="#bodyfunctions"><code class="docutils literal notranslate"><span class="pre">bodyfunctions</span></code></a></li>
<li><a class="reference internal" href="#evadventure"><code class="docutils literal notranslate"><span class="pre">evadventure</span></code></a></li>
<li><a class="reference internal" href="#mirror"><code class="docutils literal notranslate"><span class="pre">mirror</span></code></a></li>
<li><a class="reference internal" href="#red-button"><code class="docutils literal notranslate"><span class="pre">red_button</span></code></a></li>
<li><a class="reference internal" href="#talking-npc"><code class="docutils literal notranslate"><span class="pre">talking_npc</span></code></a></li>
<li><a class="reference internal" href="#tutorial-world"><code class="docutils literal notranslate"><span class="pre">tutorial_world</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#utils">utils</a><ul>
<li><a class="reference internal" href="#contrib-auditing">Contrib: <code class="docutils literal notranslate"><span class="pre">auditing</span></code></a></li>
<li><a class="reference internal" href="#contrib-fieldfill">Contrib: <code class="docutils literal notranslate"><span class="pre">fieldfill</span></code></a></li>
<li><a class="reference internal" href="#contrib-git-integration">Contrib: <code class="docutils literal notranslate"><span class="pre">git_integration</span></code></a></li>
<li><a class="reference internal" href="#contrib-name-generator">Contrib: <code class="docutils literal notranslate"><span class="pre">name_generator</span></code></a></li>
<li><a class="reference internal" href="#contrib-random-string-generator">Contrib: <code class="docutils literal notranslate"><span class="pre">random_string_generator</span></code></a></li>
<li><a class="reference internal" href="#contrib-tree-select">Contrib: <code class="docutils literal notranslate"><span class="pre">tree_select</span></code></a></li>
<li><a class="reference internal" href="#auditing"><code class="docutils literal notranslate"><span class="pre">auditing</span></code></a></li>
<li><a class="reference internal" href="#fieldfill"><code class="docutils literal notranslate"><span class="pre">fieldfill</span></code></a></li>
<li><a class="reference internal" href="#git-integration"><code class="docutils literal notranslate"><span class="pre">git_integration</span></code></a></li>
<li><a class="reference internal" href="#name-generator"><code class="docutils literal notranslate"><span class="pre">name_generator</span></code></a></li>
<li><a class="reference internal" href="#random-string-generator"><code class="docutils literal notranslate"><span class="pre">random_string_generator</span></code></a></li>
<li><a class="reference internal" href="#tree-select"><code class="docutils literal notranslate"><span class="pre">tree_select</span></code></a></li>
</ul>
</li>
</ul>
@ -174,10 +175,16 @@
<section class="tex2jax_ignore mathjax_ignore" id="contribs">
<h1>Contribs<a class="headerlink" href="#contribs" title="Permalink to this headline"></a></h1>
<aside class="sidebar">
<p class="sidebar-title">More contributions</p>
<p>Additional Evennia code snippets and contributions can be found
in the <a class="reference external" href="https://github.com/evennia/evennia/discussions/categories/community-contribs-snippets">Community Contribs &amp; Snippets</a> forum.</p>
</aside>
<p><em>Contribs</em> are optional code snippets and systems contributed by
the Evennia community. They vary in size and complexity and
may be more specific about game types and styles than core Evennia.
This page is auto-generated and summarizes all contribs currently included.</p>
This page is auto-generated and summarizes all <strong>46</strong> contribs currently included
with the Evennia distribution.</p>
<p>All contrib categories are imported from <code class="docutils literal notranslate"><span class="pre">evennia.contrib</span></code>, such as</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>from evennia.contrib.base_systems import building_menu
</pre></div>
@ -185,15 +192,108 @@ This page is auto-generated and summarizes all contribs currently included.</p>
<p>Each contrib contains installation instructions for how to integrate it
with your other code. If you want to tweak the code of a contrib, just
copy its entire folder to your game directory and modify/use it from there.</p>
<blockquote>
<div><p>Hint: Additional (potentially un-maintained) code snippets from the community can be found
in our discussion forums <a class="reference external" href="https://github.com/evennia/evennia/discussions/categories/community-contribs-snippets">Community Contribs &amp; Snippets</a> category.</p>
</div></blockquote>
<p>If you want to contribute yourself, see <a class="reference internal" href="../Contributing.html"><span class="doc std std-doc">here</span></a>!</p>
<section id="index">
<h2>Index<a class="headerlink" href="#index" title="Permalink to this headline"></a></h2>
<table class="colwidths-auto docutils align-default">
<thead>
<tr class="row-odd"><th class="head"><p></p></th>
<th class="head"><p></p></th>
<th class="head"><p></p></th>
<th class="head"><p></p></th>
<th class="head"><p></p></th>
<th class="head"><p></p></th>
<th class="head"><p></p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><a class="reference internal" href="#base-systems"><span class="std std-doc">base_systems</span></a></p></td>
<td><p><a class="reference internal" href="#full-systems"><span class="std std-doc">full_systems</span></a></p></td>
<td><p><a class="reference internal" href="#game-systems"><span class="std std-doc">game_systems</span></a></p></td>
<td><p><a class="reference internal" href="#grid"><span class="std std-doc">grid</span></a></p></td>
<td><p><a class="reference internal" href="#rpg"><span class="std std-doc">rpg</span></a></p></td>
<td><p><a class="reference internal" href="#tutorials"><span class="std std-doc">tutorials</span></a></p></td>
<td><p><a class="reference internal" href="#utils"><span class="std std-doc">utils</span></a></p></td>
</tr>
</tbody>
</table>
<table class="colwidths-auto docutils align-default">
<thead>
<tr class="row-odd"><th class="head"><p></p></th>
<th class="head"><p></p></th>
<th class="head"><p></p></th>
<th class="head"><p></p></th>
<th class="head"><p></p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><a class="reference internal" href="#auditing"><span class="std std-doc">auditing</span></a></p></td>
<td><p><a class="reference internal" href="#awsstorage"><span class="std std-doc">awsstorage</span></a></p></td>
<td><p><a class="reference internal" href="#barter"><span class="std std-doc">barter</span></a></p></td>
<td><p><a class="reference internal" href="#batchprocessor"><span class="std std-doc">batchprocessor</span></a></p></td>
<td><p><a class="reference internal" href="#bodyfunctions"><span class="std std-doc">bodyfunctions</span></a></p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#buffs"><span class="std std-doc">buffs</span></a></p></td>
<td><p><a class="reference internal" href="#building-menu"><span class="std std-doc">building_menu</span></a></p></td>
<td><p><a class="reference internal" href="#character-creator"><span class="std std-doc">character_creator</span></a></p></td>
<td><p><a class="reference internal" href="#clothing"><span class="std std-doc">clothing</span></a></p></td>
<td><p><a class="reference internal" href="#color-markups"><span class="std std-doc">color_markups</span></a></p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#components"><span class="std std-doc">components</span></a></p></td>
<td><p><a class="reference internal" href="#cooldowns"><span class="std std-doc">cooldowns</span></a></p></td>
<td><p><a class="reference internal" href="#crafting"><span class="std std-doc">crafting</span></a></p></td>
<td><p><a class="reference internal" href="#custom-gametime"><span class="std std-doc">custom_gametime</span></a></p></td>
<td><p><a class="reference internal" href="#dice"><span class="std std-doc">dice</span></a></p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#email-login"><span class="std std-doc">email_login</span></a></p></td>
<td><p><a class="reference internal" href="#evadventure"><span class="std std-doc">evadventure</span></a></p></td>
<td><p><a class="reference internal" href="#evscaperoom"><span class="std std-doc">evscaperoom</span></a></p></td>
<td><p><a class="reference internal" href="#extended-room"><span class="std std-doc">extended_room</span></a></p></td>
<td><p><a class="reference internal" href="#fieldfill"><span class="std std-doc">fieldfill</span></a></p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#gendersub"><span class="std std-doc">gendersub</span></a></p></td>
<td><p><a class="reference internal" href="#git-integration"><span class="std std-doc">git_integration</span></a></p></td>
<td><p><a class="reference internal" href="#health-bar"><span class="std std-doc">health_bar</span></a></p></td>
<td><p><a class="reference internal" href="#ingame-map-display"><span class="std std-doc">ingame_map_display</span></a></p></td>
<td><p><a class="reference internal" href="#ingame-python"><span class="std std-doc">ingame_python</span></a></p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#mail"><span class="std std-doc">mail</span></a></p></td>
<td><p><a class="reference internal" href="#mapbuilder"><span class="std std-doc">mapbuilder</span></a></p></td>
<td><p><a class="reference internal" href="#menu-login"><span class="std std-doc">menu_login</span></a></p></td>
<td><p><a class="reference internal" href="#mirror"><span class="std std-doc">mirror</span></a></p></td>
<td><p><a class="reference internal" href="#multidescer"><span class="std std-doc">multidescer</span></a></p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#mux-comms-cmds"><span class="std std-doc">mux_comms_cmds</span></a></p></td>
<td><p><a class="reference internal" href="#name-generator"><span class="std std-doc">name_generator</span></a></p></td>
<td><p><a class="reference internal" href="#puzzles"><span class="std std-doc">puzzles</span></a></p></td>
<td><p><a class="reference internal" href="#random-string-generator"><span class="std std-doc">random_string_generator</span></a></p></td>
<td><p><a class="reference internal" href="#red-button"><span class="std std-doc">red_button</span></a></p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#rpsystem"><span class="std std-doc">rpsystem</span></a></p></td>
<td><p><a class="reference internal" href="#simpledoor"><span class="std std-doc">simpledoor</span></a></p></td>
<td><p><a class="reference internal" href="#slow-exit"><span class="std std-doc">slow_exit</span></a></p></td>
<td><p><a class="reference internal" href="#talking-npc"><span class="std std-doc">talking_npc</span></a></p></td>
<td><p><a class="reference internal" href="#traits"><span class="std std-doc">traits</span></a></p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#tree-select"><span class="std std-doc">tree_select</span></a></p></td>
<td><p><a class="reference internal" href="#turnbattle"><span class="std std-doc">turnbattle</span></a></p></td>
<td><p><a class="reference internal" href="#tutorial-world"><span class="std std-doc">tutorial_world</span></a></p></td>
<td><p><a class="reference internal" href="#unixcommand"><span class="std std-doc">unixcommand</span></a></p></td>
<td><p><a class="reference internal" href="#wilderness"><span class="std std-doc">wilderness</span></a></p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#xyzgrid"><span class="std std-doc">xyzgrid</span></a></p></td>
<td><p></p></td>
<td><p></p></td>
<td><p></p></td>
<td><p></p></td>
</tr>
</tbody>
</table>
</section>
<section id="base-systems">
<h2>base_systems<a class="headerlink" href="#base-systems" title="Permalink to this headline"></a></h2>
<p><em>This category contains systems that are not necessarily tied to a specific
in-game mechanic but is useful for the game as a whole. Examples include
<p><em>Systems that are not necessarily tied to a specific
in-game mechanic but which are useful for the game as a whole. Examples include
login systems, new command syntaxes, and build helpers.</em></p>
<div class="toctree-wrapper compound">
<ul>
@ -214,16 +314,16 @@ login systems, new command syntaxes, and build helpers.</em></p>
<li class="toctree-l1"><a class="reference internal" href="Contrib-Unixcommand.html">Unix-like Command style</a></li>
</ul>
</div>
<section id="contrib-awsstorage">
<h3>Contrib: <code class="docutils literal notranslate"><span class="pre">awsstorage</span></code><a class="headerlink" href="#contrib-awsstorage" title="Permalink to this headline"></a></h3>
<section id="awsstorage">
<h3><code class="docutils literal notranslate"><span class="pre">awsstorage</span></code><a class="headerlink" href="#awsstorage" title="Permalink to this headline"></a></h3>
<p><em>Contrib by The Right Honourable Reverend (trhr), 2020</em></p>
<p>This plugin migrates the Web-based portion of Evennia, namely images,
javascript, and other items located inside staticfiles into Amazon AWS (S3)
cloud hosting. Great for those serving media with the game.</p>
<p><a class="reference internal" href="Contrib-AWSStorage.html"><span class="doc std std-doc">Read the documentation</span></a> - <a class="reference internal" href="../api/evennia.contrib.base_systems.awsstorage.html#evennia-contrib-base-systems-awsstorage"><span class="std std-ref">Browse the Code</span></a></p>
</section>
<section id="contrib-building-menu">
<h3>Contrib: <code class="docutils literal notranslate"><span class="pre">building_menu</span></code><a class="headerlink" href="#contrib-building-menu" title="Permalink to this headline"></a></h3>
<section id="building-menu">
<h3><code class="docutils literal notranslate"><span class="pre">building_menu</span></code><a class="headerlink" href="#building-menu" title="Permalink to this headline"></a></h3>
<p><em>Contrib by vincent-lg, 2018</em></p>
<p>Building menus are in-game menus, not unlike <code class="docutils literal notranslate"><span class="pre">EvMenu</span></code> though using a
different approach. Building menus have been specifically designed to edit
@ -233,16 +333,16 @@ steps to add the contrib, you will have access to an <code class="docutils liter
that will edit any default object, offering to change its key and description.</p>
<p><a class="reference internal" href="Contrib-Building-Menu.html"><span class="doc std std-doc">Read the documentation</span></a> - <a class="reference internal" href="../api/evennia.contrib.base_systems.building_menu.html#evennia-contrib-base-systems-building-menu"><span class="std std-ref">Browse the Code</span></a></p>
</section>
<section id="contrib-color-markups">
<h3>Contrib: <code class="docutils literal notranslate"><span class="pre">color_markups</span></code><a class="headerlink" href="#contrib-color-markups" title="Permalink to this headline"></a></h3>
<section id="color-markups">
<h3><code class="docutils literal notranslate"><span class="pre">color_markups</span></code><a class="headerlink" href="#color-markups" title="Permalink to this headline"></a></h3>
<p><em>Contrib by Griatch, 2017</em></p>
<p>Additional color markup styles for Evennia (extending or replacing the default
<code class="docutils literal notranslate"><span class="pre">|r</span></code>, <code class="docutils literal notranslate"><span class="pre">|234</span></code>). Adds support for MUSH-style (<code class="docutils literal notranslate"><span class="pre">%cr</span></code>, <code class="docutils literal notranslate"><span class="pre">%c123</span></code>) and/or legacy-Evennia
(<code class="docutils literal notranslate"><span class="pre">{r</span></code>, <code class="docutils literal notranslate"><span class="pre">{123</span></code>).</p>
<p><a class="reference internal" href="Contrib-Color-Markups.html"><span class="doc std std-doc">Read the documentation</span></a> - <a class="reference internal" href="../api/evennia.contrib.base_systems.color_markups.html#evennia-contrib-base-systems-color-markups"><span class="std std-ref">Browse the Code</span></a></p>
</section>
<section id="contrib-components">
<h3>Contrib: <code class="docutils literal notranslate"><span class="pre">components</span></code><a class="headerlink" href="#contrib-components" title="Permalink to this headline"></a></h3>
<section id="components">
<h3><code class="docutils literal notranslate"><span class="pre">components</span></code><a class="headerlink" href="#components" title="Permalink to this headline"></a></h3>
<p><strong>Contrib by ChrisLR 2021</strong></p>
</section>
</section>
@ -250,8 +350,8 @@ that will edit any default object, offering to change its key and description.</
<section class="tex2jax_ignore mathjax_ignore" id="the-components-contrib">
<h1>The Components Contrib<a class="headerlink" href="#the-components-contrib" title="Permalink to this headline"></a></h1>
<p><a class="reference internal" href="Contrib-Components.html"><span class="doc std std-doc">Read the documentation</span></a> - <a class="reference internal" href="../api/evennia.contrib.base_systems.components.html#evennia-contrib-base-systems-components"><span class="std std-ref">Browse the Code</span></a></p>
<section id="contrib-custom-gametime">
<h2>Contrib: <code class="docutils literal notranslate"><span class="pre">custom_gametime</span></code><a class="headerlink" href="#contrib-custom-gametime" title="Permalink to this headline"></a></h2>
<section id="custom-gametime">
<h2><code class="docutils literal notranslate"><span class="pre">custom_gametime</span></code><a class="headerlink" href="#custom-gametime" title="Permalink to this headline"></a></h2>
<p><em>Contrib by vlgeoff, 2017 - based on Griatchs core original</em></p>
<p>This reimplements the <code class="docutils literal notranslate"><span class="pre">evennia.utils.gametime</span></code> module but with a <em>custom</em>
calendar (unusual number of days per week/month/year etc) for your game world.
@ -259,16 +359,16 @@ Like the original, it allows for scheduling events to happen at given
in-game times, but now taking this custom calendar into account.</p>
<p><a class="reference internal" href="Contrib-Custom-Gametime.html"><span class="doc std std-doc">Read the documentation</span></a> - <a class="reference internal" href="../api/evennia.contrib.base_systems.custom_gametime.html#evennia-contrib-base-systems-custom-gametime"><span class="std std-ref">Browse the Code</span></a></p>
</section>
<section id="contrib-email-login">
<h2>Contrib: <code class="docutils literal notranslate"><span class="pre">email_login</span></code><a class="headerlink" href="#contrib-email-login" title="Permalink to this headline"></a></h2>
<section id="email-login">
<h2><code class="docutils literal notranslate"><span class="pre">email_login</span></code><a class="headerlink" href="#email-login" title="Permalink to this headline"></a></h2>
<p><em>Contrib by Griatch, 2012</em></p>
<p>This is a variant of the login system that asks for an email-address
instead of a username to login. Note that it does not verify the email,
it just uses it as the identifier rather than a username.</p>
<p><a class="reference internal" href="Contrib-Email-Login.html"><span class="doc std std-doc">Read the documentation</span></a> - <a class="reference internal" href="../api/evennia.contrib.base_systems.email_login.html#evennia-contrib-base-systems-email-login"><span class="std std-ref">Browse the Code</span></a></p>
</section>
<section id="contrib-ingame-python">
<h2>Contrib: <code class="docutils literal notranslate"><span class="pre">ingame_python</span></code><a class="headerlink" href="#contrib-ingame-python" title="Permalink to this headline"></a></h2>
<section id="ingame-python">
<h2><code class="docutils literal notranslate"><span class="pre">ingame_python</span></code><a class="headerlink" href="#ingame-python" title="Permalink to this headline"></a></h2>
<p><em>Contrib by Vincent Le Goff 2017</em></p>
<p>This contrib adds the ability to script with Python in-game. It allows trusted
staff/builders to dynamically add features and triggers to individual objects
@ -280,16 +380,16 @@ security concerns (you must trust your builders deeply), so read the warnings in
this module carefully before continuing.</p>
<p><a class="reference internal" href="Contrib-Ingame-Python.html"><span class="doc std std-doc">Read the documentation</span></a> - <a class="reference internal" href="../api/evennia.contrib.base_systems.ingame_python.html#evennia-contrib-base-systems-ingame-python"><span class="std std-ref">Browse the Code</span></a></p>
</section>
<section id="contrib-menu-login">
<h2>Contrib: <code class="docutils literal notranslate"><span class="pre">menu_login</span></code><a class="headerlink" href="#contrib-menu-login" title="Permalink to this headline"></a></h2>
<section id="menu-login">
<h2><code class="docutils literal notranslate"><span class="pre">menu_login</span></code><a class="headerlink" href="#menu-login" title="Permalink to this headline"></a></h2>
<p><em>Contribution by Vincent-lg 2016. Reworked for modern EvMenu by Griatch, 2019.</em></p>
<p>This changes the Evennia login to ask for the account name and password as a series
of questions instead of requiring you to enter both at once. It uses Evennias
menu system <code class="docutils literal notranslate"><span class="pre">EvMenu</span></code> under the hood.</p>
<p><a class="reference internal" href="Contrib-Menu-Login.html"><span class="doc std std-doc">Read the documentation</span></a> - <a class="reference internal" href="../api/evennia.contrib.base_systems.menu_login.html#evennia-contrib-base-systems-menu-login"><span class="std std-ref">Browse the Code</span></a></p>
</section>
<section id="contrib-mux-comms-cmds">
<h2>Contrib: <code class="docutils literal notranslate"><span class="pre">mux_comms_cmds</span></code><a class="headerlink" href="#contrib-mux-comms-cmds" title="Permalink to this headline"></a></h2>
<section id="mux-comms-cmds">
<h2><code class="docutils literal notranslate"><span class="pre">mux_comms_cmds</span></code><a class="headerlink" href="#mux-comms-cmds" title="Permalink to this headline"></a></h2>
<p><em>Contribution by Griatch 2021</em></p>
<p>In Evennia 1.0+, the old Channel commands (originally inspired by MUX) were
replaced by the single <code class="docutils literal notranslate"><span class="pre">channel</span></code> command that performs all these functions.
@ -298,8 +398,8 @@ separate Commands more familiar to MU* users. This is just for show though, the
main <code class="docutils literal notranslate"><span class="pre">channel</span></code> command is still called under the hood.</p>
<p><a class="reference internal" href="Contrib-Mux-Comms-Cmds.html"><span class="doc std std-doc">Read the documentation</span></a> - <a class="reference internal" href="../api/evennia.contrib.base_systems.mux_comms_cmds.html#evennia-contrib-base-systems-mux-comms-cmds"><span class="std std-ref">Browse the Code</span></a></p>
</section>
<section id="contrib-unixcommand">
<h2>Contrib: <code class="docutils literal notranslate"><span class="pre">unixcommand</span></code><a class="headerlink" href="#contrib-unixcommand" title="Permalink to this headline"></a></h2>
<section id="unixcommand">
<h2><code class="docutils literal notranslate"><span class="pre">unixcommand</span></code><a class="headerlink" href="#unixcommand" title="Permalink to this headline"></a></h2>
<p><em>Contribution by Vincent Le Geoff (vlgeoff), 2017</em></p>
<p>This module contains a command class with an alternate syntax parser implementing
Unix-style command syntax in-game. This means <code class="docutils literal notranslate"><span class="pre">--options</span></code>, positional arguments
@ -311,15 +411,15 @@ library under the hood.</p>
</section>
<section id="full-systems">
<h2>full_systems<a class="headerlink" href="#full-systems" title="Permalink to this headline"></a></h2>
<p><em>This category contains complete game engines that can be used directly
to start creating content without no further additions (unless you want to).</em></p>
<p><em>Complete game engines that can be used directly to start creating content
without no further additions (unless you want to).</em></p>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="Contrib-Evscaperoom.html">EvscapeRoom</a></li>
</ul>
</div>
<section id="contrib-evscaperoom">
<h3>Contrib: <code class="docutils literal notranslate"><span class="pre">evscaperoom</span></code><a class="headerlink" href="#contrib-evscaperoom" title="Permalink to this headline"></a></h3>
<section id="evscaperoom">
<h3><code class="docutils literal notranslate"><span class="pre">evscaperoom</span></code><a class="headerlink" href="#evscaperoom" title="Permalink to this headline"></a></h3>
<p><em>Contribution by Griatch, 2019</em></p>
<p>A full engine for creating multiplayer escape-rooms in Evennia. Allows players to
spawn and join puzzle rooms that track their state independently. Any number of players
@ -331,10 +431,10 @@ content but contains the utilities and base classes and an empty example room.</
</section>
<section id="game-systems">
<h2>game_systems<a class="headerlink" href="#game-systems" title="Permalink to this headline"></a></h2>
<p><em>This category holds code implementing in-game gameplay systems like
crafting, mail, combat and more. Each system is meant to be adopted
piecemeal and adopted for your game. This does not include
roleplaying-specific systems, those are found in the <code class="docutils literal notranslate"><span class="pre">rpg</span></code> folder.</em></p>
<p><em>In-game gameplay systems like crafting, mail, combat and more.
Each system is meant to be adopted piecemeal and adopted for your game.
This does not include roleplaying-specific systems, those are found in
the <code class="docutils literal notranslate"><span class="pre">rpg</span></code> category.</em></p>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="Contrib-Barter.html">Barter system</a></li>
@ -348,8 +448,8 @@ roleplaying-specific systems, those are found in the <code class="docutils liter
<li class="toctree-l1"><a class="reference internal" href="Contrib-Turnbattle.html">Turn based battle system framework</a></li>
</ul>
</div>
<section id="contrib-barter">
<h3>Contrib: <code class="docutils literal notranslate"><span class="pre">barter</span></code><a class="headerlink" href="#contrib-barter" title="Permalink to this headline"></a></h3>
<section id="barter">
<h3><code class="docutils literal notranslate"><span class="pre">barter</span></code><a class="headerlink" href="#barter" title="Permalink to this headline"></a></h3>
<p><em>Contribution by Griatch, 2012</em></p>
<p>This implements a full barter system - a way for players to safely
trade items between each other in code rather than simple <code class="docutils literal notranslate"><span class="pre">give/get</span></code>
@ -360,15 +460,15 @@ be moved automatically). By just replacing one side with coin objects,
transactions.</p>
<p><a class="reference internal" href="Contrib-Barter.html"><span class="doc std std-doc">Read the documentation</span></a> - <a class="reference internal" href="../api/evennia.contrib.game_systems.barter.html#evennia-contrib-game-systems-barter"><span class="std std-ref">Browse the Code</span></a></p>
</section>
<section id="contrib-clothing">
<h3>Contrib: <code class="docutils literal notranslate"><span class="pre">clothing</span></code><a class="headerlink" href="#contrib-clothing" title="Permalink to this headline"></a></h3>
<section id="clothing">
<h3><code class="docutils literal notranslate"><span class="pre">clothing</span></code><a class="headerlink" href="#clothing" title="Permalink to this headline"></a></h3>
<p><em>Contribution by Tim Ashley Jenkins, 2017</em></p>
<p>Provides a typeclass and commands for wearable clothing. These
look of these clothes are appended to the characters description when worn.</p>
<p><a class="reference internal" href="Contrib-Clothing.html"><span class="doc std std-doc">Read the documentation</span></a> - <a class="reference internal" href="../api/evennia.contrib.game_systems.clothing.html#evennia-contrib-game-systems-clothing"><span class="std std-ref">Browse the Code</span></a></p>
</section>
<section id="contrib-cooldowns">
<h3>Contrib: <code class="docutils literal notranslate"><span class="pre">cooldowns</span></code><a class="headerlink" href="#contrib-cooldowns" title="Permalink to this headline"></a></h3>
<section id="cooldowns">
<h3><code class="docutils literal notranslate"><span class="pre">cooldowns</span></code><a class="headerlink" href="#cooldowns" title="Permalink to this headline"></a></h3>
<p><em>Contribution by owllex, 2021</em></p>
<p>Cooldowns are used to model rate-limited actions, like how often a
character can perform a given action; until a certain time has passed their
@ -377,8 +477,8 @@ handler that can be attached to any typeclass. A cooldown is a lightweight persi
asynchronous timer that you can query to see if a certain time has yet passed.</p>
<p><a class="reference internal" href="Contrib-Cooldowns.html"><span class="doc std std-doc">Read the documentation</span></a> - <a class="reference internal" href="../api/evennia.contrib.game_systems.cooldowns.html#evennia-contrib-game-systems-cooldowns"><span class="std std-ref">Browse the Code</span></a></p>
</section>
<section id="contrib-crafting">
<h3>Contrib: <code class="docutils literal notranslate"><span class="pre">crafting</span></code><a class="headerlink" href="#contrib-crafting" title="Permalink to this headline"></a></h3>
<section id="crafting">
<h3><code class="docutils literal notranslate"><span class="pre">crafting</span></code><a class="headerlink" href="#crafting" title="Permalink to this headline"></a></h3>
<p><em>Contribution by Griatch 2020</em></p>
<p>This implements a full crafting system. The principle is that of a recipe,
where you combine items (tagged as ingredients) create something new. The recipe can also
@ -386,8 +486,8 @@ require certain (non-consumed) tools. An example would be to use the bread re
combine flour, water and yeast with an oven to bake a loaf of bread.</p>
<p><a class="reference internal" href="Contrib-Crafting.html"><span class="doc std std-doc">Read the documentation</span></a> - <a class="reference internal" href="../api/evennia.contrib.game_systems.crafting.html#evennia-contrib-game-systems-crafting"><span class="std std-ref">Browse the Code</span></a></p>
</section>
<section id="contrib-gendersub">
<h3>Contrib: <code class="docutils literal notranslate"><span class="pre">gendersub</span></code><a class="headerlink" href="#contrib-gendersub" title="Permalink to this headline"></a></h3>
<section id="gendersub">
<h3><code class="docutils literal notranslate"><span class="pre">gendersub</span></code><a class="headerlink" href="#gendersub" title="Permalink to this headline"></a></h3>
<p><em>Contribution by Griatch 2015</em></p>
<p>This is a simple gender-aware Character class for allowing users to
insert custom markers in their text to indicate gender-aware
@ -395,8 +495,8 @@ messaging. It relies on a modified msg() and is meant as an
inspiration and starting point to how to do stuff like this.</p>
<p><a class="reference internal" href="Contrib-Gendersub.html"><span class="doc std std-doc">Read the documentation</span></a> - <a class="reference internal" href="../api/evennia.contrib.game_systems.gendersub.html#evennia-contrib-game-systems-gendersub"><span class="std std-ref">Browse the Code</span></a></p>
</section>
<section id="contrib-mail">
<h3>Contrib: <code class="docutils literal notranslate"><span class="pre">mail</span></code><a class="headerlink" href="#contrib-mail" title="Permalink to this headline"></a></h3>
<section id="mail">
<h3><code class="docutils literal notranslate"><span class="pre">mail</span></code><a class="headerlink" href="#mail" title="Permalink to this headline"></a></h3>
<p><em>Contribution by grungies1138 2016</em></p>
<p>A simple Brandymail style mail system that uses the <code class="docutils literal notranslate"><span class="pre">Msg</span></code> class from Evennia
Core. It has two Commands for either sending mails between Accounts (out of game)
@ -404,8 +504,8 @@ or between Characters (in-game). The two types of mails can be used together or
on their own.</p>
<p><a class="reference internal" href="Contrib-Mail.html"><span class="doc std std-doc">Read the documentation</span></a> - <a class="reference internal" href="../api/evennia.contrib.game_systems.mail.html#evennia-contrib-game-systems-mail"><span class="std std-ref">Browse the Code</span></a></p>
</section>
<section id="contrib-multidescer">
<h3>Contrib: <code class="docutils literal notranslate"><span class="pre">multidescer</span></code><a class="headerlink" href="#contrib-multidescer" title="Permalink to this headline"></a></h3>
<section id="multidescer">
<h3><code class="docutils literal notranslate"><span class="pre">multidescer</span></code><a class="headerlink" href="#multidescer" title="Permalink to this headline"></a></h3>
<p><em>Contribution by Griatch 2016</em></p>
<p>A “multidescer” is a concept from the MUSH world. It allows for
creating, managing and switching between multiple character
@ -414,8 +514,8 @@ changing clothes) in more free-form roleplaying systems. This will also
work well together with the <code class="docutils literal notranslate"><span class="pre">rpsystem</span></code> contrib.</p>
<p><a class="reference internal" href="Contrib-Multidescer.html"><span class="doc std std-doc">Read the documentation</span></a> - <a class="reference internal" href="../api/evennia.contrib.game_systems.multidescer.html#evennia-contrib-game-systems-multidescer"><span class="std std-ref">Browse the Code</span></a></p>
</section>
<section id="contrib-puzzles">
<h3>Contrib: <code class="docutils literal notranslate"><span class="pre">puzzles</span></code><a class="headerlink" href="#contrib-puzzles" title="Permalink to this headline"></a></h3>
<section id="puzzles">
<h3><code class="docutils literal notranslate"><span class="pre">puzzles</span></code><a class="headerlink" href="#puzzles" title="Permalink to this headline"></a></h3>
<p><em>Contribution by Henddher 2018</em></p>
<p>Intended for adventure-game style combination puzzles, such as combining fruits
and a blender to create a smoothie. Provides a typeclass and commands for objects
@ -424,8 +524,8 @@ puzzle is built from unique objects rather than using tags and a builder can cre
the puzzle entirely from in-game.</p>
<p><a class="reference internal" href="Contrib-Puzzles.html"><span class="doc std std-doc">Read the documentation</span></a> - <a class="reference internal" href="../api/evennia.contrib.game_systems.puzzles.html#evennia-contrib-game-systems-puzzles"><span class="std std-ref">Browse the Code</span></a></p>
</section>
<section id="contrib-turnbattle">
<h3>Contrib: <code class="docutils literal notranslate"><span class="pre">turnbattle</span></code><a class="headerlink" href="#contrib-turnbattle" title="Permalink to this headline"></a></h3>
<section id="turnbattle">
<h3><code class="docutils literal notranslate"><span class="pre">turnbattle</span></code><a class="headerlink" href="#turnbattle" title="Permalink to this headline"></a></h3>
<p><em>Contribution by Tim Ashley Jenkins, 2017</em></p>
<p>This is a framework for a simple turn-based combat system, similar
to those used in D&amp;D-style tabletop role playing games. It allows
@ -439,8 +539,8 @@ the participants until the fight ends.</p>
</section>
<section id="grid">
<h2>grid<a class="headerlink" href="#grid" title="Permalink to this headline"></a></h2>
<p><em>Systems related to the game worlds topology and structure. This has
contribs related to rooms, exits and map building.</em></p>
<p><em>Systems related to the game worlds topology and structure. Contribs related
to rooms, exits and map building.</em></p>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="Contrib-Extended-Room.html">Extended Room</a></li>
@ -452,8 +552,8 @@ contribs related to rooms, exits and map building.</em></p>
<li class="toctree-l1"><a class="reference internal" href="Contrib-XYZGrid.html">XYZgrid</a></li>
</ul>
</div>
<section id="contrib-extended-room">
<h3>Contrib: <code class="docutils literal notranslate"><span class="pre">extended_room</span></code><a class="headerlink" href="#contrib-extended-room" title="Permalink to this headline"></a></h3>
<section id="extended-room">
<h3><code class="docutils literal notranslate"><span class="pre">extended_room</span></code><a class="headerlink" href="#extended-room" title="Permalink to this headline"></a></h3>
<p><em>Contribution - Griatch 2012, vincent-lg 2019</em></p>
<p>This extends the normal <code class="docutils literal notranslate"><span class="pre">Room</span></code> typeclass to allow its description to change
with time-of-day and/or season. It also adds details for the player to look at
@ -461,8 +561,8 @@ in the room (without having to create a new in-game object for each). The room i
supported by new <code class="docutils literal notranslate"><span class="pre">look</span></code> and <code class="docutils literal notranslate"><span class="pre">desc</span></code> commands.</p>
<p><a class="reference internal" href="Contrib-Extended-Room.html"><span class="doc std std-doc">Read the documentation</span></a> - <a class="reference internal" href="../api/evennia.contrib.grid.extended_room.html#evennia-contrib-grid-extended-room"><span class="std std-ref">Browse the Code</span></a></p>
</section>
<section id="contrib-ingame-map-display">
<h3>Contrib: <code class="docutils literal notranslate"><span class="pre">ingame_map_display</span></code><a class="headerlink" href="#contrib-ingame-map-display" title="Permalink to this headline"></a></h3>
<section id="ingame-map-display">
<h3><code class="docutils literal notranslate"><span class="pre">ingame_map_display</span></code><a class="headerlink" href="#ingame-map-display" title="Permalink to this headline"></a></h3>
<p><em>Contribution - helpme 2022</em></p>
<p>This adds an ascii <code class="docutils literal notranslate"><span class="pre">map</span></code> to a given room which can be viewed with the <code class="docutils literal notranslate"><span class="pre">map</span></code> command.
You can easily alter it to add special characters, room colors etc. The map shown is
@ -470,22 +570,22 @@ dynamically generated on use, and supports all compass directions and up/down. O
directions are ignored.</p>
<p><a class="reference internal" href="Contrib-Ingame-Map-Display.html"><span class="doc std std-doc">Read the documentation</span></a> - <a class="reference internal" href="../api/evennia.contrib.grid.ingame_map_display.html#evennia-contrib-grid-ingame-map-display"><span class="std std-ref">Browse the Code</span></a></p>
</section>
<section id="contrib-mapbuilder">
<h3>Contrib: <code class="docutils literal notranslate"><span class="pre">mapbuilder</span></code><a class="headerlink" href="#contrib-mapbuilder" title="Permalink to this headline"></a></h3>
<section id="mapbuilder">
<h3><code class="docutils literal notranslate"><span class="pre">mapbuilder</span></code><a class="headerlink" href="#mapbuilder" title="Permalink to this headline"></a></h3>
<p><em>Contribution by Cloud_Keeper 2016</em></p>
<p>Build a game map from the drawing of a 2D ASCII map.</p>
<p><a class="reference internal" href="Contrib-Mapbuilder.html"><span class="doc std std-doc">Read the documentation</span></a> - <a class="reference internal" href="../api/evennia.contrib.grid.mapbuilder.html#evennia-contrib-grid-mapbuilder"><span class="std std-ref">Browse the Code</span></a></p>
</section>
<section id="contrib-simpledoor">
<h3>Contrib: <code class="docutils literal notranslate"><span class="pre">simpledoor</span></code><a class="headerlink" href="#contrib-simpledoor" title="Permalink to this headline"></a></h3>
<section id="simpledoor">
<h3><code class="docutils literal notranslate"><span class="pre">simpledoor</span></code><a class="headerlink" href="#simpledoor" title="Permalink to this headline"></a></h3>
<p><em>Contribution by Griatch, 2016</em></p>
<p>A simple two-way exit that represents a door that can be opened and
closed from both sides. Can easily be expanded to make it lockable,
destroyable etc.</p>
<p><a class="reference internal" href="Contrib-Simpledoor.html"><span class="doc std std-doc">Read the documentation</span></a> - <a class="reference internal" href="../api/evennia.contrib.grid.simpledoor.html#evennia-contrib-grid-simpledoor"><span class="std std-ref">Browse the Code</span></a></p>
</section>
<section id="contrib-slow-exit">
<h3>Contrib: <code class="docutils literal notranslate"><span class="pre">slow_exit</span></code><a class="headerlink" href="#contrib-slow-exit" title="Permalink to this headline"></a></h3>
<section id="slow-exit">
<h3><code class="docutils literal notranslate"><span class="pre">slow_exit</span></code><a class="headerlink" href="#slow-exit" title="Permalink to this headline"></a></h3>
<p><em>Contribution by Griatch 2014</em></p>
<p>An example of an Exit-type that delays its traversal. This simulates
slow movement, common in many games. The contrib also
@ -493,8 +593,8 @@ contains two commands, <code class="docutils literal notranslate"><span class="p
and abort an ongoing traversal, respectively.</p>
<p><a class="reference internal" href="Contrib-Slow-Exit.html"><span class="doc std std-doc">Read the documentation</span></a> - <a class="reference internal" href="../api/evennia.contrib.grid.slow_exit.html#evennia-contrib-grid-slow-exit"><span class="std std-ref">Browse the Code</span></a></p>
</section>
<section id="contrib-wilderness">
<h3>Contrib: <code class="docutils literal notranslate"><span class="pre">wilderness</span></code><a class="headerlink" href="#contrib-wilderness" title="Permalink to this headline"></a></h3>
<section id="wilderness">
<h3><code class="docutils literal notranslate"><span class="pre">wilderness</span></code><a class="headerlink" href="#wilderness" title="Permalink to this headline"></a></h3>
<p><em>Contribution by titeuf87, 2017</em></p>
<p>This contrib provides a wilderness map without actually creating a large number
of rooms - as you move, you instead end up back in the same room but its description
@ -502,8 +602,8 @@ changes. This means you can make huge areas with little database use as
long as the rooms are relatively similar (name/desc changing).</p>
<p><a class="reference internal" href="Contrib-Wilderness.html"><span class="doc std std-doc">Read the documentation</span></a> - <a class="reference internal" href="../api/evennia.contrib.grid.wilderness.html#evennia-contrib-grid-wilderness"><span class="std std-ref">Browse the Code</span></a></p>
</section>
<section id="contrib-xyzgrid">
<h3>Contrib: <code class="docutils literal notranslate"><span class="pre">xyzgrid</span></code><a class="headerlink" href="#contrib-xyzgrid" title="Permalink to this headline"></a></h3>
<section id="xyzgrid">
<h3><code class="docutils literal notranslate"><span class="pre">xyzgrid</span></code><a class="headerlink" href="#xyzgrid" title="Permalink to this headline"></a></h3>
<p><em>Contribution by Griatch 2021</em></p>
<p>Places Evennias game world on an xy (z being different maps) coordinate grid.
Grid is created and maintained externally by drawing and parsing 2D ASCII maps,
@ -516,7 +616,7 @@ current location (useful for displaying the grid as an in-game, updating map).</
</section>
<section id="rpg">
<h2>rpg<a class="headerlink" href="#rpg" title="Permalink to this headline"></a></h2>
<p><em>These are systems specifically related to roleplaying
<p><em>Systems specifically related to roleplaying
and rule implementation like character traits, dice rolling and emoting.</em></p>
<div class="toctree-wrapper compound">
<ul>
@ -528,21 +628,21 @@ and rule implementation like character traits, dice rolling and emoting.</em></p
<li class="toctree-l1"><a class="reference internal" href="Contrib-Traits.html">Traits</a></li>
</ul>
</div>
<section id="contrib-buffs">
<h3>Contrib: <code class="docutils literal notranslate"><span class="pre">buffs</span></code><a class="headerlink" href="#contrib-buffs" title="Permalink to this headline"></a></h3>
<section id="buffs">
<h3><code class="docutils literal notranslate"><span class="pre">buffs</span></code><a class="headerlink" href="#buffs" title="Permalink to this headline"></a></h3>
<p><em>Contribution by Tegiminis 2022</em></p>
<p>A buff is a timed object, attached to a game entity. It is capable of modifying values, triggering code, or both.
It is a common design pattern in RPGs, particularly action games.</p>
<p><a class="reference internal" href="Contrib-Buffs.html"><span class="doc std std-doc">Read the documentation</span></a> - <a class="reference internal" href="../api/evennia.contrib.rpg.buffs.html#evennia-contrib-rpg-buffs"><span class="std std-ref">Browse the Code</span></a></p>
</section>
<section id="contrib-character-creator">
<h3>Contrib: <code class="docutils literal notranslate"><span class="pre">character_creator</span></code><a class="headerlink" href="#contrib-character-creator" title="Permalink to this headline"></a></h3>
<section id="character-creator">
<h3><code class="docutils literal notranslate"><span class="pre">character_creator</span></code><a class="headerlink" href="#character-creator" title="Permalink to this headline"></a></h3>
<p><em>Commands for managing and initiating an in-game character-creation menu.</em></p>
<p>Contribution by InspectorCaracal, 2022</p>
<p><a class="reference internal" href="Contrib-Character-Creator.html"><span class="doc std std-doc">Read the documentation</span></a> - <a class="reference internal" href="../api/evennia.contrib.rpg.character_creator.html#evennia-contrib-rpg-character-creator"><span class="std std-ref">Browse the Code</span></a></p>
</section>
<section id="contrib-dice">
<h3>Contrib: <code class="docutils literal notranslate"><span class="pre">dice</span></code><a class="headerlink" href="#contrib-dice" title="Permalink to this headline"></a></h3>
<section id="dice">
<h3><code class="docutils literal notranslate"><span class="pre">dice</span></code><a class="headerlink" href="#dice" title="Permalink to this headline"></a></h3>
<p><em>Contribution by Griatch, 2012</em></p>
<p>A dice roller for any number and side of dice. Adds in-game dice rolling
(<code class="docutils literal notranslate"><span class="pre">roll</span> <span class="pre">2d10</span> <span class="pre">+</span> <span class="pre">1</span></code>) as well as conditionals (roll under/over/equal to a target)
@ -550,8 +650,8 @@ and functions for rolling dice in code. Command also supports hidden or secret
rolls for use by a human game master.</p>
<p><a class="reference internal" href="Contrib-Dice.html"><span class="doc std std-doc">Read the documentation</span></a> - <a class="reference internal" href="../api/evennia.contrib.rpg.dice.html#evennia-contrib-rpg-dice"><span class="std std-ref">Browse the Code</span></a></p>
</section>
<section id="contrib-health-bar">
<h3>Contrib: <code class="docutils literal notranslate"><span class="pre">health_bar</span></code><a class="headerlink" href="#contrib-health-bar" title="Permalink to this headline"></a></h3>
<section id="health-bar">
<h3><code class="docutils literal notranslate"><span class="pre">health_bar</span></code><a class="headerlink" href="#health-bar" title="Permalink to this headline"></a></h3>
<p><em>Contribution by Tim Ashley Jenkins, 2017</em></p>
<p>The function provided in this module lets you easily display visual
bars or meters as a colorful bar instead of just a number. A “health bar”
@ -559,8 +659,8 @@ is merely the most obvious use for this, but the bar is highly customizable
and can be used for any sort of appropriate data besides player health.</p>
<p><a class="reference internal" href="Contrib-Health-Bar.html"><span class="doc std std-doc">Read the documentation</span></a> - <a class="reference internal" href="../api/evennia.contrib.rpg.health_bar.html#evennia-contrib-rpg-health-bar"><span class="std std-ref">Browse the Code</span></a></p>
</section>
<section id="contrib-rpsystem">
<h3>Contrib: <code class="docutils literal notranslate"><span class="pre">rpsystem</span></code><a class="headerlink" href="#contrib-rpsystem" title="Permalink to this headline"></a></h3>
<section id="rpsystem">
<h3><code class="docutils literal notranslate"><span class="pre">rpsystem</span></code><a class="headerlink" href="#rpsystem" title="Permalink to this headline"></a></h3>
<p><em>Contribution by Griatch, 2015</em></p>
<p>A full roleplaying emote system. Short-descriptions and recognition (only
know people by their looks until you assign a name to them). Room poses. Masks/disguises
@ -571,8 +671,8 @@ very powerful in-emote reference system, for referencing and differentiate targe
(including objects).</p>
<p><a class="reference internal" href="Contrib-RPSystem.html"><span class="doc std std-doc">Read the documentation</span></a> - <a class="reference internal" href="../api/evennia.contrib.rpg.rpsystem.html#evennia-contrib-rpg-rpsystem"><span class="std std-ref">Browse the Code</span></a></p>
</section>
<section id="contrib-traits">
<h3>Contrib: <code class="docutils literal notranslate"><span class="pre">traits</span></code><a class="headerlink" href="#contrib-traits" title="Permalink to this headline"></a></h3>
<section id="traits">
<h3><code class="docutils literal notranslate"><span class="pre">traits</span></code><a class="headerlink" href="#traits" title="Permalink to this headline"></a></h3>
<p><em>Contribution by Griatch 2020, based on code by Whitenoise and Ainneve contribs, 2014</em></p>
<p>A <code class="docutils literal notranslate"><span class="pre">Trait</span></code> represents a modifiable property on (usually) a Character. They can
be used to represent everything from attributes (str, agi etc) to skills
@ -588,7 +688,8 @@ healed).</p>
<h2>tutorials<a class="headerlink" href="#tutorials" title="Permalink to this headline"></a></h2>
<p><em>Helper resources specifically meant to teach a development concept or
to exemplify an Evennia system. Any extra resources tied to documentation
tutorials are found here. Also the home of the Tutorial World demo adventure.</em></p>
tutorials are found here. Also the home of the Tutorial-World and Evadventure
demo codes.</em></p>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="Contrib-Batchprocessor.html">Batch processor examples</a></li>
@ -600,23 +701,23 @@ tutorials are found here. Also the home of the Tutorial World demo adventure.</e
<li class="toctree-l1"><a class="reference internal" href="Contrib-Tutorial-World.html">Evennia Tutorial World</a></li>
</ul>
</div>
<section id="contrib-batchprocessor">
<h3>Contrib: <code class="docutils literal notranslate"><span class="pre">batchprocessor</span></code><a class="headerlink" href="#contrib-batchprocessor" title="Permalink to this headline"></a></h3>
<section id="batchprocessor">
<h3><code class="docutils literal notranslate"><span class="pre">batchprocessor</span></code><a class="headerlink" href="#batchprocessor" title="Permalink to this headline"></a></h3>
<p><em>Contibution by Griatch, 2012</em></p>
<p>Simple examples for the batch-processor. The batch processor is used for generating
in-game content from one or more static files. Files can be stored with version
control and then applied to the game to create content.</p>
<p><a class="reference internal" href="Contrib-Batchprocessor.html"><span class="doc std std-doc">Read the documentation</span></a> - <a class="reference internal" href="../api/evennia.contrib.tutorials.batchprocessor.html#evennia-contrib-tutorials-batchprocessor"><span class="std std-ref">Browse the Code</span></a></p>
</section>
<section id="contrib-bodyfunctions">
<h3>Contrib: <code class="docutils literal notranslate"><span class="pre">bodyfunctions</span></code><a class="headerlink" href="#contrib-bodyfunctions" title="Permalink to this headline"></a></h3>
<section id="bodyfunctions">
<h3><code class="docutils literal notranslate"><span class="pre">bodyfunctions</span></code><a class="headerlink" href="#bodyfunctions" title="Permalink to this headline"></a></h3>
<p><em>Contribution by Griatch, 2012</em></p>
<p>Example script for testing. This adds a simple timer that has your
character make small verbal observations at irregular intervals.</p>
<p><a class="reference internal" href="Contrib-Bodyfunctions.html"><span class="doc std std-doc">Read the documentation</span></a> - <a class="reference internal" href="../api/evennia.contrib.tutorials.bodyfunctions.html#evennia-contrib-tutorials-bodyfunctions"><span class="std std-ref">Browse the Code</span></a></p>
</section>
<section id="contrib-evadventure">
<h3>Contrib: <code class="docutils literal notranslate"><span class="pre">evadventure</span></code><a class="headerlink" href="#contrib-evadventure" title="Permalink to this headline"></a></h3>
<section id="evadventure">
<h3><code class="docutils literal notranslate"><span class="pre">evadventure</span></code><a class="headerlink" href="#evadventure" title="Permalink to this headline"></a></h3>
<p><em>Contrib by Griatch 2022</em></p>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
@ -626,28 +727,28 @@ perfection.</p>
</div>
<p><a class="reference internal" href="Contrib-Evadventure.html"><span class="doc std std-doc">Read the documentation</span></a> - <a class="reference internal" href="../api/evennia.contrib.tutorials.evadventure.html#evennia-contrib-tutorials-evadventure"><span class="std std-ref">Browse the Code</span></a></p>
</section>
<section id="contrib-mirror">
<h3>Contrib: <code class="docutils literal notranslate"><span class="pre">mirror</span></code><a class="headerlink" href="#contrib-mirror" title="Permalink to this headline"></a></h3>
<section id="mirror">
<h3><code class="docutils literal notranslate"><span class="pre">mirror</span></code><a class="headerlink" href="#mirror" title="Permalink to this headline"></a></h3>
<p><em>Contribution by Griatch, 2017</em></p>
<p>A simple mirror object to experiment with. It will respond to being looked at.</p>
<p><a class="reference internal" href="Contrib-Mirror.html"><span class="doc std std-doc">Read the documentation</span></a> - <a class="reference internal" href="../api/evennia.contrib.tutorials.mirror.html#evennia-contrib-tutorials-mirror"><span class="std std-ref">Browse the Code</span></a></p>
</section>
<section id="contrib-red-button">
<h3>Contrib: <code class="docutils literal notranslate"><span class="pre">red_button</span></code><a class="headerlink" href="#contrib-red-button" title="Permalink to this headline"></a></h3>
<section id="red-button">
<h3><code class="docutils literal notranslate"><span class="pre">red_button</span></code><a class="headerlink" href="#red-button" title="Permalink to this headline"></a></h3>
<p><em>Contribution by Griatch, 2011</em></p>
<p>A red button that you can press to have an effect. This is a more advanced example
object with its own functionality and state tracking.</p>
<p><a class="reference internal" href="Contrib-Red-Button.html"><span class="doc std std-doc">Read the documentation</span></a> - <a class="reference internal" href="../api/evennia.contrib.tutorials.red_button.html#evennia-contrib-tutorials-red-button"><span class="std std-ref">Browse the Code</span></a></p>
</section>
<section id="contrib-talking-npc">
<h3>Contrib: <code class="docutils literal notranslate"><span class="pre">talking_npc</span></code><a class="headerlink" href="#contrib-talking-npc" title="Permalink to this headline"></a></h3>
<section id="talking-npc">
<h3><code class="docutils literal notranslate"><span class="pre">talking_npc</span></code><a class="headerlink" href="#talking-npc" title="Permalink to this headline"></a></h3>
<p><em>Contribution by Griatch 2011. Updated by grungies1138, 2016</em></p>
<p>This is an example of a static NPC object capable of holding a simple menu-driven
conversation. Suitable for example as a quest giver or merchant.</p>
<p><a class="reference internal" href="Contrib-Talking-Npc.html"><span class="doc std std-doc">Read the documentation</span></a> - <a class="reference internal" href="../api/evennia.contrib.tutorials.talking_npc.html#evennia-contrib-tutorials-talking-npc"><span class="std std-ref">Browse the Code</span></a></p>
</section>
<section id="contrib-tutorial-world">
<h3>Contrib: <code class="docutils literal notranslate"><span class="pre">tutorial_world</span></code><a class="headerlink" href="#contrib-tutorial-world" title="Permalink to this headline"></a></h3>
<section id="tutorial-world">
<h3><code class="docutils literal notranslate"><span class="pre">tutorial_world</span></code><a class="headerlink" href="#tutorial-world" title="Permalink to this headline"></a></h3>
<p><em>Contribution by Griatch 2011, 2015</em></p>
<p>A stand-alone tutorial area for an unmodified Evennia install.
Think of it as a sort of single-player adventure rather than a
@ -661,8 +762,7 @@ is a great way to start learning the system.</p>
</section>
<section id="utils">
<h2>utils<a class="headerlink" href="#utils" title="Permalink to this headline"></a></h2>
<p><em>Miscellaneous, optional tools for manipulating text, auditing connections
and more.</em></p>
<p><em>Miscellaneous, tools for manipulating text, security auditing, and more.</em></p>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="Contrib-Auditing.html">Input/Output Auditing</a></li>
@ -673,16 +773,16 @@ and more.</em></p>
<li class="toctree-l1"><a class="reference internal" href="Contrib-Tree-Select.html">Easy menu selection tree</a></li>
</ul>
</div>
<section id="contrib-auditing">
<h3>Contrib: <code class="docutils literal notranslate"><span class="pre">auditing</span></code><a class="headerlink" href="#contrib-auditing" title="Permalink to this headline"></a></h3>
<section id="auditing">
<h3><code class="docutils literal notranslate"><span class="pre">auditing</span></code><a class="headerlink" href="#auditing" title="Permalink to this headline"></a></h3>
<p><em>Contribution by Johnny, 2017</em></p>
<p>Utility that taps and intercepts all data sent to/from clients and the
server and passes it to a callback of your choosing. This is intended for
quality assurance, post-incident investigations and debugging.</p>
<p><a class="reference internal" href="Contrib-Auditing.html"><span class="doc std std-doc">Read the documentation</span></a> - <a class="reference internal" href="../api/evennia.contrib.utils.auditing.html#evennia-contrib-utils-auditing"><span class="std std-ref">Browse the Code</span></a></p>
</section>
<section id="contrib-fieldfill">
<h3>Contrib: <code class="docutils literal notranslate"><span class="pre">fieldfill</span></code><a class="headerlink" href="#contrib-fieldfill" title="Permalink to this headline"></a></h3>
<section id="fieldfill">
<h3><code class="docutils literal notranslate"><span class="pre">fieldfill</span></code><a class="headerlink" href="#fieldfill" title="Permalink to this headline"></a></h3>
<p><em>Contribution by Tim Ashley Jenkins, 2018</em></p>
<p>This module contains a function that generates an <code class="docutils literal notranslate"><span class="pre">EvMenu</span></code> for you - this
menu presents the player with a form of fields that can be filled
@ -693,14 +793,14 @@ function. Once the form is submitted, the forms data is submitted as a dictio
to any callable of your choice.</p>
<p><a class="reference internal" href="Contrib-Fieldfill.html"><span class="doc std std-doc">Read the documentation</span></a> - <a class="reference internal" href="../api/evennia.contrib.utils.fieldfill.html#evennia-contrib-utils-fieldfill"><span class="std std-ref">Browse the Code</span></a></p>
</section>
<section id="contrib-git-integration">
<h3>Contrib: <code class="docutils literal notranslate"><span class="pre">git_integration</span></code><a class="headerlink" href="#contrib-git-integration" title="Permalink to this headline"></a></h3>
<section id="git-integration">
<h3><code class="docutils literal notranslate"><span class="pre">git_integration</span></code><a class="headerlink" href="#git-integration" title="Permalink to this headline"></a></h3>
<p><em>Contribution by helpme (2022)</em></p>
<p>A module to integrate a stripped-down version of git within the game, allowing developers to view their git status, change branches, and pull updated code of both their local mygame repo and Evennia core. After a successful pull or checkout, the git command will reload the game: Manual restarts may be required to to apply certain changes that would impact persistent scripts etc.</p>
<p><a class="reference internal" href="Contrib-Git-Integration.html"><span class="doc std std-doc">Read the documentation</span></a> - <a class="reference internal" href="../api/evennia.contrib.utils.git_integration.html#evennia-contrib-utils-git-integration"><span class="std std-ref">Browse the Code</span></a></p>
</section>
<section id="contrib-name-generator">
<h3>Contrib: <code class="docutils literal notranslate"><span class="pre">name_generator</span></code><a class="headerlink" href="#contrib-name-generator" title="Permalink to this headline"></a></h3>
<section id="name-generator">
<h3><code class="docutils literal notranslate"><span class="pre">name_generator</span></code><a class="headerlink" href="#name-generator" title="Permalink to this headline"></a></h3>
<p><em>Contribution by InspectorCaracal (2022)</em></p>
<p>A module for generating random names, both real-world and fantasy. Real-world
names can be generated either as first (personal) names, family (last) names, or
@ -708,8 +808,8 @@ full names (first, optional middles, and last). The name data is from <a class="
and used under the <a class="reference external" href="https://creativecommons.org/licenses/by-sa/4.0/">CC BY-SA 4.0 license</a>.</p>
<p><a class="reference internal" href="Contrib-Name-Generator.html"><span class="doc std std-doc">Read the documentation</span></a> - <a class="reference internal" href="../api/evennia.contrib.utils.name_generator.html#evennia-contrib-utils-name-generator"><span class="std std-ref">Browse the Code</span></a></p>
</section>
<section id="contrib-random-string-generator">
<h3>Contrib: <code class="docutils literal notranslate"><span class="pre">random_string_generator</span></code><a class="headerlink" href="#contrib-random-string-generator" title="Permalink to this headline"></a></h3>
<section id="random-string-generator">
<h3><code class="docutils literal notranslate"><span class="pre">random_string_generator</span></code><a class="headerlink" href="#random-string-generator" title="Permalink to this headline"></a></h3>
<p><em>Contribution by Vincent Le Goff (vlgeoff), 2017</em></p>
<p>This utility can be used to generate pseudo-random strings of information
with specific criteria. You could, for instance, use it to generate
@ -717,8 +817,8 @@ phone numbers, license plate numbers, validation codes, in-game security
passwords and so on. The strings generated will be stored and wont be repeated.</p>
<p><a class="reference internal" href="Contrib-Random-String-Generator.html"><span class="doc std std-doc">Read the documentation</span></a> - <a class="reference internal" href="../api/evennia.contrib.utils.random_string_generator.html#evennia-contrib-utils-random-string-generator"><span class="std std-ref">Browse the Code</span></a></p>
</section>
<section id="contrib-tree-select">
<h3>Contrib: <code class="docutils literal notranslate"><span class="pre">tree_select</span></code><a class="headerlink" href="#contrib-tree-select" title="Permalink to this headline"></a></h3>
<section id="tree-select">
<h3><code class="docutils literal notranslate"><span class="pre">tree_select</span></code><a class="headerlink" href="#tree-select" title="Permalink to this headline"></a></h3>
<p><em>Contribution by Tim Ashley Jenkins, 2017</em></p>
<p>This utility allows you to create and initialize an entire branching EvMenu
instance from a multi-line string passed to one function.</p>

View file

@ -157,7 +157,7 @@ you need to know depending on your skills and needs.</p>
</section>
<section id="i-know-basic-python-or-i-am-willing-to-learn">
<h3>I know basic Python, or I am willing to learn<a class="headerlink" href="#i-know-basic-python-or-i-am-willing-to-learn" title="Permalink to this headline"></a></h3>
<p>Evennias source code is <a class="reference external" href="https://www.evennia.com/docs/latest">extensively documented</a>. But while Python is considered a very easy programming language to get into, you do have a learning curve to climb if you are new to programming. Evennias <a class="reference internal" href="Howtos/Beginner-Tutorial/Part1/Beginner-Tutorial-Part1-Intro.html"><span class="doc std std-doc">Starting-tutorial</span></a> has a <a class="reference internal" href="Howtos/Beginner-Tutorial/Part1/Beginner-Tutorial-Python-basic-introduction.html"><span class="doc std std-doc">basic introduction to Python</span></a> but you should probably also sit down with a full Python beginners tutorial at some point (there are plenty of them on the web if you look around). See also our <a class="reference internal" href="Links.html"><span class="doc std std-doc">link page</span></a> for some reading suggestions.</p>
<p>Evennias source code is <a class="reference external" href="https://www.evennia.com/docs/latest">extensively documented</a>. But while Python is considered a very easy programming language to get into, you do have a learning curve to climb if you are new to programming. Evennias <a class="reference internal" href="Howtos/Beginner-Tutorial/Part1/Beginner-Tutorial-Part1-Overview.html"><span class="doc std std-doc">Starting-tutorial</span></a> has a <a class="reference internal" href="Howtos/Beginner-Tutorial/Part1/Beginner-Tutorial-Python-basic-introduction.html"><span class="doc std std-doc">basic introduction to Python</span></a> but you should probably also sit down with a full Python beginners tutorial at some point (there are plenty of them on the web if you look around). See also our <a class="reference internal" href="Links.html"><span class="doc std std-doc">link page</span></a> for some reading suggestions.</p>
<p>To code your dream game in Evennia you dont need to be a Python guru, but you do need to be able to read example code containing at least these basic Python features:</p>
<ul class="simple">
<li><p>Importing and using python <a class="reference external" href="https://docs.python.org/3.7/tutorial/modules.html">modules</a></p></li>
@ -182,7 +182,7 @@ presence (a website and a mud web client) to play around with …</p>
</section>
<section id="where-to-from-here">
<h2>Where to from here?<a class="headerlink" href="#where-to-from-here" title="Permalink to this headline"></a></h2>
<p>Its recommended you jump into the <a class="reference internal" href="Howtos/Beginner-Tutorial/Beginner-Tutorial-Intro.html"><span class="doc std std-doc">Beginner Tutorial</span></a>. You can either follow it or jump around to lessons that seem interesting. You can also read the lead developers <a class="reference external" href="https://www.evennia.com/devblog/index.html">dev blog</a> for many tidbits and snippets about Evennias development and structure.</p>
<p>Its recommended you jump into the <a class="reference internal" href="Howtos/Beginner-Tutorial/Beginner-Tutorial-Overview.html"><span class="doc std std-doc">Beginner Tutorial</span></a>. You can either follow it or jump around to lessons that seem interesting. You can also read the lead developers <a class="reference external" href="https://www.evennia.com/devblog/index.html">dev blog</a> for many tidbits and snippets about Evennias development and structure.</p>
<p>Sometimes its easier to ask for help. Get engaged in the Evennia community by joining our <a class="reference external" href="https://discord.gg/AJJpcRUhtF">Discord</a> for direct support. Make an introductory post to our <a class="reference external" href="https://github.com/evennia/evennia/discussions">Discussion forum</a> and say hi!.</p>
</section>
</section>

View file

@ -17,7 +17,7 @@
<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="Part 1: What we have" href="Part1/Beginner-Tutorial-Part1-Intro.html" />
<link rel="next" title="Part 1: What we have" href="Part1/Beginner-Tutorial-Part1-Overview.html" />
<link rel="prev" title="Tutorials and Howtos" href="../Howtos-Overview.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
@ -30,7 +30,7 @@
<a href="../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="Part1/Beginner-Tutorial-Part1-Intro.html" title="Part 1: What we have"
<a href="Part1/Beginner-Tutorial-Part1-Overview.html" title="Part 1: What we have"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="../Howtos-Overview.html" title="Tutorials and Howtos"
@ -66,8 +66,8 @@
<li><a class="reference internal" href="#things-you-need">Things you 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>
<li><a class="reference internal" href="#a-text-editor-or-ide">A text Editor or IDE</a></li>
<li><a class="reference internal" href="#a-fresh-game-dir">A fresh game dir?</a></li>
</ul>
</li>
</ul>
@ -78,12 +78,12 @@
<p class="topless"><a href="../Howtos-Overview.html"
title="previous chapter">Tutorials and Howtos</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="Part1/Beginner-Tutorial-Part1-Intro.html"
<p class="topless"><a href="Part1/Beginner-Tutorial-Part1-Overview.html"
title="next chapter">Part 1: What we have</a></p>
<div role="note" aria-label="source link">
<!--h3>This Page</h3-->
<ul class="this-page-menu">
<li><a href="../../_sources/Howtos/Beginner-Tutorial/Beginner-Tutorial-Intro.md.txt"
<li><a href="../../_sources/Howtos/Beginner-Tutorial/Beginner-Tutorial-Overview.md.txt"
rel="nofollow">Show Page Source</a></li>
</ul>
</div><h3>Links</h3>
@ -99,7 +99,7 @@
</ul>
<h3>Versions</h3>
<ul>
<li><a href="Beginner-Tutorial-Intro.html">1.0-dev (develop branch)</a></li>
<li><a href="Beginner-Tutorial-Overview.html">1.0-dev (develop branch)</a></li>
<ul>
<li><a href="../0.9.5/index.html">0.9.5 (v0.9.5 branch)</a></li>
@ -117,24 +117,21 @@
<ul class="simple">
<li><p><strong><a class="reference internal" href="#"><span class="doc std std-doc">Introduction</span></a></strong>
<br>Getting set up.</p></li>
<li><p>Part 1: <a class="reference internal" href="Part1/Beginner-Tutorial-Part1-Intro.html"><span class="doc std std-doc">What we have</span></a>
<li><p>Part 1: <a class="reference internal" href="Part1/Beginner-Tutorial-Part1-Overview.html"><span class="doc std std-doc">What we have</span></a>
<br>A tour of Evennia and how to use the tools, including an introduction to Python.</p></li>
<li><p>Part 2: <a class="reference internal" href="Part2/Beginner-Tutorial-Part2-Intro.html"><span class="doc std std-doc">What we want</span></a>
<li><p>Part 2: <a class="reference internal" href="Part2/Beginner-Tutorial-Part2-Overview.html"><span class="doc std std-doc">What we want</span></a>
<br>Planning our tutorial game and what to think about when planning your own in the future.</p></li>
<li><p>Part 3: <a class="reference internal" href="Part3/Beginner-Tutorial-Part3-Intro.html"><span class="doc std std-doc">How we get there</span></a>
<li><p>Part 3: <a class="reference internal" href="Part3/Beginner-Tutorial-Part3-Overview.html"><span class="doc std std-doc">How we get there</span></a>
<br>Getting down to the meat of extending Evennia to make our game</p></li>
<li><p>Part 4: <a class="reference internal" href="Part4/Beginner-Tutorial-Part4-Intro.html"><span class="doc std std-doc">Using what we created</span></a>
<li><p>Part 4: <a class="reference internal" href="Part4/Beginner-Tutorial-Part4-Overview.html"><span class="doc std std-doc">Using what we created</span></a>
<br>Building a tech-demo and world content to go with our code</p></li>
<li><p>Part 5: <a class="reference internal" href="Part5/Beginner-Tutorial-Part5-Intro.html"><span class="doc std std-doc">Showing the world</span></a>
<li><p>Part 5: <a class="reference internal" href="Part5/Beginner-Tutorial-Part5-Overview.html"><span class="doc std std-doc">Showing the world</span></a>
<br>Taking our new game online and let players try it out</p></li>
</ul>
</aside>
<p>Welcome to Evennia! This multi-part Beginner 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>
<p>Use the menu on the right to get the index of each tutorial-part. Use the <a class="reference internal" href="Part1/Beginner-Tutorial-Part1-Intro.html"><span class="doc std std-doc">next</span></a>
and <a class="reference internal" href="../Howtos-Overview.html"><span class="doc std std-doc">previous</span></a> links to step from lesson to lesson.</p>
<p>Welcome to Evennia! This multi-part Beginner Tutorial will help you get off the ground.</p>
<p>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>
<p>Use the menu on the right to get the index of each tutorial-part. Use the <a class="reference internal" href="Part1/Beginner-Tutorial-Part1-Overview.html"><span class="doc std std-doc">next</span></a> and <a class="reference internal" href="../Howtos-Overview.html"><span class="doc std std-doc">previous</span></a> links at the top/bottom right of the page to step between lessons.</p>
<section id="things-you-need">
<h2>Things you need<a class="headerlink" href="#things-you-need" title="Permalink to this headline"></a></h2>
<ul class="simple">
@ -145,86 +142,51 @@ and <a class="reference internal" href="../Howtos-Overview.html"><span class="do
</ul>
<section id="a-command-line">
<h3>A Command line<a class="headerlink" href="#a-command-line" title="Permalink to this headline"></a></h3>
<p>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>
<p>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>
<li><p><a class="reference external" href="https://tutorial.djangogirls.org/en/intro_to_command_line/">Online Intro to the Command line for different OS:es</a></p></li>
</ul>
<p>Note that we usually only show forward-slashes <code class="docutils literal notranslate"><span class="pre">/</span></code> for file system paths. Windows users should mentally convert this to
back-slashes <code class="docutils literal notranslate"><span class="pre">\</span></code> instead.</p>
<blockquote>
<div><p>Note that we usually only show forward-slashes <code class="docutils literal notranslate"><span class="pre">/</span></code> for file system paths. Windows users should mentally convert this to back-slashes <code class="docutils literal notranslate"><span class="pre">\</span></code> instead.</p>
</div></blockquote>
</section>
<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 std std-doc">grid of supported clients</span></a> for aid.
<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 std std-doc">grid of supported clients</span></a>.
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 the terms MUD, MU or MU* interchangeably
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><p>In this documentation we often use the terms MUD, MU or MU* interchangeably 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>
</section>
<section id="an-editor">
<h3>An Editor<a class="headerlink" href="#an-editor" title="Permalink to this headline"></a></h3>
<section id="a-text-editor-or-ide">
<h3>A text Editor or IDE<a class="headerlink" href="#a-text-editor-or-ide" 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>
<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>
<div class="admonition important">
<p class="admonition-title">Important</p>
<p>Use spaces, not tabs</p>
</div>
<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><p>Make sure to configure your editor so 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>
</section>
<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/Installation.html"><span class="doc std std-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-none notranslate"><div class="highlight"><pre><span></span> evennia stop
</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-none notranslate"><div class="highlight"><pre><span></span> evennia --init mygame
cd mygame
evennia migrate
evennia start --log
</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-none notranslate"><div class="highlight"><pre><span></span> evennia --log
</pre></div>
</div>
</li>
</ul>
<p>You should now be good to go on to <a class="reference internal" href="Part1/Beginner-Tutorial-Part1-Intro.html"><span class="doc std std-doc">the first part of the tutorial</span></a>.
Good luck!</p>
<section id="a-fresh-game-dir">
<h3>A fresh game dir?<a class="headerlink" href="#a-fresh-game-dir" title="Permalink to this headline"></a></h3>
<p>You should make sure you have <a class="reference internal" href="../../Setup/Installation.html"><span class="doc std std-doc">installed Evennia</span></a>. If you followed the instructions you will already have created a game-dir.</p>
<p>You could re-use that or make a new one only for this tutorial, its up to you.</p>
<p>If you already have a game dir and want a separate one for the tutorial, use <code class="docutils literal notranslate"><span class="pre">evennia</span> <span class="pre">stop</span></code> to halt the running server and then <a class="reference internal" href="../../Setup/Installation.html#initialize-a-new-game"><span class="std std-doc">Initialize a new game dir</span></a> somewhere else (<em>not</em> inside the previous game dir!). We refer to it everywhere as <code class="docutils literal notranslate"><span class="pre">mygame</span></code>, so you may want to do the same.</p>
<p>You should now be ready to move on to the <a class="reference internal" href="Part1/Beginner-Tutorial-Part1-Overview.html"><span class="doc std std-doc">first lesson</span></a></p>
<details>
<summary>
Click here to expand a list of all Beginner-Tutorial sections (all parts).
</summary>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="Part1/Beginner-Tutorial-Part1-Intro.html">Part 1: What we have</a><ul>
<li class="toctree-l2"><a class="reference internal" href="Part1/Beginner-Tutorial-Part1-Intro.html#lessons">Lessons</a><ul>
<li class="toctree-l1"><a class="reference internal" href="Part1/Beginner-Tutorial-Part1-Overview.html">Part 1: What we have</a><ul>
<li class="toctree-l2"><a class="reference internal" href="Part1/Beginner-Tutorial-Part1-Overview.html#lessons">Lessons</a><ul>
<li class="toctree-l3"><a class="reference internal" href="Part1/Beginner-Tutorial-Building-Quickstart.html">1. Using commands and building stuff</a><ul>
<li class="toctree-l4"><a class="reference internal" href="Part1/Beginner-Tutorial-Building-Quickstart.html#getting-help">1.1. Getting help</a></li>
<li class="toctree-l4"><a class="reference internal" href="Part1/Beginner-Tutorial-Building-Quickstart.html#looking-around">1.2. Looking around</a></li>
@ -402,8 +364,8 @@ Click here to expand a list of all Beginner-Tutorial sections (all parts).
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="Part2/Beginner-Tutorial-Part2-Intro.html">Part 2: What we want</a><ul>
<li class="toctree-l2"><a class="reference internal" href="Part2/Beginner-Tutorial-Part2-Intro.html#lessons">Lessons</a><ul>
<li class="toctree-l1"><a class="reference internal" href="Part2/Beginner-Tutorial-Part2-Overview.html">Part 2: What we want</a><ul>
<li class="toctree-l2"><a class="reference internal" href="Part2/Beginner-Tutorial-Part2-Overview.html#lessons">Lessons</a><ul>
<li class="toctree-l3"><a class="reference internal" href="Part2/Beginner-Tutorial-Planning-Where-Do-I-Begin.html">1. Where do I begin?</a><ul>
<li class="toctree-l4"><a class="reference internal" href="Part2/Beginner-Tutorial-Planning-Where-Do-I-Begin.html#what-is-your-motivation-for-doing-this">1.1. What is your motivation for doing this?</a></li>
<li class="toctree-l4"><a class="reference internal" href="Part2/Beginner-Tutorial-Planning-Where-Do-I-Begin.html#what-are-your-skills">1.2. What are your skills?</a><ul>
@ -493,8 +455,8 @@ Click here to expand a list of all Beginner-Tutorial sections (all parts).
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="Part3/Beginner-Tutorial-Part3-Intro.html">Part 3: How we get there (example game)</a><ul>
<li class="toctree-l2"><a class="reference internal" href="Part3/Beginner-Tutorial-Part3-Intro.html#lessons">Lessons</a><ul>
<li class="toctree-l1"><a class="reference internal" href="Part3/Beginner-Tutorial-Part3-Overview.html">Part 3: How we get there (example game)</a><ul>
<li class="toctree-l2"><a class="reference internal" href="Part3/Beginner-Tutorial-Part3-Overview.html#lessons">Lessons</a><ul>
<li class="toctree-l3"><a class="reference internal" href="Part3/Beginner-Tutorial-Utilities.html">1. Code structure and Utilities</a><ul>
<li class="toctree-l4"><a class="reference internal" href="Part3/Beginner-Tutorial-Utilities.html#folder-structure">1.1. Folder structure</a></li>
<li class="toctree-l4"><a class="reference internal" href="Part3/Beginner-Tutorial-Utilities.html#enums">1.2. Enums</a></li>
@ -603,28 +565,21 @@ Click here to expand a list of all Beginner-Tutorial sections (all parts).
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="Part4/Beginner-Tutorial-Part4-Intro.html">Part 4: Using what we created</a><ul>
<li class="toctree-l2"><a class="reference internal" href="Part4/Beginner-Tutorial-Part4-Intro.html#lessons">Lessons</a><ul>
<li class="toctree-l1"><a class="reference internal" href="Part4/Beginner-Tutorial-Part4-Overview.html">Part 4: Using what we created</a><ul>
<li class="toctree-l2"><a class="reference internal" href="Part4/Beginner-Tutorial-Part4-Overview.html#lessons">Lessons</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../../Unimplemented.html">1. Unimplemented</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="Part5/Beginner-Tutorial-Part5-Intro.html">Part 5: Showing the world</a><ul>
<li class="toctree-l2"><a class="reference internal" href="Part5/Beginner-Tutorial-Part5-Intro.html#lessons">Lessons</a><ul>
<li class="toctree-l1"><a class="reference internal" href="Part5/Beginner-Tutorial-Part5-Overview.html">Part 5: Showing the world</a><ul>
<li class="toctree-l2"><a class="reference internal" href="Part5/Beginner-Tutorial-Part5-Overview.html#lessons">Lessons</a><ul>
<li class="toctree-l3"><a class="reference internal" href="Part5/Add-a-simple-new-web-page.html">1. Add a simple new web page</a><ul>
<li class="toctree-l4"><a class="reference internal" href="Part5/Add-a-simple-new-web-page.html#create-the-view">1.1. Create the view</a></li>
<li class="toctree-l4"><a class="reference internal" href="Part5/Add-a-simple-new-web-page.html#the-html-page">1.2. The HTML page</a></li>
<li class="toctree-l4"><a class="reference internal" href="Part5/Add-a-simple-new-web-page.html#the-url">1.3. The URL</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="Part5/Web-Tutorial.html">2. Web Tutorial</a><ul>
<li class="toctree-l4"><a class="reference internal" href="Part5/Web-Tutorial.html#a-basic-overview">2.1. A Basic Overview</a></li>
<li class="toctree-l4"><a class="reference internal" href="Part5/Web-Tutorial.html#changing-the-logo-on-the-front-page">2.2. Changing the logo on the front page</a></li>
<li class="toctree-l4"><a class="reference internal" href="Part5/Web-Tutorial.html#changing-the-front-pages-text">2.3. Changing the Front Pages Text</a></li>
<li class="toctree-l4"><a class="reference internal" href="Part5/Web-Tutorial.html#further-reading">2.4. Further reading</a></li>
</ul>
</li>
</ul>
</li>
</ul>
@ -651,7 +606,7 @@ Click here to expand a list of all Beginner-Tutorial sections (all parts).
<a href="../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="Part1/Beginner-Tutorial-Part1-Intro.html" title="Part 1: What we have"
<a href="Part1/Beginner-Tutorial-Part1-Overview.html" title="Part 1: What we have"
>next</a> |</li>
<li class="right" >
<a href="../Howtos-Overview.html" title="Tutorials and Howtos"

View file

@ -37,8 +37,8 @@
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-1"><a href="../../Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Intro.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part1-Intro.html" accesskey="U">Part 1: What we have</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Overview.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part1-Overview.html" accesskey="U">Part 1: What we have</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><span class="section-number">8. </span>Adding custom commands</a></li>
</ul>
<div class="develop">develop branch</div>
@ -489,8 +489,8 @@ get into how we replace and extend Evennias default Commands.</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-1"><a href="../../Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Intro.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part1-Intro.html" >Part 1: What we have</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Overview.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part1-Overview.html" >Part 1: What we have</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><span class="section-number">8. </span>Adding custom commands</a></li>
</ul>
<div class="develop">develop branch</div>

View file

@ -18,7 +18,7 @@
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
<link rel="next" title="2. The Tutorial World" href="Beginner-Tutorial-Tutorial-World.html" />
<link rel="prev" title="Part 1: What we have" href="Beginner-Tutorial-Part1-Intro.html" />
<link rel="prev" title="Part 1: What we have" href="Beginner-Tutorial-Part1-Overview.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
@ -33,12 +33,12 @@
<a href="Beginner-Tutorial-Tutorial-World.html" title="2. The Tutorial World"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="Beginner-Tutorial-Part1-Intro.html" title="Part 1: What we have"
<a href="Beginner-Tutorial-Part1-Overview.html" title="Part 1: What we have"
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-1"><a href="../../Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Intro.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part1-Intro.html" accesskey="U">Part 1: What we have</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Overview.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part1-Overview.html" accesskey="U">Part 1: What we have</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><span class="section-number">1. </span>Using commands and building stuff</a></li>
</ul>
<div class="develop">develop branch</div>
@ -80,7 +80,7 @@
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="Beginner-Tutorial-Part1-Intro.html"
<p class="topless"><a href="Beginner-Tutorial-Part1-Overview.html"
title="previous chapter">Part 1: What we have</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="Beginner-Tutorial-Tutorial-World.html"
@ -427,12 +427,12 @@ example. Evennia comes with a tutorial world for you to explore. We will try tha
<a href="Beginner-Tutorial-Tutorial-World.html" title="2. The Tutorial World"
>next</a> |</li>
<li class="right" >
<a href="Beginner-Tutorial-Part1-Intro.html" title="Part 1: What we have"
<a href="Beginner-Tutorial-Part1-Overview.html" title="Part 1: What we have"
>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-1"><a href="../../Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Intro.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part1-Intro.html" >Part 1: What we have</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Overview.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part1-Overview.html" >Part 1: What we have</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><span class="section-number">1. </span>Using commands and building stuff</a></li>
</ul>
<div class="develop">develop branch</div>

View file

@ -37,8 +37,8 @@
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-1"><a href="../../Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Intro.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part1-Intro.html" accesskey="U">Part 1: What we have</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Overview.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part1-Overview.html" accesskey="U">Part 1: What we have</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><span class="section-number">10. </span>Creating things</a></li>
</ul>
<div class="develop">develop branch</div>
@ -325,8 +325,8 @@ channel/sub channel name
>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-1"><a href="../../Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Intro.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part1-Intro.html" >Part 1: What we have</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Overview.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part1-Overview.html" >Part 1: What we have</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><span class="section-number">10. </span>Creating things</a></li>
</ul>
<div class="develop">develop branch</div>

View file

@ -37,8 +37,8 @@
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-1"><a href="../../Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Intro.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part1-Intro.html" accesskey="U">Part 1: What we have</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Overview.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part1-Overview.html" accesskey="U">Part 1: What we have</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><span class="section-number">12. </span>Advanced searching - Django Database queries</a></li>
</ul>
<div class="develop">develop branch</div>
@ -528,8 +528,8 @@ in a format like the following:</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-1"><a href="../../Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Intro.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part1-Intro.html" >Part 1: What we have</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Overview.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part1-Overview.html" >Part 1: What we have</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><span class="section-number">12. </span>Advanced searching - Django Database queries</a></li>
</ul>
<div class="develop">develop branch</div>

View file

@ -37,8 +37,8 @@
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-1"><a href="../../Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Intro.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part1-Intro.html" accesskey="U">Part 1: What we have</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Overview.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part1-Overview.html" accesskey="U">Part 1: What we have</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><span class="section-number">6. </span>Overview of the Evennia library</a></li>
</ul>
<div class="develop">develop branch</div>
@ -256,8 +256,8 @@ from here to <code class="docutils literal notranslate"><span class="pre">mygame
>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-1"><a href="../../Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Intro.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part1-Intro.html" >Part 1: What we have</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Overview.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part1-Overview.html" >Part 1: What we have</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><span class="section-number">6. </span>Overview of the Evennia library</a></li>
</ul>
<div class="develop">develop branch</div>

View file

@ -37,8 +37,8 @@
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-1"><a href="../../Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Intro.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part1-Intro.html" accesskey="U">Part 1: What we have</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Overview.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part1-Overview.html" accesskey="U">Part 1: What we have</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><span class="section-number">4. </span>Overview of your new Game Dir</a></li>
</ul>
<div class="develop">develop branch</div>
@ -332,8 +332,8 @@ just a list of Evennia commands to execute in sequence. This one is empty and re
>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-1"><a href="../../Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Intro.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part1-Intro.html" >Part 1: What we have</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Overview.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part1-Overview.html" >Part 1: What we have</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><span class="section-number">4. </span>Overview of your new Game Dir</a></li>
</ul>
<div class="develop">develop branch</div>

View file

@ -37,8 +37,8 @@
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-1"><a href="../../Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Intro.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part1-Intro.html" accesskey="U">Part 1: What we have</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Overview.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part1-Overview.html" accesskey="U">Part 1: What we have</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><span class="section-number">7. </span>Making objects persistent</a></li>
</ul>
<div class="develop">develop branch</div>
@ -718,8 +718,8 @@ Oh, and if you created any other rooms before, make sure they get the new flag t
>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-1"><a href="../../Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Intro.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part1-Intro.html" >Part 1: What we have</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Overview.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part1-Overview.html" >Part 1: What we have</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><span class="section-number">7. </span>Making objects persistent</a></li>
</ul>
<div class="develop">develop branch</div>

View file

@ -17,7 +17,7 @@
<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="Part 2: What we want" href="../Part2/Beginner-Tutorial-Part2-Intro.html" />
<link rel="next" title="Part 2: What we want" href="../Part2/Beginner-Tutorial-Part2-Overview.html" />
<link rel="prev" title="12. Advanced searching - Django Database queries" href="Beginner-Tutorial-Django-queries.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
@ -30,15 +30,15 @@
<a href="../../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="../Part2/Beginner-Tutorial-Part2-Intro.html" title="Part 2: What we want"
<a href="../Part2/Beginner-Tutorial-Part2-Overview.html" title="Part 2: What we want"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="Beginner-Tutorial-Django-queries.html" title="12. Advanced searching - Django Database queries"
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-1"><a href="../../Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Intro.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part1-Intro.html" accesskey="U">Part 1: What we have</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Overview.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part1-Overview.html" accesskey="U">Part 1: What we have</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><span class="section-number">13. </span>Building a chair you can sit on</a></li>
</ul>
<div class="develop">develop branch</div>
@ -85,7 +85,7 @@
<p class="topless"><a href="Beginner-Tutorial-Django-queries.html"
title="previous chapter"><span class="section-number">12. </span>Advanced searching - Django Database queries</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="../Part2/Beginner-Tutorial-Part2-Intro.html"
<p class="topless"><a href="../Part2/Beginner-Tutorial-Part2-Overview.html"
title="next chapter">Part 2: What we want</a></p>
<div role="note" aria-label="source link">
<!--h3>This Page</h3-->
@ -922,15 +922,15 @@ You stand up from sofa.
<a href="../../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="../Part2/Beginner-Tutorial-Part2-Intro.html" title="Part 2: What we want"
<a href="../Part2/Beginner-Tutorial-Part2-Overview.html" title="Part 2: What we want"
>next</a> |</li>
<li class="right" >
<a href="Beginner-Tutorial-Django-queries.html" title="12. Advanced searching - Django Database queries"
>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-1"><a href="../../Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Intro.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part1-Intro.html" >Part 1: What we have</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Overview.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part1-Overview.html" >Part 1: What we have</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><span class="section-number">13. </span>Building a chair you can sit on</a></li>
</ul>
<div class="develop">develop branch</div>

View file

@ -37,8 +37,8 @@
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-1"><a href="../../Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Intro.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part1-Intro.html" accesskey="U">Part 1: What we have</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Overview.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part1-Overview.html" accesskey="U">Part 1: What we have</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><span class="section-number">9. </span>Parsing Command input</a></li>
</ul>
<div class="develop">develop branch</div>
@ -636,8 +636,8 @@ Get What?
>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-1"><a href="../../Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Intro.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part1-Intro.html" >Part 1: What we have</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Overview.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part1-Overview.html" >Part 1: What we have</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><span class="section-number">9. </span>Parsing Command input</a></li>
</ul>
<div class="develop">develop branch</div>

View file

@ -18,7 +18,7 @@
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
<link rel="next" title="1. Using commands and building stuff" href="Beginner-Tutorial-Building-Quickstart.html" />
<link rel="prev" title="Beginner Tutorial" href="../Beginner-Tutorial-Intro.html" />
<link rel="prev" title="Beginner Tutorial" href="../Beginner-Tutorial-Overview.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
@ -33,11 +33,11 @@
<a href="Beginner-Tutorial-Building-Quickstart.html" title="1. Using commands and building stuff"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="../Beginner-Tutorial-Intro.html" title="Beginner Tutorial"
<a href="../Beginner-Tutorial-Overview.html" title="Beginner Tutorial"
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-1"><a href="../../Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Intro.html" accesskey="U">Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Overview.html" accesskey="U">Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Part 1: What we have</a></li>
</ul>
<div class="develop">develop branch</div>
@ -70,7 +70,7 @@
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="../Beginner-Tutorial-Intro.html"
<p class="topless"><a href="../Beginner-Tutorial-Overview.html"
title="previous chapter">Beginner Tutorial</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="Beginner-Tutorial-Building-Quickstart.html"
@ -78,7 +78,7 @@
<div role="note" aria-label="source link">
<!--h3>This Page</h3-->
<ul class="this-page-menu">
<li><a href="../../../_sources/Howtos/Beginner-Tutorial/Part1/Beginner-Tutorial-Part1-Intro.md.txt"
<li><a href="../../../_sources/Howtos/Beginner-Tutorial/Part1/Beginner-Tutorial-Part1-Overview.md.txt"
rel="nofollow">Show Page Source</a></li>
</ul>
</div><h3>Links</h3>
@ -94,7 +94,7 @@
</ul>
<h3>Versions</h3>
<ul>
<li><a href="Beginner-Tutorial-Part1-Intro.html">1.0-dev (develop branch)</a></li>
<li><a href="Beginner-Tutorial-Part1-Overview.html">1.0-dev (develop branch)</a></li>
<ul>
<li><a href="../0.9.5/index.html">0.9.5 (v0.9.5 branch)</a></li>
@ -110,17 +110,17 @@
<aside class="sidebar">
<p class="sidebar-title">Beginner Tutorial Parts</p>
<ul class="simple">
<li><p><a class="reference internal" href="../Beginner-Tutorial-Intro.html"><span class="doc std std-doc">Introduction</span></a>
<li><p><a class="reference internal" href="../Beginner-Tutorial-Overview.html"><span class="doc std std-doc">Introduction</span></a>
<br>Getting set up.</p></li>
<li><p>Part 1: <strong><a class="reference internal" href="#"><span class="doc std std-doc">What we have</span></a></strong>
<br>A tour of Evennia and how to use the tools, including an introduction to Python.</p></li>
<li><p>Part 2: <a class="reference internal" href="../Part2/Beginner-Tutorial-Part2-Intro.html"><span class="doc std std-doc">What we want</span></a>
<li><p>Part 2: <a class="reference internal" href="../Part2/Beginner-Tutorial-Part2-Overview.html"><span class="doc std std-doc">What we want</span></a>
<br>Planning our tutorial game and what to think about when planning your own in the future.</p></li>
<li><p>Part 3: <a class="reference internal" href="../Part3/Beginner-Tutorial-Part3-Intro.html"><span class="doc std std-doc">How we get there</span></a>
<li><p>Part 3: <a class="reference internal" href="../Part3/Beginner-Tutorial-Part3-Overview.html"><span class="doc std std-doc">How we get there</span></a>
<br>Getting down to the meat of extending Evennia to make our game</p></li>
<li><p>Part 4: <a class="reference internal" href="../Part4/Beginner-Tutorial-Part4-Intro.html"><span class="doc std std-doc">Using what we created</span></a>
<li><p>Part 4: <a class="reference internal" href="../Part4/Beginner-Tutorial-Part4-Overview.html"><span class="doc std std-doc">Using what we created</span></a>
<br>Building a tech-demo and world content to go with our code</p></li>
<li><p>Part 5: <a class="reference internal" href="../Part5/Beginner-Tutorial-Part5-Intro.html"><span class="doc std std-doc">Showing the world</span></a>
<li><p>Part 5: <a class="reference internal" href="../Part5/Beginner-Tutorial-Part5-Overview.html"><span class="doc std std-doc">Showing the world</span></a>
<br>Taking our new game online and let players try it out</p></li>
</ul>
</aside>
@ -262,11 +262,11 @@ these concepts in the context of Evennia before.</p>
<a href="Beginner-Tutorial-Building-Quickstart.html" title="1. Using commands and building stuff"
>next</a> |</li>
<li class="right" >
<a href="../Beginner-Tutorial-Intro.html" title="Beginner Tutorial"
<a href="../Beginner-Tutorial-Overview.html" title="Beginner Tutorial"
>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-1"><a href="../../Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Intro.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Overview.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Part 1: What we have</a></li>
</ul>
<div class="develop">develop branch</div>

View file

@ -37,8 +37,8 @@
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-1"><a href="../../Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Intro.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part1-Intro.html" accesskey="U">Part 1: What we have</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Overview.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part1-Overview.html" accesskey="U">Part 1: What we have</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><span class="section-number">3. </span>Intro to using Python with Evennia</a></li>
</ul>
<div class="develop">develop branch</div>
@ -751,8 +751,8 @@ practice you will be writing most your code in Python modules.</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-1"><a href="../../Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Intro.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part1-Intro.html" >Part 1: What we have</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Overview.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part1-Overview.html" >Part 1: What we have</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><span class="section-number">3. </span>Intro to using Python with Evennia</a></li>
</ul>
<div class="develop">develop branch</div>

View file

@ -37,8 +37,8 @@
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-1"><a href="../../Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Intro.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part1-Intro.html" accesskey="U">Part 1: What we have</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Overview.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part1-Overview.html" accesskey="U">Part 1: What we have</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><span class="section-number">5. </span>Introduction to Python classes and objects</a></li>
</ul>
<div class="develop">develop branch</div>
@ -494,8 +494,8 @@ The world trembles.
>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-1"><a href="../../Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Intro.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part1-Intro.html" >Part 1: What we have</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Overview.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part1-Overview.html" >Part 1: What we have</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><span class="section-number">5. </span>Introduction to Python classes and objects</a></li>
</ul>
<div class="develop">develop branch</div>

View file

@ -37,8 +37,8 @@
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-1"><a href="../../Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Intro.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part1-Intro.html" accesskey="U">Part 1: What we have</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Overview.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part1-Overview.html" accesskey="U">Part 1: What we have</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><span class="section-number">11. </span>Searching for things</a></li>
</ul>
<div class="develop">develop branch</div>
@ -425,8 +425,8 @@ We can also find what is inside each object. This is a list of things.</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-1"><a href="../../Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Intro.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part1-Intro.html" >Part 1: What we have</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Overview.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part1-Overview.html" >Part 1: What we have</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><span class="section-number">11. </span>Searching for things</a></li>
</ul>
<div class="develop">develop branch</div>

View file

@ -37,8 +37,8 @@
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-1"><a href="../../Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Intro.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part1-Intro.html" accesskey="U">Part 1: What we have</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Overview.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part1-Overview.html" accesskey="U">Part 1: What we have</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><span class="section-number">2. </span>The Tutorial World</a></li>
</ul>
<div class="develop">develop branch</div>
@ -252,8 +252,8 @@ move on with how to access this power through code.</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-1"><a href="../../Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Intro.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part1-Intro.html" >Part 1: What we have</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Overview.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part1-Overview.html" >Part 1: What we have</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><span class="section-number">2. </span>The Tutorial World</a></li>
</ul>
<div class="develop">develop branch</div>

View file

@ -37,8 +37,8 @@
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-1"><a href="../../Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Intro.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part2-Intro.html" accesskey="U">Part 2: What we want</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Overview.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part2-Overview.html" accesskey="U">Part 2: What we want</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><span class="section-number">2. </span>On Planning a Game</a></li>
</ul>
<div class="develop">develop branch</div>
@ -344,8 +344,8 @@ have made their dream game a reality!</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-1"><a href="../../Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Intro.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part2-Intro.html" >Part 2: What we want</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Overview.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part2-Overview.html" >Part 2: What we want</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><span class="section-number">2. </span>On Planning a Game</a></li>
</ul>
<div class="develop">develop branch</div>

View file

@ -37,7 +37,7 @@
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-1"><a href="../../Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Intro.html" accesskey="U">Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Overview.html" accesskey="U">Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Part 2: What we want</a></li>
</ul>
<div class="develop">develop branch</div>
@ -78,7 +78,7 @@
<div role="note" aria-label="source link">
<!--h3>This Page</h3-->
<ul class="this-page-menu">
<li><a href="../../../_sources/Howtos/Beginner-Tutorial/Part2/Beginner-Tutorial-Part2-Intro.md.txt"
<li><a href="../../../_sources/Howtos/Beginner-Tutorial/Part2/Beginner-Tutorial-Part2-Overview.md.txt"
rel="nofollow">Show Page Source</a></li>
</ul>
</div><h3>Links</h3>
@ -94,7 +94,7 @@
</ul>
<h3>Versions</h3>
<ul>
<li><a href="Beginner-Tutorial-Part2-Intro.html">1.0-dev (develop branch)</a></li>
<li><a href="Beginner-Tutorial-Part2-Overview.html">1.0-dev (develop branch)</a></li>
<ul>
<li><a href="../0.9.5/index.html">0.9.5 (v0.9.5 branch)</a></li>
@ -110,17 +110,17 @@
<aside class="sidebar">
<p class="sidebar-title">Beginner Tutorial Parts</p>
<ul class="simple">
<li><p><a class="reference internal" href="../Beginner-Tutorial-Intro.html"><span class="doc std std-doc">Introduction</span></a>
<li><p><a class="reference internal" href="../Beginner-Tutorial-Overview.html"><span class="doc std std-doc">Introduction</span></a>
<br>Getting set up.</p></li>
<li><p>Part 1: <a class="reference internal" href="../Part1/Beginner-Tutorial-Part1-Intro.html"><span class="doc std std-doc">What we have</span></a>
<li><p>Part 1: <a class="reference internal" href="../Part1/Beginner-Tutorial-Part1-Overview.html"><span class="doc std std-doc">What we have</span></a>
<br>A tour of Evennia and how to use the tools, including an introduction to Python.</p></li>
<li><p><strong>Part 2: <a class="reference internal" href="#"><span class="doc std std-doc">What we want</span></a></strong>
<br>Planning our tutorial game and what to think about when planning your own in the future.</p></li>
<li><p>Part 3: <a class="reference internal" href="../Part3/Beginner-Tutorial-Part3-Intro.html"><span class="doc std std-doc">How we get there</span></a>
<li><p>Part 3: <a class="reference internal" href="../Part3/Beginner-Tutorial-Part3-Overview.html"><span class="doc std std-doc">How we get there</span></a>
<br>Getting down to the meat of extending Evennia to make our game</p></li>
<li><p>Part 4: <a class="reference internal" href="../Part4/Beginner-Tutorial-Part4-Intro.html"><span class="doc std std-doc">Using what we created</span></a>
<li><p>Part 4: <a class="reference internal" href="../Part4/Beginner-Tutorial-Part4-Overview.html"><span class="doc std std-doc">Using what we created</span></a>
<br>Building a tech-demo and world content to go with our code</p></li>
<li><p>Part 5: <a class="reference internal" href="../Part5/Beginner-Tutorial-Part5-Intro.html"><span class="doc std std-doc">Showing the world</span></a>
<li><p>Part 5: <a class="reference internal" href="../Part5/Beginner-Tutorial-Part5-Overview.html"><span class="doc std std-doc">Showing the world</span></a>
<br>Taking our new game online and let players try it out</p></li>
</ul>
</aside>
@ -189,7 +189,7 @@ and “what to think about” when creating a multiplayer online text game.</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-1"><a href="../../Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Intro.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Overview.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Part 2: What we want</a></li>
</ul>
<div class="develop">develop branch</div>

View file

@ -17,7 +17,7 @@
<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="Part 3: How we get there (example game)" href="../Part3/Beginner-Tutorial-Part3-Intro.html" />
<link rel="next" title="Part 3: How we get there (example game)" href="../Part3/Beginner-Tutorial-Part3-Overview.html" />
<link rel="prev" title="2. On Planning a Game" href="Beginner-Tutorial-Game-Planning.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
@ -30,15 +30,15 @@
<a href="../../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="../Part3/Beginner-Tutorial-Part3-Intro.html" title="Part 3: How we get there (example game)"
<a href="../Part3/Beginner-Tutorial-Part3-Overview.html" title="Part 3: How we get there (example game)"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="Beginner-Tutorial-Game-Planning.html" title="2. On Planning a Game"
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-1"><a href="../../Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Intro.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part2-Intro.html" accesskey="U">Part 2: What we want</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Overview.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part2-Overview.html" accesskey="U">Part 2: What we want</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><span class="section-number">3. </span>Planning our tutorial game</a></li>
</ul>
<div class="develop">develop branch</div>
@ -125,7 +125,7 @@
<p class="topless"><a href="Beginner-Tutorial-Game-Planning.html"
title="previous chapter"><span class="section-number">2. </span>On Planning a Game</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="../Part3/Beginner-Tutorial-Part3-Intro.html"
<p class="topless"><a href="../Part3/Beginner-Tutorial-Part3-Overview.html"
title="next chapter">Part 3: How we get there (example game)</a></p>
<div role="note" aria-label="source link">
<!--h3>This Page</h3-->
@ -569,15 +569,15 @@ playable game!</p>
<a href="../../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="../Part3/Beginner-Tutorial-Part3-Intro.html" title="Part 3: How we get there (example game)"
<a href="../Part3/Beginner-Tutorial-Part3-Overview.html" title="Part 3: How we get there (example game)"
>next</a> |</li>
<li class="right" >
<a href="Beginner-Tutorial-Game-Planning.html" title="2. On Planning a Game"
>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-1"><a href="../../Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Intro.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part2-Intro.html" >Part 2: What we want</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Overview.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part2-Overview.html" >Part 2: What we want</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><span class="section-number">3. </span>Planning our tutorial game</a></li>
</ul>
<div class="develop">develop branch</div>

View file

@ -18,7 +18,7 @@
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
<link rel="next" title="2. On Planning a Game" href="Beginner-Tutorial-Game-Planning.html" />
<link rel="prev" title="Part 2: What we want" href="Beginner-Tutorial-Part2-Intro.html" />
<link rel="prev" title="Part 2: What we want" href="Beginner-Tutorial-Part2-Overview.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
@ -33,12 +33,12 @@
<a href="Beginner-Tutorial-Game-Planning.html" title="2. On Planning a Game"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="Beginner-Tutorial-Part2-Intro.html" title="Part 2: What we want"
<a href="Beginner-Tutorial-Part2-Overview.html" title="Part 2: What we want"
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-1"><a href="../../Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Intro.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part2-Intro.html" accesskey="U">Part 2: What we want</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Overview.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part2-Overview.html" accesskey="U">Part 2: What we want</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><span class="section-number">1. </span>Where do I begin?</a></li>
</ul>
<div class="develop">develop branch</div>
@ -78,7 +78,7 @@
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="Beginner-Tutorial-Part2-Intro.html"
<p class="topless"><a href="Beginner-Tutorial-Part2-Overview.html"
title="previous chapter">Part 2: What we want</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="Beginner-Tutorial-Game-Planning.html"
@ -269,12 +269,12 @@ then try to answer those questions for the sake of creating our little tutorial
<a href="Beginner-Tutorial-Game-Planning.html" title="2. On Planning a Game"
>next</a> |</li>
<li class="right" >
<a href="Beginner-Tutorial-Part2-Intro.html" title="Part 2: What we want"
<a href="Beginner-Tutorial-Part2-Overview.html" title="Part 2: What we want"
>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-1"><a href="../../Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Intro.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part2-Intro.html" >Part 2: What we want</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Overview.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part2-Overview.html" >Part 2: What we want</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><span class="section-number">1. </span>Where do I begin?</a></li>
</ul>
<div class="develop">develop branch</div>

View file

@ -37,8 +37,8 @@
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-1"><a href="../../Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Intro.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part3-Intro.html" accesskey="U">Part 3: How we get there (example game)</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Overview.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part3-Overview.html" accesskey="U">Part 3: How we get there (example game)</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><span class="section-number">3. </span>Player Characters</a></li>
</ul>
<div class="develop">develop branch</div>
@ -528,8 +528,8 @@ then on.</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-1"><a href="../../Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Intro.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part3-Intro.html" >Part 3: How we get there (example game)</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Overview.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part3-Overview.html" >Part 3: How we get there (example game)</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><span class="section-number">3. </span>Player Characters</a></li>
</ul>
<div class="develop">develop branch</div>

View file

@ -37,8 +37,8 @@
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-1"><a href="../../Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Intro.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part3-Intro.html" accesskey="U">Part 3: How we get there (example game)</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Overview.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part3-Overview.html" accesskey="U">Part 3: How we get there (example game)</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><span class="section-number">6. </span>Character Generation</a></li>
</ul>
<div class="develop">develop branch</div>
@ -796,8 +796,8 @@ characters - how they store their stats, handle their equipment and how to creat
>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-1"><a href="../../Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Intro.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part3-Intro.html" >Part 3: How we get there (example game)</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Overview.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part3-Overview.html" >Part 3: How we get there (example game)</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><span class="section-number">6. </span>Character Generation</a></li>
</ul>
<div class="develop">develop branch</div>

View file

@ -17,7 +17,7 @@
<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="Part 4: Using what we created" href="../Part4/Beginner-Tutorial-Part4-Intro.html" />
<link rel="next" title="Part 4: Using what we created" href="../Part4/Beginner-Tutorial-Part4-Overview.html" />
<link rel="prev" title="11. Dynamically generated Dungeon" href="Beginner-Tutorial-Dungeon.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
@ -30,15 +30,15 @@
<a href="../../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="../Part4/Beginner-Tutorial-Part4-Intro.html" title="Part 4: Using what we created"
<a href="../Part4/Beginner-Tutorial-Part4-Overview.html" title="Part 4: Using what we created"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="Beginner-Tutorial-Dungeon.html" title="11. Dynamically generated Dungeon"
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-1"><a href="../../Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Intro.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part3-Intro.html" accesskey="U">Part 3: How we get there (example game)</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Overview.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part3-Overview.html" accesskey="U">Part 3: How we get there (example game)</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><span class="section-number">12. </span>In-game Commands</a></li>
</ul>
<div class="develop">develop branch</div>
@ -66,7 +66,7 @@
<p class="topless"><a href="Beginner-Tutorial-Dungeon.html"
title="previous chapter"><span class="section-number">11. </span>Dynamically generated Dungeon</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="../Part4/Beginner-Tutorial-Part4-Intro.html"
<p class="topless"><a href="../Part4/Beginner-Tutorial-Part4-Overview.html"
title="next chapter">Part 4: Using what we created</a></p>
<div role="note" aria-label="source link">
<!--h3>This Page</h3-->
@ -122,15 +122,15 @@
<a href="../../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="../Part4/Beginner-Tutorial-Part4-Intro.html" title="Part 4: Using what we created"
<a href="../Part4/Beginner-Tutorial-Part4-Overview.html" title="Part 4: Using what we created"
>next</a> |</li>
<li class="right" >
<a href="Beginner-Tutorial-Dungeon.html" title="11. Dynamically generated Dungeon"
>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-1"><a href="../../Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Intro.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part3-Intro.html" >Part 3: How we get there (example game)</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Overview.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part3-Overview.html" >Part 3: How we get there (example game)</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><span class="section-number">12. </span>In-game Commands</a></li>
</ul>
<div class="develop">develop branch</div>

View file

@ -37,8 +37,8 @@
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-1"><a href="../../Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Intro.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part3-Intro.html" accesskey="U">Part 3: How we get there (example game)</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Overview.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part3-Overview.html" accesskey="U">Part 3: How we get there (example game)</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><span class="section-number">11. </span>Dynamically generated Dungeon</a></li>
</ul>
<div class="develop">develop branch</div>
@ -129,8 +129,8 @@
>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-1"><a href="../../Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Intro.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part3-Intro.html" >Part 3: How we get there (example game)</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Overview.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part3-Overview.html" >Part 3: How we get there (example game)</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><span class="section-number">11. </span>Dynamically generated Dungeon</a></li>
</ul>
<div class="develop">develop branch</div>

View file

@ -37,8 +37,8 @@
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-1"><a href="../../Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Intro.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part3-Intro.html" accesskey="U">Part 3: How we get there (example game)</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Overview.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part3-Overview.html" accesskey="U">Part 3: How we get there (example game)</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><span class="section-number">5. </span>Handling Equipment</a></li>
</ul>
<div class="develop">develop branch</div>
@ -696,8 +696,8 @@ generation - where players get to make their own character!</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-1"><a href="../../Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Intro.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part3-Intro.html" >Part 3: How we get there (example game)</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Overview.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part3-Overview.html" >Part 3: How we get there (example game)</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><span class="section-number">5. </span>Handling Equipment</a></li>
</ul>
<div class="develop">develop branch</div>

View file

@ -37,8 +37,8 @@
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-1"><a href="../../Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Intro.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part3-Intro.html" accesskey="U">Part 3: How we get there (example game)</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Overview.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part3-Overview.html" accesskey="U">Part 3: How we get there (example game)</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><span class="section-number">8. </span>Non-Player-Characters (NPCs)</a></li>
</ul>
<div class="develop">develop branch</div>
@ -129,8 +129,8 @@
>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-1"><a href="../../Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Intro.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part3-Intro.html" >Part 3: How we get there (example game)</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Overview.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part3-Overview.html" >Part 3: How we get there (example game)</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><span class="section-number">8. </span>Non-Player-Characters (NPCs)</a></li>
</ul>
<div class="develop">develop branch</div>

View file

@ -37,8 +37,8 @@
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-1"><a href="../../Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Intro.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part3-Intro.html" accesskey="U">Part 3: How we get there (example game)</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Overview.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part3-Overview.html" accesskey="U">Part 3: How we get there (example game)</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><span class="section-number">4. </span>In-game Objects and items</a></li>
</ul>
<div class="develop">develop branch</div>
@ -472,8 +472,8 @@ to <code class="docutils literal notranslate"><span class="pre">get_obj_stats</s
>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-1"><a href="../../Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Intro.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part3-Intro.html" >Part 3: How we get there (example game)</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Overview.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part3-Overview.html" >Part 3: How we get there (example game)</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><span class="section-number">4. </span>In-game Objects and items</a></li>
</ul>
<div class="develop">develop branch</div>

View file

@ -37,7 +37,7 @@
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-1"><a href="../../Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Intro.html" accesskey="U">Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Overview.html" accesskey="U">Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Part 3: How we get there (example game)</a></li>
</ul>
<div class="develop">develop branch</div>
@ -78,7 +78,7 @@
<div role="note" aria-label="source link">
<!--h3>This Page</h3-->
<ul class="this-page-menu">
<li><a href="../../../_sources/Howtos/Beginner-Tutorial/Part3/Beginner-Tutorial-Part3-Intro.md.txt"
<li><a href="../../../_sources/Howtos/Beginner-Tutorial/Part3/Beginner-Tutorial-Part3-Overview.md.txt"
rel="nofollow">Show Page Source</a></li>
</ul>
</div><h3>Links</h3>
@ -94,7 +94,7 @@
</ul>
<h3>Versions</h3>
<ul>
<li><a href="Beginner-Tutorial-Part3-Intro.html">1.0-dev (develop branch)</a></li>
<li><a href="Beginner-Tutorial-Part3-Overview.html">1.0-dev (develop branch)</a></li>
<ul>
<li><a href="../0.9.5/index.html">0.9.5 (v0.9.5 branch)</a></li>
@ -116,17 +116,17 @@ from it at this time.</p>
<aside class="sidebar">
<p class="sidebar-title">Beginner Tutorial Parts</p>
<ul class="simple">
<li><p><a class="reference internal" href="../Beginner-Tutorial-Intro.html"><span class="doc std std-doc">Introduction</span></a>
<li><p><a class="reference internal" href="../Beginner-Tutorial-Overview.html"><span class="doc std std-doc">Introduction</span></a>
<br>Getting set up.</p></li>
<li><p>Part 1: <a class="reference internal" href="../Part1/Beginner-Tutorial-Part1-Intro.html"><span class="doc std std-doc">What we have</span></a>
<li><p>Part 1: <a class="reference internal" href="../Part1/Beginner-Tutorial-Part1-Overview.html"><span class="doc std std-doc">What we have</span></a>
<br>A tour of Evennia and how to use the tools, including an introduction to Python.</p></li>
<li><p>Part 2: <a class="reference internal" href="../Part2/Beginner-Tutorial-Part2-Intro.html"><span class="doc std std-doc">What we want</span></a>
<li><p>Part 2: <a class="reference internal" href="../Part2/Beginner-Tutorial-Part2-Overview.html"><span class="doc std std-doc">What we want</span></a>
<br>Planning our tutorial game and what to think about when planning your own in the future.</p></li>
<li><p><strong>Part 3: <a class="reference internal" href="#"><span class="doc std std-doc">How we get there</span></a></strong>
<br>Getting down to the meat of extending Evennia to make our game</p></li>
<li><p>Part 4: <a class="reference internal" href="../Part4/Beginner-Tutorial-Part4-Intro.html"><span class="doc std std-doc">Using what we created</span></a>
<li><p>Part 4: <a class="reference internal" href="../Part4/Beginner-Tutorial-Part4-Overview.html"><span class="doc std std-doc">Using what we created</span></a>
<br>Building a tech-demo and world content to go with our code</p></li>
<li><p>Part 5: <a class="reference internal" href="../Part5/Beginner-Tutorial-Part5-Intro.html"><span class="doc std std-doc">Showing the world</span></a>
<li><p>Part 5: <a class="reference internal" href="../Part5/Beginner-Tutorial-Part5-Overview.html"><span class="doc std std-doc">Showing the world</span></a>
<br>Taking our new game online and let players try it out</p></li>
</ul>
</aside>
@ -245,7 +245,7 @@ of experience using Evennia and be really helpful for doing your own thing later
>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-1"><a href="../../Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Intro.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Overview.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Part 3: How we get there (example game)</a></li>
</ul>
<div class="develop">develop branch</div>

View file

@ -37,8 +37,8 @@
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-1"><a href="../../Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Intro.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part3-Intro.html" accesskey="U">Part 3: How we get there (example game)</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Overview.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part3-Overview.html" accesskey="U">Part 3: How we get there (example game)</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><span class="section-number">9. </span>Game Quests</a></li>
</ul>
<div class="develop">develop branch</div>
@ -129,8 +129,8 @@
>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-1"><a href="../../Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Intro.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part3-Intro.html" >Part 3: How we get there (example game)</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Overview.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part3-Overview.html" >Part 3: How we get there (example game)</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><span class="section-number">9. </span>Game Quests</a></li>
</ul>
<div class="develop">develop branch</div>

View file

@ -37,8 +37,8 @@
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-1"><a href="../../Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Intro.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part3-Intro.html" accesskey="U">Part 3: How we get there (example game)</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Overview.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part3-Overview.html" accesskey="U">Part 3: How we get there (example game)</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><span class="section-number">7. </span>In-game Rooms</a></li>
</ul>
<div class="develop">develop branch</div>
@ -129,8 +129,8 @@
>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-1"><a href="../../Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Intro.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part3-Intro.html" >Part 3: How we get there (example game)</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Overview.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part3-Overview.html" >Part 3: How we get there (example game)</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><span class="section-number">7. </span>In-game Rooms</a></li>
</ul>
<div class="develop">develop branch</div>

View file

@ -37,8 +37,8 @@
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-1"><a href="../../Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Intro.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part3-Intro.html" accesskey="U">Part 3: How we get there (example game)</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Overview.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part3-Overview.html" accesskey="U">Part 3: How we get there (example game)</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><span class="section-number">2. </span>Rules and dice rolling</a></li>
</ul>
<div class="develop">develop branch</div>
@ -781,8 +781,8 @@ address that next.</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-1"><a href="../../Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Intro.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part3-Intro.html" >Part 3: How we get there (example game)</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Overview.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part3-Overview.html" >Part 3: How we get there (example game)</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><span class="section-number">2. </span>Rules and dice rolling</a></li>
</ul>
<div class="develop">develop branch</div>

View file

@ -37,8 +37,8 @@
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-1"><a href="../../Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Intro.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part3-Intro.html" accesskey="U">Part 3: How we get there (example game)</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Overview.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part3-Overview.html" accesskey="U">Part 3: How we get there (example game)</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><span class="section-number">10. </span>In-game Shops</a></li>
</ul>
<div class="develop">develop branch</div>
@ -129,8 +129,8 @@
>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-1"><a href="../../Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Intro.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part3-Intro.html" >Part 3: How we get there (example game)</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Overview.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part3-Overview.html" >Part 3: How we get there (example game)</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><span class="section-number">10. </span>In-game Shops</a></li>
</ul>
<div class="develop">develop branch</div>

View file

@ -18,7 +18,7 @@
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
<link rel="next" title="2. Rules and dice rolling" href="Beginner-Tutorial-Rules.html" />
<link rel="prev" title="Part 3: How we get there (example game)" href="Beginner-Tutorial-Part3-Intro.html" />
<link rel="prev" title="Part 3: How we get there (example game)" href="Beginner-Tutorial-Part3-Overview.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
@ -33,12 +33,12 @@
<a href="Beginner-Tutorial-Rules.html" title="2. Rules and dice rolling"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="Beginner-Tutorial-Part3-Intro.html" title="Part 3: How we get there (example game)"
<a href="Beginner-Tutorial-Part3-Overview.html" title="Part 3: How we get there (example game)"
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-1"><a href="../../Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Intro.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part3-Intro.html" accesskey="U">Part 3: How we get there (example game)</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Overview.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part3-Overview.html" accesskey="U">Part 3: How we get there (example game)</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><span class="section-number">1. </span>Code structure and Utilities</a></li>
</ul>
<div class="develop">develop branch</div>
@ -78,7 +78,7 @@
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="Beginner-Tutorial-Part3-Intro.html"
<p class="topless"><a href="Beginner-Tutorial-Part3-Overview.html"
title="previous chapter">Part 3: How we get there (example game)</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="Beginner-Tutorial-Rules.html"
@ -419,12 +419,12 @@ small modules and even making your first unit test, you are off to a great start
<a href="Beginner-Tutorial-Rules.html" title="2. Rules and dice rolling"
>next</a> |</li>
<li class="right" >
<a href="Beginner-Tutorial-Part3-Intro.html" title="Part 3: How we get there (example game)"
<a href="Beginner-Tutorial-Part3-Overview.html" title="Part 3: How we get there (example game)"
>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-1"><a href="../../Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Intro.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part3-Intro.html" >Part 3: How we get there (example game)</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Overview.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part3-Overview.html" >Part 3: How we get there (example game)</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><span class="section-number">1. </span>Code structure and Utilities</a></li>
</ul>
<div class="develop">develop branch</div>

View file

@ -37,7 +37,7 @@
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-1"><a href="../../Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Intro.html" accesskey="U">Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Overview.html" accesskey="U">Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Part 4: Using what we created</a></li>
</ul>
<div class="develop">develop branch</div>
@ -78,7 +78,7 @@
<div role="note" aria-label="source link">
<!--h3>This Page</h3-->
<ul class="this-page-menu">
<li><a href="../../../_sources/Howtos/Beginner-Tutorial/Part4/Beginner-Tutorial-Part4-Intro.md.txt"
<li><a href="../../../_sources/Howtos/Beginner-Tutorial/Part4/Beginner-Tutorial-Part4-Overview.md.txt"
rel="nofollow">Show Page Source</a></li>
</ul>
</div><h3>Links</h3>
@ -94,7 +94,7 @@
</ul>
<h3>Versions</h3>
<ul>
<li><a href="Beginner-Tutorial-Part4-Intro.html">1.0-dev (develop branch)</a></li>
<li><a href="Beginner-Tutorial-Part4-Overview.html">1.0-dev (develop branch)</a></li>
<ul>
<li><a href="../0.9.5/index.html">0.9.5 (v0.9.5 branch)</a></li>
@ -110,25 +110,21 @@
<aside class="sidebar">
<p class="sidebar-title">Beginner Tutorial Parts</p>
<ul class="simple">
<li><p><a class="reference internal" href="../Beginner-Tutorial-Intro.html"><span class="doc std std-doc">Introduction</span></a>
<li><p><a class="reference internal" href="../Beginner-Tutorial-Overview.html"><span class="doc std std-doc">Introduction</span></a>
<br>Getting set up.</p></li>
<li><p>Part 1: <a class="reference internal" href="../Part1/Beginner-Tutorial-Part1-Intro.html"><span class="doc std std-doc">What we have</span></a>
<li><p>Part 1: <a class="reference internal" href="../Part1/Beginner-Tutorial-Part1-Overview.html"><span class="doc std std-doc">What we have</span></a>
<br>A tour of Evennia and how to use the tools, including an introduction to Python.</p></li>
<li><p>Part 2: <a class="reference internal" href="../Part2/Beginner-Tutorial-Part2-Intro.html"><span class="doc std std-doc">What we want</span></a>
<li><p>Part 2: <a class="reference internal" href="../Part2/Beginner-Tutorial-Part2-Overview.html"><span class="doc std std-doc">What we want</span></a>
<br>Planning our tutorial game and what to think about when planning your own in the future.</p></li>
<li><p>Part 3: <a class="reference internal" href="../Part3/Beginner-Tutorial-Part3-Intro.html"><span class="doc std std-doc">How we get there</span></a>
<li><p>Part 3: <a class="reference internal" href="../Part3/Beginner-Tutorial-Part3-Overview.html"><span class="doc std std-doc">How we get there</span></a>
<br>Getting down to the meat of extending Evennia to make our game</p></li>
<li><p><strong>Part 4: <a class="reference internal" href="#"><span class="doc std std-doc">Using what we created</span></a></strong>
<br>Building a tech-demo and world content to go with our code</p></li>
<li><p>Part 5: <a class="reference internal" href="../Part5/Beginner-Tutorial-Part5-Intro.html"><span class="doc std std-doc">Showing the world</span></a>
<li><p>Part 5: <a class="reference internal" href="../Part5/Beginner-Tutorial-Part5-Overview.html"><span class="doc std std-doc">Showing the world</span></a>
<br>Taking our new game online and let players try it out</p></li>
</ul>
</aside>
<p>We now have the code underpinnings of everything we need. We have also tested the various components
and has a simple tech-demo to show it all works together. But there is no real coherence to it at this
point - we need to actually make a world.
In part four we will expand our tech demo into a more full-fledged (if small) game by use of batchcommand
and batchcode processors.</p>
<p>We now have the code underpinnings of everything we need. We have also tested the various components and has a simple tech-demo to show it all works together. But there is no real coherence to it at this point - we need to actually make a world. In part four we will expand our tech demo into a more full-fledged (if small) game by use of batchcommand and batchcode processors.</p>
<section id="lessons">
<h2>Lessons<a class="headerlink" href="#lessons" title="Permalink to this headline"></a></h2>
<p><em>TODO</em></p>
@ -163,7 +159,7 @@ and batchcode processors.</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-1"><a href="../../Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Intro.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Overview.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Part 4: Using what we created</a></li>
</ul>
<div class="develop">develop branch</div>

View file

@ -17,8 +17,8 @@
<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="2. Web Tutorial" href="Web-Tutorial.html" />
<link rel="prev" title="Part 5: Showing the world" href="Beginner-Tutorial-Part5-Intro.html" />
<link rel="next" title="Adding a Command Prompt" href="../../Howto-Command-Prompt.html" />
<link rel="prev" title="Part 5: Showing the world" href="Beginner-Tutorial-Part5-Overview.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
@ -30,15 +30,15 @@
<a href="../../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="Web-Tutorial.html" title="2. Web Tutorial"
<a href="../../Howto-Command-Prompt.html" title="Adding a Command Prompt"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="Beginner-Tutorial-Part5-Intro.html" title="Part 5: Showing the world"
<a href="Beginner-Tutorial-Part5-Overview.html" title="Part 5: Showing the world"
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-1"><a href="../../Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Intro.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part5-Intro.html" accesskey="U">Part 5: Showing the world</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Overview.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part5-Overview.html" accesskey="U">Part 5: Showing the world</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><span class="section-number">1. </span>Add a simple new web page</a></li>
</ul>
<div class="develop">develop branch</div>
@ -73,11 +73,11 @@
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="Beginner-Tutorial-Part5-Intro.html"
<p class="topless"><a href="Beginner-Tutorial-Part5-Overview.html"
title="previous chapter">Part 5: Showing the world</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="Web-Tutorial.html"
title="next chapter"><span class="section-number">2. </span>Web Tutorial</a></p>
<p class="topless"><a href="../../Howto-Command-Prompt.html"
title="next chapter">Adding a Command Prompt</a></p>
<div role="note" aria-label="source link">
<!--h3>This Page</h3-->
<ul class="this-page-menu">
@ -212,15 +212,15 @@ to.</p>
<a href="../../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="Web-Tutorial.html" title="2. Web Tutorial"
<a href="../../Howto-Command-Prompt.html" title="Adding a Command Prompt"
>next</a> |</li>
<li class="right" >
<a href="Beginner-Tutorial-Part5-Intro.html" title="Part 5: Showing the world"
<a href="Beginner-Tutorial-Part5-Overview.html" title="Part 5: Showing the world"
>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-1"><a href="../../Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Intro.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part5-Intro.html" >Part 5: Showing the world</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Overview.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part5-Overview.html" >Part 5: Showing the world</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><span class="section-number">1. </span>Add a simple new web page</a></li>
</ul>
<div class="develop">develop branch</div>

View file

@ -37,7 +37,7 @@
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-1"><a href="../../Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Intro.html" accesskey="U">Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Overview.html" accesskey="U">Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Part 5: Showing the world</a></li>
</ul>
<div class="develop">develop branch</div>
@ -78,7 +78,7 @@
<div role="note" aria-label="source link">
<!--h3>This Page</h3-->
<ul class="this-page-menu">
<li><a href="../../../_sources/Howtos/Beginner-Tutorial/Part5/Beginner-Tutorial-Part5-Intro.md.txt"
<li><a href="../../../_sources/Howtos/Beginner-Tutorial/Part5/Beginner-Tutorial-Part5-Overview.md.txt"
rel="nofollow">Show Page Source</a></li>
</ul>
</div><h3>Links</h3>
@ -94,7 +94,7 @@
</ul>
<h3>Versions</h3>
<ul>
<li><a href="Beginner-Tutorial-Part5-Intro.html">1.0-dev (develop branch)</a></li>
<li><a href="Beginner-Tutorial-Part5-Overview.html">1.0-dev (develop branch)</a></li>
<ul>
<li><a href="../0.9.5/index.html">0.9.5 (v0.9.5 branch)</a></li>
@ -110,17 +110,17 @@
<aside class="sidebar">
<p class="sidebar-title">Beginner Tutorial Parts</p>
<ul class="simple">
<li><p><a class="reference internal" href="../Beginner-Tutorial-Intro.html"><span class="doc std std-doc">Introduction</span></a>
<li><p><span class="xref myst">Introduction</span>
<br>Getting set up.</p></li>
<li><p>Part 1: <a class="reference internal" href="../Part1/Beginner-Tutorial-Part1-Intro.html"><span class="doc std std-doc">What we have</span></a>
<li><p>Part 1: <span class="xref myst">What we have</span>
<br>A tour of Evennia and how to use the tools, including an introduction to Python.</p></li>
<li><p>Part 2: <a class="reference internal" href="../Part2/Beginner-Tutorial-Part2-Intro.html"><span class="doc std std-doc">What we want</span></a>
<li><p>Part 2: <span class="xref myst">What we want</span>
<br>Planning our tutorial game and what to think about when planning your own in the future.</p></li>
<li><p>Part 3: <a class="reference internal" href="../Part3/Beginner-Tutorial-Part3-Intro.html"><span class="doc std std-doc">How we get there</span></a>
<li><p>Part 3: <span class="xref myst">How we get there</span>
<br>Getting down to the meat of extending Evennia to make our game</p></li>
<li><p>Part 4: <a class="reference internal" href="../Part4/Beginner-Tutorial-Part4-Intro.html"><span class="doc std std-doc">Using what we created</span></a>
<li><p>Part 4: <span class="xref myst">Using what we created</span>
<br>Building a tech-demo and world content to go with our code</p></li>
<li><p><strong>Part 5: <a class="reference internal" href="#"><span class="doc std std-doc">Showing the world</span></a></strong>
<li><p><strong>Part 5: <span class="xref myst">Showing the world</span></strong>
<br>Taking our new game online and let players try it out</p></li>
</ul>
</aside>
@ -138,13 +138,6 @@ to bring your game online so you can invite your first players.</p>
<li class="toctree-l2"><a class="reference internal" href="Add-a-simple-new-web-page.html#the-url">1.3. The URL</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="Web-Tutorial.html">2. Web Tutorial</a><ul>
<li class="toctree-l2"><a class="reference internal" href="Web-Tutorial.html#a-basic-overview">2.1. A Basic Overview</a></li>
<li class="toctree-l2"><a class="reference internal" href="Web-Tutorial.html#changing-the-logo-on-the-front-page">2.2. Changing the logo on the front page</a></li>
<li class="toctree-l2"><a class="reference internal" href="Web-Tutorial.html#changing-the-front-pages-text">2.3. Changing the Front Pages Text</a></li>
<li class="toctree-l2"><a class="reference internal" href="Web-Tutorial.html#further-reading">2.4. Further reading</a></li>
</ul>
</li>
</ul>
</div>
</section>
@ -173,7 +166,7 @@ to bring your game online so you can invite your first players.</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-1"><a href="../../Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Intro.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Overview.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Part 5: Showing the world</a></li>
</ul>
<div class="develop">develop branch</div>

View file

@ -17,7 +17,7 @@
<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="Arxcode installing help" href="Arxcode-Installation.html" />
<link rel="next" title="Using the Arxcode game dir" href="Tutorial-Using-Arxcode.html" />
<link rel="prev" title="Evennia for Diku Users" href="Evennia-for-Diku-Users.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
@ -30,7 +30,7 @@
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="Arxcode-Installation.html" title="Arxcode installing help"
<a href="Tutorial-Using-Arxcode.html" title="Using the Arxcode game dir"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="Evennia-for-Diku-Users.html" title="Evennia for Diku Users"
@ -80,8 +80,8 @@
<p class="topless"><a href="Evennia-for-Diku-Users.html"
title="previous chapter">Evennia for Diku Users</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="Arxcode-Installation.html"
title="next chapter">Arxcode installing help</a></p>
<p class="topless"><a href="Tutorial-Using-Arxcode.html"
title="next chapter">Using the Arxcode game dir</a></p>
<div role="note" aria-label="source link">
<!--h3>This Page</h3-->
<ul class="this-page-menu">
@ -325,7 +325,7 @@ or post a question in our <a class="reference external" href="https://groups.goo
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="Arxcode-Installation.html" title="Arxcode installing help"
<a href="Tutorial-Using-Arxcode.html" title="Using the Arxcode game dir"
>next</a> |</li>
<li class="right" >
<a href="Evennia-for-Diku-Users.html" title="Evennia for Diku Users"

View file

@ -158,7 +158,7 @@ defaults for our particular use-case. Below we will flesh out these components f
instructions. Initialize a new game directory with <code class="docutils literal notranslate"><span class="pre">evennia</span> <span class="pre">init</span> <span class="pre">&lt;gamedirname&gt;</span></code>. In this tutorial we assume your game dir is simply named <code class="docutils literal notranslate"><span class="pre">mygame</span></code>. You can use the
default database and keep all other settings to default for now. Familiarize yourself with the
<code class="docutils literal notranslate"><span class="pre">mygame</span></code> folder before continuing. You might want to browse the
<a class="reference internal" href="Beginner-Tutorial/Part1/Beginner-Tutorial-Part1-Intro.html"><span class="doc std std-doc">First Steps Coding</span></a> tutorial, just to see roughly where things are modified.</p>
<a class="reference internal" href="Beginner-Tutorial/Part1/Beginner-Tutorial-Part1-Overview.html"><span class="doc std std-doc">First Steps Coding</span></a> tutorial, just to see roughly where things are modified.</p>
</section>
<section id="the-game-master-role">
<h2>The Game Master role<a class="headerlink" href="#the-game-master-role" title="Permalink to this headline"></a></h2>

View file

@ -18,7 +18,7 @@
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Adding Command Cooldowns" href="Howto-Command-Cooldown.html" />
<link rel="prev" title="2. Web Tutorial" href="Beginner-Tutorial/Part5/Web-Tutorial.html" />
<link rel="prev" title="1. Add a simple new web page" href="Beginner-Tutorial/Part5/Add-a-simple-new-web-page.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
@ -33,7 +33,7 @@
<a href="Howto-Command-Cooldown.html" title="Adding Command Cooldowns"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="Beginner-Tutorial/Part5/Web-Tutorial.html" title="2. Web Tutorial"
<a href="Beginner-Tutorial/Part5/Add-a-simple-new-web-page.html" title="1. Add a simple new web page"
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-1"><a href="Howtos-Overview.html" accesskey="U">Tutorials and Howtos</a> &#187;</li>
@ -73,8 +73,8 @@
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="Beginner-Tutorial/Part5/Web-Tutorial.html"
title="previous chapter"><span class="section-number">2. </span>Web Tutorial</a></p>
<p class="topless"><a href="Beginner-Tutorial/Part5/Add-a-simple-new-web-page.html"
title="previous chapter"><span class="section-number">1. </span>Add a simple new web page</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="Howto-Command-Cooldown.html"
title="next chapter">Adding Command Cooldowns</a></p>
@ -237,7 +237,7 @@ the prompt when they cause a change in health, for example.</p>
<a href="Howto-Command-Cooldown.html" title="Adding Command Cooldowns"
>next</a> |</li>
<li class="right" >
<a href="Beginner-Tutorial/Part5/Web-Tutorial.html" title="2. Web Tutorial"
<a href="Beginner-Tutorial/Part5/Add-a-simple-new-web-page.html" title="1. Add a simple new web page"
>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-1"><a href="Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>

View file

@ -6,7 +6,7 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<title>Gametime Tutorial &#8212; Evennia 1.0-dev documentation</title>
<title>Changing game calendar and time speed &#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>
@ -17,7 +17,7 @@
<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="Weather Tutorial" href="Weather-Tutorial.html" />
<link rel="next" title="Adding Weather messages to a Room" href="Tutorial-Weather-Effects.html" />
<link rel="prev" title="Making a Persistent object Handler" href="Tutorial-Persistent-Handler.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
@ -30,14 +30,14 @@
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="Weather-Tutorial.html" title="Weather Tutorial"
<a href="Tutorial-Weather-Effects.html" title="Adding Weather messages to a Room"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="Tutorial-Persistent-Handler.html" title="Making a Persistent object Handler"
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-1"><a href="Howtos-Overview.html" accesskey="U">Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Gametime Tutorial</a></li>
<li class="nav-item nav-item-this"><a href="">Changing game calendar and time speed</a></li>
</ul>
<div class="develop">develop branch</div>
</div>
@ -62,7 +62,7 @@
<script>$('#searchbox').show(0);</script>
<h3><a href="../index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Gametime Tutorial</a><ul>
<li><a class="reference internal" href="#">Changing game calendar and time speed</a><ul>
<li><a class="reference internal" href="#a-game-time-with-a-standard-calendar">A game time with a standard calendar</a><ul>
<li><a class="reference internal" href="#setting-up-game-time-for-a-standard-calendar">Setting up game time for a standard calendar</a></li>
<li><a class="reference internal" href="#time-related-events">Time-related events</a></li>
@ -82,12 +82,12 @@
<p class="topless"><a href="Tutorial-Persistent-Handler.html"
title="previous chapter">Making a Persistent object Handler</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="Weather-Tutorial.html"
title="next chapter">Weather Tutorial</a></p>
<p class="topless"><a href="Tutorial-Weather-Effects.html"
title="next chapter">Adding Weather messages to a Room</a></p>
<div role="note" aria-label="source link">
<!--h3>This Page</h3-->
<ul class="this-page-menu">
<li><a href="../_sources/Howtos/Gametime-Tutorial.md.txt"
<li><a href="../_sources/Howtos/Howto-Game-Time.md.txt"
rel="nofollow">Show Page Source</a></li>
</ul>
</div><h3>Links</h3>
@ -103,7 +103,7 @@
</ul>
<h3>Versions</h3>
<ul>
<li><a href="Gametime-Tutorial.html">1.0-dev (develop branch)</a></li>
<li><a href="Howto-Game-Time.html">1.0-dev (develop branch)</a></li>
<ul>
<li><a href="../0.9.5/index.html">0.9.5 (v0.9.5 branch)</a></li>
@ -114,13 +114,10 @@
<div class="bodywrapper">
<div class="body" role="main">
<section class="tex2jax_ignore mathjax_ignore" id="gametime-tutorial">
<h1>Gametime Tutorial<a class="headerlink" href="#gametime-tutorial" title="Permalink to this headline"></a></h1>
<p>A lot of games use a separate time system we refer to as <em>game time</em>. This runs in parallel to what
we usually think of as <em>real time</em>. The game time might run at a different speed, use different
names for its time units or might even use a completely custom calendar. You dont need to rely on a
game time system at all. But if you do, Evennia offers basic tools to handle these various
situations. This tutorial will walk you through these features.</p>
<section class="tex2jax_ignore mathjax_ignore" id="changing-game-calendar-and-time-speed">
<h1>Changing game calendar and time speed<a class="headerlink" href="#changing-game-calendar-and-time-speed" title="Permalink to this headline"></a></h1>
<p>A lot of games use a separate time system we refer to as <em>game time</em>. This runs in parallel to what we usually think of as <em>real time</em>. The game time might run at a different speed, use different
names for its time units or might even use a completely custom calendar. You dont need to rely on a game time system at all. But if you do, Evennia offers basic tools to handle these various situations. This tutorial will walk you through these features.</p>
<section id="a-game-time-with-a-standard-calendar">
<h2>A game time with a standard calendar<a class="headerlink" href="#a-game-time-with-a-standard-calendar" title="Permalink to this headline"></a></h2>
<p>Many games let their in-game time run faster or slower than real time, but still use our normal
@ -132,8 +129,7 @@ in-game perceived one is easy.</p></li>
<li><p>The intricacies of the real world calendar, with leap years and months of different length etc are
automatically handled by the system.</p></li>
</ul>
<p>Evennias game time features assume a standard calendar (see the relevant section below for a custom
calendar).</p>
<p>Evennias game time features assume a standard calendar (see the relevant section below for a custom calendar).</p>
<section id="setting-up-game-time-for-a-standard-calendar">
<h3>Setting up game time for a standard calendar<a class="headerlink" href="#setting-up-game-time-for-a-standard-calendar" title="Permalink to this headline"></a></h3>
<p>All is done through the settings. Here are the settings you should use if you want a game time with
@ -150,11 +146,7 @@ a standard calendar:</p>
<span class="n">TIME_GAME_EPOCH</span> <span class="o">=</span> <span class="kc">None</span>
</pre></div>
</div>
<p>By default, the game time runs twice as fast as the real time. You can set the time factor to be 1
(the game time would run exactly at the same speed than the real time) or lower (the game time will
be slower than the real time). Most games choose to have the game time spinning faster (you will
find some games that have a time factor of 60, meaning the game time runs sixty times as fast as the
real time, a minute in real time would be an hour in game time).</p>
<p>By default, the game time runs twice as fast as the real time. You can set the time factor to be 1 (the game time would run exactly at the same speed than the real time) or lower (the game time will be slower than the real time). Most games choose to have the game time spinning faster (you will find some games that have a time factor of 60, meaning the game time runs sixty times as fast as the real time, a minute in real time would be an hour in game time).</p>
<p>The epoch is a slightly more complex setting. It should contain a number of seconds that would
indicate the time your game started. As indicated, an epoch of 0 would mean January 1st, 1970. If
you want to set your time in the future, you just need to find the starting point in seconds. There
@ -167,8 +159,7 @@ are several ways to do this in Python, this method will show you how to do it in
<span class="n">time</span><span class="o">.</span><span class="n">mktime</span><span class="p">(</span><span class="n">start</span><span class="o">.</span><span class="n">timetuple</span><span class="p">())</span>
</pre></div>
</div>
<p>This should return a huge number - the number of seconds since Jan 1 1970. Copy that directly into
your settings (editing <code class="docutils literal notranslate"><span class="pre">server/conf/settings.py</span></code>):</p>
<p>This should return a huge number - the number of seconds since Jan 1 1970. Copy that directly into your settings (editing <code class="docutils literal notranslate"><span class="pre">server/conf/settings.py</span></code>):</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="c1"># in a file settings.py in mygame/server/conf</span>
<span class="n">TIME_GAME_EPOCH</span> <span class="o">=</span> <span class="mi">1577865600</span>
</pre></div>
@ -197,20 +188,13 @@ time updated correctly… and going (by default) twice as fast as the real time.
</section>
<section id="time-related-events">
<h3>Time-related events<a class="headerlink" href="#time-related-events" title="Permalink to this headline"></a></h3>
<p>The <code class="docutils literal notranslate"><span class="pre">gametime</span></code> utility also has a way to schedule game-related events, taking into account your game
time, and assuming a standard calendar (see below for the same feature with a custom calendar). For
instance, it can be used to have a specific message every (in-game) day at 6:00 AM showing how the
sun rises.</p>
<p>The function <code class="docutils literal notranslate"><span class="pre">schedule()</span></code> should be used here. It will create a <a class="reference internal" href="../Components/Scripts.html"><span class="doc std std-doc">script</span></a> with some
additional features to make sure the script is always executed when the game time matches the given
parameters.</p>
<p>The <code class="docutils literal notranslate"><span class="pre">gametime</span></code> utility also has a way to schedule game-related events, taking into account your game time, and assuming a standard calendar (see below for the same feature with a custom calendar). For instance, it can be used to have a specific message every (in-game) day at 6:00 AM showing how the sun rises.</p>
<p>The function <code class="docutils literal notranslate"><span class="pre">schedule()</span></code> should be used here. It will create a <a class="reference internal" href="../Components/Scripts.html"><span class="doc std std-doc">script</span></a> with some additional features to make sure the script is always executed when the game time matches the given parameters.</p>
<p>The <code class="docutils literal notranslate"><span class="pre">schedule</span></code> function takes the following arguments:</p>
<ul class="simple">
<li><p>The <em>callback</em>, a function to be called when time is up.</p></li>
<li><p>The keyword <code class="docutils literal notranslate"><span class="pre">repeat</span></code> (<code class="docutils literal notranslate"><span class="pre">False</span></code> by default) to indicate whether this function should be called
repeatedly.</p></li>
<li><p>Additional keyword arguments <code class="docutils literal notranslate"><span class="pre">sec</span></code>, <code class="docutils literal notranslate"><span class="pre">min</span></code>, <code class="docutils literal notranslate"><span class="pre">hour</span></code>, <code class="docutils literal notranslate"><span class="pre">day</span></code>, <code class="docutils literal notranslate"><span class="pre">month</span></code> and <code class="docutils literal notranslate"><span class="pre">year</span></code> to describe the time
to schedule. If the parameter isnt given, it assumes the current time value of this specific unit.</p></li>
<li><p>The keyword <code class="docutils literal notranslate"><span class="pre">repeat</span></code> (<code class="docutils literal notranslate"><span class="pre">False</span></code> by default) to indicate whether this function should be called repeatedly.</p></li>
<li><p>Additional keyword arguments <code class="docutils literal notranslate"><span class="pre">sec</span></code>, <code class="docutils literal notranslate"><span class="pre">min</span></code>, <code class="docutils literal notranslate"><span class="pre">hour</span></code>, <code class="docutils literal notranslate"><span class="pre">day</span></code>, <code class="docutils literal notranslate"><span class="pre">month</span></code> and <code class="docutils literal notranslate"><span class="pre">year</span></code> to describe the time to schedule. If the parameter isnt given, it assumes the current time value of this specific unit.</p></li>
</ul>
<p>Here is a short example for making the sun rise every day:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="c1"># in a file ingame_time.py in mygame/world/</span>
@ -237,9 +221,7 @@ to schedule. If the parameter isnt given, it assumes the current time value
<p>The script will be created silently. The <code class="docutils literal notranslate"><span class="pre">at_sunrise</span></code> function will now be called every in-game day
at 6 AM. You can use the <code class="docutils literal notranslate"><span class="pre">&#64;scripts</span></code> command to see it. You could stop it using <code class="docutils literal notranslate"><span class="pre">&#64;scripts/stop</span></code>. If
we hadnt set <code class="docutils literal notranslate"><span class="pre">repeat</span></code> the sun would only have risen once and then never again.</p>
<p>We used the <code class="docutils literal notranslate"><span class="pre">&#64;py</span></code> command here: nothing prevents you from adding the system into your game code.
Remember to be careful not to add each event at startup, however, otherwise there will be a lot of
overlapping events scheduled when the sun rises.</p>
<p>We used the <code class="docutils literal notranslate"><span class="pre">&#64;py</span></code> command here: nothing prevents you from adding the system into your game code. Remember to be careful not to add each event at startup, however, otherwise there will be a lot of overlapping events scheduled when the sun rises.</p>
<p>The <code class="docutils literal notranslate"><span class="pre">schedule</span></code> function when using <code class="docutils literal notranslate"><span class="pre">repeat</span></code> set to <code class="docutils literal notranslate"><span class="pre">True</span></code> works with the higher, non-specified unit.
In our example, we have specified hour, minute and second. The higher unit we havent specified is
day: <code class="docutils literal notranslate"><span class="pre">schedule</span></code> assumes we mean “run the callback every day at the specified time”. Therefore, you
@ -253,24 +235,14 @@ such day in February, April etc. Similarly, leap years may change the number of
</section>
<section id="a-game-time-with-a-custom-calendar">
<h3>A game time with a custom calendar<a class="headerlink" href="#a-game-time-with-a-custom-calendar" title="Permalink to this headline"></a></h3>
<p>Using a custom calendar to handle game time is sometimes needed if you want to place your game in a
fictional universe. For instance you may want to create the Shire calendar which Tolkien described
having 12 months, each which 30 days. That would give only 360 days per year (presumably hobbits
werent really fond of the hassle of following the astronomical calendar). Another example would be
creating a planet in a different solar system with, say, days 29 hours long and months of only 18
days.</p>
<p>Using a custom calendar to handle game time is sometimes needed if you want to place your game in a fictional universe. For instance you may want to create the Shire calendar which Tolkien described having 12 months, each which 30 days. That would give only 360 days per year (presumably hobbits werent really fond of the hassle of following the astronomical calendar). Another example would be creating a planet in a different solar system with, say, days 29 hours long and months of only 18 days.</p>
<p>Evennia handles custom calendars through an optional <em>contrib</em> module, called <code class="docutils literal notranslate"><span class="pre">custom_gametime</span></code>.
Contrary to the normal <code class="docutils literal notranslate"><span class="pre">gametime</span></code> module described above it is not active by default.</p>
</section>
<section id="setting-up-the-custom-calendar">
<h3>Setting up the custom calendar<a class="headerlink" href="#setting-up-the-custom-calendar" title="Permalink to this headline"></a></h3>
<p>In our first example of the Shire calendar, used by hobbits in books by Tolkien, we dont really
need the notion of weeks… but we need the notion of months having 30 days, not 28.</p>
<p>The custom calendar is defined by adding the <code class="docutils literal notranslate"><span class="pre">TIME_UNITS</span></code> setting to your settings file. Its a
dictionary containing as keys the name of the units, and as value the number of seconds (the
smallest unit for us) in this unit. Its keys must be picked among the following: “sec”, “min”,
“hour”, “day”, “week”, “month” and “year” but you dont have to include them all. Here is the
configuration for the Shire calendar:</p>
<p>In our first example of the Shire calendar, used by hobbits in books by Tolkien, we dont really need the notion of weeks… but we need the notion of months having 30 days, not 28.</p>
<p>The custom calendar is defined by adding the <code class="docutils literal notranslate"><span class="pre">TIME_UNITS</span></code> setting to your settings file. Its a dictionary containing as keys the name of the units, and as value the number of seconds (the smallest unit for us) in this unit. Its keys must be picked among the following: “sec”, “min”, “hour”, “day”, “week”, “month” and “year” but you dont have to include them all. Here is the configuration for the Shire calendar:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="c1"># in a file settings.py in mygame/server/conf</span>
<span class="n">TIME_UNITS</span> <span class="o">=</span> <span class="p">{</span><span class="s2">&quot;sec&quot;</span><span class="p">:</span> <span class="mi">1</span><span class="p">,</span>
<span class="s2">&quot;min&quot;</span><span class="p">:</span> <span class="mi">60</span><span class="p">,</span>
@ -280,11 +252,8 @@ configuration for the Shire calendar:</p>
<span class="s2">&quot;year&quot;</span><span class="p">:</span> <span class="mi">60</span> <span class="o">*</span> <span class="mi">60</span> <span class="o">*</span> <span class="mi">24</span> <span class="o">*</span> <span class="mi">30</span> <span class="o">*</span> <span class="mi">12</span> <span class="p">}</span>
</pre></div>
</div>
<p>We give each unit we want as keys. Values represent the number of seconds in that unit. Hour is
set to 60 * 60 (that is, 3600 seconds per hour). Notice that we dont specify the week unit in this
configuration: instead, we skip from days to months directly.</p>
<p>In order for this setting to work properly, remember all units have to be multiples of the previous
units. If you create “day”, it needs to be multiple of hours, for instance.</p>
<p>We give each unit we want as keys. Values represent the number of seconds in that unit. Hour is set to 60 * 60 (that is, 3600 seconds per hour). Notice that we dont specify the week unit in this configuration: instead, we skip from days to months directly.</p>
<p>In order for this setting to work properly, remember all units have to be multiples of the previous units. If you create “day”, it needs to be multiple of hours, for instance.</p>
<p>So for our example, our settings may look like this:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="c1"># in a file settings.py in mygame/server/conf</span>
<span class="c1"># Time factor</span>
@ -304,19 +273,16 @@ units. If you create “day”, it needs to be multiple of hours, for instance.
<span class="p">}</span>
</pre></div>
</div>
<p>Notice we have set a time epoch of 0. Using a custom calendar, we will come up with a nice display
of time on our own. In our case the game time starts at year 0, month 1, day 1, and at midnight.</p>
<p>Notice we have set a time epoch of 0. Using a custom calendar, we will come up with a nice display of time on our own. In our case the game time starts at year 0, month 1, day 1, and at midnight.</p>
<blockquote>
<div><p>Year, hour, minute and sec starts from 0, month, week and day starts from 1, this makes them
behave consistently with the standard time.</p>
</div></blockquote>
<p>Note that while we use “month”, “week” etc in the settings, your game may not use those terms in-
game, instead referring to them as “cycles”, “moons”, “sand falls” etc. This is just a matter of you
<p>Note that while we use “month”, “week” etc in the settings, your game may not use those terms in- game, instead referring to them as “cycles”, “moons”, “sand falls” etc. This is just a matter of you
displaying them differently. See next section.</p>
<section id="a-command-to-display-the-current-game-time">
<h4>A command to display the current game time<a class="headerlink" href="#a-command-to-display-the-current-game-time" title="Permalink to this headline"></a></h4>
<p>As pointed out earlier, the <code class="docutils literal notranslate"><span class="pre">&#64;time</span></code> command is meant to be used with a standard calendar, not a
custom one. We can easily create a new command though. Well call it <code class="docutils literal notranslate"><span class="pre">time</span></code>, as is often the case
<p>As pointed out earlier, the <code class="docutils literal notranslate"><span class="pre">&#64;time</span></code> command is meant to be used with a standard calendar, not a custom one. We can easily create a new command though. Well call it <code class="docutils literal notranslate"><span class="pre">time</span></code>, as is often the case
on other MU*. Heres an example of how we could write it (for the example, you can create a file
<code class="docutils literal notranslate"><span class="pre">gametime.py</span></code> in your <code class="docutils literal notranslate"><span class="pre">commands</span></code> directory and paste this code in it):</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="c1"># in a file mygame/commands/gametime.py</span>
@ -371,8 +337,7 @@ on other MU*. Heres an example of how we could write it (for the example, yo
<span class="bp">self</span><span class="o">.</span><span class="n">add</span><span class="p">(</span><span class="n">CmdTime</span><span class="p">())</span> <span class="c1"># &lt;- Add</span>
</pre></div>
</div>
<p>Reload your game with the <code class="docutils literal notranslate"><span class="pre">&#64;reload</span></code> command. You should now see the <code class="docutils literal notranslate"><span class="pre">time</span></code> command. If you enter
it, you might see something like:</p>
<p>Reload your game with the <code class="docutils literal notranslate"><span class="pre">&#64;reload</span></code> command. You should now see the <code class="docutils literal notranslate"><span class="pre">time</span></code> command. If you enter it, you might see something like:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>We are in year 0, day 0, month 0.
It&#39;s 00:52:17.
</pre></div>
@ -384,10 +349,7 @@ And if “months” are called “moons” in your game, this is where youd a
</section>
<section id="time-related-events-in-custom-gametime">
<h2>Time-related events in custom gametime<a class="headerlink" href="#time-related-events-in-custom-gametime" title="Permalink to this headline"></a></h2>
<p>The <code class="docutils literal notranslate"><span class="pre">custom_gametime</span></code> module also has a way to schedule game-related events, taking into account
your game time (and your custom calendar). It can be used to have a specific message every day at
6:00 AM, to show the sun rises, for instance. The <code class="docutils literal notranslate"><span class="pre">custom_gametime.schedule</span></code> function works in the
same way as described for the default one above.</p>
<p>The <code class="docutils literal notranslate"><span class="pre">custom_gametime</span></code> module also has a way to schedule game-related events, taking into account your game time (and your custom calendar). It can be used to have a specific message every day at 6:00 AM, to show the sun rises, for instance. The <code class="docutils literal notranslate"><span class="pre">custom_gametime.schedule</span></code> function works in the same way as described for the default one above.</p>
</section>
</section>
@ -407,14 +369,14 @@ same way as described for the default one above.</p>
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="Weather-Tutorial.html" title="Weather Tutorial"
<a href="Tutorial-Weather-Effects.html" title="Adding Weather messages to a Room"
>next</a> |</li>
<li class="right" >
<a href="Tutorial-Persistent-Handler.html" title="Making a Persistent object Handler"
>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-1"><a href="Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Gametime Tutorial</a></li>
<li class="nav-item nav-item-this"><a href="">Changing game calendar and time speed</a></li>
</ul>
<div class="develop">develop branch</div>
</div>

View file

@ -17,8 +17,8 @@
<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="Beginner Tutorial" href="Beginner-Tutorial/Beginner-Tutorial-Intro.html" />
<link rel="prev" title="Configuring HAProxy" href="../Setup/Config-HAProxy.html" />
<link rel="next" title="Beginner Tutorial" href="Beginner-Tutorial/Beginner-Tutorial-Overview.html" />
<link rel="prev" title="Configuring an Apache Proxy" href="../Setup/Config-Apache-Proxy.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
@ -30,10 +30,10 @@
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="Beginner-Tutorial/Beginner-Tutorial-Intro.html" title="Beginner Tutorial"
<a href="Beginner-Tutorial/Beginner-Tutorial-Overview.html" title="Beginner Tutorial"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="../Setup/Config-HAProxy.html" title="Configuring HAProxy"
<a href="../Setup/Config-Apache-Proxy.html" title="Configuring an Apache Proxy"
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="">Tutorials and Howtos</a></li>
@ -64,8 +64,6 @@
<li><a class="reference internal" href="#">Tutorials and Howtos</a><ul>
<li><a class="reference internal" href="#beginner-tutorial">Beginner Tutorial</a></li>
<li><a class="reference internal" href="#howtos">Howtos</a></li>
<li><a class="reference internal" href="#mobs-and-npcs">Mobs and NPCs</a></li>
<li><a class="reference internal" href="#vehicles">Vehicles</a></li>
<li><a class="reference internal" href="#systems">Systems</a></li>
<li><a class="reference internal" href="#web-related-tutorials">Web-related tutorials</a></li>
<li><a class="reference internal" href="#deep-dives">Deep-dives</a></li>
@ -75,10 +73,10 @@
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="../Setup/Config-HAProxy.html"
title="previous chapter">Configuring HAProxy</a></p>
<p class="topless"><a href="../Setup/Config-Apache-Proxy.html"
title="previous chapter">Configuring an Apache Proxy</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="Beginner-Tutorial/Beginner-Tutorial-Intro.html"
<p class="topless"><a href="Beginner-Tutorial/Beginner-Tutorial-Overview.html"
title="next chapter">Beginner Tutorial</a></p>
<div role="note" aria-label="source link">
<!--h3>This Page</h3-->
@ -112,7 +110,10 @@
<section class="tex2jax_ignore mathjax_ignore" id="tutorials-and-howtos">
<h1>Tutorials and Howtos<a class="headerlink" href="#tutorials-and-howtos" title="Permalink to this headline"></a></h1>
<p>All Evennia tutorials. They will often refer to the <a class="reference internal" href="../Components/Components-Overview.html"><span class="doc std std-doc">components</span></a> or <a class="reference internal" href="../Concepts/Concepts-Overview.html"><span class="doc std std-doc">concepts</span></a> if you want to dive deeper.</p>
<aside class="sidebar">
<p class="sidebar-title">Want more details about something?</p>
<p>See the documentation about the Evennia core <a class="reference internal" href="../Components/Components-Overview.html"><span class="doc std std-doc">Components</span></a> and important <a class="reference internal" href="../Concepts/Concepts-Overview.html"><span class="doc std std-doc">Concepts</span></a>.</p>
</aside>
<section id="beginner-tutorial">
<h2>Beginner Tutorial<a class="headerlink" href="#beginner-tutorial" title="Permalink to this headline"></a></h2>
<p>Recommended starting point! This will take you from absolute beginner to making
@ -123,18 +124,18 @@ a small but full game with Evennia. Other tutorials and howtos tend to assume
</div>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="Beginner-Tutorial/Beginner-Tutorial-Intro.html">Beginner Tutorial</a><ul>
<li class="toctree-l2"><a class="reference internal" href="Beginner-Tutorial/Beginner-Tutorial-Intro.html#things-you-need">Things you need</a><ul>
<li class="toctree-l3"><a class="reference internal" href="Beginner-Tutorial/Beginner-Tutorial-Intro.html#a-command-line">A Command line</a></li>
<li class="toctree-l3"><a class="reference internal" href="Beginner-Tutorial/Beginner-Tutorial-Intro.html#a-mud-client">A MUD client</a></li>
<li class="toctree-l3"><a class="reference internal" href="Beginner-Tutorial/Beginner-Tutorial-Intro.html#an-editor">An Editor</a></li>
<li class="toctree-l3"><a class="reference internal" href="Beginner-Tutorial/Beginner-Tutorial-Intro.html#set-up-a-game-dir-for-the-tutorial">Set up a game dir for the tutorial</a></li>
<li class="toctree-l1"><a class="reference internal" href="Beginner-Tutorial/Beginner-Tutorial-Overview.html">Beginner Tutorial</a><ul>
<li class="toctree-l2"><a class="reference internal" href="Beginner-Tutorial/Beginner-Tutorial-Overview.html#things-you-need">Things you need</a><ul>
<li class="toctree-l3"><a class="reference internal" href="Beginner-Tutorial/Beginner-Tutorial-Overview.html#a-command-line">A Command line</a></li>
<li class="toctree-l3"><a class="reference internal" href="Beginner-Tutorial/Beginner-Tutorial-Overview.html#a-mud-client">A MUD client</a></li>
<li class="toctree-l3"><a class="reference internal" href="Beginner-Tutorial/Beginner-Tutorial-Overview.html#a-text-editor-or-ide">A text Editor or IDE</a></li>
<li class="toctree-l3"><a class="reference internal" href="Beginner-Tutorial/Beginner-Tutorial-Overview.html#a-fresh-game-dir">A fresh game dir?</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="Beginner-Tutorial/Part1/Beginner-Tutorial-Part1-Intro.html">Part 1: What we have</a><ul>
<li class="toctree-l2"><a class="reference internal" href="Beginner-Tutorial/Part1/Beginner-Tutorial-Part1-Intro.html#lessons">Lessons</a><ul>
<li class="toctree-l1"><a class="reference internal" href="Beginner-Tutorial/Part1/Beginner-Tutorial-Part1-Overview.html">Part 1: What we have</a><ul>
<li class="toctree-l2"><a class="reference internal" href="Beginner-Tutorial/Part1/Beginner-Tutorial-Part1-Overview.html#lessons">Lessons</a><ul>
<li class="toctree-l3"><a class="reference internal" href="Beginner-Tutorial/Part1/Beginner-Tutorial-Building-Quickstart.html">1. Using commands and building stuff</a></li>
<li class="toctree-l3"><a class="reference internal" href="Beginner-Tutorial/Part1/Beginner-Tutorial-Tutorial-World.html">2. The Tutorial World</a></li>
<li class="toctree-l3"><a class="reference internal" href="Beginner-Tutorial/Part1/Beginner-Tutorial-Python-basic-introduction.html">3. Intro to using Python with Evennia</a></li>
@ -152,8 +153,8 @@ a small but full game with Evennia. Other tutorials and howtos tend to assume
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="Beginner-Tutorial/Part2/Beginner-Tutorial-Part2-Intro.html">Part 2: What we want</a><ul>
<li class="toctree-l2"><a class="reference internal" href="Beginner-Tutorial/Part2/Beginner-Tutorial-Part2-Intro.html#lessons">Lessons</a><ul>
<li class="toctree-l1"><a class="reference internal" href="Beginner-Tutorial/Part2/Beginner-Tutorial-Part2-Overview.html">Part 2: What we want</a><ul>
<li class="toctree-l2"><a class="reference internal" href="Beginner-Tutorial/Part2/Beginner-Tutorial-Part2-Overview.html#lessons">Lessons</a><ul>
<li class="toctree-l3"><a class="reference internal" href="Beginner-Tutorial/Part2/Beginner-Tutorial-Planning-Where-Do-I-Begin.html">1. Where do I begin?</a></li>
<li class="toctree-l3"><a class="reference internal" href="Beginner-Tutorial/Part2/Beginner-Tutorial-Game-Planning.html">2. On Planning a Game</a></li>
<li class="toctree-l3"><a class="reference internal" href="Beginner-Tutorial/Part2/Beginner-Tutorial-Planning-The-Tutorial-Game.html">3. Planning our tutorial game</a></li>
@ -161,8 +162,8 @@ a small but full game with Evennia. Other tutorials and howtos tend to assume
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="Beginner-Tutorial/Part3/Beginner-Tutorial-Part3-Intro.html">Part 3: How we get there (example game)</a><ul>
<li class="toctree-l2"><a class="reference internal" href="Beginner-Tutorial/Part3/Beginner-Tutorial-Part3-Intro.html#lessons">Lessons</a><ul>
<li class="toctree-l1"><a class="reference internal" href="Beginner-Tutorial/Part3/Beginner-Tutorial-Part3-Overview.html">Part 3: How we get there (example game)</a><ul>
<li class="toctree-l2"><a class="reference internal" href="Beginner-Tutorial/Part3/Beginner-Tutorial-Part3-Overview.html#lessons">Lessons</a><ul>
<li class="toctree-l3"><a class="reference internal" href="Beginner-Tutorial/Part3/Beginner-Tutorial-Utilities.html">1. Code structure and Utilities</a></li>
<li class="toctree-l3"><a class="reference internal" href="Beginner-Tutorial/Part3/Beginner-Tutorial-Rules.html">2. Rules and dice rolling</a></li>
<li class="toctree-l3"><a class="reference internal" href="Beginner-Tutorial/Part3/Beginner-Tutorial-Characters.html">3. Player Characters</a></li>
@ -179,17 +180,16 @@ a small but full game with Evennia. Other tutorials and howtos tend to assume
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="Beginner-Tutorial/Part4/Beginner-Tutorial-Part4-Intro.html">Part 4: Using what we created</a><ul>
<li class="toctree-l2"><a class="reference internal" href="Beginner-Tutorial/Part4/Beginner-Tutorial-Part4-Intro.html#lessons">Lessons</a><ul>
<li class="toctree-l1"><a class="reference internal" href="Beginner-Tutorial/Part4/Beginner-Tutorial-Part4-Overview.html">Part 4: Using what we created</a><ul>
<li class="toctree-l2"><a class="reference internal" href="Beginner-Tutorial/Part4/Beginner-Tutorial-Part4-Overview.html#lessons">Lessons</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../Unimplemented.html">1. Unimplemented</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="Beginner-Tutorial/Part5/Beginner-Tutorial-Part5-Intro.html">Part 5: Showing the world</a><ul>
<li class="toctree-l2"><a class="reference internal" href="Beginner-Tutorial/Part5/Beginner-Tutorial-Part5-Intro.html#lessons">Lessons</a><ul>
<li class="toctree-l1"><a class="reference internal" href="Beginner-Tutorial/Part5/Beginner-Tutorial-Part5-Overview.html">Part 5: Showing the world</a><ul>
<li class="toctree-l2"><a class="reference internal" href="Beginner-Tutorial/Part5/Beginner-Tutorial-Part5-Overview.html#lessons">Lessons</a><ul>
<li class="toctree-l3"><a class="reference internal" href="Beginner-Tutorial/Part5/Add-a-simple-new-web-page.html">1. Add a simple new web page</a></li>
<li class="toctree-l3"><a class="reference internal" href="Beginner-Tutorial/Part5/Web-Tutorial.html">2. Web Tutorial</a></li>
</ul>
</li>
</ul>
@ -201,50 +201,16 @@ a small but full game with Evennia. Other tutorials and howtos tend to assume
<h2>Howtos<a class="headerlink" href="#howtos" title="Permalink to this headline"></a></h2>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="Howto-Command-Prompt.html">Adding a Command Prompt</a><ul>
<li class="toctree-l2"><a class="reference internal" href="Howto-Command-Prompt.html#a-fixed-location-prompt">A fixed-location prompt</a></li>
<li class="toctree-l2"><a class="reference internal" href="Howto-Command-Prompt.html#a-prompt-with-every-command">A prompt with every command</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="Howto-Command-Cooldown.html">Adding Command Cooldowns</a><ul>
<li class="toctree-l2"><a class="reference internal" href="Howto-Command-Cooldown.html#an-efficient-cooldown">An efficient cooldown</a></li>
<li class="toctree-l2"><a class="reference internal" href="Howto-Command-Cooldown.html#make-a-cooldown-aware-command-parent">Make a cooldown-aware command parent</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="Howto-Command-Duration.html">Commands that take time to finish</a><ul>
<li class="toctree-l2"><a class="reference internal" href="Howto-Command-Duration.html#pause-commands-with-yield">Pause commands with <code class="docutils literal notranslate"><span class="pre">yield</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="Howto-Command-Duration.html#pause-commands-with-utils-delay">Pause commands with <code class="docutils literal notranslate"><span class="pre">utils.delay</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="Howto-Command-Duration.html#making-a-blocking-command">Making a blocking command</a></li>
<li class="toctree-l2"><a class="reference internal" href="Howto-Command-Duration.html#make-a-command-possible-to-abort">Make a Command possible to Abort</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="Howto-Default-Exit-Errors.html">Return custom errors on missing Exits</a><ul>
<li class="toctree-l2"><a class="reference internal" href="Howto-Default-Exit-Errors.html#why-not-a-single-command">Why not a single command?</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="Howto-Add-Object-Weight.html">Give objects weight</a><ul>
<li class="toctree-l2"><a class="reference internal" href="Howto-Add-Object-Weight.html#limit-inventory-by-weight-carried">Limit inventory by weight carried</a></li>
</ul>
</li>
</ul>
</div>
</section>
<section id="mobs-and-npcs">
<h2>Mobs and NPCs<a class="headerlink" href="#mobs-and-npcs" title="Permalink to this headline"></a></h2>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="Howto-Command-Prompt.html">Adding a Command Prompt</a></li>
<li class="toctree-l1"><a class="reference internal" href="Howto-Command-Cooldown.html">Adding Command Cooldowns</a></li>
<li class="toctree-l1"><a class="reference internal" href="Howto-Command-Duration.html">Commands that take time to finish</a></li>
<li class="toctree-l1"><a class="reference internal" href="Howto-Default-Exit-Errors.html">Return custom errors on missing Exits</a></li>
<li class="toctree-l1"><a class="reference internal" href="Howto-Add-Object-Weight.html">Give objects weight</a></li>
<li class="toctree-l1"><a class="reference internal" href="Tutorial-NPC-Listening.html">NPCs that listen to what is said</a></li>
<li class="toctree-l1"><a class="reference internal" href="Tutorial-NPC-Reacting.html">NPCs reacting to your presence</a></li>
<li class="toctree-l1"><a class="reference internal" href="Tutorial-NPC-Merchants.html">NPC merchants</a></li>
</ul>
</div>
</section>
<section id="vehicles">
<h2>Vehicles<a class="headerlink" href="#vehicles" title="Permalink to this headline"></a></h2>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="Building-a-mech-tutorial.html">Building a mech tutorial</a></li>
<li class="toctree-l1"><a class="reference internal" href="Tutorial-Vehicles.html">Tutorial Vehicles</a></li>
<li class="toctree-l1"><a class="reference internal" href="Tutorial-Building-a-Mech.html">Building a giant mech</a></li>
<li class="toctree-l1"><a class="reference internal" href="Tutorial-Building-a-Train.html">Building a train that moves</a></li>
</ul>
</div>
</section>
@ -253,25 +219,25 @@ a small but full game with Evennia. Other tutorials and howtos tend to assume
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="Tutorial-Persistent-Handler.html">Making a Persistent object Handler</a></li>
<li class="toctree-l1"><a class="reference internal" href="Gametime-Tutorial.html">Gametime Tutorial</a></li>
<li class="toctree-l1"><a class="reference internal" href="Weather-Tutorial.html">Weather Tutorial</a></li>
<li class="toctree-l1"><a class="reference internal" href="Tutorial-Coordinates.html">Coordinates</a></li>
<li class="toctree-l1"><a class="reference internal" href="Tutorial-Coordinates.html#adding-room-coordinates-in-your-game">Adding room coordinates in your game</a></li>
<li class="toctree-l1"><a class="reference internal" href="Dynamic-In-Game-Map.html">Dynamic In Game Map</a></li>
<li class="toctree-l1"><a class="reference internal" href="Static-In-Game-Map.html">Static In Game Map</a></li>
<li class="toctree-l1"><a class="reference internal" href="Tutorial-Tweeting-Game-Stats.html">Tutorial Tweeting Game Stats</a></li>
<li class="toctree-l1"><a class="reference internal" href="Howto-Game-Time.html">Changing game calendar and time speed</a></li>
<li class="toctree-l1"><a class="reference internal" href="Tutorial-Weather-Effects.html">Adding Weather messages to a Room</a></li>
<li class="toctree-l1"><a class="reference internal" href="Tutorial-Coordinates.html">Adding room coordinates to your game</a></li>
<li class="toctree-l1"><a class="reference internal" href="Tutorial-Displaying-Room-Map.html">Show a dynamic map of rooms</a></li>
</ul>
</div>
</section>
<section id="web-related-tutorials">
<h2>Web-related tutorials<a class="headerlink" href="#web-related-tutorials" title="Permalink to this headline"></a></h2>
<p><em>Some of these will likely move into the Beginner tutorial later</em>.</p>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="Web-Changing-Webpage.html">Changing the Game Website</a></li>
<li class="toctree-l1"><a class="reference internal" href="Web-Add-a-wiki.html">Add a wiki on your website</a></li>
<li class="toctree-l1"><a class="reference internal" href="Web-Character-Generation.html">Web Character Generation</a></li>
<li class="toctree-l1"><a class="reference internal" href="Web-Character-View-Tutorial.html">Web Character View Tutorial</a></li>
<li class="toctree-l1"><a class="reference internal" href="Web-Help-System-Tutorial.html">Help System Tutorial</a></li>
<li class="toctree-l1"><a class="reference internal" href="Web-Extending-the-REST-API.html">Extending the REST API</a></li>
<li class="toctree-l1"><a class="reference internal" href="Web-Tweeting-Game-Stats.html">Automatically Tweet game stats</a></li>
</ul>
</div>
</section>
@ -279,12 +245,12 @@ a small but full game with Evennia. Other tutorials and howtos tend to assume
<h2>Deep-dives<a class="headerlink" href="#deep-dives" title="Permalink to this headline"></a></h2>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="Parsing-commands-tutorial.html">Parsing command arguments, theory and best practices</a></li>
<li class="toctree-l1"><a class="reference internal" href="Tutorial-Parsing-Commands.html">Parsing command arguments, theory and best practices</a></li>
<li class="toctree-l1"><a class="reference internal" href="Tutorial-Understanding-Color-Tags.html">Understanding Color Tags</a></li>
<li class="toctree-l1"><a class="reference internal" href="Evennia-for-roleplaying-sessions.html">Evennia for roleplaying sessions</a></li>
<li class="toctree-l1"><a class="reference internal" href="Evennia-for-Diku-Users.html">Evennia for Diku Users</a></li>
<li class="toctree-l1"><a class="reference internal" href="Evennia-for-MUSH-Users.html">Evennia for MUSH Users</a></li>
<li class="toctree-l1"><a class="reference internal" href="Arxcode-Installation.html">Arxcode installing help</a></li>
<li class="toctree-l1"><a class="reference internal" href="Tutorial-Using-Arxcode.html">Using the Arxcode game dir</a></li>
</ul>
</div>
</section>
@ -317,10 +283,10 @@ a small but full game with Evennia. Other tutorials and howtos tend to assume
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="Beginner-Tutorial/Beginner-Tutorial-Intro.html" title="Beginner Tutorial"
<a href="Beginner-Tutorial/Beginner-Tutorial-Overview.html" title="Beginner Tutorial"
>next</a> |</li>
<li class="right" >
<a href="../Setup/Config-HAProxy.html" title="Configuring HAProxy"
<a href="../Setup/Config-Apache-Proxy.html" title="Configuring an Apache Proxy"
>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="">Tutorials and Howtos</a></li>

View file

@ -18,7 +18,7 @@
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Turn based Combat System" href="Turn-based-Combat-System.html" />
<link rel="prev" title="Arxcode installing help" href="Arxcode-Installation.html" />
<link rel="prev" title="Using the Arxcode game dir" href="Tutorial-Using-Arxcode.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
@ -33,7 +33,7 @@
<a href="Turn-based-Combat-System.html" title="Turn based Combat System"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="Arxcode-Installation.html" title="Arxcode installing help"
<a href="Tutorial-Using-Arxcode.html" title="Using the Arxcode game dir"
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-1"><a href="Howtos-Overview.html" accesskey="U">Tutorials and Howtos</a> &#187;</li>
@ -75,8 +75,8 @@
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="Arxcode-Installation.html"
title="previous chapter">Arxcode installing help</a></p>
<p class="topless"><a href="Tutorial-Using-Arxcode.html"
title="previous chapter">Using the Arxcode game dir</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="Turn-based-Combat-System.html"
title="next chapter">Turn based Combat System</a></p>
@ -390,7 +390,7 @@ your <code class="docutils literal notranslate"><span class="pre">rules</span></
<a href="Turn-based-Combat-System.html" title="Turn based Combat System"
>next</a> |</li>
<li class="right" >
<a href="Arxcode-Installation.html" title="Arxcode installing help"
<a href="Tutorial-Using-Arxcode.html" title="Using the Arxcode game dir"
>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-1"><a href="Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>

View file

@ -6,7 +6,7 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<title>Building a mech tutorial &#8212; Evennia 1.0-dev documentation</title>
<title>Building a giant mech &#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>
@ -17,7 +17,7 @@
<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="Tutorial Vehicles" href="Tutorial-Vehicles.html" />
<link rel="next" title="Building a train that moves" href="Tutorial-Building-a-Train.html" />
<link rel="prev" title="NPC merchants" href="Tutorial-NPC-Merchants.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
@ -30,14 +30,14 @@
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="Tutorial-Vehicles.html" title="Tutorial Vehicles"
<a href="Tutorial-Building-a-Train.html" title="Building a train that moves"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="Tutorial-NPC-Merchants.html" title="NPC merchants"
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-1"><a href="Howtos-Overview.html" accesskey="U">Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Building a mech tutorial</a></li>
<li class="nav-item nav-item-this"><a href="">Building a giant mech</a></li>
</ul>
<div class="develop">develop branch</div>
</div>
@ -62,13 +62,12 @@
<script>$('#searchbox').show(0);</script>
<h3><a href="../index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Building a mech tutorial</a><ul>
<li><a class="reference internal" href="#creating-the-mech">Creating the Mech</a><ul>
<li><a class="reference internal" href="#arming-the-mech">Arming the Mech</a></li>
<li><a class="reference internal" href="#">Building a giant mech</a><ul>
<li><a class="reference internal" href="#make-a-mech-that-can-shoot">Make a Mech that can shoot</a></li>
<li><a class="reference internal" href="#making-an-army-of-mechs">Making an army of Mechs</a><ul>
<li><a class="reference internal" href="#future-mechs">Future Mechs</a></li>
</ul>
</li>
<li><a class="reference internal" href="#making-a-mech-production-line">Making a Mech production line</a></li>
<li><a class="reference internal" href="#future-mechs">Future Mechs</a></li>
</ul>
</li>
</ul>
@ -77,12 +76,12 @@
<p class="topless"><a href="Tutorial-NPC-Merchants.html"
title="previous chapter">NPC merchants</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="Tutorial-Vehicles.html"
title="next chapter">Tutorial Vehicles</a></p>
<p class="topless"><a href="Tutorial-Building-a-Train.html"
title="next chapter">Building a train that moves</a></p>
<div role="note" aria-label="source link">
<!--h3>This Page</h3-->
<ul class="this-page-menu">
<li><a href="../_sources/Howtos/Building-a-mech-tutorial.md.txt"
<li><a href="../_sources/Howtos/Tutorial-Building-a-Mech.md.txt"
rel="nofollow">Show Page Source</a></li>
</ul>
</div><h3>Links</h3>
@ -98,7 +97,7 @@
</ul>
<h3>Versions</h3>
<ul>
<li><a href="Building-a-mech-tutorial.html">1.0-dev (develop branch)</a></li>
<li><a href="Tutorial-Building-a-Mech.html">1.0-dev (develop branch)</a></li>
<ul>
<li><a href="../0.9.5/index.html">0.9.5 (v0.9.5 branch)</a></li>
@ -109,73 +108,55 @@
<div class="bodywrapper">
<div class="body" role="main">
<section class="tex2jax_ignore mathjax_ignore" id="building-a-mech-tutorial">
<h1>Building a mech tutorial<a class="headerlink" href="#building-a-mech-tutorial" title="Permalink to this headline"></a></h1>
<blockquote>
<div><p>This page was adapted from the article “Building a Giant Mech in Evennia” by Griatch, published in
Imaginary Realities Volume 6, issue 1, 2014. The original article is no longer available online,
this is a version adopted to be compatible with the latest Evennia.</p>
</div></blockquote>
<section id="creating-the-mech">
<h2>Creating the Mech<a class="headerlink" href="#creating-the-mech" title="Permalink to this headline"></a></h2>
<p>Let us create a functioning giant mech using the Python MUD-creation system Evennia. Everyone likes
a giant mech, right? Start in-game as a character with build privileges (or the superuser).</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>@create/drop Giant Mech ; mech
<section class="tex2jax_ignore mathjax_ignore" id="building-a-giant-mech">
<h1>Building a giant mech<a class="headerlink" href="#building-a-giant-mech" title="Permalink to this headline"></a></h1>
<p>Let us create a functioning giant mech in Evennia. Everyone likes a giant mech, right? Start in-game as a character with build privileges (or the superuser).</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>create/drop Giant Mech ; mech
</pre></div>
</div>
<p>Boom. We created a Giant Mech Object and dropped it in the room. We also gave it an alias <em>mech</em>.
Lets describe it.</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>@desc mech = This is a huge mech. It has missiles and stuff.
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>desc mech = This is a huge mech. It has missiles and stuff.
</pre></div>
</div>
<p>Next we define who can “puppet” the mech object.</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>@lock mech = puppet:all()
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>lock mech = puppet:all()
</pre></div>
</div>
<p>This makes it so that everyone can control the mech. More mechs to the people! (Note that whereas
Evennias default commands may look vaguely MUX-like, you can change the syntax to look like
whatever interface style you prefer.)</p>
<p>Before we continue, lets make a brief detour. Evennia is very flexible about its objects and even
more flexible about using and adding commands to those objects. Here are some ground rules well
worth remembering for the remainder of this article:</p>
<p>This makes it so that everyone can control the mech. More mechs to the people! (Note that whereas Evennias default commands may look vaguely MUX-like, you can change the syntax to look like whatever interface style you prefer.)</p>
<p>Before we continue, lets make a brief detour. Evennia is very flexible about its objects and even more flexible about using and adding commands to those objects. Here are some ground rules well worth remembering for the remainder of this article:</p>
<ul class="simple">
<li><p>The <a class="reference internal" href="../Components/Accounts.html"><span class="doc std std-doc">Account</span></a> represents the real person logging in and has no game-world existence.</p></li>
<li><p>Any <a class="reference internal" href="../Components/Objects.html"><span class="doc std std-doc">Object</span></a> can be puppeted by an Account (with proper permissions).</p></li>
<li><p><a class="reference internal" href="../Components/Objects.html#characters"><span class="std std-doc">Characters</span></a>, <a class="reference internal" href="../Components/Objects.html#rooms"><span class="std std-doc">Rooms</span></a>, and <a class="reference internal" href="../Components/Objects.html#exits"><span class="std std-doc">Exits</span></a> are just
children of normal Objects.</p></li>
<li><p><a class="reference internal" href="../Components/Objects.html#characters"><span class="std std-doc">Characters</span></a>, <a class="reference internal" href="../Components/Objects.html#rooms"><span class="std std-doc">Rooms</span></a>, and <a class="reference internal" href="../Components/Objects.html#exits"><span class="std std-doc">Exits</span></a> are just children of normal Objects.</p></li>
<li><p>Any Object can be inside another (except if it creates a loop).</p></li>
<li><p>Any Object can store custom sets of commands on it. Those commands can:</p>
<ul>
<li><p>be made available to the puppeteer (Account),</p></li>
<li><p>be made available to anyone in the same location as the Object, and</p></li>
<li><p>be made available to anyone “inside” the Object</p></li>
<li><p>Also Accounts can store commands on themselves. Account commands are always available unless
commands on a puppeted Object explicitly override them.</p></li>
<li><p>Also Accounts can store commands on themselves. Account commands are always available unless commands on a puppeted Object explicitly override them.</p></li>
</ul>
</li>
</ul>
<p>In Evennia, using the <code class="docutils literal notranslate"><span class="pre">&#64;ic</span></code> command will allow you to puppet a given Object (assuming you have
puppet-access to do so). As mentioned above, the bog-standard Character class is in fact like any
Object: it is auto-puppeted when logging in and just has a command set on it containing the normal
in-game commands, like look, inventory, get and so on.</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>@ic mech
<p>In Evennia, using the <code class="docutils literal notranslate"><span class="pre">ic</span></code> command will allow you to puppet a given Object (assuming you have puppet-access to do so). As mentioned above, the bog-standard Character class is in fact like any Object: it is auto-puppeted when logging in and just has a command set on it containing the normal in-game commands, like look, inventory, get and so on.</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>ic mech
</pre></div>
</div>
<p>You just jumped out of your Character and <em>are</em> now the mech! If people look at you in-game, they
will look at a mech. The problem at this point is that the mech Object has no commands of its own.
The usual things like look, inventory and get sat on the Character object, remember? So at the
moment the mech is not quite as cool as it could be.</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>@ic &lt;Your old Character&gt;
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>ic &lt;Your old Character&gt;
</pre></div>
</div>
<p>You just jumped back to puppeting your normal, mundane Character again. All is well.</p>
<blockquote>
<div><p>(But, you ask, where did that <code class="docutils literal notranslate"><span class="pre">&#64;ic</span></code> command come from, if the mech had no commands on it? The
answer is that it came from the Accounts command set. This is important. Without the Account being
the one with the <code class="docutils literal notranslate"><span class="pre">&#64;ic</span></code> command, we would not have been able to get back out of our mech again.)</p>
<div><p>Where did that <code class="docutils literal notranslate"><span class="pre">ic</span></code> command come from, if the mech had no commands on it? The
answer is that it came from the <code class="docutils literal notranslate"><span class="pre">Account</span></code>s command set. This is important. Without the Account being the one with the <code class="docutils literal notranslate"><span class="pre">ic</span></code> command, we would not have been able to get back out of our mech again.</p>
</div></blockquote>
<section id="arming-the-mech">
<h3>Arming the Mech<a class="headerlink" href="#arming-the-mech" title="Permalink to this headline"></a></h3>
<section id="make-a-mech-that-can-shoot">
<h2>Make a Mech that can shoot<a class="headerlink" href="#make-a-mech-that-can-shoot" title="Permalink to this headline"></a></h2>
<p>Let us make the mech a little more interesting. In our favorite text editor, we will create some new
mech-suitable commands. In Evennia, commands are defined as Python classes.</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="c1"># in a new file mygame/commands/mechcommands.py</span>
@ -220,18 +201,10 @@ mech-suitable commands. In Evennia, commands are defined as Python classes.</p>
</pre></div>
</div>
<p>This is saved as a normal Python module (lets call it <code class="docutils literal notranslate"><span class="pre">mechcommands.py</span></code>), in a place Evennia looks
for such modules (<code class="docutils literal notranslate"><span class="pre">mygame/commands/</span></code>). This command will trigger when the player gives the command
“shoot”, “fire,” or even “fire!” with an exclamation mark. The mech can shoot in the air or at a
target if you give one. In a real game the gun would probably be given a chance to hit and give
<p>This is saved as a normal Python module (lets call it <code class="docutils literal notranslate"><span class="pre">mechcommands.py</span></code>), in a place Evennia looks for such modules (<code class="docutils literal notranslate"><span class="pre">mygame/commands/</span></code>). This command will trigger when the player gives the command “shoot”, “fire,” or even “fire!” with an exclamation mark. The mech can shoot in the air or at a target if you give one. In a real game the gun would probably be given a chance to hit and give
damage to the target, but this is enough for now.</p>
<p>We also make a second command for launching missiles (<code class="docutils literal notranslate"><span class="pre">CmdLaunch</span></code>). To save
space we wont describe it here; it looks the same except it returns a text
about the missiles being fired and has different <code class="docutils literal notranslate"><span class="pre">key</span></code> and <code class="docutils literal notranslate"><span class="pre">aliases</span></code>. We leave
that up to you to create as an exercise. You could have it print “WOOSH! The
mech launches missiles against <target>!”, for example.</p>
<p>Now we shove our commands into a command set. A <a class="reference internal" href="../Components/Command-Sets.html"><span class="doc std std-doc">Command Set</span></a> (CmdSet) is a container
holding any number of commands. The command set is what we will store on the mech.</p>
<p>We also make a second command for launching missiles (<code class="docutils literal notranslate"><span class="pre">CmdLaunch</span></code>). To save space we wont describe it here; it looks the same except it returns a text about the missiles being fired and has different <code class="docutils literal notranslate"><span class="pre">key</span></code> and <code class="docutils literal notranslate"><span class="pre">aliases</span></code>. We leave that up to you to create as an exercise. You could have it print <code class="docutils literal notranslate"><span class="pre">&quot;WOOSH!</span> <span class="pre">The</span> <span class="pre">mech</span> <span class="pre">launches</span> <span class="pre">missiles</span> <span class="pre">against</span> <span class="pre">&lt;target&gt;!</span></code>, for example.</p>
<p>Now we shove our commands into a command set. A <a class="reference internal" href="../Components/Command-Sets.html"><span class="doc std std-doc">Command Set</span></a> (CmdSet) is a container holding any number of commands. The command set is what we will store on the mech.</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="c1"># in the same file mygame/commands/mechcommands.py</span>
<span class="kn">from</span> <span class="nn">evennia</span> <span class="kn">import</span> <span class="n">CmdSet</span>
@ -249,15 +222,12 @@ holding any number of commands. The command set is what we will store on the mec
<span class="bp">self</span><span class="o">.</span><span class="n">add</span><span class="p">(</span><span class="n">CmdLaunch</span><span class="p">())</span>
</pre></div>
</div>
<p>This simply groups all the commands we want. We add our new shoot/launch commands. Lets head back
into the game. For testing we will manually attach our new CmdSet to the mech.</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>@py self.search(&quot;mech&quot;).cmdset.add(&quot;commands.mechcommands.MechCmdSet&quot;)
<p>This simply groups all the commands we want. We add our new shoot/launch commands. Lets head back into the game. For testing we will manually attach our new CmdSet to the mech.</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>py self.search(&quot;mech&quot;).cmdset.add(&quot;commands.mechcommands.MechCmdSet&quot;)
</pre></div>
</div>
<p>This is a little Python snippet (run from the command line as an admin) that searches for the mech
in our current location and attaches our new MechCmdSet to it. What we add is actually the Python
path to our cmdset class. Evennia will import and initialize it behind the scenes.</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>@ic mech
<p>This is a little Python snippet that searches for the mech in our current location and attaches our new MechCmdSet to it. What we add is actually the Python path to our cmdset class. Evennia will import and initialize it behind the scenes.</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>ic mech
</pre></div>
</div>
<p>We are back as the mech! Lets do some shooting!</p>
@ -265,23 +235,17 @@ path to our cmdset class. Evennia will import and initialize it behind the scene
BOOM! The mech fires its gun in the air!
</pre></div>
</div>
<p>There we go, one functioning mech. Try your own <code class="docutils literal notranslate"><span class="pre">launch</span></code> command and see that it works too. We can
not only walk around as the mech — since the CharacterCmdSet is included in our MechCmdSet, the mech
can also do everything a Character could do, like look around, pick up stuff, and have an inventory.
We could now shoot the gun at a target or try the missile launch command. Once you have your own
mech, what else do you need?</p>
<p>There we go, one functioning mech. Try your own <code class="docutils literal notranslate"><span class="pre">launch</span></code> command and see that it works too. We can not only walk around as the mech — since the CharacterCmdSet is included in our MechCmdSet, the mech can also do everything a Character could do, like look around, pick up stuff, and have an inventory. We could now shoot the gun at a target or try the missile launch command. Once you have your own mech, what else do you need?</p>
<blockquote>
<div><p>Note: Youll find that the mechs commands are available to you by just standing in the same
<div><p>Youll find that the mechs commands are available to you by just standing in the same
location (not just by puppeting it). Well solve this with a <em>lock</em> in the next section.</p>
</div></blockquote>
</section>
</section>
<section id="making-a-mech-production-line">
<h2>Making a Mech production line<a class="headerlink" href="#making-a-mech-production-line" title="Permalink to this headline"></a></h2>
<section id="making-an-army-of-mechs">
<h2>Making an army of Mechs<a class="headerlink" href="#making-an-army-of-mechs" title="Permalink to this headline"></a></h2>
<p>What weve done so far is just to make a normal Object, describe it and put some commands on it.
This is great for testing. The way we added it, the MechCmdSet will even go away if we reload the
server. Now we want to make the mech an actual object “type” so we can create mechs without those
extra steps. For this we need to create a new Typeclass.</p>
server. Now we want to make the mech an actual object “type” so we can create mechs without those extra steps. For this we need to create a new Typeclass.</p>
<p>A <a class="reference internal" href="../Components/Typeclasses.html"><span class="doc std std-doc">Typeclass</span></a> is a near-normal Python class that stores its existence to the database
behind the scenes. A Typeclass is created in a normal Python source file:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="c1"># in the new file mygame/typeclasses/mech.py</span>
@ -302,41 +266,29 @@ behind the scenes. A Typeclass is created in a normal Python source file:</p>
<span class="bp">self</span><span class="o">.</span><span class="n">db</span><span class="o">.</span><span class="n">desc</span> <span class="o">=</span> <span class="s2">&quot;This is a huge mech. It has missiles and stuff.&quot;</span>
</pre></div>
</div>
<p>For convenience we include the full contents of the default <code class="docutils literal notranslate"><span class="pre">CharacterCmdSet</span></code> in there. This will
make a Characters normal commands available to the mech. We also add the mech-commands from before,
making sure they are stored persistently in the database. The locks specify that anyone can puppet
the meck and no-one can “call” the mechs Commands from outside it - you have to puppet it to be
able to shoot.</p>
<p>Thats it. When Objects of this type are created, they will always start out with the mechs command
set and the correct lock. We set a default description, but you would probably change this with
<code class="docutils literal notranslate"><span class="pre">&#64;desc</span></code> to individualize your mechs as you build them.</p>
<p>For convenience we include the full contents of the default <code class="docutils literal notranslate"><span class="pre">CharacterCmdSet</span></code> in there. This will make a Characters normal commands available to the mech. We also add the mech-commands from before, making sure they are stored persistently in the database. The locks specify that anyone can puppet the meck and no-one can “call” the mechs Commands from outside it - you have to puppet it to be able to shoot.</p>
<p>Thats it. When Objects of this type are created, they will always start out with the mechs command set and the correct lock. We set a default description, but you would probably change this with <code class="docutils literal notranslate"><span class="pre">desc</span></code> to individualize your mechs as you build them.</p>
<p>Back in the game, just exit the old mech (<code class="docutils literal notranslate"><span class="pre">&#64;ic</span></code> back to your old character) then do</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>@create/drop The Bigger Mech ; bigmech : mech.Mech
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>create/drop The Bigger Mech ; bigmech : mech.Mech
</pre></div>
</div>
<p>We create a new, bigger mech with an alias bigmech. Note how we give the python-path to our
Typeclass at the end — this tells Evennia to create the new object based on that class (we dont
have to give the full path in our game dir <code class="docutils literal notranslate"><span class="pre">typeclasses.mech.Mech</span></code> because Evennia knows to look in
the <code class="docutils literal notranslate"><span class="pre">typeclasses</span></code> folder already). A shining new mech will appear in the room! Just use</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>@ic bigmech
have to give the full path in our game dir <code class="docutils literal notranslate"><span class="pre">typeclasses.mech.Mech</span></code> because Evennia knows to look in the <code class="docutils literal notranslate"><span class="pre">typeclasses</span></code> folder already). A shining new mech will appear in the room! Just use</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>ic bigmech
</pre></div>
</div>
<p>to take it on a test drive.</p>
</section>
<section id="future-mechs">
<h2>Future Mechs<a class="headerlink" href="#future-mechs" title="Permalink to this headline"></a></h2>
<p>To expand on this you could add more commands to the mech and remove others. Maybe the mech
shouldnt work just like a Character after all. Maybe it makes loud noises every time it passes from
room to room. Maybe it cannot pick up things without crushing them. Maybe it needs fuel, ammo and
repairs. Maybe youll lock it down so it can only be puppeted by emo teenagers.</p>
<p>Having you puppet the mech-object directly is also just one way to implement a giant mech in
Evennia.</p>
<h3>Future Mechs<a class="headerlink" href="#future-mechs" title="Permalink to this headline"></a></h3>
<p>Having you puppet the mech-object directly is just one way to implement a giant mech in Evennia.</p>
<p>For example, you could instead picture a mech as a “vehicle” that you “enter” as your normal
Character (since any Object can move inside another). In that case the “insides” of the mech Object
could be the “cockpit”. The cockpit would have the <code class="docutils literal notranslate"><span class="pre">MechCommandSet</span></code> stored on itself and all the
shooting goodness would be made available to you only when you enter it.</p>
Character (since any Object can move inside another). In that case the “insides” of the mech Object could be the “cockpit”. The cockpit would have the <code class="docutils literal notranslate"><span class="pre">MechCommandSet</span></code> stored on itself and all the shooting goodness would be made available to you only when you enter it.</p>
<p>To expand on this you could add more commands to the mech and remove others. Maybe the mech shouldnt work just like a Character after all.</p>
<p>Maybe it makes loud noises every time it passes from room to room. Maybe it cannot pick up things without crushing them. Maybe it needs fuel, ammo and repairs. Maybe youll lock it down so it can only be puppeted by emo teenagers.</p>
<p>And of course you could put more guns on it. And make it fly.</p>
</section>
</section>
</section>
@ -355,14 +307,14 @@ shooting goodness would be made available to you only when you enter it.</p>
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="Tutorial-Vehicles.html" title="Tutorial Vehicles"
<a href="Tutorial-Building-a-Train.html" title="Building a train that moves"
>next</a> |</li>
<li class="right" >
<a href="Tutorial-NPC-Merchants.html" title="NPC merchants"
>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-1"><a href="Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Building a mech tutorial</a></li>
<li class="nav-item nav-item-this"><a href="">Building a giant mech</a></li>
</ul>
<div class="develop">develop branch</div>
</div>

View file

@ -6,7 +6,7 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<title>Tutorial Vehicles &#8212; Evennia 1.0-dev documentation</title>
<title>Building a train that moves &#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>
@ -18,7 +18,7 @@
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Making a Persistent object Handler" href="Tutorial-Persistent-Handler.html" />
<link rel="prev" title="Building a mech tutorial" href="Building-a-mech-tutorial.html" />
<link rel="prev" title="Building a giant mech" href="Tutorial-Building-a-Mech.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
@ -33,11 +33,11 @@
<a href="Tutorial-Persistent-Handler.html" title="Making a Persistent object Handler"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="Building-a-mech-tutorial.html" title="Building a mech tutorial"
<a href="Tutorial-Building-a-Mech.html" title="Building a giant mech"
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-1"><a href="Howtos-Overview.html" accesskey="U">Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Tutorial Vehicles</a></li>
<li class="nav-item nav-item-this"><a href="">Building a train that moves</a></li>
</ul>
<div class="develop">develop branch</div>
</div>
@ -62,8 +62,7 @@
<script>$('#searchbox').show(0);</script>
<h3><a href="../index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Tutorial Vehicles</a><ul>
<li><a class="reference internal" href="#how-it-works">How it works</a></li>
<li><a class="reference internal" href="#">Building a train that moves</a><ul>
<li><a class="reference internal" href="#creating-our-train-object">Creating our train object</a></li>
<li><a class="reference internal" href="#entering-and-leaving-the-train">Entering and leaving the train</a></li>
<li><a class="reference internal" href="#locking-down-the-commands">Locking down the commands</a></li>
@ -75,15 +74,15 @@
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="Building-a-mech-tutorial.html"
title="previous chapter">Building a mech tutorial</a></p>
<p class="topless"><a href="Tutorial-Building-a-Mech.html"
title="previous chapter">Building a giant mech</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="Tutorial-Persistent-Handler.html"
title="next chapter">Making a Persistent object Handler</a></p>
<div role="note" aria-label="source link">
<!--h3>This Page</h3-->
<ul class="this-page-menu">
<li><a href="../_sources/Howtos/Tutorial-Vehicles.md.txt"
<li><a href="../_sources/Howtos/Tutorial-Building-a-Train.md.txt"
rel="nofollow">Show Page Source</a></li>
</ul>
</div><h3>Links</h3>
@ -99,7 +98,7 @@
</ul>
<h3>Versions</h3>
<ul>
<li><a href="Tutorial-Vehicles.html">1.0-dev (develop branch)</a></li>
<li><a href="Tutorial-Building-a-Train.html">1.0-dev (develop branch)</a></li>
<ul>
<li><a href="../0.9.5/index.html">0.9.5 (v0.9.5 branch)</a></li>
@ -110,24 +109,21 @@
<div class="bodywrapper">
<div class="body" role="main">
<section class="tex2jax_ignore mathjax_ignore" id="tutorial-vehicles">
<h1>Tutorial Vehicles<a class="headerlink" href="#tutorial-vehicles" title="Permalink to this headline"></a></h1>
<p>This tutorial explains how you can create vehicles that can move around in your world. The tutorial
will explain how to create a train, but this can be equally applied to create other kind of vehicles
<section class="tex2jax_ignore mathjax_ignore" id="building-a-train-that-moves">
<h1>Building a train that moves<a class="headerlink" href="#building-a-train-that-moves" title="Permalink to this headline"></a></h1>
<blockquote>
<div><p>TODO: This should be updated for latest Evennia use.</p>
</div></blockquote>
<p>Vehicles are things that you can enter and then move around in your game world. Here well explain how to create a train, but this can be equally applied to create other kind of vehicles
(cars, planes, boats, spaceships, submarines, …).</p>
<section id="how-it-works">
<h2>How it works<a class="headerlink" href="#how-it-works" title="Permalink to this headline"></a></h2>
<p>Objects in Evennia have an interesting property: you can put any object inside another object. This
is most obvious in rooms: a room in Evennia is just like any other game object (except rooms tend to
not themselves be inside anything else).</p>
<p>Objects in Evennia have an interesting property: you can put any object inside another object. This is most obvious in rooms: a room in Evennia is just like any other game object (except rooms tend to not themselves be inside anything else).</p>
<p>Our train will be similar: it will be an object that other objects can get inside. We then simply
move the Train, which brings along everyone inside it.</p>
</section>
<section id="creating-our-train-object">
<h2>Creating our train object<a class="headerlink" href="#creating-our-train-object" title="Permalink to this headline"></a></h2>
<p>The first step we need to do is create our train object, including a new typeclass. To do this,
create a new file, for instance in <code class="docutils literal notranslate"><span class="pre">mygame/typeclasses/train.py</span></code> with the following content:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="c1"># file mygame/typeclasses/train.py</span>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="c1"># in mygame/typeclasses/train.py</span>
<span class="kn">from</span> <span class="nn">evennia</span> <span class="kn">import</span> <span class="n">DefaultObject</span>
@ -140,27 +136,21 @@ create a new file, for instance in <code class="docutils literal notranslate"><s
</pre></div>
</div>
<p>Now we can create our train in our game:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="nd">@create</span><span class="o">/</span><span class="n">drop</span> <span class="n">train</span><span class="p">:</span><span class="n">train</span><span class="o">.</span><span class="n">TrainObject</span>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">create</span><span class="o">/</span><span class="n">drop</span> <span class="n">train</span><span class="p">:</span><span class="n">train</span><span class="o">.</span><span class="n">TrainObject</span>
</pre></div>
</div>
<p>Now this is just an object that doesnt do much yet… but we can already force our way inside it
and back (assuming we created it in limbo).</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="nd">@tel</span> <span class="n">train</span>
<span class="nd">@tel</span> <span class="n">limbo</span>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">tel</span> <span class="n">train</span>
<span class="n">tel</span> <span class="n">limbo</span>
</pre></div>
</div>
</section>
<section id="entering-and-leaving-the-train">
<h2>Entering and leaving the train<a class="headerlink" href="#entering-and-leaving-the-train" title="Permalink to this headline"></a></h2>
<p>Using the <code class="docutils literal notranslate"><span class="pre">&#64;tel</span></code>command like shown above is obviously not what we want. <code class="docutils literal notranslate"><span class="pre">&#64;tel</span></code> is an admin command
and normal players will thus never be able to enter the train! It is also not really a good idea to
use <a class="reference internal" href="../Components/Objects.html#exits"><span class="std std-doc">Exits</span></a> to get in and out of the train - Exits are (at least by default) objects
too. They point to a specific destination. If we put an Exit in this room leading inside the train
it would stay here when the train moved away (still leading into the train like a magic portal!). In
the same way, if we put an Exit object inside the train, it would always point back to this room,
regardless of where the Train has moved. Now, one <em>could</em> define custom Exit types that move with
the train or change their destination in the right way - but this seems to be a pretty cumbersome
solution.</p>
<p>Using the <code class="docutils literal notranslate"><span class="pre">tel</span></code>command like shown above is obviously not what we want. <code class="docutils literal notranslate"><span class="pre">&#64;tel</span></code> is an admin command and normal players will thus never be able to enter the train!</p>
<p>It is also not really a good idea to use <a class="reference internal" href="../Components/Objects.html#exits"><span class="std std-doc">Exits</span></a> to get in and out of the train - Exits are (at least by default) objects too. They point to a specific destination. If we put an Exit in this room leading inside the train it would stay here when the train moved away (still leading into the train like a magic portal!). In the same way, if we put an Exit object inside the train, it would always point back to this room, regardless of where the Train has moved.</p>
<p>Now, one <em>could</em> define custom Exit types that move with the train or change their destination in the right way - but this seems to be a pretty cumbersome solution.</p>
<p>What we will do instead is to create some new <a class="reference internal" href="../Components/Commands.html"><span class="doc std std-doc">commands</span></a>: one for entering the train and
another for leaving it again. These will be stored <em>on the train object</em> and will thus be made
available to whomever is either inside it or in the same room as the train.</p>
@ -181,7 +171,6 @@ available to whomever is either inside it or in the same room as the train.</p>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">key</span> <span class="o">=</span> <span class="s2">&quot;enter train&quot;</span>
<span class="n">locks</span> <span class="o">=</span> <span class="s2">&quot;cmd:all()&quot;</span>
<span class="k">def</span> <span class="nf">func</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="n">train</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">obj</span>
@ -202,7 +191,6 @@ available to whomever is either inside it or in the same room as the train.</p>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">key</span> <span class="o">=</span> <span class="s2">&quot;leave train&quot;</span>
<span class="n">locks</span> <span class="o">=</span> <span class="s2">&quot;cmd:all()&quot;</span>
<span class="k">def</span> <span class="nf">func</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="n">train</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">obj</span>
@ -219,34 +207,29 @@ available to whomever is either inside it or in the same room as the train.</p>
</div>
<p>Note that while this seems like a lot of text, the majority of lines here are taken up by
documentation.</p>
<p>These commands are work in a pretty straightforward way: <code class="docutils literal notranslate"><span class="pre">CmdEnterTrain</span></code> moves the location of the
player to inside the train and <code class="docutils literal notranslate"><span class="pre">CmdLeaveTrain</span></code> does the opposite: it moves the player back to the
current location of the train (back outside to its current location). We stacked them in a
<a class="reference internal" href="../Components/Command-Sets.html"><span class="doc std std-doc">cmdset</span></a> <code class="docutils literal notranslate"><span class="pre">CmdSetTrain</span></code> so they can be used.</p>
<p>These commands are work in a pretty straightforward way: <code class="docutils literal notranslate"><span class="pre">CmdEnterTrain</span></code> moves the location of the player to inside the train and <code class="docutils literal notranslate"><span class="pre">CmdLeaveTrain</span></code> does the opposite: it moves the player back to the
current location of the train (back outside to its current location). We stacked them in a <a class="reference internal" href="../Components/Command-Sets.html"><span class="doc std std-doc">cmdset</span></a> <code class="docutils literal notranslate"><span class="pre">CmdSetTrain</span></code> so they can be used.</p>
<p>To make the commands work we need to add this cmdset to our train typeclass:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="c1"># file mygame/typeclasses/train.py</span>
<span class="kn">from</span> <span class="nn">evennia</span> <span class="kn">import</span> <span class="n">DefaultObject</span>
<span class="kn">from</span> <span class="nn">commands.train</span> <span class="kn">import</span> <span class="n">CmdSetTrain</span>
<span class="kn">from</span> <span class="nn">typeclasses.objects</span> <span class="kn">import</span> <span class="n">Object</span>
<span class="k">class</span> <span class="nc">TrainObject</span><span class="p">(</span><span class="n">DefaultObject</span><span class="p">):</span>
<span class="k">class</span> <span class="nc">TrainObject</span><span class="p">(</span><span class="n">Object</span><span class="p">):</span>
<span class="k">def</span> <span class="nf">at_object_creation</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="bp">self</span><span class="o">.</span><span class="n">cmdset</span><span class="o">.</span><span class="n">add_default</span><span class="p">(</span><span class="n">CmdSetTrain</span><span class="p">)</span>
</pre></div>
</div>
<p>If we now <code class="docutils literal notranslate"><span class="pre">&#64;reload</span></code> our game and reset our train, those commands should work and we can now enter
and leave the train:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="nd">@reload</span>
<span class="nd">@typeclass</span><span class="o">/</span><span class="n">force</span><span class="o">/</span><span class="n">reset</span> <span class="n">train</span> <span class="o">=</span> <span class="n">train</span><span class="o">.</span><span class="n">TrainObject</span>
<p>If we now <code class="docutils literal notranslate"><span class="pre">reload</span></code> our game and reset our train, those commands should work and we can now enter and leave the train:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">reload</span>
<span class="n">typeclass</span><span class="o">/</span><span class="n">force</span><span class="o">/</span><span class="n">reset</span> <span class="n">train</span> <span class="o">=</span> <span class="n">train</span><span class="o">.</span><span class="n">TrainObject</span>
<span class="n">enter</span> <span class="n">train</span>
<span class="n">leave</span> <span class="n">train</span>
</pre></div>
</div>
<p>Note the switches used with the <code class="docutils literal notranslate"><span class="pre">&#64;typeclass</span></code> command: The <code class="docutils literal notranslate"><span class="pre">/force</span></code> switch is necessary to assign our
object the same typeclass we already have. The <code class="docutils literal notranslate"><span class="pre">/reset</span></code> re-triggers the typeclass
<code class="docutils literal notranslate"><span class="pre">at_object_creation()</span></code> hook (which is otherwise only called the very first an instance is created).
<p>Note the switches used with the <code class="docutils literal notranslate"><span class="pre">typeclass</span></code> command: The <code class="docutils literal notranslate"><span class="pre">/force</span></code> switch is necessary to assign our object the same typeclass we already have. The <code class="docutils literal notranslate"><span class="pre">/reset</span></code> re-triggers the typeclass <code class="docutils literal notranslate"><span class="pre">at_object_creation()</span></code> hook (which is otherwise only called the very first an instance is created).
As seen above, when this hook is called on our train, our new cmdset will be loaded.</p>
</section>
<section id="locking-down-the-commands">
@ -254,15 +237,10 @@ As seen above, when this hook is called on our train, our new cmdset will be loa
<p>If you have played around a bit, youve probably figured out that you can use <code class="docutils literal notranslate"><span class="pre">leave</span> <span class="pre">train</span></code> when
outside the train and <code class="docutils literal notranslate"><span class="pre">enter</span> <span class="pre">train</span></code> when inside. This doesnt make any sense … so lets go ahead
and fix that. We need to tell Evennia that you can not enter the train when youre already inside
or leave the train when youre outside. One solution to this is <a class="reference internal" href="../Components/Locks.html"><span class="doc std std-doc">locks</span></a>: we will lock down
the commands so that they can only be called if the player is at the correct location.</p>
<p>Right now commands defaults to the lock <code class="docutils literal notranslate"><span class="pre">cmd:all()</span></code>. The <code class="docutils literal notranslate"><span class="pre">cmd</span></code> lock type in combination with the
<code class="docutils literal notranslate"><span class="pre">all()</span></code> lock function means that everyone can run those commands as long as they are in the same
room as the train <em>or</em> inside the train. Were going to change this to check the location of the
player and <em>only</em> allow access if they are inside the train.</p>
or leave the train when youre outside. One solution to this is <a class="reference internal" href="../Components/Locks.html"><span class="doc std std-doc">locks</span></a>: we will lock down the commands so that they can only be called if the player is at the correct location.</p>
<p>Since we didnt set a <code class="docutils literal notranslate"><span class="pre">lock</span></code> property on the Command, it defaults to <code class="docutils literal notranslate"><span class="pre">cmd:all()</span></code>. This means that everyone can use the command as long as they are in the same room <em>or inside the train</em>.</p>
<p>First of all we need to create a new lock function. Evennia comes with many lock functions built-in
already, but none that we can use for locking a command in this particular case. Create a new entry
in <code class="docutils literal notranslate"><span class="pre">mygame/server/conf/lockfuncs.py</span></code>:</p>
already, but none that we can use for locking a command in this particular case. Create a new entry in <code class="docutils literal notranslate"><span class="pre">mygame/server/conf/lockfuncs.py</span></code>:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span>
<span class="c1"># file mygame/server/conf/lockfuncs.py</span>
@ -278,12 +256,7 @@ in <code class="docutils literal notranslate"><span class="pre">mygame/server/co
</div>
<p>If you didnt know, Evennia is by default set up to use all functions in this module as lock
functions (there is a setting variable that points to it).</p>
<p>Our new lock function, <code class="docutils literal notranslate"><span class="pre">cmdinside</span></code>, is to be used by Commands. The <code class="docutils literal notranslate"><span class="pre">accessed_obj</span></code> is the Command
object (in our case this will be <code class="docutils literal notranslate"><span class="pre">CmdEnterTrain</span></code> and <code class="docutils literal notranslate"><span class="pre">CmdLeaveTrain</span></code>) — Every command has an <code class="docutils literal notranslate"><span class="pre">obj</span></code>
property: this is the the object on which the command “sits”. Since we added those commands to our
train object, the <code class="docutils literal notranslate"><span class="pre">.obj</span></code> property will be set to the train object. Conversely, <code class="docutils literal notranslate"><span class="pre">accessing_obj</span></code> is
the object that called the command: in our case its the Character trying to enter or leave the
train.</p>
<p>Our new lock function, <code class="docutils literal notranslate"><span class="pre">cmdinside</span></code>, is to be used by Commands. The <code class="docutils literal notranslate"><span class="pre">accessed_obj</span></code> is the Command object (in our case this will be <code class="docutils literal notranslate"><span class="pre">CmdEnterTrain</span></code> and <code class="docutils literal notranslate"><span class="pre">CmdLeaveTrain</span></code>) — Every command has an <code class="docutils literal notranslate"><span class="pre">obj</span></code> property: this is the the object on which the command “sits”. Since we added those commands to our train object, the <code class="docutils literal notranslate"><span class="pre">.obj</span></code> property will be set to the train object. Conversely, <code class="docutils literal notranslate"><span class="pre">accessing_obj</span></code> is the object that called the command: in our case its the Character trying to enter or leave the train.</p>
<p>What this function does is to check that the players location is the same as the train object. If
it is, it means the player is inside the train. Otherwise it means the player is somewhere else and
the check will fail.</p>
@ -314,28 +287,23 @@ user ignores lock functions. In order to use this functionality you need to <cod
<p>Now that we can enter and leave the train correctly, its time to make it move. There are different
things we need to consider for this:</p>
<ul class="simple">
<li><p>Who can control your vehicle? The first player to enter it, only players that have a certain
“drive” skill, automatically?</p></li>
<li><p>Where should it go? Can the player steer the vehicle to go somewhere else or will it always follow
the same route?</p></li>
<li><p>Who can control your vehicle? The first player to enter it, only players that have a certain “drive” skill, automatically?</p></li>
<li><p>Where should it go? Can the player steer the vehicle to go somewhere else or will it always follow the same route?</p></li>
</ul>
<p>For our example train were going to go with automatic movement through a predefined route (its
track). The train will stop for a bit at the start and end of the route to allow players to enter
and leave it.</p>
<p>Go ahead and create some rooms for our train. Make a list of the room ids along the route (using the
<code class="docutils literal notranslate"><span class="pre">&#64;ex</span></code> command).</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="nd">@dig</span><span class="o">/</span><span class="n">tel</span> <span class="n">South</span> <span class="n">station</span>
<span class="nd">@ex</span> <span class="c1"># note the id of the station</span>
<span class="nd">@tunnel</span><span class="o">/</span><span class="n">tel</span> <span class="n">n</span> <span class="o">=</span> <span class="n">Following</span> <span class="n">a</span> <span class="n">railroad</span>
<span class="nd">@ex</span> <span class="c1"># note the id of the track</span>
<span class="nd">@tunnel</span><span class="o">/</span><span class="n">tel</span> <span class="n">n</span> <span class="o">=</span> <span class="n">Following</span> <span class="n">a</span> <span class="n">railroad</span>
<span class="o">...</span>
<span class="nd">@tunnel</span><span class="o">/</span><span class="n">tel</span> <span class="n">n</span> <span class="o">=</span> <span class="n">North</span> <span class="n">Station</span>
<p>For our example train were going to go with automatic movement through a predefined route (its track). The train will stop for a bit at the start and end of the route to allow players to enter and leave it.</p>
<p>Go ahead and create some rooms for our train. Make a list of the room ids along the route (using the <code class="docutils literal notranslate"><span class="pre">xe</span></code> command).</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">&gt;</span> <span class="n">dig</span><span class="o">/</span><span class="n">tel</span> <span class="n">South</span> <span class="n">station</span>
<span class="o">&gt;</span> <span class="n">ex</span> <span class="c1"># note the id of the station</span>
<span class="o">&gt;</span> <span class="n">tunnel</span><span class="o">/</span><span class="n">tel</span> <span class="n">n</span> <span class="o">=</span> <span class="n">Following</span> <span class="n">a</span> <span class="n">railroad</span>
<span class="o">&gt;</span> <span class="n">ex</span> <span class="c1"># note the id of the track</span>
<span class="o">&gt;</span> <span class="n">tunnel</span><span class="o">/</span><span class="n">tel</span> <span class="n">n</span> <span class="o">=</span> <span class="n">Following</span> <span class="n">a</span> <span class="n">railroad</span>
<span class="o">&gt;</span> <span class="o">...</span>
<span class="o">&gt;</span> <span class="n">tunnel</span><span class="o">/</span><span class="n">tel</span> <span class="n">n</span> <span class="o">=</span> <span class="n">North</span> <span class="n">Station</span>
</pre></div>
</div>
<p>Put the train onto the tracks:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="nd">@tel</span> <span class="n">south</span> <span class="n">station</span>
<span class="nd">@tel</span> <span class="n">train</span> <span class="o">=</span> <span class="n">here</span>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">tel</span> <span class="n">south</span> <span class="n">station</span>
<span class="n">tel</span> <span class="n">train</span> <span class="o">=</span> <span class="n">here</span>
</pre></div>
</div>
<p>Next we will tell the train how to move and which route to take.</p>
@ -377,26 +345,22 @@ and leave it.</p>
<span class="bp">self</span><span class="o">.</span><span class="n">msg_contents</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;The train is moving forward to </span><span class="si">{</span><span class="n">room</span><span class="o">.</span><span class="n">name</span><span class="si">}</span><span class="s2">.&quot;</span><span class="p">)</span>
</pre></div>
</div>
<p>We added a lot of code here. Since we changed the <code class="docutils literal notranslate"><span class="pre">at_object_creation</span></code> to add in variables we will
have to reset our train object like earlier (using the <code class="docutils literal notranslate"><span class="pre">&#64;typeclass/force/reset</span></code> command).</p>
<p>We added a lot of code here. Since we changed the <code class="docutils literal notranslate"><span class="pre">at_object_creation</span></code> to add in variables we will have to reset our train object like earlier (using the <code class="docutils literal notranslate"><span class="pre">&#64;typeclass/force/reset</span></code> command).</p>
<p>We are keeping track of a few different things now: whether the train is moving or standing still,
which direction the train is heading to and what rooms the train will pass through.</p>
<p>We also added some methods: one to start moving the train, another to stop and a third that actually
moves the train to the next room in the list. Or makes it stop driving if it reaches the last stop.</p>
<p>Lets try it out, using <code class="docutils literal notranslate"><span class="pre">&#64;py</span></code> to call the new train functionality:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="nd">@reload</span>
<span class="nd">@typeclass</span><span class="o">/</span><span class="n">force</span><span class="o">/</span><span class="n">reset</span> <span class="n">train</span> <span class="o">=</span> <span class="n">train</span><span class="o">.</span><span class="n">TrainObject</span>
<span class="n">enter</span> <span class="n">train</span>
<span class="nd">@py</span> <span class="n">here</span><span class="o">.</span><span class="n">goto_next_room</span><span class="p">()</span>
<p>We also added some methods: one to start moving the train, another to stop and a third that actually moves the train to the next room in the list. Or makes it stop driving if it reaches the last stop.</p>
<p>Lets try it out, using <code class="docutils literal notranslate"><span class="pre">py</span></code> to call the new train functionality:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">&gt;</span> <span class="n">reload</span>
<span class="o">&gt;</span> <span class="n">typeclass</span><span class="o">/</span><span class="n">force</span><span class="o">/</span><span class="n">reset</span> <span class="n">train</span> <span class="o">=</span> <span class="n">train</span><span class="o">.</span><span class="n">TrainObject</span>
<span class="o">&gt;</span> <span class="n">enter</span> <span class="n">train</span>
<span class="o">&gt;</span> <span class="n">py</span> <span class="n">here</span><span class="o">.</span><span class="n">goto_next_room</span><span class="p">()</span>
</pre></div>
</div>
<p>You should see the train moving forward one step along the rail road.</p>
</section>
<section id="adding-in-scripts">
<h2>Adding in scripts<a class="headerlink" href="#adding-in-scripts" title="Permalink to this headline"></a></h2>
<p>If we wanted full control of the train we could now just add a command to step it along the track
when desired. We want the train to move on its own though, without us having to force it by manually
calling the <code class="docutils literal notranslate"><span class="pre">goto_next_room</span></code> method.</p>
<p>If we wanted full control of the train we could now just add a command to step it along the track when desired. We want the train to move on its own though, without us having to force it by manually calling the <code class="docutils literal notranslate"><span class="pre">goto_next_room</span></code> method.</p>
<p>To do this we will create two <a class="reference internal" href="../Components/Scripts.html"><span class="doc std std-doc">scripts</span></a>: one script that runs when the train has stopped at
a station and is responsible for starting the train again after a while. The other script will take
care of the driving.</p>
@ -457,9 +421,9 @@ train again., and were ready to ride it around!</p>
<span class="bp">self</span><span class="o">.</span><span class="n">scripts</span><span class="o">.</span><span class="n">add</span><span class="p">(</span><span class="n">TrainStoppedScript</span><span class="p">)</span>
</pre></div>
</div>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="nd">@reload</span>
<span class="nd">@typeclass</span><span class="o">/</span><span class="n">force</span><span class="o">/</span><span class="n">reset</span> <span class="n">train</span> <span class="o">=</span> <span class="n">train</span><span class="o">.</span><span class="n">TrainObject</span>
<span class="n">enter</span> <span class="n">train</span>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">&gt;</span> <span class="n">reload</span>
<span class="o">&gt;</span> <span class="n">typeclass</span><span class="o">/</span><span class="n">force</span><span class="o">/</span><span class="n">reset</span> <span class="n">train</span> <span class="o">=</span> <span class="n">train</span><span class="o">.</span><span class="n">TrainObject</span>
<span class="o">&gt;</span> <span class="n">enter</span> <span class="n">train</span>
<span class="c1"># output:</span>
<span class="o">&lt;</span> <span class="n">The</span> <span class="n">train</span> <span class="ow">is</span> <span class="n">moving</span> <span class="n">forward</span> <span class="n">to</span> <span class="n">Following</span> <span class="n">a</span> <span class="n">railroad</span><span class="o">.</span>
@ -479,14 +443,10 @@ train again., and were ready to ride it around!</p>
<p>This train is very basic and still has some flaws. Some more things to do:</p>
<ul class="simple">
<li><p>Make it look like a train.</p></li>
<li><p>Make it impossible to exit and enter the train mid-ride. This could be made by having the
enter/exit commands check so the train is not moving before allowing the caller to proceed.</p></li>
<li><p>Make it impossible to exit and enter the train mid-ride. This could be made by having the enter/exit commands check so the train is not moving before allowing the caller to proceed.</p></li>
<li><p>Have train conductor commands that can override the automatic start/stop.</p></li>
<li><p>Allow for in-between stops between the start- and end station</p></li>
<li><p>Have a rail road track instead of hard-coding the rooms in the train object. This could for
example be a custom <a class="reference internal" href="../Components/Objects.html#exits"><span class="std std-doc">Exit</span></a> only traversable by trains. The train will follow the
track. Some track segments can split to lead to two different rooms and a player can switch the
direction to which room it goes.</p></li>
<li><p>Have a rail road track instead of hard-coding the rooms in the train object. This could for example be a custom <a class="reference internal" href="../Components/Objects.html#exits"><span class="std std-doc">Exit</span></a> only traversable by trains. The train will follow the track. Some track segments can split to lead to two different rooms and a player can switch the direction to which room it goes.</p></li>
<li><p>Create another kind of vehicle!</p></li>
</ul>
</section>
@ -511,11 +471,11 @@ direction to which room it goes.</p></li>
<a href="Tutorial-Persistent-Handler.html" title="Making a Persistent object Handler"
>next</a> |</li>
<li class="right" >
<a href="Building-a-mech-tutorial.html" title="Building a mech tutorial"
<a href="Tutorial-Building-a-Mech.html" title="Building a giant mech"
>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-1"><a href="Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Tutorial Vehicles</a></li>
<li class="nav-item nav-item-this"><a href="">Building a train that moves</a></li>
</ul>
<div class="develop">develop branch</div>
</div>

View file

@ -6,7 +6,7 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<title>Coordinates &#8212; Evennia 1.0-dev documentation</title>
<title>Adding room coordinates to your game &#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>
@ -17,8 +17,8 @@
<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="Dynamic In Game Map" href="Dynamic-In-Game-Map.html" />
<link rel="prev" title="Weather Tutorial" href="Weather-Tutorial.html" />
<link rel="next" title="Show a dynamic map of rooms" href="Tutorial-Displaying-Room-Map.html" />
<link rel="prev" title="Adding Weather messages to a Room" href="Tutorial-Weather-Effects.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
@ -30,14 +30,14 @@
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="Dynamic-In-Game-Map.html" title="Dynamic In Game Map"
<a href="Tutorial-Displaying-Room-Map.html" title="Show a dynamic map of rooms"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="Weather-Tutorial.html" title="Weather Tutorial"
<a href="Tutorial-Weather-Effects.html" title="Adding Weather messages to a Room"
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-1"><a href="Howtos-Overview.html" accesskey="U">Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Coordinates</a></li>
<li class="nav-item nav-item-this"><a href="">Adding room coordinates to your game</a></li>
</ul>
<div class="develop">develop branch</div>
</div>
@ -62,26 +62,25 @@
<script>$('#searchbox').show(0);</script>
<h3><a href="../index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Coordinates</a></li>
<li><a class="reference internal" href="#adding-room-coordinates-in-your-game">Adding room coordinates in your game</a><ul>
<li><a class="reference internal" href="#">Adding room coordinates to your game</a><ul>
<li><a class="reference internal" href="#coordinates-as-tags">Coordinates as tags</a></li>
<li><a class="reference internal" href="#some-additional-searches">Some additional searches</a><ul>
<li><a class="reference internal" href="#finding-one-room">Finding one room</a></li>
<li><a class="reference internal" href="#finding-several-rooms">Finding several rooms</a></li>
<li><a class="reference internal" href="#an-example">An example</a></li>
<li><a class="reference internal" href="#to-conclude">To conclude</a></li>
</ul>
</li>
<li><a class="reference internal" href="#to-conclude">To conclude</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="Weather-Tutorial.html"
title="previous chapter">Weather Tutorial</a></p>
<p class="topless"><a href="Tutorial-Weather-Effects.html"
title="previous chapter">Adding Weather messages to a Room</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="Dynamic-In-Game-Map.html"
title="next chapter">Dynamic In Game Map</a></p>
<p class="topless"><a href="Tutorial-Displaying-Room-Map.html"
title="next chapter">Show a dynamic map of rooms</a></p>
<div role="note" aria-label="source link">
<!--h3>This Page</h3-->
<ul class="this-page-menu">
@ -112,18 +111,14 @@
<div class="bodywrapper">
<div class="body" role="main">
<section class="tex2jax_ignore mathjax_ignore" id="coordinates">
<h1>Coordinates<a class="headerlink" href="#coordinates" title="Permalink to this headline"></a></h1>
</section>
<section class="tex2jax_ignore mathjax_ignore" id="adding-room-coordinates-in-your-game">
<h1>Adding room coordinates in your game<a class="headerlink" href="#adding-room-coordinates-in-your-game" title="Permalink to this headline"></a></h1>
<p>This tutorial is moderately difficult in content. You might want to be familiar and at ease with
some Python concepts (like properties) and possibly Django concepts (like queries), although this
tutorial will try to walk you through the process and give enough explanations each time. If you
dont feel very confident with math, dont hesitate to pause, go to the example section, which shows
a tiny map, and try to walk around the code or read the explanation.</p>
<p>Evennia doesnt have a coordinate system by default. Rooms and other objects are linked by location
and content:</p>
<section class="tex2jax_ignore mathjax_ignore" id="adding-room-coordinates-to-your-game">
<h1>Adding room coordinates to your game<a class="headerlink" href="#adding-room-coordinates-to-your-game" title="Permalink to this headline"></a></h1>
<aside class="sidebar">
<p class="sidebar-title">The XYZGrid </p>
<p>See also the <a class="reference internal" href="../Contribs/Contrib-XYZGrid.html"><span class="doc std std-doc">XYZGrid contrib</span></a>, which adds coordinate support and pathfinding.</p>
</aside>
<p>This tutorial is moderately difficult in content. You might want to be familiar and at ease with some Python concepts (like properties) and possibly Django concepts (like queries), although this tutorial will try to walk you through the process and give enough explanations each time. If you dont feel very confident with math, dont hesitate to pause, go to the example section, which shows a tiny map, and try to walk around the code or read the explanation.</p>
<p>Evennia doesnt have a coordinate system by default. Rooms and other objects are linked by location and content:</p>
<ul class="simple">
<li><p>An object can be in a location, that is, another object. Like an exit in a room.</p></li>
<li><p>An object can access its content. A room can see what objects uses it as location (that would
@ -137,14 +132,8 @@ instance.</p>
<h2>Coordinates as tags<a class="headerlink" href="#coordinates-as-tags" title="Permalink to this headline"></a></h2>
<p>The first concept might be the most surprising at first glance: we will create coordinates as
<a class="reference internal" href="../Components/Tags.html"><span class="doc std std-doc">tags</span></a>.</p>
<blockquote>
<div><p>Why not attributes, wouldnt that be easier?</p>
</div></blockquote>
<p>It would. We could just do something like <code class="docutils literal notranslate"><span class="pre">room.db.x</span> <span class="pre">=</span> <span class="pre">3</span></code>. The advantage of using tags is that it
will be easy and effective to search. Although this might not seem like a huge advantage right now,
with a database of thousands of rooms, it might make a difference, particularly if you have a lot of
things based on coordinates.</p>
<p>Rather than giving you a step-by-step process, Ill show you the code. Notice that we use
<p>So, why not attributes, wouldnt that be easier? It would. We could just do something like <code class="docutils literal notranslate"><span class="pre">room.db.x</span> <span class="pre">=</span> <span class="pre">3</span></code>. The advantage of using tags is that it will be easy and effective to search. Although this might not seem like a huge advantage right now, with a database of thousands of rooms, it might make a difference, particularly if you have a lot of things based on coordinates.</p>
<p>Rather than giving you a step-by-step process, Well show you the code. Notice that we use
properties to easily access and update coordinates. This is a Pythonic approach. Heres our first
<code class="docutils literal notranslate"><span class="pre">Room</span></code> class, that you can modify in <code class="docutils literal notranslate"><span class="pre">typeclasses/rooms.py</span></code>:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="c1"># in typeclasses/rooms.py</span>
@ -227,12 +216,7 @@ The <code class="docutils literal notranslate"><span class="pre">tags.get</span>
<li><p>We convert the value to an integer, if its a <code class="docutils literal notranslate"><span class="pre">str</span></code>. Remember that tags can only contain <code class="docutils literal notranslate"><span class="pre">str</span></code>,
so well need to convert it.</p></li>
</ol>
<blockquote>
<div><p>I thought tags couldnt contain values?</p>
</div></blockquote>
<p>Well, technically, they cant: theyre either here or not. But using tag categories, as we have
done, we get a tag, knowing only its category. Thats the basic approach to coordinates in this
tutorial.</p>
<p>So can Tags contain values? Well, technically, they cant: theyre either here or not. But using tag categories, as we have done, we get a tag, knowing only its category. Thats the basic approach to coordinates in this tutorial.</p>
<p>Now, lets look at the method that will be called when we wish to set <code class="docutils literal notranslate"><span class="pre">x</span></code> in our room:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span> <span class="nd">@x</span><span class="o">.</span><span class="n">setter</span>
<span class="k">def</span> <span class="nf">x</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">x</span><span class="p">):</span>
@ -249,19 +233,15 @@ tutorial.</p>
room with “coordx” as their category, which wouldnt do at all.</p></li>
<li><p>Then we add the new tag, giving it the proper category.</p></li>
</ol>
<blockquote>
<div><p>Now what?</p>
</div></blockquote>
<p>If you add this code and reload your game, once youre logged in with a character in a room as its
location, you can play around:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="nd">@py</span> <span class="n">here</span><span class="o">.</span><span class="n">x</span>
<span class="nd">@py</span> <span class="n">here</span><span class="o">.</span><span class="n">x</span> <span class="o">=</span> <span class="mi">0</span>
<span class="nd">@py</span> <span class="n">here</span><span class="o">.</span><span class="n">y</span> <span class="o">=</span> <span class="mi">3</span>
<span class="nd">@py</span> <span class="n">here</span><span class="o">.</span><span class="n">z</span> <span class="o">=</span> <span class="o">-</span><span class="mi">2</span>
<span class="nd">@py</span> <span class="n">here</span><span class="o">.</span><span class="n">z</span> <span class="o">=</span> <span class="kc">None</span>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">py</span> <span class="n">here</span><span class="o">.</span><span class="n">x</span>
<span class="n">py</span> <span class="n">here</span><span class="o">.</span><span class="n">x</span> <span class="o">=</span> <span class="mi">0</span>
<span class="n">py</span> <span class="n">here</span><span class="o">.</span><span class="n">y</span> <span class="o">=</span> <span class="mi">3</span>
<span class="n">py</span> <span class="n">here</span><span class="o">.</span><span class="n">z</span> <span class="o">=</span> <span class="o">-</span><span class="mi">2</span>
<span class="n">py</span> <span class="n">here</span><span class="o">.</span><span class="n">z</span> <span class="o">=</span> <span class="kc">None</span>
</pre></div>
</div>
<p>The code might not be that easy to read, but you have to admit its fairly easy to use.</p>
</section>
<section id="some-additional-searches">
<h2>Some additional searches<a class="headerlink" href="#some-additional-searches" title="Permalink to this headline"></a></h2>
@ -305,23 +285,18 @@ Z=0?</p>
<span class="k">return</span> <span class="kc">None</span>
</pre></div>
</div>
<p>This solution includes a bit of <a class="reference external" href="https://docs.djangoproject.com/en/1.11/topics/db/queries/">Django
queries</a>.
Basically, what we do is reach for the object manager and search for objects with the matching tags.
Again, dont spend too much time worrying about the mechanism, the method is quite easy to use:</p>
<p>This solution includes some <span class="xref myst">Django queries</span>. Basically, what we do is reach for the object manager and search for objects with the matching tags. Again, dont spend too much time worrying about the mechanism, the method is quite easy to use:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Room</span><span class="o">.</span><span class="n">get_room_at</span><span class="p">(</span><span class="mi">5</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="o">-</span><span class="mi">3</span><span class="p">)</span>
</pre></div>
</div>
<p>Notice that this is a class method: you will call it from <code class="docutils literal notranslate"><span class="pre">Room</span></code> (the class), not an instance.
Though you still can:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>@py here.get_room_at(3, 8, 0)
<p>Notice that this is a class method: you will call it from <code class="docutils literal notranslate"><span class="pre">Room</span></code> (the class), not an instance. Though you still can:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>py here.get_room_at(3, 8, 0)
</pre></div>
</div>
</section>
<section id="finding-several-rooms">
<h3>Finding several rooms<a class="headerlink" href="#finding-several-rooms" title="Permalink to this headline"></a></h3>
<p>Heres another useful method that allows us to look for rooms around a given coordinate. This is
more advanced search and doing some calculation, beware! Look at the following section if youre
<p>Heres another useful method that allows us to look for rooms around a given coordinate. This is more advanced search and doing some calculation, beware! Look at the following section if youre
lost.</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">math</span> <span class="kn">import</span> <span class="n">sqrt</span>
@ -385,9 +360,7 @@ lost.</p>
<ol class="simple">
<li><p>We have specified coordinates as parameters. We determine a broad range using the distance.
That is, for each coordinate, we create a list of possible matches. See the example below.</p></li>
<li><p>We then search for the rooms within this broader range. It gives us a square
around our location. Some rooms are definitely outside the range. Again, see the example below
to follow the logic.</p></li>
<li><p>We then search for the rooms within this broader range. It gives us a square around our location. Some rooms are definitely outside the range. Again, see the example below to follow the logic.</p></li>
<li><p>We filter down the list and sort it by distance from the specified coordinates.</p></li>
</ol>
<p>Notice that we only search starting at step 2. Thus, the Django search doesnt look and cache all
@ -406,24 +379,16 @@ optimized to be quick and efficient.</p>
<span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span> <span class="mi">4</span>
</pre></div>
</div>
<p>The X coordinates are given below. The Y coordinates are given on the left. This is a simple
square with 16 rooms: 4 on each line, 4 lines of them. All the rooms are identified by letters in
this example: the first line at the top has rooms A to D, the second E to H, the third I to L and
the fourth M to P. The bottom-left room, X=1 and Y=1, is M. The upper-right room X=4 and Y=4 is D.</p>
<p>So lets say we want to find all the neighbors, distance 1, from the room J. J is at X=2, Y=2.</p>
<p>The X coordinates are given below. The Y coordinates are given on the left. This is a simple square with 16 rooms: 4 on each line, 4 lines of them. All the rooms are identified by letters in this example: the first line at the top has rooms A to D, the second E to H, the third I to L and the fourth M to P. The bottom-left room, X=1 and Y=1, is M. The upper-right room X=4 and Y=4 is D.
So lets say we want to find all the neighbors, distance 1, from the room J. J is at X=2, Y=2.</p>
<p>So we use:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>Room.get_rooms_around(x=2, y=2, z=0, distance=1)
# we&#39;ll assume a z coordinate of 0 for simplicity
</pre></div>
</div>
<ol class="simple">
<li><p>First, this method gets all the rooms in a square around J. So it gets E F G, I J K, M N O. If
you want, draw the square around these coordinates to see whats happening.</p></li>
<li><p>Next, we browse over this list and check the real distance between J (X=2, Y=2) and the room.
The four corners of the square are not in this circle. For instance, the distance between J and M
is not 1. If you draw a circle of center J and radius 1, youll notice that the four corners of our
square (E, G, M and O) are not in this circle. So we remove them.</p></li>
<li><p>We sort by distance from J.</p></li>
<li><p>First, this method gets all the rooms in a square around J. So it gets E F G, I J K, M N O. If you want, draw the square around these coordinates to see whats happening.</p></li>
<li><p>Next, we browse over this list and check the real distance between J (X=2, Y=2) and the room. The four corners of the square are not in this circle. For instance, the distance between J and M is not 1. If you draw a circle of center J and radius 1, youll notice that the four corners of our square (E, G, M and O) are not in this circle. So we remove them. 3. We sort by distance from J.</p></li>
</ol>
<p>So in the end we might obtain something like this:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">[</span>
@ -437,11 +402,11 @@ square (E, G, M and O) are not in this circle. So we remove them.</p></li>
</div>
<p>You can try with more examples if you want to see this in action.</p>
</section>
<section id="to-conclude">
<h3>To conclude<a class="headerlink" href="#to-conclude" title="Permalink to this headline"></a></h3>
<p>You can definitely use this system to map other objects, not just rooms. You can easily remove the
`Z coordinate too, if you simply need X and Y.</p>
</section>
<section id="to-conclude">
<h2>To conclude<a class="headerlink" href="#to-conclude" title="Permalink to this headline"></a></h2>
<p>You can also use this system to map other objects, not just rooms. You can easily remove the
<code class="docutils literal notranslate"><span class="pre">Z</span></code> coordinate too, if you simply need <code class="docutils literal notranslate"><span class="pre">X</span></code> and <code class="docutils literal notranslate"><span class="pre">Y</span></code>.</p>
</section>
</section>
@ -461,14 +426,14 @@ square (E, G, M and O) are not in this circle. So we remove them.</p></li>
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="Dynamic-In-Game-Map.html" title="Dynamic In Game Map"
<a href="Tutorial-Displaying-Room-Map.html" title="Show a dynamic map of rooms"
>next</a> |</li>
<li class="right" >
<a href="Weather-Tutorial.html" title="Weather Tutorial"
<a href="Tutorial-Weather-Effects.html" title="Adding Weather messages to a Room"
>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-1"><a href="Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Coordinates</a></li>
<li class="nav-item nav-item-this"><a href="">Adding room coordinates to your game</a></li>
</ul>
<div class="develop">develop branch</div>
</div>

View file

@ -6,7 +6,7 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<title>Dynamic In Game Map &#8212; Evennia 1.0-dev documentation</title>
<title>Show a dynamic map of rooms &#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>
@ -17,8 +17,8 @@
<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="Static In Game Map" href="Static-In-Game-Map.html" />
<link rel="prev" title="Coordinates" href="Tutorial-Coordinates.html" />
<link rel="next" title="Changing the Game Website" href="Web-Changing-Webpage.html" />
<link rel="prev" title="Adding room coordinates to your game" href="Tutorial-Coordinates.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
@ -30,14 +30,14 @@
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="Static-In-Game-Map.html" title="Static In Game Map"
<a href="Web-Changing-Webpage.html" title="Changing the Game Website"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="Tutorial-Coordinates.html" title="Coordinates"
<a href="Tutorial-Coordinates.html" title="Adding room coordinates to your game"
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-1"><a href="Howtos-Overview.html" accesskey="U">Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Dynamic In Game Map</a></li>
<li class="nav-item nav-item-this"><a href="">Show a dynamic map of rooms</a></li>
</ul>
<div class="develop">develop branch</div>
</div>
@ -62,8 +62,7 @@
<script>$('#searchbox').show(0);</script>
<h3><a href="../index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Dynamic In Game Map</a><ul>
<li><a class="reference internal" href="#introduction">Introduction</a></li>
<li><a class="reference internal" href="#">Show a dynamic map of rooms</a><ul>
<li><a class="reference internal" href="#the-grid-of-rooms">The Grid of Rooms</a></li>
<li><a class="reference internal" href="#concept">Concept</a></li>
<li><a class="reference internal" href="#setting-up-the-map-display">Setting up the Map Display</a></li>
@ -76,14 +75,14 @@
<h4>Previous topic</h4>
<p class="topless"><a href="Tutorial-Coordinates.html"
title="previous chapter">Coordinates</a></p>
title="previous chapter">Adding room coordinates to your game</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="Static-In-Game-Map.html"
title="next chapter">Static In Game Map</a></p>
<p class="topless"><a href="Web-Changing-Webpage.html"
title="next chapter">Changing the Game Website</a></p>
<div role="note" aria-label="source link">
<!--h3>This Page</h3-->
<ul class="this-page-menu">
<li><a href="../_sources/Howtos/Dynamic-In-Game-Map.md.txt"
<li><a href="../_sources/Howtos/Tutorial-Displaying-Room-Map.md.txt"
rel="nofollow">Show Page Source</a></li>
</ul>
</div><h3>Links</h3>
@ -99,7 +98,7 @@
</ul>
<h3>Versions</h3>
<ul>
<li><a href="Dynamic-In-Game-Map.html">1.0-dev (develop branch)</a></li>
<li><a href="Tutorial-Displaying-Room-Map.html">1.0-dev (develop branch)</a></li>
<ul>
<li><a href="../0.9.5/index.html">0.9.5 (v0.9.5 branch)</a></li>
@ -110,53 +109,44 @@
<div class="bodywrapper">
<div class="body" role="main">
<section class="tex2jax_ignore mathjax_ignore" id="dynamic-in-game-map">
<h1>Dynamic In Game Map<a class="headerlink" href="#dynamic-in-game-map" title="Permalink to this headline"></a></h1>
<section id="introduction">
<h2>Introduction<a class="headerlink" href="#introduction" title="Permalink to this headline"></a></h2>
<p>An often desired feature in a MUD is to show an in-game map to help navigation. The <a class="reference internal" href="../Contribs/Contrib-Mapbuilder.html"><span class="doc std std-doc">Static in-game
map</span></a> tutorial solves this by creating a <em>static</em> map, meaning the map is pre-
drawn once and for all - the rooms are then created to match that map. When walking around, parts of
the static map is then cut out and displayed next to the room description.</p>
<p>In this tutorial well instead do it the other way around; We will dynamically draw the map based on
the relationships we find between already existing rooms.</p>
</section>
<section class="tex2jax_ignore mathjax_ignore" id="show-a-dynamic-map-of-rooms">
<h1>Show a dynamic map of rooms<a class="headerlink" href="#show-a-dynamic-map-of-rooms" title="Permalink to this headline"></a></h1>
<aside class="sidebar">
<p>See also the <a class="reference internal" href="../Contribs/Contrib-Mapbuilder.html"><span class="doc std std-doc">Mapbuilder</span></a> and <a class="reference internal" href="../Contribs/Contrib-XYZGrid.html"><span class="doc std std-doc">XYZGrid</span></a> contribs, which offer alternative ways of both creating and displaying room maps.</p>
</aside>
<p>An often desired feature in a MUD is to show an in-game map to help navigation.</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Forest</span> <span class="n">path</span>
<span class="p">[</span><span class="o">.</span><span class="p">]</span> <span class="p">[</span><span class="o">.</span><span class="p">]</span>
<span class="p">[</span><span class="o">.</span><span class="p">][</span><span class="o">.</span><span class="p">][</span><span class="o">@</span><span class="p">][</span><span class="o">.</span><span class="p">][</span><span class="o">.</span><span class="p">][</span><span class="o">.</span><span class="p">]</span>
<span class="p">[</span><span class="o">.</span><span class="p">]</span> <span class="p">[</span><span class="o">.</span><span class="p">][</span><span class="o">.</span><span class="p">][</span><span class="o">.</span><span class="p">]</span>
<span class="n">The</span> <span class="n">trees</span> <span class="n">are</span> <span class="n">looming</span> <span class="n">over</span> <span class="n">the</span> <span class="n">narrow</span> <span class="n">forest</span> <span class="n">path</span><span class="o">.</span>
<span class="n">Exits</span><span class="p">:</span> <span class="n">East</span><span class="p">,</span> <span class="n">West</span>
</pre></div>
</div>
<section id="the-grid-of-rooms">
<h2>The Grid of Rooms<a class="headerlink" href="#the-grid-of-rooms" title="Permalink to this headline"></a></h2>
<p>There are at least two requirements needed for this tutorial to work.</p>
<ol class="simple">
<li><p>The structure of your mud has to follow a logical layout. Evennia supports the layout of your
world to be logically impossible with rooms looping to themselves or exits leading to the other
side of the map. Exits can also be named anything, from “jumping out the window” to “into the fifth
dimension”. This tutorial assumes you can only move in the cardinal directions (N, E, S and W).</p></li>
<li><p>Rooms must be connected and linked together for the map to be generated correctly. Vanilla
Evennia comes with a admin command <a class="reference internal" href="../api/evennia.commands.default.building.html#evennia.commands.default.building.CmdTunnel" title="evennia.commands.default.building.CmdTunnel"><span class="xref myst py py-class">tunnel</span></a> that allows a
user to create rooms in the cardinal directions, but additional work is needed to assure that rooms
are connected. For example, if you <code class="docutils literal notranslate"><span class="pre">tunnel</span> <span class="pre">east</span></code> and then immediately do <code class="docutils literal notranslate"><span class="pre">tunnel</span> <span class="pre">west</span></code> youll find
that you have created two completely stand-alone rooms. So care is needed if you want to create a
“logical” layout. In this tutorial we assume you have such a grid of rooms that we can generate the
map from.</p></li>
<li><p>The structure of your mud has to follow a logical layout. Evennia supports the layout of your world to be logically impossible with rooms looping to themselves or exits leading to the other side of the map. Exits can also be named anything, from “jumping out the window” to “into the fifth dimension”. This tutorial assumes you can only move in the cardinal directions (N, E, S and W).</p></li>
<li><p>Rooms must be connected and linked together for the map to be generated correctly. Vanilla Evennia comes with a admin command <a class="reference internal" href="../api/evennia.commands.default.building.html#evennia.commands.default.building.CmdTunnel" title="evennia.commands.default.building.CmdTunnel"><span class="xref myst py py-class">tunnel</span></a> that allows a user to create rooms in the cardinal directions, but additional work is needed to assure that rooms are connected. For example, if you <code class="docutils literal notranslate"><span class="pre">tunnel</span> <span class="pre">east</span></code> and then immediately do <code class="docutils literal notranslate"><span class="pre">tunnel</span> <span class="pre">west</span></code> youll find that you have created two completely stand-alone rooms. So care is needed if you want to create a “logical” layout. In this tutorial we assume you have such a grid of rooms that we can generate the map from.</p></li>
</ol>
</section>
<section id="concept">
<h2>Concept<a class="headerlink" href="#concept" title="Permalink to this headline"></a></h2>
<p>Before getting into the code, it is beneficial to understand and conceptualize how this is going to
work. The idea is analogous to a worm that starts at your current position. It chooses a direction
and walks outward from it, mapping its route as it goes. Once it has traveled a pre-set distance
it stops and starts over in another direction. An important note is that we want a system which is
easily callable and not too complicated. Therefore we will wrap this entire code into a custom
Python class (not a typeclass as this doesnt use any core objects from evennia itself).</p>
<p>We are going to create something that displays like this when you type look:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span> <span class="n">Hallway</span>
<p>Before getting into the code, it is beneficial to understand and conceptualize how this is going to work. The idea is analogous to a worm that starts at your current position. It chooses a direction and walks outward from it, mapping its route as it goes. Once it has traveled a pre-set distance it stops and starts over in another direction. An important note is that we want a system which is easily callable and not too complicated. Therefore we will wrap this entire code into a custom Python class (not a typeclass as this doesnt use any core objects from evennia itself). We are going to create something that displays like this when you type look:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Hallway</span>
<span class="p">[</span><span class="o">.</span><span class="p">]</span> <span class="p">[</span><span class="o">.</span><span class="p">]</span>
<span class="p">[</span><span class="o">@</span><span class="p">][</span><span class="o">.</span><span class="p">][</span><span class="o">.</span><span class="p">][</span><span class="o">.</span><span class="p">][</span><span class="o">.</span><span class="p">]</span>
<span class="p">[</span><span class="o">.</span><span class="p">]</span> <span class="p">[</span><span class="o">.</span><span class="p">]</span> <span class="p">[</span><span class="o">.</span><span class="p">]</span>
<span class="p">[</span><span class="o">.</span><span class="p">]</span> <span class="p">[</span><span class="o">.</span><span class="p">]</span>
<span class="p">[</span><span class="o">@</span><span class="p">][</span><span class="o">.</span><span class="p">][</span><span class="o">.</span><span class="p">][</span><span class="o">.</span><span class="p">][</span><span class="o">.</span><span class="p">]</span>
<span class="p">[</span><span class="o">.</span><span class="p">]</span> <span class="p">[</span><span class="o">.</span><span class="p">]</span> <span class="p">[</span><span class="o">.</span><span class="p">]</span>
<span class="n">The</span> <span class="n">distant</span> <span class="n">echoes</span> <span class="n">of</span> <span class="n">the</span> <span class="n">forgotten</span>
<span class="n">wail</span> <span class="n">throughout</span> <span class="n">the</span> <span class="n">empty</span> <span class="n">halls</span><span class="o">.</span>
<span class="n">The</span> <span class="n">distant</span> <span class="n">echoes</span> <span class="n">of</span> <span class="n">the</span> <span class="n">forgotten</span>
<span class="n">wail</span> <span class="n">throughout</span> <span class="n">the</span> <span class="n">empty</span> <span class="n">halls</span><span class="o">.</span>
<span class="n">Exits</span><span class="p">:</span> <span class="n">North</span><span class="p">,</span> <span class="n">East</span><span class="p">,</span> <span class="n">South</span>
<span class="n">Exits</span><span class="p">:</span> <span class="n">North</span><span class="p">,</span> <span class="n">East</span><span class="p">,</span> <span class="n">South</span>
</pre></div>
</div>
<p>Your current location is defined by <code class="docutils literal notranslate"><span class="pre">[&#64;]</span></code> while the <code class="docutils literal notranslate"><span class="pre">[.]</span></code>s are other rooms that the “worm” has seen
@ -164,12 +154,7 @@ since departing from your location.</p>
</section>
<section id="setting-up-the-map-display">
<h2>Setting up the Map Display<a class="headerlink" href="#setting-up-the-map-display" title="Permalink to this headline"></a></h2>
<p>First we must define the components for displaying the map. For the “worm” to know what symbol to
draw on the map we will have it check an Attribute on the room it visits called <code class="docutils literal notranslate"><span class="pre">sector_type</span></code>. For
this tutorial we understand two symbols - a normal room and the room with us in it. We also define a
fallback symbol for rooms without said Attribute - that way the map will still work even if we
didnt prepare the room correctly. Assuming your game folder is named <code class="docutils literal notranslate"><span class="pre">mygame</span></code>, we create this code
in <code class="docutils literal notranslate"><span class="pre">mygame/world/map.py.</span></code></p>
<p>First we must define the components for displaying the map. For the “worm” to know what symbol to draw on the map we will have it check an Attribute on the room it visits called <code class="docutils literal notranslate"><span class="pre">sector_type</span></code>. For this tutorial we understand two symbols - a normal room and the room with us in it. We also define a fallback symbol for rooms without said Attribute - that way the map will still work even if we didnt prepare the room correctly. Assuming your game folder is named <code class="docutils literal notranslate"><span class="pre">mygame</span></code>, we create this code in <code class="docutils literal notranslate"><span class="pre">mygame/world/map.py.</span></code></p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="c1"># in mygame/world/map.py</span>
<span class="c1"># the symbol is identified with a key &quot;sector_type&quot; on the</span>
@ -197,17 +182,11 @@ methods we need.</p>
</div>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">self.caller</span></code> is normally your Character object, the one using the map.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">self.max_width/length</span></code> determine the max width and length of the map that will be generated. Note
that its important that these variables are set to <em>odd</em> numbers to make sure the display area has
a center point.</p></li>
<li><p><code class="docutils literal notranslate"> <span class="pre">self.worm_has_mapped</span></code> is building off the worm analogy above. This dictionary will store all
rooms the “worm” has mapped as well as its relative position within the grid. This is the most
important variable as it acts as a checker and address book that is able to tell us where the
worm has been and what it has mapped so far.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">self.max_width/length</span></code> determine the max width and length of the map that will be generated. Note that its important that these variables are set to <em>odd</em> numbers to make sure the display area has a center point.</p></li>
<li><p><code class="docutils literal notranslate"> <span class="pre">self.worm_has_mapped</span></code> is building off the worm analogy above. This dictionary will store all rooms the “worm” has mapped as well as its relative position within the grid. This is the most important variable as it acts as a checker and address book that is able to tell us where the worm has been and what it has mapped so far.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">self.curX/Y</span></code> are coordinates representing the worms current location on the grid.</p></li>
</ul>
<p>Before any sort of mapping can actually be done we need to create an empty display area and do some
sanity checks on it by using the following methods.</p>
<p>Before any sort of mapping can actually be done we need to create an empty display area and do some sanity checks on it by using the following methods.</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="c1"># in mygame/world/map.py</span>
<span class="k">class</span> <span class="nc">Map</span><span class="p">(</span><span class="nb">object</span><span class="p">):</span>
@ -230,8 +209,7 @@ sanity checks on it by using the following methods.</p>
<span class="k">else</span> <span class="kc">False</span>
</pre></div>
</div>
<p>Before we can set our worm on its way, we need to know some of the computer science behind all this
called Graph Traversing. In Pseudo code what we are trying to accomplish is this:</p>
<p>Before we can set our worm on its way, we need to know some of the computer science behind all this called Graph Traversing. In Pseudo code what we are trying to accomplish is this:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="c1"># pseudo code</span>
<span class="k">def</span> <span class="nf">draw_room_on_map</span><span class="p">(</span><span class="n">room</span><span class="p">,</span> <span class="n">max_distance</span><span class="p">):</span>
@ -252,35 +230,25 @@ called Graph Traversing. In Pseudo code what we are trying to accomplish i
<p>The beauty of Python is that our actual code of doing this doesnt differ much if at all from this
Pseudo code example.</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">max_distance</span></code> is a variable indicating to our Worm how many rooms AWAY from your current location
will it map. Obviously the larger the number the more time it will take if your current location has
many many rooms around you.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">max_distance</span></code> is a variable indicating to our Worm how many rooms AWAY from your current location will it map. Obviously the larger the number the more time it will take if your current location has many many rooms around you.</p></li>
</ul>
<p>The first hurdle here is what value to use for max_distance. There is no reason for the worm to
travel further than what is actually displayed to you. For example, if your current location is
placed in the center of a display area of size <code class="docutils literal notranslate"><span class="pre">max_length</span> <span class="pre">=</span> <span class="pre">max_width</span> <span class="pre">=</span> <span class="pre">9</span></code>, then the worm need only
<p>The first hurdle here is what value to use for max_distance. There is no reason for the worm to travel further than what is actually displayed to you. For example, if your current location is placed in the center of a display area of size <code class="docutils literal notranslate"><span class="pre">max_length</span> <span class="pre">=</span> <span class="pre">max_width</span> <span class="pre">=</span> <span class="pre">9</span></code>, then the worm need only
go <code class="docutils literal notranslate"><span class="pre">4</span></code> spaces in either direction:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">[</span><span class="o">.</span><span class="p">][</span><span class="o">.</span><span class="p">][</span><span class="o">.</span><span class="p">][</span><span class="o">.</span><span class="p">][</span><span class="o">@</span><span class="p">][</span><span class="o">.</span><span class="p">][</span><span class="o">.</span><span class="p">][</span><span class="o">.</span><span class="p">][</span><span class="o">.</span><span class="p">]</span>
<span class="mi">4</span> <span class="mi">3</span> <span class="mi">2</span> <span class="mi">1</span> <span class="mi">0</span> <span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span> <span class="mi">4</span>
</pre></div>
</div>
<p>The <code class="docutils literal notranslate"><span class="pre">max_distance</span></code> can be set dynamically based on the size of the display area. As your width/length
changes it becomes a simple algebraic linear relationship which is simply <code class="docutils literal notranslate"><span class="pre">max_distance</span> <span class="pre">=</span> <span class="pre">(min(max_width,</span> <span class="pre">max_length)</span> <span class="pre">-1)</span> <span class="pre">/</span> <span class="pre">2</span></code>.</p>
<p>The <code class="docutils literal notranslate"><span class="pre">max_distance</span></code> can be set dynamically based on the size of the display area. As your width/length changes it becomes a simple algebraic linear relationship which is simply <code class="docutils literal notranslate"><span class="pre">max_distance</span> <span class="pre">=</span> <span class="pre">(min(max_width,</span> <span class="pre">max_length)</span> <span class="pre">-1)</span> <span class="pre">/</span> <span class="pre">2</span></code>.</p>
</section>
<section id="building-the-mapper">
<h2>Building the Mapper<a class="headerlink" href="#building-the-mapper" title="Permalink to this headline"></a></h2>
<p>Now we can start to fill our Map object with some methods. We are still missing a few methods that
are very important:</p>
<p>Now we can start to fill our Map object with some methods. We are still missing a few methods that are very important:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">self.draw(self,</span> <span class="pre">room)</span></code> - responsible for actually drawing room to grid.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">self.has_drawn(self,</span> <span class="pre">room)</span></code> - checks to see if the room has been mapped and worm has already been
here.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">self.median(self,</span> <span class="pre">number)</span></code> - a simple utility method that finds the median (middle point) from 0,
n</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">self.update_pos(self,</span> <span class="pre">room,</span> <span class="pre">exit_name)</span></code> - updates the worms physical position by reassigning
self.curX/Y. .accordingly</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">self.start_loc_on_grid(self)</span></code> - the very first initial draw on the grid representing your
location in the middle of the grid</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">self.has_drawn(self,</span> <span class="pre">room)</span></code> - checks to see if the room has been mapped and worm has already been here.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">self.median(self,</span> <span class="pre">number)</span></code> - a simple utility method that finds the median (middle point) from <code class="docutils literal notranslate"><span class="pre">0,</span> <span class="pre">n</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">self.update_pos(self,</span> <span class="pre">room,</span> <span class="pre">exit_name)</span></code> - updates the worms physical position by reassigning <code class="docutils literal notranslate"><span class="pre">self.curX/Y</span></code> accordingly.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">self.start_loc_on_grid(self)</span></code> - the very first initial draw on the grid representing your location in the middle of the grid.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">self.show_map</span></code> - after everything is done convert the map into a readable string</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">self.draw_room_on_map(self,</span> <span class="pre">room,</span> <span class="pre">max_distance)</span></code> - the main method that ties it all together.</p></li>
</ul>
@ -307,10 +275,8 @@ conditional statements and set it up to start building the display.</p>
</pre></div>
</div>
<p>Here we check to see if the parameters for the grid are okay, then we create an empty canvas and map
our initial location as the first room!</p>
<p>As mentioned above, the code for the <code class="docutils literal notranslate"><span class="pre">self.draw_room_on_map()</span></code> is not much different than the Pseudo
code. The method is shown below:</p>
<p>Here we check to see if the parameters for the grid are okay, then we create an empty canvas and map our initial location as the first room!</p>
<p>As mentioned above, the code for the <code class="docutils literal notranslate"><span class="pre">self.draw_room_on_map()</span></code> is not much different than the Pseudo code. The method is shown below:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="c1"># in mygame/world/map.py, in the Map class</span>
<span class="k">def</span> <span class="nf">draw_room_on_map</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">room</span><span class="p">,</span> <span class="n">max_distance</span><span class="p">):</span>
@ -431,22 +397,9 @@ presentational string out of it using the <code class="docutils literal notransl
<span class="k">return</span> <span class="n">string</span>
</pre></div>
</div>
<p>Obviously this method of generating maps doesnt take into account of any doors or exits that are
hidden… etc… but hopefully it serves as a good base to start with. Like previously mentioned, it
is very important to have a solid foundation on rooms before implementing this. You can try this on
vanilla evennia by using &#64;tunnel and essentially you can just create a long straight/edgy non-
looping rooms that will show on your in-game map.</p>
<p>The above example will display the map above the room description. You could also use an
<a class="reference external" href="https://github.com/evennia/evennia/blob/master/evennia.utils.evtable">EvTable</a> to place description and map next to each other. Some other
things you can do is to have a <a class="reference internal" href="../Components/Commands.html"><span class="doc std std-doc">Command</span></a> that displays with a larger radius, maybe with a
legend and other features.</p>
<p>Below is the whole <code class="docutils literal notranslate"><span class="pre">map.py</span></code> for your reference. You need to update your <code class="docutils literal notranslate"><span class="pre">Room</span></code> typeclass (see above)
to actually call it. Remember that to see different symbols for a location you also need to set the
<code class="docutils literal notranslate"><span class="pre">sector_type</span></code> Attribute on the room to one of the keys in the <code class="docutils literal notranslate"><span class="pre">SYMBOLS</span></code> dictionary. So in this
example, to make a room be mapped as <code class="docutils literal notranslate"><span class="pre">[.]</span></code> you would set the rooms <code class="docutils literal notranslate"><span class="pre">sector_type</span></code> to
<code class="docutils literal notranslate"><span class="pre">&quot;SECT_INSIDE&quot;</span></code>. Try it out with <code class="docutils literal notranslate"><span class="pre">&#64;set</span> <span class="pre">here/sector_type</span> <span class="pre">=</span> <span class="pre">&quot;SECT_INSIDE&quot;</span></code>. If you wanted all new
rooms to have a given sector symbol, you could change the default in the <code class="docutils literal notranslate"><span class="pre">SYMBOLS</span></code> dictionary below,
or you could add the Attribute in the Rooms <code class="docutils literal notranslate"><span class="pre">at_object_creation</span></code> method.</p>
<p>Obviously this method of generating maps doesnt take into account of any doors or exits that are hidden… etc… but hopefully it serves as a good base to start with. Like previously mentioned, it is very important to have a solid foundation on rooms before implementing this. You can try this on vanilla evennia by using &#64;tunnel and essentially you can just create a long straight/edgy non- looping rooms that will show on your in-game map.</p>
<p>The above example will display the map above the room description. You could also use an <a class="reference external" href="https://github.com/evennia/evennia/blob/master/evennia.utils.evtable">EvTable</a> to place description and map next to each other. Some other things you can do is to have a <a class="reference internal" href="../Components/Commands.html"><span class="doc std std-doc">Command</span></a> that displays with a larger radius, maybe with a legend and other features.</p>
<p>Below is the whole <code class="docutils literal notranslate"><span class="pre">map.py</span></code> for your reference. You need to update your <code class="docutils literal notranslate"><span class="pre">Room</span></code> typeclass (see above) to actually call it. Remember that to see different symbols for a location you also need to set the <code class="docutils literal notranslate"><span class="pre">sector_type</span></code> Attribute on the room to one of the keys in the <code class="docutils literal notranslate"><span class="pre">SYMBOLS</span></code> dictionary. So in this example, to make a room be mapped as <code class="docutils literal notranslate"><span class="pre">[.]</span></code> you would set the rooms <code class="docutils literal notranslate"><span class="pre">sector_type</span></code> to <code class="docutils literal notranslate"><span class="pre">&quot;SECT_INSIDE&quot;</span></code>. Try it out with <code class="docutils literal notranslate"><span class="pre">&#64;set</span> <span class="pre">here/sector_type</span> <span class="pre">=</span> <span class="pre">&quot;SECT_INSIDE&quot;</span></code>. If you wanted all new rooms to have a given sector symbol, you could change the default in the <code class="docutils literal notranslate"><span class="pre">SYMBOLS</span></code> dictionary below, or you could add the Attribute in the Rooms <code class="docutils literal notranslate"><span class="pre">at_object_creation</span></code> method.</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="c1"># mygame/world/map.py</span>
<span class="c1"># These are keys set with the Attribute sector_type on the room.</span>
@ -587,14 +540,14 @@ also look into up/down directions and figure out how to display that in a good w
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="Static-In-Game-Map.html" title="Static In Game Map"
<a href="Web-Changing-Webpage.html" title="Changing the Game Website"
>next</a> |</li>
<li class="right" >
<a href="Tutorial-Coordinates.html" title="Coordinates"
<a href="Tutorial-Coordinates.html" title="Adding room coordinates to your game"
>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-1"><a href="Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Dynamic In Game Map</a></li>
<li class="nav-item nav-item-this"><a href="">Show a dynamic map of rooms</a></li>
</ul>
<div class="develop">develop branch</div>
</div>

View file

@ -17,7 +17,7 @@
<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="Building a mech tutorial" href="Building-a-mech-tutorial.html" />
<link rel="next" title="Building a giant mech" href="Tutorial-Building-a-Mech.html" />
<link rel="prev" title="NPCs reacting to your presence" href="Tutorial-NPC-Reacting.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
@ -30,7 +30,7 @@
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="Building-a-mech-tutorial.html" title="Building a mech tutorial"
<a href="Tutorial-Building-a-Mech.html" title="Building a giant mech"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="Tutorial-NPC-Reacting.html" title="NPCs reacting to your presence"
@ -74,8 +74,8 @@
<p class="topless"><a href="Tutorial-NPC-Reacting.html"
title="previous chapter">NPCs reacting to your presence</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="Building-a-mech-tutorial.html"
title="next chapter">Building a mech tutorial</a></p>
<p class="topless"><a href="Tutorial-Building-a-Mech.html"
title="next chapter">Building a giant mech</a></p>
<div role="note" aria-label="source link">
<!--h3>This Page</h3-->
<ul class="this-page-menu">
@ -367,7 +367,7 @@ _________________________________________________________
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="Building-a-mech-tutorial.html" title="Building a mech tutorial"
<a href="Tutorial-Building-a-Mech.html" title="Building a giant mech"
>next</a> |</li>
<li class="right" >
<a href="Tutorial-NPC-Reacting.html" title="NPCs reacting to your presence"

View file

@ -18,7 +18,7 @@
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Understanding Color Tags" href="Tutorial-Understanding-Color-Tags.html" />
<link rel="prev" title="Extending the REST API" href="Web-Extending-the-REST-API.html" />
<link rel="prev" title="Automatically Tweet game stats" href="Web-Tweeting-Game-Stats.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
@ -33,7 +33,7 @@
<a href="Tutorial-Understanding-Color-Tags.html" title="Understanding Color Tags"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="Web-Extending-the-REST-API.html" title="Extending the REST API"
<a href="Web-Tweeting-Game-Stats.html" title="Automatically Tweet game stats"
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-1"><a href="Howtos-Overview.html" accesskey="U">Tutorials and Howtos</a> &#187;</li>
@ -84,15 +84,15 @@
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="Web-Extending-the-REST-API.html"
title="previous chapter">Extending the REST API</a></p>
<p class="topless"><a href="Web-Tweeting-Game-Stats.html"
title="previous chapter">Automatically Tweet game stats</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="Tutorial-Understanding-Color-Tags.html"
title="next chapter">Understanding Color Tags</a></p>
<div role="note" aria-label="source link">
<!--h3>This Page</h3-->
<ul class="this-page-menu">
<li><a href="../_sources/Howtos/Parsing-commands-tutorial.md.txt"
<li><a href="../_sources/Howtos/Tutorial-Parsing-Commands.md.txt"
rel="nofollow">Show Page Source</a></li>
</ul>
</div><h3>Links</h3>
@ -108,7 +108,7 @@
</ul>
<h3>Versions</h3>
<ul>
<li><a href="Parsing-commands-tutorial.html">1.0-dev (develop branch)</a></li>
<li><a href="Tutorial-Parsing-Commands.html">1.0-dev (develop branch)</a></li>
<ul>
<li><a href="../0.9.5/index.html">0.9.5 (v0.9.5 branch)</a></li>
@ -158,8 +158,7 @@ you would have trouble communicating with others in the game. One would need to
command for every kind of word or sentence, which is, of course, not practical.</p>
<p>Last thing: what is parsing?</p>
<blockquote>
<div><p>In our case, parsing is the process by which we convert command arguments into something we can
work with.</p>
<div><p>In our case, parsing is the process by which we convert command arguments into something we can work with.</p>
</div></blockquote>
<p>We dont usually use the command argument as is (which is just text, of type <code class="docutils literal notranslate"><span class="pre">str</span></code> in Python). We
need to extract useful information. We might want to ask the user for a number, or the name of
@ -838,7 +837,7 @@ code.</p>
<a href="Tutorial-Understanding-Color-Tags.html" title="Understanding Color Tags"
>next</a> |</li>
<li class="right" >
<a href="Web-Extending-the-REST-API.html" title="Extending the REST API"
<a href="Web-Tweeting-Game-Stats.html" title="Automatically Tweet game stats"
>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-1"><a href="Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>

View file

@ -17,8 +17,8 @@
<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="Gametime Tutorial" href="Gametime-Tutorial.html" />
<link rel="prev" title="Tutorial Vehicles" href="Tutorial-Vehicles.html" />
<link rel="next" title="Changing game calendar and time speed" href="Howto-Game-Time.html" />
<link rel="prev" title="Building a train that moves" href="Tutorial-Building-a-Train.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
@ -30,10 +30,10 @@
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="Gametime-Tutorial.html" title="Gametime Tutorial"
<a href="Howto-Game-Time.html" title="Changing game calendar and time speed"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="Tutorial-Vehicles.html" title="Tutorial Vehicles"
<a href="Tutorial-Building-a-Train.html" title="Building a train that moves"
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-1"><a href="Howtos-Overview.html" accesskey="U">Tutorials and Howtos</a> &#187;</li>
@ -75,11 +75,11 @@
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="Tutorial-Vehicles.html"
title="previous chapter">Tutorial Vehicles</a></p>
<p class="topless"><a href="Tutorial-Building-a-Train.html"
title="previous chapter">Building a train that moves</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="Gametime-Tutorial.html"
title="next chapter">Gametime Tutorial</a></p>
<p class="topless"><a href="Howto-Game-Time.html"
title="next chapter">Changing game calendar and time speed</a></p>
<div role="note" aria-label="source link">
<!--h3>This Page</h3-->
<ul class="this-page-menu">
@ -342,10 +342,10 @@ repository.</p>
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="Gametime-Tutorial.html" title="Gametime Tutorial"
<a href="Howto-Game-Time.html" title="Changing game calendar and time speed"
>next</a> |</li>
<li class="right" >
<a href="Tutorial-Vehicles.html" title="Tutorial Vehicles"
<a href="Tutorial-Building-a-Train.html" title="Building a train that moves"
>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-1"><a href="Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>

View file

@ -18,7 +18,7 @@
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Evennia for roleplaying sessions" href="Evennia-for-roleplaying-sessions.html" />
<link rel="prev" title="Parsing command arguments, theory and best practices" href="Parsing-commands-tutorial.html" />
<link rel="prev" title="Parsing command arguments, theory and best practices" href="Tutorial-Parsing-Commands.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
@ -33,7 +33,7 @@
<a href="Evennia-for-roleplaying-sessions.html" title="Evennia for roleplaying sessions"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="Parsing-commands-tutorial.html" title="Parsing command arguments, theory and best practices"
<a href="Tutorial-Parsing-Commands.html" title="Parsing command arguments, theory and best practices"
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-1"><a href="Howtos-Overview.html" accesskey="U">Tutorials and Howtos</a> &#187;</li>
@ -72,7 +72,7 @@
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="Parsing-commands-tutorial.html"
<p class="topless"><a href="Tutorial-Parsing-Commands.html"
title="previous chapter">Parsing command arguments, theory and best practices</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="Evennia-for-roleplaying-sessions.html"
@ -284,7 +284,7 @@ push it over the limit, so to speak.</p>
<a href="Evennia-for-roleplaying-sessions.html" title="Evennia for roleplaying sessions"
>next</a> |</li>
<li class="right" >
<a href="Parsing-commands-tutorial.html" title="Parsing command arguments, theory and best practices"
<a href="Tutorial-Parsing-Commands.html" title="Parsing command arguments, theory and best practices"
>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-1"><a href="Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>

View file

@ -6,7 +6,7 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<title>Arxcode installing help &#8212; Evennia 1.0-dev documentation</title>
<title>Using the Arxcode game dir &#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>
@ -37,7 +37,7 @@
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-1"><a href="Howtos-Overview.html" accesskey="U">Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Arxcode installing help</a></li>
<li class="nav-item nav-item-this"><a href="">Using the Arxcode game dir</a></li>
</ul>
<div class="develop">develop branch</div>
</div>
@ -62,7 +62,7 @@
<script>$('#searchbox').show(0);</script>
<h3><a href="../index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Arxcode installing help</a><ul>
<li><a class="reference internal" href="#">Using the Arxcode game dir</a><ul>
<li><a class="reference internal" href="#installing-evennia">Installing Evennia</a></li>
<li><a class="reference internal" href="#installing-arxcode">Installing Arxcode</a><ul>
<li><a class="reference internal" href="#clean-up-settings">Clean up settings</a></li>
@ -86,7 +86,7 @@
<div role="note" aria-label="source link">
<!--h3>This Page</h3-->
<ul class="this-page-menu">
<li><a href="../_sources/Howtos/Arxcode-Installation.md.txt"
<li><a href="../_sources/Howtos/Tutorial-Using-Arxcode.md.txt"
rel="nofollow">Show Page Source</a></li>
</ul>
</div><h3>Links</h3>
@ -102,7 +102,7 @@
</ul>
<h3>Versions</h3>
<ul>
<li><a href="Arxcode-Installation.html">1.0-dev (develop branch)</a></li>
<li><a href="Tutorial-Using-Arxcode.html">1.0-dev (develop branch)</a></li>
<ul>
<li><a href="../0.9.5/index.html">0.9.5 (v0.9.5 branch)</a></li>
@ -113,8 +113,8 @@
<div class="bodywrapper">
<div class="body" role="main">
<section class="tex2jax_ignore mathjax_ignore" id="arxcode-installing-help">
<h1>Arxcode installing help<a class="headerlink" href="#arxcode-installing-help" title="Permalink to this headline"></a></h1>
<section class="tex2jax_ignore mathjax_ignore" id="using-the-arxcode-game-dir">
<h1>Using the Arxcode game dir<a class="headerlink" href="#using-the-arxcode-game-dir" title="Permalink to this headline"></a></h1>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>Arxcode is separately maintained.</p>
@ -351,7 +351,7 @@ on localhost at port 4000, and the webserver at <a class="reference external" hr
>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-1"><a href="Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Arxcode installing help</a></li>
<li class="nav-item nav-item-this"><a href="">Using the Arxcode game dir</a></li>
</ul>
<div class="develop">develop branch</div>
</div>

View file

@ -6,7 +6,7 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<title>Weather Tutorial &#8212; Evennia 1.0-dev documentation</title>
<title>Adding Weather messages to a Room &#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>
@ -17,8 +17,8 @@
<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="Coordinates" href="Tutorial-Coordinates.html" />
<link rel="prev" title="Gametime Tutorial" href="Gametime-Tutorial.html" />
<link rel="next" title="Adding room coordinates to your game" href="Tutorial-Coordinates.html" />
<link rel="prev" title="Changing game calendar and time speed" href="Howto-Game-Time.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
@ -30,14 +30,14 @@
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="Tutorial-Coordinates.html" title="Coordinates"
<a href="Tutorial-Coordinates.html" title="Adding room coordinates to your game"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="Gametime-Tutorial.html" title="Gametime Tutorial"
<a href="Howto-Game-Time.html" title="Changing game calendar and time speed"
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-1"><a href="Howtos-Overview.html" accesskey="U">Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Weather Tutorial</a></li>
<li class="nav-item nav-item-this"><a href="">Adding Weather messages to a Room</a></li>
</ul>
<div class="develop">develop branch</div>
</div>
@ -61,15 +61,15 @@
</div>
<script>$('#searchbox').show(0);</script>
<h4>Previous topic</h4>
<p class="topless"><a href="Gametime-Tutorial.html"
title="previous chapter">Gametime Tutorial</a></p>
<p class="topless"><a href="Howto-Game-Time.html"
title="previous chapter">Changing game calendar and time speed</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="Tutorial-Coordinates.html"
title="next chapter">Coordinates</a></p>
title="next chapter">Adding room coordinates to your game</a></p>
<div role="note" aria-label="source link">
<!--h3>This Page</h3-->
<ul class="this-page-menu">
<li><a href="../_sources/Howtos/Weather-Tutorial.md.txt"
<li><a href="../_sources/Howtos/Tutorial-Weather-Effects.md.txt"
rel="nofollow">Show Page Source</a></li>
</ul>
</div><h3>Links</h3>
@ -85,7 +85,7 @@
</ul>
<h3>Versions</h3>
<ul>
<li><a href="Weather-Tutorial.html">1.0-dev (develop branch)</a></li>
<li><a href="Tutorial-Weather-Effects.html">1.0-dev (develop branch)</a></li>
<ul>
<li><a href="../0.9.5/index.html">0.9.5 (v0.9.5 branch)</a></li>
@ -96,23 +96,33 @@
<div class="bodywrapper">
<div class="body" role="main">
<section class="tex2jax_ignore mathjax_ignore" id="weather-tutorial">
<h1>Weather Tutorial<a class="headerlink" href="#weather-tutorial" title="Permalink to this headline"></a></h1>
<p>This tutorial will have us create a simple weather system for our MUD. The way we want to use this
is to have all outdoor rooms echo weather-related messages to the room at regular and semi-random
intervals. Things like “Clouds gather above”, “It starts to rain” and so on.</p>
<p>One could imagine every outdoor room in the game having a script running on themselves that fires
regularly. For this particular example it is however more efficient to do it another way, namely by
using a “ticker-subscription” model. The principle is simple: Instead of having each Object
individually track the time, they instead subscribe to be called by a global ticker who handles time
keeping. Not only does this centralize and organize much of the code in one place, it also has less
computing overhead.</p>
<p>Evennia offers the <a class="reference internal" href="../Components/TickerHandler.html"><span class="doc std std-doc">TickerHandler</span></a> specifically for using the subscription model. We
will use it for our weather system.</p>
<p>We will assume you know how to make your own Typeclasses. If not see one of the beginning tutorials.
We will create a new WeatherRoom typeclass that is aware of the day-night cycle.</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span>
<span class="kn">import</span> <span class="nn">random</span>
<section class="tex2jax_ignore mathjax_ignore" id="adding-weather-messages-to-a-room">
<h1>Adding Weather messages to a Room<a class="headerlink" href="#adding-weather-messages-to-a-room" title="Permalink to this headline"></a></h1>
<p>This tutorial will have us create a simple weather system for our MUD. The way we want to use this is to have all outdoor rooms echo weather-related messages to the room at regular and semi-random intervals. Things like “Clouds gather above”, “It starts to rain” and so on.</p>
<p>One could imagine every outdoor room in the game having a script running on themselves that fires regularly. For this particular example it is however more efficient to do it another way, namely by using a “ticker-subscription” model.</p>
<p>The principle is simple: Instead of having each Object individually track the time, they instead subscribe to be called by a global ticker who handles time keeping. Not only does this centralize and organize much of the code in one place, it also has less computing overhead.</p>
<p>Evennias <a class="reference internal" href="../Components/TickerHandler.html"><span class="doc std std-doc">TickerHandler</span></a> specifically offers such a subscription model. We will use it for our weather system.</p>
<p>We will create a new WeatherRoom typeclass that is aware of the day-night cycle.</p>
<div class="highlight-python notranslate"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal"> 1</span>
<span class="normal"> 2</span>
<span class="normal"> 3</span>
<span class="normal"> 4</span>
<span class="normal"> 5</span>
<span class="normal"> 6</span>
<span class="normal"> 7</span>
<span class="normal"> 8</span>
<span class="normal"> 9</span>
<span class="normal">10</span>
<span class="normal">11</span>
<span class="normal">12</span>
<span class="normal">13</span>
<span class="normal">14</span>
<span class="normal">15</span>
<span class="normal">16</span>
<span class="normal">17</span>
<span class="normal">18</span>
<span class="normal">19</span>
<span class="normal">20</span></pre></div></td><td class="code"><div><pre><span></span> <span class="kn">import</span> <span class="nn">random</span>
<span class="kn">from</span> <span class="nn">evennia</span> <span class="kn">import</span> <span class="n">DefaultRoom</span><span class="p">,</span> <span class="n">TICKER_HANDLER</span>
<span class="n">ECHOES</span> <span class="o">=</span> <span class="p">[</span><span class="s2">&quot;The sky is clear.&quot;</span><span class="p">,</span>
@ -132,7 +142,7 @@ We will create a new WeatherRoom typeclass that is aware of the day-night cycle.
<span class="s2">&quot;ticked at regular intervals&quot;</span>
<span class="n">echo</span> <span class="o">=</span> <span class="n">random</span><span class="o">.</span><span class="n">choice</span><span class="p">(</span><span class="n">ECHOES</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">msg_contents</span><span class="p">(</span><span class="n">echo</span><span class="p">)</span>
</pre></div>
</pre></div></td></tr></table></div>
</div>
<p>In the <code class="docutils literal notranslate"><span class="pre">at_object_creation</span></code> method, we simply added ourselves to the TickerHandler and tell it to
call <code class="docutils literal notranslate"><span class="pre">at_weather_update</span></code> every hour (<code class="docutils literal notranslate"><span class="pre">60*60</span></code> seconds). During testing you might want to play with a
@ -160,14 +170,14 @@ weather came before it. Expanding it to be more realistic is a useful exercise.<
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="Tutorial-Coordinates.html" title="Coordinates"
<a href="Tutorial-Coordinates.html" title="Adding room coordinates to your game"
>next</a> |</li>
<li class="right" >
<a href="Gametime-Tutorial.html" title="Gametime Tutorial"
<a href="Howto-Game-Time.html" title="Changing game calendar and time speed"
>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-1"><a href="Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Weather Tutorial</a></li>
<li class="nav-item nav-item-this"><a href="">Adding Weather messages to a Room</a></li>
</ul>
<div class="develop">develop branch</div>
</div>

View file

@ -130,7 +130,7 @@
focused on free form storytelling. Even if you are not interested in MUSH:es, this is still a good
first game-type to try since its not so code heavy. You will be able to use the same principles for
building other types of games.</p>
<p>The tutorial starts from scratch. If you did the <a class="reference internal" href="Beginner-Tutorial/Part1/Beginner-Tutorial-Part1-Intro.html"><span class="doc std std-doc">First Steps Coding</span></a> tutorial
<p>The tutorial starts from scratch. If you did the <a class="reference internal" href="Beginner-Tutorial/Part1/Beginner-Tutorial-Part1-Overview.html"><span class="doc std std-doc">First Steps Coding</span></a> tutorial
already you should have some ideas about how to do some of the steps already.</p>
<p>The following are the (very simplistic and cut-down) features we will implement (this was taken from
a feature request from a MUSH user new to Evennia). A Character in this system should:</p>

View file

@ -18,7 +18,7 @@
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Web Character Generation" href="Web-Character-Generation.html" />
<link rel="prev" title="Tutorial Tweeting Game Stats" href="Tutorial-Tweeting-Game-Stats.html" />
<link rel="prev" title="Changing the Game Website" href="Web-Changing-Webpage.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
@ -33,7 +33,7 @@
<a href="Web-Character-Generation.html" title="Web Character Generation"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="Tutorial-Tweeting-Game-Stats.html" title="Tutorial Tweeting Game Stats"
<a href="Web-Changing-Webpage.html" title="Changing the Game Website"
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-1"><a href="Howtos-Overview.html" accesskey="U">Tutorials and Howtos</a> &#187;</li>
@ -81,8 +81,8 @@
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="Tutorial-Tweeting-Game-Stats.html"
title="previous chapter">Tutorial Tweeting Game Stats</a></p>
<p class="topless"><a href="Web-Changing-Webpage.html"
title="previous chapter">Changing the Game Website</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="Web-Character-Generation.html"
title="next chapter">Web Character Generation</a></p>
@ -119,7 +119,7 @@
<section class="tex2jax_ignore mathjax_ignore" id="add-a-wiki-on-your-website">
<h1>Add a wiki on your website<a class="headerlink" href="#add-a-wiki-on-your-website" title="Permalink to this headline"></a></h1>
<p><strong>Before doing this tutorial you will probably want to read the intro in
<a class="reference internal" href="Beginner-Tutorial/Part5/Web-Tutorial.html"><span class="doc std std-doc">Basic Web tutorial</span></a>.</strong> Reading the three first parts of the
<a class="reference internal" href="Web-Changing-Webpage.html"><span class="doc std std-doc">Basic Web tutorial</span></a>.</strong> Reading the three first parts of the
<a class="reference external" href="https://docs.djangoproject.com/en/1.9/intro/tutorial01/">Django tutorial</a> might help as well.</p>
<p>This tutorial will provide a step-by-step process to installing a wiki on your website.
Fortunately, you dont have to create the features manually, since it has been done by others, and
@ -331,7 +331,7 @@ solution for connecting the Evennia permission levels to wiki access, this is th
<a href="Web-Character-Generation.html" title="Web Character Generation"
>next</a> |</li>
<li class="right" >
<a href="Tutorial-Tweeting-Game-Stats.html" title="Tutorial Tweeting Game Stats"
<a href="Web-Changing-Webpage.html" title="Changing the Game Website"
>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-1"><a href="Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>

View file

@ -6,40 +6,38 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<title>2. Web Tutorial &#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="Adding a Command Prompt" href="../../Howto-Command-Prompt.html" />
<link rel="prev" title="1. Add a simple new web page" href="Add-a-simple-new-web-page.html" />
<title>Changing the Game Website &#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="Add a wiki on your website" href="Web-Add-a-wiki.html" />
<link rel="prev" title="Show a dynamic map of rooms" href="Tutorial-Displaying-Room-Map.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"
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../../../py-modindex.html" title="Python Module Index"
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="../../Howto-Command-Prompt.html" title="Adding a Command Prompt"
<a href="Web-Add-a-wiki.html" title="Add a wiki on your website"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="Add-a-simple-new-web-page.html" title="1. Add a simple new web page"
<a href="Tutorial-Displaying-Room-Map.html" title="Show a dynamic map of rooms"
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-1"><a href="../../Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Intro.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part5-Intro.html" accesskey="U">Part 5: Showing the world</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><span class="section-number">2. </span>Web Tutorial</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-1"><a href="Howtos-Overview.html" accesskey="U">Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Changing the Game Website</a></li>
</ul>
<div class="develop">develop branch</div>
</div>
@ -49,40 +47,40 @@
<div class="documentwrapper">
<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"/>
<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">
<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>
<h3><a href="../../../index.html">Table of Contents</a></h3>
<h3><a href="../index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">2. Web Tutorial</a><ul>
<li><a class="reference internal" href="#a-basic-overview">2.1. A Basic Overview</a></li>
<li><a class="reference internal" href="#changing-the-logo-on-the-front-page">2.2. Changing the logo on the front page</a></li>
<li><a class="reference internal" href="#changing-the-front-pages-text">2.3. Changing the Front Pages Text</a></li>
<li><a class="reference internal" href="#further-reading">2.4. Further reading</a></li>
<li><a class="reference internal" href="#">Changing the Game Website</a><ul>
<li><a class="reference internal" href="#a-basic-overview">A Basic Overview</a></li>
<li><a class="reference internal" href="#changing-the-logo-on-the-front-page">Changing the logo on the front page</a></li>
<li><a class="reference internal" href="#changing-the-front-pages-text">Changing the Front Pages Text</a></li>
<li><a class="reference internal" href="#further-reading">Further reading</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="Add-a-simple-new-web-page.html"
title="previous chapter"><span class="section-number">1. </span>Add a simple new web page</a></p>
<p class="topless"><a href="Tutorial-Displaying-Room-Map.html"
title="previous chapter">Show a dynamic map of rooms</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="../../Howto-Command-Prompt.html"
title="next chapter">Adding a Command Prompt</a></p>
<p class="topless"><a href="Web-Add-a-wiki.html"
title="next chapter">Add a wiki on your website</a></p>
<div role="note" aria-label="source link">
<!--h3>This Page</h3-->
<ul class="this-page-menu">
<li><a href="../../../_sources/Howtos/Beginner-Tutorial/Part5/Web-Tutorial.md.txt"
<li><a href="../_sources/Howtos/Web-Changing-Webpage.md.txt"
rel="nofollow">Show Page Source</a></li>
</ul>
</div><h3>Links</h3>
@ -98,7 +96,7 @@
</ul>
<h3>Versions</h3>
<ul>
<li><a href="Web-Tutorial.html">1.0-dev (develop branch)</a></li>
<li><a href="Web-Changing-Webpage.html">1.0-dev (develop branch)</a></li>
<ul>
<li><a href="../0.9.5/index.html">0.9.5 (v0.9.5 branch)</a></li>
@ -109,36 +107,22 @@
<div class="bodywrapper">
<div class="body" role="main">
<section class="tex2jax_ignore mathjax_ignore" id="web-tutorial">
<h1><span class="section-number">2. </span>Web Tutorial<a class="headerlink" href="#web-tutorial" title="Permalink to this headline"></a></h1>
<p>Evennia uses the <a class="reference external" href="https://www.djangoproject.com/">Django</a> web framework as the basis of both its
database configuration and the website it provides. While a full understanding of Django requires
reading the Django documentation, we have provided this tutorial to get you running with the basics
and how they pertain to Evennia. This text details getting everything set up. The
<a class="reference internal" href="../../Web-Character-View-Tutorial.html"><span class="doc std std-doc">Web-based Character view Tutorial</span></a> gives a more explicit example of making a
custom web page connected to your game, and you may want to read that after finishing this guide.</p>
<section class="tex2jax_ignore mathjax_ignore" id="changing-the-game-website">
<h1>Changing the Game Website<a class="headerlink" href="#changing-the-game-website" title="Permalink to this headline"></a></h1>
<p>Evennia uses the <a class="reference external" href="https://www.djangoproject.com/">Django</a> web framework as the basis of both its database configuration and the website it provides. While a full understanding of Django requires reading the Django documentation, we have provided this tutorial to get you running with the basics and how they pertain to Evennia. This text details getting everything set up. The <a class="reference internal" href="Web-Character-View-Tutorial.html"><span class="doc std std-doc">Web-based Character view Tutorial</span></a> gives a more explicit example of making a custom web page connected to your game, and you may want to read that after finishing this guide.</p>
<section id="a-basic-overview">
<h2><span class="section-number">2.1. </span>A Basic Overview<a class="headerlink" href="#a-basic-overview" title="Permalink to this headline"></a></h2>
<p>Django is a web framework. It gives you a set of development tools for building a website quickly
and easily.</p>
<h2>A Basic Overview<a class="headerlink" href="#a-basic-overview" title="Permalink to this headline"></a></h2>
<p>Django is a web framework. It gives you a set of development tools for building a website quickly and easily.</p>
<p>Django projects are split up into <em>apps</em> and these apps all contribute to one project. For instance,
you might have an app for conducting polls, or an app for showing news posts or, like us, one for
creating a web client.</p>
<p>Each of these applications has a <code class="docutils literal notranslate"><span class="pre">urls.py</span></code> file, which specifies what
<a class="reference external" href="https://en.wikipedia.org/wiki/Uniform_resource_locator">URL</a>s are used by the app, a <code class="docutils literal notranslate"><span class="pre">views.py</span></code> file
for the code that the URLs activate, a <code class="docutils literal notranslate"><span class="pre">templates</span></code> directory for displaying the results of that code
in <a class="reference external" href="https://en.wikipedia.org/wiki/Html">HTML</a> for the user, and a <code class="docutils literal notranslate"><span class="pre">static</span></code> folder that holds assets
like <a class="reference external" href="https://en.wikipedia.org/wiki/CSS">CSS</a>, <a class="reference external" href="https://en.wikipedia.org/wiki/Javascript">Javascript</a>,
and Image files (You may note your mygame/web folder does not have a <code class="docutils literal notranslate"><span class="pre">static</span></code> or <code class="docutils literal notranslate"><span class="pre">template</span></code> folder.
This is intended and explained further below). Django applications may also have a <code class="docutils literal notranslate"><span class="pre">models.py</span></code> file
for storing information in the database. We will not change any models here, take a look at the
<a class="reference internal" href="../../../Concepts/New-Models.html"><span class="doc std std-doc">New Models</span></a> page (as well as the <a class="reference external" href="https://docs.djangoproject.com/en/1.7/topics/db/models/">Django docs</a> on models) if you are interested.</p>
<p>Each of these applications has a <code class="docutils literal notranslate"><span class="pre">urls.py</span></code> file, which specifies what <a class="reference external" href="https://en.wikipedia.org/wiki/Uniform_resource_locator">URL</a>s are used by the app, a <code class="docutils literal notranslate"><span class="pre">views.py</span></code> file for the code that the URLs activate, a <code class="docutils literal notranslate"><span class="pre">templates</span></code> directory for displaying the results of that code in <a class="reference external" href="https://en.wikipedia.org/wiki/Html">HTML</a> for the user, and a <code class="docutils literal notranslate"><span class="pre">static</span></code> folder that holds assets like <a class="reference external" href="https://en.wikipedia.org/wiki/CSS">CSS</a>, <a class="reference external" href="https://en.wikipedia.org/wiki/Javascript">Javascript</a>, and Image files (You may note your mygame/web folder does not have a <code class="docutils literal notranslate"><span class="pre">static</span></code> or <code class="docutils literal notranslate"><span class="pre">template</span></code> folder. This is intended and explained further below). Django applications may also have a <code class="docutils literal notranslate"><span class="pre">models.py</span></code> file for storing information in the database. We will not change any models here, take a look at the <a class="reference internal" href="../Concepts/New-Models.html"><span class="doc std std-doc">New Models</span></a> page (as well as the <a class="reference external" href="https://docs.djangoproject.com/en/1.7/topics/db/models/">Django docs</a> on models) if you are interested.</p>
<p>There is also a root <code class="docutils literal notranslate"><span class="pre">urls.py</span></code> that determines the URL structure for the entire project. A starter
<code class="docutils literal notranslate"><span class="pre">urls.py</span></code> is included in the default game template, and automatically imports all of Evennias
default URLs for you. This is located in <code class="docutils literal notranslate"><span class="pre">web/urls.py</span></code>.</p>
</section>
<section id="changing-the-logo-on-the-front-page">
<h2><span class="section-number">2.2. </span>Changing the logo on the front page<a class="headerlink" href="#changing-the-logo-on-the-front-page" title="Permalink to this headline"></a></h2>
<h2>Changing the logo on the front page<a class="headerlink" href="#changing-the-logo-on-the-front-page" title="Permalink to this headline"></a></h2>
<p>Evennias default logo is a fun little googly-eyed snake wrapped around a gear globe. As cute as it
is, it probably doesnt represent your game. So one of the first things you may wish to do is
replace it with a logo of your own.</p>
@ -175,31 +159,18 @@ the server you could instead use</p>
</div>
<p>to only update the static files without any other changes.</p>
<blockquote>
<div><p><strong>Note</strong>: Evennia will collect static files automatically during startup. So if <code class="docutils literal notranslate"><span class="pre">evennia</span> <span class="pre">collectstatic</span></code> reports finding 0 files to collect, make sure you didnt start the engine at some
point - if so the collector has already done its work! To make sure, connect to the website and
check so the logo has actually changed to your own version.</p>
<div><p>Evennia will collect static files automatically during startup. So if <code class="docutils literal notranslate"><span class="pre">evennia</span> <span class="pre">collectstatic</span></code> reports finding 0 files to collect, make sure you didnt start the engine at some point - if so the collector has already done its work! To make sure, connect to the website and check so the logo has actually changed to your own version.</p>
</div></blockquote>
<blockquote>
<div><p><strong>Note</strong>: Sometimes the static asset collector can get confused. If no matter what you do, your
overridden files arent getting copied over the defaults, try removing the target file (or
everything) in the <code class="docutils literal notranslate"><span class="pre">web/static</span></code> directory, and re-running <code class="docutils literal notranslate"><span class="pre">collectstatic</span></code> to gather everything from
scratch.</p>
<div><p>Sometimes the static asset collector can get confused. If no matter what you do, your overridden files arent getting copied over the defaults, try removing the target file (or everything) in the <code class="docutils literal notranslate"><span class="pre">web/static</span></code> directory, and re-running <code class="docutils literal notranslate"><span class="pre">collectstatic</span></code> to gather everything from scratch.</p>
</div></blockquote>
</section>
<section id="changing-the-front-pages-text">
<h2><span class="section-number">2.3. </span>Changing the Front Pages Text<a class="headerlink" href="#changing-the-front-pages-text" title="Permalink to this headline"></a></h2>
<p>The default front page for Evennia contains information about the Evennia project. Youll probably
want to replace this information with information about your own project. Changing the page template
is done in a similar way to changing static resources.</p>
<p>Like static files, Django looks through a series of template folders to find the file it wants. The
difference is that Django does not copy all of the template files into one place, it just searches
through the template folders until it finds a template that matches what its looking for. This
means that when you edit a template, the changes are instant. You dont have to reload the server or
<h2>Changing the Front Pages Text<a class="headerlink" href="#changing-the-front-pages-text" title="Permalink to this headline"></a></h2>
<p>The default front page for Evennia contains information about the Evennia project. Youll probably want to replace this information with information about your own project. Changing the page template is done in a similar way to changing static resources.</p>
<p>Like static files, Django looks through a series of template folders to find the file it wants. The difference is that Django does not copy all of the template files into one place, it just searches through the template folders until it finds a template that matches what its looking for. This means that when you edit a template, the changes are instant. You dont have to reload the server or
run any extra commands to see these changes - reloading the web page in your browser is enough.</p>
<p>To replace the index pages text, well need to find the template for it. Well go into more detail
about how to determine which template is used for rendering a page in the
<a class="reference internal" href="../../Web-Character-View-Tutorial.html"><span class="doc std std-doc">Web-based Character view Tutorial</span></a>. For now, you should know that the template we want to change
is stored in <code class="docutils literal notranslate"><span class="pre">evennia/web/website/templates/website/index.html</span></code>.</p>
<p>To replace the index pages text, well need to find the template for it. Well go into more detail about how to determine which template is used for rendering a page in the <a class="reference internal" href="Web-Character-View-Tutorial.html"><span class="doc std std-doc">Web-based Character view Tutorial</span></a>. For now, you should know that the template we want to change is stored in <code class="docutils literal notranslate"><span class="pre">evennia/web/website/templates/website/index.html</span></code>.</p>
<p>To replace this template file, you will put your changed template inside the
<code class="docutils literal notranslate"><span class="pre">web/template_overrides/website</span></code> directory in your game folder. In the same way as with static
resources you must replicate the path inside the default <code class="docutils literal notranslate"><span class="pre">template</span></code> directory exactly. So we must
@ -209,12 +180,8 @@ web/template_overrides<code class="docutils literal notranslate"><span class="pr
original file already has all the markup and tags, ready for editing.</p>
</section>
<section id="further-reading">
<h2><span class="section-number">2.4. </span>Further reading<a class="headerlink" href="#further-reading" title="Permalink to this headline"></a></h2>
<p>For further hints on working with the web presence, you could now continue to the
<a class="reference internal" href="../../Web-Character-View-Tutorial.html"><span class="doc std std-doc">Web-based Character view Tutorial</span></a> where you learn to make a web page that
displays in-game character stats. You can also look at <a class="reference external" href="https://docs.djangoproject.com/en/1.7/intro/tutorial01/">Djangos own
tutorial</a> to get more insight in how Django
works and what possibilities exist.</p>
<h2>Further reading<a class="headerlink" href="#further-reading" title="Permalink to this headline"></a></h2>
<p>For further hints on working with the web presence, you could now continue to the <a class="reference internal" href="Web-Character-View-Tutorial.html"><span class="doc std std-doc">Web-based Character view Tutorial</span></a> where you learn to make a web page that displays in-game character stats. You can also look at <a class="reference external" href="https://docs.djangoproject.com/en/1.7/intro/tutorial01/">Djangos own tutorial</a> to get more insight in how Django works and what possibilities exist.</p>
</section>
</section>
@ -228,22 +195,20 @@ works and what possibilities exist.</p>
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../../genindex.html" title="General Index"
<a href="../genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="../../../py-modindex.html" title="Python Module Index"
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="../../Howto-Command-Prompt.html" title="Adding a Command Prompt"
<a href="Web-Add-a-wiki.html" title="Add a wiki on your website"
>next</a> |</li>
<li class="right" >
<a href="Add-a-simple-new-web-page.html" title="1. Add a simple new web page"
<a href="Tutorial-Displaying-Room-Map.html" title="Show a dynamic map of rooms"
>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-1"><a href="../../Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../Beginner-Tutorial-Intro.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Beginner-Tutorial-Part5-Intro.html" >Part 5: Showing the world</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><span class="section-number">2. </span>Web Tutorial</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-1"><a href="Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Changing the Game Website</a></li>
</ul>
<div class="develop">develop branch</div>
</div>

View file

@ -17,7 +17,7 @@
<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="Parsing command arguments, theory and best practices" href="Parsing-commands-tutorial.html" />
<link rel="next" title="Automatically Tweet game stats" href="Web-Tweeting-Game-Stats.html" />
<link rel="prev" title="Help System Tutorial" href="Web-Help-System-Tutorial.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
@ -30,7 +30,7 @@
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="Parsing-commands-tutorial.html" title="Parsing command arguments, theory and best practices"
<a href="Web-Tweeting-Game-Stats.html" title="Automatically Tweet game stats"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="Web-Help-System-Tutorial.html" title="Help System Tutorial"
@ -78,8 +78,8 @@
<p class="topless"><a href="Web-Help-System-Tutorial.html"
title="previous chapter">Help System Tutorial</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="Parsing-commands-tutorial.html"
title="next chapter">Parsing command arguments, theory and best practices</a></p>
<p class="topless"><a href="Web-Tweeting-Game-Stats.html"
title="next chapter">Automatically Tweet game stats</a></p>
<div role="note" aria-label="source link">
<!--h3>This Page</h3-->
<ul class="this-page-menu">
@ -520,7 +520,7 @@
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="Parsing-commands-tutorial.html" title="Parsing command arguments, theory and best practices"
<a href="Web-Tweeting-Game-Stats.html" title="Automatically Tweet game stats"
>next</a> |</li>
<li class="right" >
<a href="Web-Help-System-Tutorial.html" title="Help System Tutorial"

View file

@ -6,7 +6,7 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<title>Tutorial Tweeting Game Stats &#8212; Evennia 1.0-dev documentation</title>
<title>Automatically Tweet game stats &#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>
@ -17,8 +17,8 @@
<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="Add a wiki on your website" href="Web-Add-a-wiki.html" />
<link rel="prev" title="Static In Game Map" href="Static-In-Game-Map.html" />
<link rel="next" title="Parsing command arguments, theory and best practices" href="Tutorial-Parsing-Commands.html" />
<link rel="prev" title="Extending the REST API" href="Web-Extending-the-REST-API.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
@ -30,14 +30,14 @@
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="Web-Add-a-wiki.html" title="Add a wiki on your website"
<a href="Tutorial-Parsing-Commands.html" title="Parsing command arguments, theory and best practices"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="Static-In-Game-Map.html" title="Static In Game Map"
<a href="Web-Extending-the-REST-API.html" title="Extending the REST API"
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-1"><a href="Howtos-Overview.html" accesskey="U">Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Tutorial Tweeting Game Stats</a></li>
<li class="nav-item nav-item-this"><a href="">Automatically Tweet game stats</a></li>
</ul>
<div class="develop">develop branch</div>
</div>
@ -61,15 +61,15 @@
</div>
<script>$('#searchbox').show(0);</script>
<h4>Previous topic</h4>
<p class="topless"><a href="Static-In-Game-Map.html"
title="previous chapter">Static In Game Map</a></p>
<p class="topless"><a href="Web-Extending-the-REST-API.html"
title="previous chapter">Extending the REST API</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="Web-Add-a-wiki.html"
title="next chapter">Add a wiki on your website</a></p>
<p class="topless"><a href="Tutorial-Parsing-Commands.html"
title="next chapter">Parsing command arguments, theory and best practices</a></p>
<div role="note" aria-label="source link">
<!--h3>This Page</h3-->
<ul class="this-page-menu">
<li><a href="../_sources/Howtos/Tutorial-Tweeting-Game-Stats.md.txt"
<li><a href="../_sources/Howtos/Web-Tweeting-Game-Stats.md.txt"
rel="nofollow">Show Page Source</a></li>
</ul>
</div><h3>Links</h3>
@ -85,7 +85,7 @@
</ul>
<h3>Versions</h3>
<ul>
<li><a href="Tutorial-Tweeting-Game-Stats.html">1.0-dev (develop branch)</a></li>
<li><a href="Web-Tweeting-Game-Stats.html">1.0-dev (develop branch)</a></li>
<ul>
<li><a href="../0.9.5/index.html">0.9.5 (v0.9.5 branch)</a></li>
@ -96,11 +96,9 @@
<div class="bodywrapper">
<div class="body" role="main">
<section class="tex2jax_ignore mathjax_ignore" id="tutorial-tweeting-game-stats">
<h1>Tutorial Tweeting Game Stats<a class="headerlink" href="#tutorial-tweeting-game-stats" title="Permalink to this headline"></a></h1>
<p>This tutorial will create a simple script that will send a tweet to your already configured twitter
account. Please see: <a class="reference internal" href="../Setup/Channels-to-Twitter.html"><span class="doc std std-doc">How to connect Evennia to Twitter</span></a> if you
havent already done so.</p>
<section class="tex2jax_ignore mathjax_ignore" id="automatically-tweet-game-stats">
<h1>Automatically Tweet game stats<a class="headerlink" href="#automatically-tweet-game-stats" title="Permalink to this headline"></a></h1>
<p>This tutorial will create a simple script that will send a tweet to your already configured twitter account. Please see: <a class="reference internal" href="../Setup/Channels-to-Twitter.html"><span class="doc std std-doc">How to connect Evennia to Twitter</span></a> if you havent already done so.</p>
<p>The script could be expanded to cover a variety of statistics you might wish to tweet about
regularly, from player deaths to how much currency is in the economy etc.</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="c1"># evennia/typeclasses/tweet_stats.py</span>
@ -109,7 +107,7 @@ regularly, from player deaths to how much currency is in the economy etc.</p>
<span class="kn">from</span> <span class="nn">random</span> <span class="kn">import</span> <span class="n">randint</span>
<span class="kn">from</span> <span class="nn">django.conf</span> <span class="kn">import</span> <span class="n">settings</span>
<span class="kn">from</span> <span class="nn">evennia</span> <span class="kn">import</span> <span class="n">ObjectDB</span>
<span class="kn">from</span> <span class="nn">evennia</span> <span class="kn">import</span> <span class="n">spawner</span>
<span class="kn">from</span> <span class="nn">evennia.prototypes</span> <span class="kn">import</span> <span class="n">prototypes</span>
<span class="kn">from</span> <span class="nn">evennia</span> <span class="kn">import</span> <span class="n">logger</span>
<span class="kn">from</span> <span class="nn">evennia</span> <span class="kn">import</span> <span class="n">DefaultScript</span>
@ -130,7 +128,8 @@ regularly, from player deaths to how much currency is in the economy etc.</p>
<span class="k">def</span> <span class="nf">at_repeat</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> This is called every self.interval seconds to tweet interesting stats about the game.</span>
<span class="sd"> This is called every self.interval seconds to </span>
<span class="sd"> tweet interesting stats about the game.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">api</span> <span class="o">=</span> <span class="n">twitter</span><span class="o">.</span><span class="n">Api</span><span class="p">(</span><span class="n">consumer_key</span><span class="o">=</span><span class="s1">&#39;consumer_key&#39;</span><span class="p">,</span>
@ -138,33 +137,29 @@ regularly, from player deaths to how much currency is in the economy etc.</p>
<span class="n">access_token_key</span><span class="o">=</span><span class="s1">&#39;access_token_key&#39;</span><span class="p">,</span>
<span class="n">access_token_secret</span><span class="o">=</span><span class="s1">&#39;access_token_secret&#39;</span><span class="p">)</span>
<span class="n">number_tweet_outputs</span> <span class="o">=</span> <span class="mi">2</span>
<span class="c1"># Game Chars, Rooms, Objects taken from `stats` command</span>
<span class="n">nobjs</span> <span class="o">=</span> <span class="n">ObjectDB</span><span class="o">.</span><span class="n">objects</span><span class="o">.</span><span class="n">count</span><span class="p">()</span>
<span class="n">base_char_typeclass</span> <span class="o">=</span> <span class="n">settings</span><span class="o">.</span><span class="n">BASE_CHARACTER_TYPECLASS</span>
<span class="n">nchars</span> <span class="o">=</span> <span class="p">(</span>
<span class="n">ObjectDB</span><span class="o">.</span><span class="n">objects</span>
<span class="o">.</span><span class="n">filter</span><span class="p">(</span><span class="n">db_typeclass_path</span><span class="o">=</span><span class="n">base_char_typeclass</span><span class="p">)</span>
<span class="o">.</span><span class="n">count</span><span class="p">()</span>
<span class="p">)</span>
<span class="n">nrooms</span> <span class="o">=</span><span class="p">(</span>
<span class="n">ObjectDB</span><span class="o">.</span><span class="n">objects</span>
<span class="o">.</span><span class="n">filter</span><span class="p">(</span><span class="n">db_location__isnull</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
<span class="o">.</span><span class="n">exclude</span><span class="p">(</span><span class="n">db_typeclass_path</span><span class="o">=</span><span class="n">base_char_typeclass</span><span class="p">)</span>
<span class="o">.</span><span class="n">count</span><span class="p">()</span>
<span class="p">)</span>
<span class="n">nexits</span> <span class="o">=</span> <span class="p">(</span>
<span class="n">ObjectDB</span><span class="o">.</span><span class="n">objects</span>
<span class="o">.</span><span class="n">filter</span><span class="p">(</span><span class="n">db_location__isnull</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
<span class="n">db_destination__isnull</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
<span class="o">.</span><span class="n">count</span><span class="p">()</span>
<span class="p">)</span>
<span class="n">nother</span> <span class="o">=</span> <span class="n">nobjs</span> <span class="o">-</span> <span class="n">nchars</span> <span class="o">-</span> <span class="n">nrooms</span> <span class="o">-</span> <span class="n">nexits</span>
<span class="n">tweet</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot;Chars: </span><span class="si">{</span><span class="n">ncars</span><span class="si">}</span><span class="s2">, Rooms: </span><span class="si">{</span><span class="n">nrooms</span><span class="si">}</span><span class="s2">, Objects: </span><span class="si">{</span><span class="n">nother</span><span class="si">}</span><span class="s2">&quot;</span>
<span class="n">tweet_output</span> <span class="o">=</span> <span class="n">randint</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="n">number_tweet_outputs</span><span class="p">)</span>
<span class="k">if</span> <span class="n">tweet_output</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span>
<span class="c1">##Game Chars, Rooms, Objects taken from @stats command</span>
<span class="n">nobjs</span> <span class="o">=</span> <span class="n">ObjectDB</span><span class="o">.</span><span class="n">objects</span><span class="o">.</span><span class="n">count</span><span class="p">()</span>
<span class="n">base_char_typeclass</span> <span class="o">=</span> <span class="n">settings</span><span class="o">.</span><span class="n">BASE_CHARACTER_TYPECLASS</span>
<span class="n">nchars</span> <span class="o">=</span> <span class="n">ObjectDB</span><span class="o">.</span><span class="n">objects</span><span class="o">.</span><span class="n">filter</span><span class="p">(</span><span class="n">db_typeclass_path</span><span class="o">=</span><span class="n">base_char_typeclass</span><span class="p">)</span><span class="o">.</span><span class="n">count</span><span class="p">()</span>
<span class="n">nrooms</span> <span class="o">=</span>
<span class="n">ObjectDB</span><span class="o">.</span><span class="n">objects</span><span class="o">.</span><span class="n">filter</span><span class="p">(</span><span class="n">db_location__isnull</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span><span class="o">.</span><span class="n">exclude</span><span class="p">(</span><span class="n">db_typeclass_path</span><span class="o">=</span><span class="n">base_char_typeclass</span><span class="p">)</span><span class="o">.</span><span class="n">count</span><span class="p">()</span>
<span class="n">nexits</span> <span class="o">=</span> <span class="n">ObjectDB</span><span class="o">.</span><span class="n">objects</span><span class="o">.</span><span class="n">filter</span><span class="p">(</span><span class="n">db_location__isnull</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
<span class="n">db_destination__isnull</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span><span class="o">.</span><span class="n">count</span><span class="p">()</span>
<span class="n">nother</span> <span class="o">=</span> <span class="n">nobjs</span> <span class="o">-</span> <span class="n">nchars</span> <span class="o">-</span> <span class="n">nrooms</span> <span class="o">-</span> <span class="n">nexits</span>
<span class="n">tweet</span> <span class="o">=</span> <span class="s2">&quot;Chars: </span><span class="si">%s</span><span class="s2">, Rooms: </span><span class="si">%s</span><span class="s2">, Objects: </span><span class="si">%s</span><span class="s2">&quot;</span> <span class="o">%</span><span class="p">(</span><span class="n">nchars</span><span class="p">,</span> <span class="n">nrooms</span><span class="p">,</span> <span class="n">nother</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="k">if</span> <span class="n">tweet_output</span> <span class="o">==</span> <span class="mi">2</span><span class="p">:</span> <span class="c1">##Number of prototypes and 3 random keys - taken from @spawn</span>
<span class="n">command</span>
<span class="n">prototypes</span> <span class="o">=</span> <span class="n">spawner</span><span class="o">.</span><span class="n">spawn</span><span class="p">(</span><span class="n">return_prototypes</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
<span class="n">keys</span> <span class="o">=</span> <span class="n">prototypes</span><span class="o">.</span><span class="n">keys</span><span class="p">()</span>
<span class="n">nprots</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">prototypes</span><span class="p">)</span>
<span class="n">tweet</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot;Prototype Count: </span><span class="si">{</span><span class="n">nprots</span><span class="si">}</span><span class="s2"> Random Keys: &quot;</span>
<span class="n">tweet</span> <span class="o">+=</span> <span class="sa">f</span><span class="s2">&quot; </span><span class="si">{</span><span class="n">keys</span><span class="p">[</span><span class="n">randint</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="nb">len</span><span class="p">(</span><span class="n">keys</span><span class="p">)</span><span class="o">-</span><span class="mi">1</span><span class="p">)]</span><span class="si">}</span><span class="s2">&quot;</span>
<span class="k">for</span> <span class="n">x</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="mi">2</span><span class="p">):</span> <span class="c1">##tweet 3</span>
<span class="n">tweet</span> <span class="o">+=</span> <span class="sa">f</span><span class="s2">&quot;, </span><span class="si">{</span><span class="n">keys</span><span class="p">[</span><span class="n">randint</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="nb">len</span><span class="p">(</span><span class="n">keys</span><span class="p">)</span><span class="o">-</span><span class="mi">1</span><span class="p">)]</span><span class="si">}</span><span class="s2">&quot;</span>
<span class="c1"># post the tweet </span>
<span class="k">try</span><span class="p">:</span>
<span class="n">response</span> <span class="o">=</span> <span class="n">api</span><span class="o">.</span><span class="n">PostUpdate</span><span class="p">(</span><span class="n">tweet</span><span class="p">)</span>
@ -175,17 +170,11 @@ regularly, from player deaths to how much currency is in the economy etc.</p>
<p>In the <code class="docutils literal notranslate"><span class="pre">at_script_creation</span></code> method, we configure the script to fire immediately (useful for testing)
and setup the delay (1 day) as well as script information seen when you use <code class="docutils literal notranslate"><span class="pre">&#64;scripts</span></code></p>
<p>In the <code class="docutils literal notranslate"><span class="pre">at_repeat</span></code> method (which is called immediately and then at interval seconds later) we setup
the Twitter API (just like in the initial configuration of twitter). numberTweetOutputs is used to
show how many different types of outputs we have (in this case 2). We then build the tweet based on
randomly choosing between these outputs.</p>
<ol class="simple">
<li><p>Shows the number of Player Characters, Rooms and Other/Objects</p></li>
<li><p>Shows the number of prototypes currently in the game and then selects 3 random keys to show</p></li>
</ol>
<p><a class="reference internal" href="../Components/Scripts.html"><span class="doc std std-doc">Scripts Information</span></a> will show you how to add it as a Global script, however, for testing
the Twitter API (just like in the initial configuration of twitter). We then show the number of Player Characters, Rooms and Other/Objects.</p>
<p>The <a class="reference internal" href="../Components/Scripts.html"><span class="doc std std-doc">Scripts docs</span></a> will show you how to add it as a Global script, however, for testing
it may be useful to start/stop it quickly from within the game. Assuming that you create the file
as <code class="docutils literal notranslate"><span class="pre">mygame/typeclasses/tweet_stats.py</span></code> it can be started by using the following command</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>@script Here = tweet_stats.TweetStats
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>script Here = tweet_stats.TweetStats
</pre></div>
</div>
</section>
@ -206,14 +195,14 @@ as <code class="docutils literal notranslate"><span class="pre">mygame/typeclass
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="Web-Add-a-wiki.html" title="Add a wiki on your website"
<a href="Tutorial-Parsing-Commands.html" title="Parsing command arguments, theory and best practices"
>next</a> |</li>
<li class="right" >
<a href="Static-In-Game-Map.html" title="Static In Game Map"
<a href="Web-Extending-the-REST-API.html" title="Extending the REST API"
>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-1"><a href="Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Tutorial Tweeting Game Stats</a></li>
<li class="nav-item nav-item-this"><a href="">Automatically Tweet game stats</a></li>
</ul>
<div class="develop">develop branch</div>
</div>

View file

@ -195,7 +195,7 @@ This is how it can look:</p>
<li><p>Changing locks to make tweeting open to more people</p></li>
<li><p>Echo your tweets to an in-game channel</p></li>
</ul>
<p>Rather than using an explicit command you can set up a Script to send automatic tweets, for example to post updated game stats. See the <a class="reference internal" href="../Howtos/Tutorial-Tweeting-Game-Stats.html"><span class="doc std std-doc">Tweeting Game Stats tutorial</span></a> for help.</p>
<p>Rather than using an explicit command you can set up a Script to send automatic tweets, for example to post updated game stats. See the <a class="reference internal" href="../Howtos/Web-Tweeting-Game-Stats.html"><span class="doc std std-doc">Tweeting Game Stats tutorial</span></a> for help.</p>
</section>
</section>
</section>

View file

@ -16,7 +16,9 @@
<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="search" title="Search" href="../search.html" />
<link rel="next" title="Tutorials and Howtos" href="../Howtos/Howtos-Overview.html" />
<link rel="prev" title="Configuring HAProxy" href="Config-HAProxy.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
@ -27,7 +29,14 @@
<li class="right" >
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="../Howtos/Howtos-Overview.html" title="Tutorials and Howtos"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="Config-HAProxy.html" title="Configuring HAProxy"
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-1"><a href="Setup-Overview.html" accesskey="U">Server Setup and Life</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Configuring an Apache Proxy</a></li>
</ul>
<div class="develop">develop branch</div>
@ -75,6 +84,12 @@
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="Config-HAProxy.html"
title="previous chapter">Configuring HAProxy</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="../Howtos/Howtos-Overview.html"
title="next chapter">Tutorials and Howtos</a></p>
<div role="note" aria-label="source link">
<!--h3>This Page</h3-->
<ul class="this-page-menu">
@ -288,7 +303,14 @@ Not confirmed, but worth trying if there are trouble.</p>
<li class="right" >
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="../Howtos/Howtos-Overview.html" title="Tutorials and Howtos"
>next</a> |</li>
<li class="right" >
<a href="Config-HAProxy.html" title="Configuring HAProxy"
>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-1"><a href="Setup-Overview.html" >Server Setup and Life</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Configuring an Apache Proxy</a></li>
</ul>
<div class="develop">develop branch</div>

View file

@ -17,7 +17,7 @@
<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="Tutorials and Howtos" href="../Howtos/Howtos-Overview.html" />
<link rel="next" title="Configuring an Apache Proxy" href="Config-Apache-Proxy.html" />
<link rel="prev" title="Security Hints and Practices" href="Security-Practices.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
@ -30,7 +30,7 @@
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="../Howtos/Howtos-Overview.html" title="Tutorials and Howtos"
<a href="Config-Apache-Proxy.html" title="Configuring an Apache Proxy"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="Security-Practices.html" title="Security Hints and Practices"
@ -74,8 +74,8 @@
<p class="topless"><a href="Security-Practices.html"
title="previous chapter">Security Hints and Practices</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="../Howtos/Howtos-Overview.html"
title="next chapter">Tutorials and Howtos</a></p>
<p class="topless"><a href="Config-Apache-Proxy.html"
title="next chapter">Configuring an Apache Proxy</a></p>
<div role="note" aria-label="source link">
<!--h3>This Page</h3-->
<ul class="this-page-menu">
@ -350,7 +350,7 @@ uncommented in the config file, it will now start as a background process.</p>
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="../Howtos/Howtos-Overview.html" title="Tutorials and Howtos"
<a href="Config-Apache-Proxy.html" title="Configuring an Apache Proxy"
>next</a> |</li>
<li class="right" >
<a href="Security-Practices.html" title="Security Hints and Practices"

View file

@ -119,11 +119,8 @@
<section class="tex2jax_ignore mathjax_ignore" id="installing-with-docker">
<h1>Installing with Docker<a class="headerlink" href="#installing-with-docker" title="Permalink to this headline"></a></h1>
<p>Evennia releases <a class="reference external" href="https://hub.docker.com/r/evennia/evennia/">docker images</a> which makes
running an Evennia-based game in a Docker container easy.</p>
<p>First, install the <code class="docutils literal notranslate"><span class="pre">docker</span></code> program so you can run the Evennia container. You can get it freely from
<a class="reference external" href="https://www.docker.com/">docker.com</a>. Linux users can likely also get it through their normal
package manager.</p>
<p>Evennia releases <a class="reference external" href="https://hub.docker.com/r/evennia/evennia/">docker images</a> as part of regular commits and releases. This makes running an Evennia-based game in a Docker container easy.</p>
<p>First, install the <code class="docutils literal notranslate"><span class="pre">docker</span></code> program so you can run the Evennia container. You can get it freely from <a class="reference external" href="https://www.docker.com/">docker.com</a>. Linux users can likely also get it through their normal package manager.</p>
<p>To fetch the latest evennia docker image, run:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>docker pull evennia/evennia
</pre></div>
@ -142,11 +139,7 @@ the docker container:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>evennia<span class="p">|</span>docker /usr/src/game $
</pre></div>
</div>
<p>This is a normal shell prompt. We are in the <code class="docutils literal notranslate"><span class="pre">/usr/src/game</span></code> location inside the docker container.
If you had anything in the folder you started from, you should see it here (with <code class="docutils literal notranslate"><span class="pre">ls</span></code>) since we
mounted the current directory to <code class="docutils literal notranslate"><span class="pre">usr/src/game</span></code> (with <code class="docutils literal notranslate"><span class="pre">-v</span></code> above). You have the <code class="docutils literal notranslate"><span class="pre">evennia</span></code> command
available and can now proceed to create a new game as per the normal <a class="reference internal" href="Installation.html"><span class="doc std std-doc">game setup</span></a>
instructions (no virtualenv needed).</p>
<p>This is a normal shell prompt. We are in the <code class="docutils literal notranslate"><span class="pre">/usr/src/game</span></code> location inside the docker container. If you had anything in the folder you started from, you should see it here (with <code class="docutils literal notranslate"><span class="pre">ls</span></code>) since we mounted the current directory to <code class="docutils literal notranslate"><span class="pre">usr/src/game</span></code> (with <code class="docutils literal notranslate"><span class="pre">-v</span></code> above). You have the <code class="docutils literal notranslate"><span class="pre">evennia</span></code> command available and can now proceed to create a new game as per the normal <a class="reference internal" href="Installation.html"><span class="doc std std-doc">game setup</span></a> instructions (no virtualenv needed).</p>
<p>You can run Evennia from inside this container if you want to, its like you are root in a little
isolated Linux environment. To exit the container and all processes in there, press <code class="docutils literal notranslate"><span class="pre">Ctrl-D</span></code>. If you
created a new game folder, you will find that it has appeared on-disk.</p>
@ -165,8 +158,7 @@ on your drive.</p></li>
</ul>
<section id="running-your-game-as-a-docker-image">
<h2>Running your game as a docker image<a class="headerlink" href="#running-your-game-as-a-docker-image" title="Permalink to this headline"></a></h2>
<p>If you run the <code class="docutils literal notranslate"><span class="pre">docker</span></code> command given in the previous section from your game dir you can then
easily start Evennia and have a running server without any further fuss.</p>
<p>If you run the <code class="docutils literal notranslate"><span class="pre">docker</span></code> command given in the previous section from your game dir you can then easily start Evennia and have a running server without any further fuss.</p>
<p>But apart from ease of install, the primary benefit to running an Evennia-based game in a container is to simplify its deployment into a public production environment. Most cloud-based hosting
providers these days support the ability to run container-based applications. This makes deploying
or updating your game as simple as building a new container image locally, pushing it to your Docker Hub account, and then pulling from Docker Hub into your AWS/Azure/other docker-enabled hosting account. The container eliminates the need to install Python, set up a virtualenv, or run pip to install dependencies.</p>
@ -197,14 +189,11 @@ enter it and run commands).</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span> docker build -t mydhaccount/mygame .
</pre></div>
</div>
<p>(dont forget the period at the end, it will use the <code class="docutils literal notranslate"><span class="pre">Dockerfile</span></code> from the current location). Here
<code class="docutils literal notranslate"><span class="pre">mydhaccount</span></code> is the name of your <code class="docutils literal notranslate"><span class="pre">dockerhub</span></code> account. If you dont have a dockerhub account you can build the image locally only (name the container whatever you like in that case, like just <code class="docutils literal notranslate"><span class="pre">mygame</span></code>).</p>
<p>Docker images are stored centrally on your computer. You can see which ones you have available
locally with <code class="docutils literal notranslate"><span class="pre">docker</span> <span class="pre">images</span></code>. Once built, you have a couple of options to run your game.</p>
<p>(dont forget the period at the end, it will use the <code class="docutils literal notranslate"><span class="pre">Dockerfile</span></code> from the current location). Here <code class="docutils literal notranslate"><span class="pre">mydhaccount</span></code> is the name of your <code class="docutils literal notranslate"><span class="pre">dockerhub</span></code> account. If you dont have a dockerhub account you can build the image locally only (name the container whatever you like in that case, like just <code class="docutils literal notranslate"><span class="pre">mygame</span></code>).</p>
<p>Docker images are stored centrally on your computer. You can see which ones you have available locally with <code class="docutils literal notranslate"><span class="pre">docker</span> <span class="pre">images</span></code>. Once built, you have a couple of options to run your game.</p>
<section id="run-container-from-your-game-image-for-development">
<h3>Run container from your game image for development<a class="headerlink" href="#run-container-from-your-game-image-for-development" title="Permalink to this headline"></a></h3>
<p>To run the container based on your game image locally for development, mount the local game
directory as before:</p>
<p>To run the container based on your game image locally for development, mount the local game directory as before:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>docker run -it --rm -p 4000:4000 -p 4001:4001 -p 4002:4002 -v $PWD:/usr/src/game --user $UID:$GID
mydhaccount/mygame
</pre></div>
@ -256,10 +245,8 @@ container will get a new container id to reference.</p>
</section>
<section id="how-it-works">
<h2>How it Works<a class="headerlink" href="#how-it-works" title="Permalink to this headline"></a></h2>
<p>The <code class="docutils literal notranslate"><span class="pre">evennia/evennia</span></code> docker image holds the evennia library and all of its dependencies. It also has an <code class="docutils literal notranslate"><span class="pre">ONBUILD</span></code> directive which is triggered during builds of images derived from it. This
<code class="docutils literal notranslate"><span class="pre">ONBUILD</span></code> directive handles setting up a volume and copying your game directory code into the proper location within the container.</p>
<p>In most cases, the Dockerfile for an Evennia-based game will only need the <code class="docutils literal notranslate"><span class="pre">FROM</span> <span class="pre">evennia/evennia:latest</span></code> directive, and optionally a <code class="docutils literal notranslate"><span class="pre">MAINTAINER</span></code> directive if you plan to publish
your image on Docker Hub and would like to provide contact info.</p>
<p>The <code class="docutils literal notranslate"><span class="pre">evennia/evennia</span></code> docker image holds the evennia library and all of its dependencies. It also has an <code class="docutils literal notranslate"><span class="pre">ONBUILD</span></code> directive which is triggered during builds of images derived from it. This <code class="docutils literal notranslate"><span class="pre">ONBUILD</span></code> directive handles setting up a volume and copying your game directory code into the proper location within the container.</p>
<p>In most cases, the Dockerfile for an Evennia-based game will only need the <code class="docutils literal notranslate"><span class="pre">FROM</span> <span class="pre">evennia/evennia:latest</span></code> directive, and optionally a <code class="docutils literal notranslate"><span class="pre">MAINTAINER</span></code> directive if you plan to publish your image on Docker Hub and would like to provide contact info.</p>
<p>For more information on Dockerfile directives, see the <a class="reference external" href="https://docs.docker.com/engine/reference/builder/">Dockerfile Reference</a>.</p>
<p>For more information on volumes and Docker containers, see the Docker sites <a class="reference external" href="https://docs.docker.com/engine/tutorials/dockervolumes/">Manage data in
containers</a> page.</p>
@ -317,8 +304,7 @@ working directory to be your game directory and run</p>
<span class="o">-</span> <span class="o">.</span><span class="p">:</span><span class="o">/</span><span class="n">usr</span><span class="o">/</span><span class="n">src</span><span class="o">/</span><span class="n">game</span>
</pre></div>
</div>
<p>With this file in the game directory next to the <code class="docutils literal notranslate"><span class="pre">Dockerfile</span></code>, starting the container is as simple
as</p>
<p>With this file in the game directory next to the <code class="docutils literal notranslate"><span class="pre">Dockerfile</span></code>, starting the container is as simple as</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">docker</span><span class="o">-</span><span class="n">compose</span> <span class="n">up</span>
</pre></div>
</div>

View file

@ -147,39 +147,44 @@ not recognize <code class="docutils literal notranslate"><span class="pre">local
<section id="virtualenv">
<h2>Virtualenv<a class="headerlink" href="#virtualenv" title="Permalink to this headline"></a></h2>
<p>A Python <a class="reference external" href="https://docs.python.org/3/library/venv.html">virtual environment</a> allows you to install Evennia in its own little folder, separate from the rest of the system. You also wont need any extra permissions. Its optional to use a virtualenv, but its highly recommended. Python supports this natively:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span> python3.11 -m venv evenv (linux/mac)
python -m venv venv evenv (Windows)
<aside class="sidebar">
<p class="sidebar-title">Using py on Windows</p>
<p>If you have older versions of Python installed on Windows, you should instead use <code class="docutils literal notranslate"><span class="pre">py</span></code> here instead of <code class="docutils literal notranslate"><span class="pre">python</span></code>. The <code class="docutils literal notranslate"><span class="pre">py</span></code> launcher automatically selects the latest python version among those you installed.</p>
</aside>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>python3.11 -m venv evenv <span class="o">(</span>linux/mac<span class="o">)</span>
python -m venv evenv <span class="o">(</span>Windows<span class="o">)</span>
</pre></div>
</div>
<blockquote>
<div><p>If you have older versions of Python installed on Windows, you should instead use <code class="docutils literal notranslate"><span class="pre">py</span></code> instead of <code class="docutils literal notranslate"><span class="pre">python</span></code> - the <code class="docutils literal notranslate"><span class="pre">py</span></code> launcher automatically selects the latest python version among those you installed.</p>
</div></blockquote>
<p>This will create a new folder <code class="docutils literal notranslate"><span class="pre">evenv</span></code> in your current directory.
Activate it like this:</p>
<p><code class="docutils literal notranslate"><span class="pre">source</span> <span class="pre">evenv/bin/activate</span></code> (Linux, Mac)
<code class="docutils literal notranslate"><span class="pre">evenv\Scripts\activate</span></code> (Windows)
<code class="docutils literal notranslate"><span class="pre">.\evenv\scripts\activate</span></code> (Windows with PS Shell, Git Bash etc)</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">source</span> <span class="n">evenv</span><span class="o">/</span><span class="nb">bin</span><span class="o">/</span><span class="n">activate</span> <span class="p">(</span><span class="n">Linux</span><span class="p">,</span> <span class="n">Mac</span><span class="p">)</span>
<span class="n">evenv</span>\<span class="n">Scripts</span>\<span class="n">activate</span> <span class="p">(</span><span class="n">Windows</span> <span class="n">Console</span><span class="p">)</span>
<span class="o">.</span>\<span class="n">evenv</span>\<span class="n">scripts</span>\<span class="n">activate</span> <span class="p">(</span><span class="n">Windows</span> <span class="n">PS</span> <span class="n">Shell</span><span class="p">,</span>
<span class="n">Git</span> <span class="n">Bash</span> <span class="n">etc</span><span class="p">)</span>
</pre></div>
</div>
<p>The text <code class="docutils literal notranslate"><span class="pre">(evenv)</span></code> should appear next to your prompt to show that the virtual
environment is active. You <em>dont</em> need to actually be in or near the <code class="docutils literal notranslate"><span class="pre">evenv</span></code> folder for
the environment to be active.</p>
<blockquote>
<div><p>Remember that you need to re-activate the virtualenv like this <em>every time</em> you
start a new terminal/console. Otherwise the <code class="docutils literal notranslate"><span class="pre">evennia</span></code> command will not be available.</p>
</div></blockquote>
<div class="admonition important">
<p class="admonition-title">Important</p>
<p>Remember that you need to (re-)activate the virtualenv like this <em>every time</em> you
start a new terminal/console (or restart your computer). Until you do, the <code class="docutils literal notranslate"><span class="pre">evennia</span></code> command will not be available.</p>
</div>
</section>
<section id="linux-install">
<h2>Linux Install<a class="headerlink" href="#linux-install" title="Permalink to this headline"></a></h2>
<p>For Debian-derived systems (like Ubuntu, Mint etc), start a terminal and
install the requirements:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">apt</span><span class="o">-</span><span class="n">get</span> <span class="n">update</span>
<span class="n">sudo</span> <span class="n">apt</span><span class="o">-</span><span class="n">get</span> <span class="n">install</span> <span class="n">python3</span><span class="mf">.11</span> <span class="n">python3</span><span class="mf">.11</span><span class="o">-</span><span class="n">venv</span> <span class="n">python3</span><span class="mf">.11</span><span class="o">-</span><span class="n">dev</span> <span class="n">gcc</span>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo apt-get update
sudo apt-get install python3.11 python3.11-venv python3.11-dev gcc
</pre></div>
</div>
<p>You should make sure to <em>not</em> be <code class="docutils literal notranslate"><span class="pre">root</span></code> after this step, running as <code class="docutils literal notranslate"><span class="pre">root</span></code> is a
security risk. Now create a folder where you want to do all your Evennia
development:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">mkdir</span> <span class="n">muddev</span>
<span class="n">cd</span> <span class="n">muddev</span>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>mkdir muddev
<span class="nb">cd</span> muddev
</pre></div>
</div>
<p>Next we fetch Evennia itself:</p>
@ -191,6 +196,9 @@ contains the source code though, it is not <em>installed</em> yet.</p>
<p>At this point its now optional but recommended that you initialize and activate a <a class="reference internal" href="#virtualenv"><span class="std std-doc">virtualenv</span></a>.</p>
<p>Next, install Evennia (system-wide, or into your active virtualenv). Make sure you are standing
at the top of your mud directory tree (so you see the <code class="docutils literal notranslate"><span class="pre">evennia/</span></code> folder, and likely the <code class="docutils literal notranslate"><span class="pre">evenv</span></code> virtualenv folder) and do</p>
<aside class="sidebar">
<p>The <code class="docutils literal notranslate"><span class="pre">-e</span> </code> means that we install evennia in editable mode. If you want to develop on Evennia itself, it means that changes you do to the code is immediately reflected on your running server (you dont have to reinstall every time you make a change).</p>
</aside>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">pip</span> <span class="n">install</span> <span class="o">-</span><span class="n">e</span> <span class="n">evennia</span>
</pre></div>
</div>

View file

@ -112,20 +112,18 @@
<section class="tex2jax_ignore mathjax_ignore" id="installation-troubleshooting">
<h1>Installation Troubleshooting<a class="headerlink" href="#installation-troubleshooting" title="Permalink to this headline"></a></h1>
<p>If you have an issue not covered here, <a class="reference external" href="https://github.com/evennia/evennia/issues/new/choose">please report it</a>
so it can be fixed or a workaround found!</p>
<p>If you have an issue not covered here, <a class="reference external" href="https://github.com/evennia/evennia/issues/new/choose">please report it</a> so it can be fixed or a workaround found!</p>
<p>The server logs are in <code class="docutils literal notranslate"><span class="pre">mygame/server/logs/</span></code>. To easily view server logs in the terminal,
you can run <code class="docutils literal notranslate"><span class="pre">evennia</span> <span class="pre">-l</span></code>, or (in the future) start the server with <code class="docutils literal notranslate"><span class="pre">evennia</span> <span class="pre">start</span> <span class="pre">-l</span></code>.</p>
you can run <code class="docutils literal notranslate"><span class="pre">evennia</span> <span class="pre">-l</span></code>, or start/reload the server with <code class="docutils literal notranslate"><span class="pre">evennia</span> <span class="pre">start</span> <span class="pre">-l</span></code> or <code class="docutils literal notranslate"><span class="pre">evennia</span> <span class="pre">reload</span> <span class="pre">-l</span></code>.</p>
<section id="check-your-requirements">
<h2>Check your Requirements<a class="headerlink" href="#check-your-requirements" title="Permalink to this headline"></a></h2>
<p>Any system that supports Python3.9+ should work. Well describe how to install
everything in the following sections.</p>
<p>Any system that supports Python3.9+ should work.</p>
<ul class="simple">
<li><p>Linux/Unix</p></li>
<li><p>Windows (Win7, Win8, Win10, Win11)</p></li>
<li><p>Mac OSX (&gt;10.5 recommended)</p></li>
<li><p><a class="reference external" href="https://www.python.org">Python</a> (v3.9, 3.10 and 3.11 are tested)</p></li>
<li><p><a class="reference external" href="https://twistedmatrix.com">Twisted</a> (v22.0+)</p>
<li><p><a class="reference external" href="https://www.python.org">Python</a> (v3.9, 3.10 and 3.11 are tested. 3.11 is recommended)</p></li>
<li><p><a class="reference external" href="https://twistedmatrix.com">Twisted</a> (v22.3+)</p>
<ul>
<li><p><a class="reference external" href="https://www.zope.org/Products/ZopeInterface">ZopeInterface</a> (v3.0+) - usually included in Twisted packages</p></li>
<li><p>Linux/Mac users may need the <code class="docutils literal notranslate"><span class="pre">gcc</span></code> and <code class="docutils literal notranslate"><span class="pre">python-dev</span></code> packages or equivalent.</p></li>

View file

@ -116,17 +116,16 @@ over things manually.</p>
<h2>Evennia v0.9.5 to 1.0<a class="headerlink" href="#evennia-v0-9-5-to-1-0" title="Permalink to this headline"></a></h2>
<section id="upgrading-the-evennia-library">
<h3>Upgrading the Evennia library<a class="headerlink" href="#upgrading-the-evennia-library" title="Permalink to this headline"></a></h3>
<p>Prior to 1.0, all Evennia installs were <a class="reference internal" href="Installation-Git.html"><span class="doc std std-doc">Git-installs</span></a>. These instructions
assume that you have a cloned <code class="docutils literal notranslate"><span class="pre">evennia</span></code> repo and use a virtualenv (best practices).</p>
<p>Prior to 1.0, all Evennia installs were <a class="reference internal" href="Installation-Git.html"><span class="doc std std-doc">Git-installs</span></a>. These instructions assume that you have a cloned <code class="docutils literal notranslate"><span class="pre">evennia</span></code> repo and use a virtualenv (best practices).</p>
<ul class="simple">
<li><p>Make sure to stop Evennia 0.9.5 entirely with <code class="docutils literal notranslate"><span class="pre">evennia</span> <span class="pre">stop</span></code>.</p></li>
<li><p>Make sure to stop Evennia 0.9.5 entirely with <code class="docutils literal notranslate"><span class="pre">evennia</span> <span class="pre">stop</span></code> from your game dir.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">deactivate</span></code> to leave your active virtualenv.</p></li>
<li><p>Make a <em>backup</em> of your entire <code class="docutils literal notranslate"><span class="pre">mygame</span></code> folder, just to be sure!</p></li>
<li><p>Install Python 3.11 (recommended). Follow the <a class="reference internal" href="Installation-Git.html"><span class="doc std std-doc">Git-installation</span></a> for your OS if needed.</p></li>
<li><p>Delete the old virtualenv <code class="docutils literal notranslate"><span class="pre">evenv</span></code> folder, or rename it (in case you want to keep using 0.9.5 for a while).</p></li>
<li><p>Make <em>new</em> <code class="docutils literal notranslate"><span class="pre">evenv</span></code> virtualenv (see the <a class="reference internal" href="Installation-Git.html#virtualenv"><span class="std std-doc">virtualenv instructions</span></a> for help)</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">cd</span></code> into your <code class="docutils literal notranslate"><span class="pre">evennia/</span></code> root folder (you want to see the <code class="docutils literal notranslate"><span class="pre">docs/</span></code> and <code class="docutils literal notranslate"><span class="pre">bin/</span></code> directories as well as a nested <code class="docutils literal notranslate"><span class="pre">evennia/</span></code> folder)</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">git</span> <span class="pre">pull</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">git</span> <span class="pre">checkout</span> <span class="pre">develop</span></code> TODO - only until 1.0 release.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">pip</span> <span class="pre">install</span> <span class="pre">-e</span> <span class="pre">.</span></code></p></li>
<li><p>If you want the optional extra libs (needed by some contribs), do <code class="docutils literal notranslate"><span class="pre">pip</span> <span class="pre">install</span> <span class="pre">-e</span> <span class="pre">.[extra]</span></code></p></li>
<li><p>Test that you can run the <code class="docutils literal notranslate"><span class="pre">evennia</span></code> command.</p></li>
@ -134,12 +133,10 @@ assume that you have a cloned <code class="docutils literal notranslate"><span c
</section>
<section id="upgrading-your-game-dir">
<h3>Upgrading your game dir<a class="headerlink" href="#upgrading-your-game-dir" title="Permalink to this headline"></a></h3>
<p>If you dont have anything you want to keep in your existing game dir, you can just start a new onew
using the normal <a class="reference internal" href="Installation.html"><span class="doc std std-doc">install instructions</span></a>. If you want to keep/convert your existing
game dir, continue below.</p>
<p>If you dont have anything you want to keep in your existing game dir, you can just start a new one using the normal <a class="reference internal" href="Installation.html"><span class="doc std std-doc">install instructions</span></a>. If you want to keep/convert your existing game dir, continue below.</p>
<ul class="simple">
<li><p>First, make a backup of your exising game dir! If you use version control, make sure to commit your current state.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">cd</span></code> to your existing 0.9.5-based game folder (like <code class="docutils literal notranslate"><span class="pre">mygame</span></code>.)</p></li>
<li><p>First, make a <em>backup</em> of your exising game dir! If you use version control, make sure to commit your current state.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">cd</span></code> to your existing 0.9.5-based game folder (like <code class="docutils literal notranslate"><span class="pre">mygame</span></code>).</p></li>
<li><p>If you have changed <code class="docutils literal notranslate"><span class="pre">mygame/web</span></code>, <em>rename</em> the folder to <code class="docutils literal notranslate"><span class="pre">web_0.9.5</span></code>. If you didnt change anything (or dont have anything you want to keep), you can <em>delete</em> it entirely.</p></li>
<li><p>Copy <code class="docutils literal notranslate"><span class="pre">evennia/evennia/game_template/web</span></code> to <code class="docutils literal notranslate"><span class="pre">mygame/</span></code> (e.g. using <code class="docutils literal notranslate"><span class="pre">cp</span> <span class="pre">-Rf</span></code> or a file manager). This new <code class="docutils literal notranslate"><span class="pre">web</span></code> folder <em>replaces the old one</em> and has a very different structure.</p></li>
<li><p>Its possible you need to replace/comment out import and calls to the deprecated

View file

@ -239,7 +239,7 @@ registering your server with the <em>Evennia game index</em>.</p>
<section id="the-next-steps">
<h2>The Next steps<a class="headerlink" href="#the-next-steps" title="Permalink to this headline"></a></h2>
<p>You are good to go!</p>
<p>Next, why not head into the <a class="reference internal" href="../Howtos/Beginner-Tutorial/Part1/Beginner-Tutorial-Part1-Intro.html"><span class="doc std std-doc">Starting Tutorial</span></a> to learn how to start making your new game!</p>
<p>Next, why not head into the <a class="reference internal" href="../Howtos/Beginner-Tutorial/Beginner-Tutorial-Overview.html"><span class="doc std std-doc">Starting Tutorial</span></a> to learn how to start making your new game!</p>
</section>
</section>

View file

@ -148,8 +148,7 @@ remote hosting later in this document.</p>
<p>Evennia will by default accept incoming connections on all interfaces (<code class="docutils literal notranslate"><span class="pre">0.0.0.0</span></code>) so in principle anyone knowing the ports to use and has the IP address to your machine should be able to connect to your game.</p>
<aside class="sidebar">
<p class="sidebar-title">Closing the log view</p>
<p>If you need to close the log-view, use <code class="docutils literal notranslate"><span class="pre">Ctrl-C</span></code>. Use just <code class="docutils literal notranslate"><span class="pre">evennia</span> <span class="pre">--log</span></code> on its own to
start tailing the logs again.</p>
<p>If you need to close the log-view, use <code class="docutils literal notranslate"><span class="pre">Ctrl-C</span></code>. Use just <code class="docutils literal notranslate"><span class="pre">evennia</span> <span class="pre">--log</span></code> on its own to start tailing the logs again.</p>
</aside>
<ul class="simple">
<li><p>Make sure Evennia is installed and that you have activated the virtualenv. Start the server with <code class="docutils literal notranslate"><span class="pre">evennia</span> <span class="pre">start</span> <span class="pre">--log</span></code>. The <code class="docutils literal notranslate"><span class="pre">--log</span></code> (or <code class="docutils literal notranslate"><span class="pre">-l</span></code>) will make sure that the logs are echoed to the terminal.</p></li>

View file

@ -258,6 +258,11 @@
<li class="toctree-l2"><a class="reference internal" href="Config-HAProxy.html#putting-it-all-together">Putting it all together</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="Config-Apache-Proxy.html">Configuring an Apache Proxy</a><ul>
<li class="toctree-l2"><a class="reference internal" href="Config-Apache-Proxy.html#running-apache-as-a-proxy-in-front-of-evennia">Running Apache as a proxy in front of Evennia</a></li>
<li class="toctree-l2"><a class="reference internal" href="Config-Apache-Proxy.html#run-apache-instead-of-the-evennia-webserver">Run Apache instead of the Evennia webserver</a></li>
</ul>
</li>
</ul>
</div>
</section>

View file

@ -17,8 +17,8 @@
<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="Part 5: Showing the world" href="Howtos/Beginner-Tutorial/Part5/Beginner-Tutorial-Part5-Intro.html" />
<link rel="prev" title="Part 4: Using what we created" href="Howtos/Beginner-Tutorial/Part4/Beginner-Tutorial-Part4-Intro.html" />
<link rel="next" title="Part 5: Showing the world" href="Howtos/Beginner-Tutorial/Part5/Beginner-Tutorial-Part5-Overview.html" />
<link rel="prev" title="Part 4: Using what we created" href="Howtos/Beginner-Tutorial/Part4/Beginner-Tutorial-Part4-Overview.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
@ -30,15 +30,15 @@
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="Howtos/Beginner-Tutorial/Part5/Beginner-Tutorial-Part5-Intro.html" title="Part 5: Showing the world"
<a href="Howtos/Beginner-Tutorial/Part5/Beginner-Tutorial-Part5-Overview.html" title="Part 5: Showing the world"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="Howtos/Beginner-Tutorial/Part4/Beginner-Tutorial-Part4-Intro.html" title="Part 4: Using what we created"
<a href="Howtos/Beginner-Tutorial/Part4/Beginner-Tutorial-Part4-Overview.html" title="Part 4: Using what we created"
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-1"><a href="Howtos/Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="Howtos/Beginner-Tutorial/Beginner-Tutorial-Intro.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Howtos/Beginner-Tutorial/Part4/Beginner-Tutorial-Part4-Intro.html" accesskey="U">Part 4: Using what we created</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="Howtos/Beginner-Tutorial/Beginner-Tutorial-Overview.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Howtos/Beginner-Tutorial/Part4/Beginner-Tutorial-Part4-Overview.html" accesskey="U">Part 4: Using what we created</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><span class="section-number">1. </span>Unimplemented</a></li>
</ul>
<div class="develop">develop branch</div>
@ -63,10 +63,10 @@
</div>
<script>$('#searchbox').show(0);</script>
<h4>Previous topic</h4>
<p class="topless"><a href="Howtos/Beginner-Tutorial/Part4/Beginner-Tutorial-Part4-Intro.html"
<p class="topless"><a href="Howtos/Beginner-Tutorial/Part4/Beginner-Tutorial-Part4-Overview.html"
title="previous chapter">Part 4: Using what we created</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="Howtos/Beginner-Tutorial/Part5/Beginner-Tutorial-Part5-Intro.html"
<p class="topless"><a href="Howtos/Beginner-Tutorial/Part5/Beginner-Tutorial-Part5-Overview.html"
title="next chapter">Part 5: Showing the world</a></p>
<div role="note" aria-label="source link">
<!--h3>This Page</h3-->
@ -120,15 +120,15 @@
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="Howtos/Beginner-Tutorial/Part5/Beginner-Tutorial-Part5-Intro.html" title="Part 5: Showing the world"
<a href="Howtos/Beginner-Tutorial/Part5/Beginner-Tutorial-Part5-Overview.html" title="Part 5: Showing the world"
>next</a> |</li>
<li class="right" >
<a href="Howtos/Beginner-Tutorial/Part4/Beginner-Tutorial-Part4-Intro.html" title="Part 4: Using what we created"
<a href="Howtos/Beginner-Tutorial/Part4/Beginner-Tutorial-Part4-Overview.html" title="Part 4: Using what we created"
>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-1"><a href="Howtos/Howtos-Overview.html" >Tutorials and Howtos</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="Howtos/Beginner-Tutorial/Beginner-Tutorial-Intro.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Howtos/Beginner-Tutorial/Part4/Beginner-Tutorial-Part4-Intro.html" >Part 4: Using what we created</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="Howtos/Beginner-Tutorial/Beginner-Tutorial-Overview.html" >Beginner Tutorial</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="Howtos/Beginner-Tutorial/Part4/Beginner-Tutorial-Part4-Overview.html" >Part 4: Using what we created</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><span class="section-number">1. </span>Unimplemented</a></li>
</ul>
<div class="develop">develop branch</div>

View file

@ -90,7 +90,6 @@
<span class="kn">from</span> <span class="nn">django.core.paginator</span> <span class="kn">import</span> <span class="n">Paginator</span>
<span class="kn">from</span> <span class="nn">django.db.models</span> <span class="kn">import</span> <span class="n">Q</span>
<span class="kn">from</span> <span class="nn">django.utils.translation</span> <span class="kn">import</span> <span class="n">gettext</span> <span class="k">as</span> <span class="n">_</span>
<span class="kn">from</span> <span class="nn">evennia.locks.lockhandler</span> <span class="kn">import</span> <span class="n">check_lockstring</span><span class="p">,</span> <span class="n">validate_lockstring</span>
<span class="kn">from</span> <span class="nn">evennia.objects.models</span> <span class="kn">import</span> <span class="n">ObjectDB</span>
<span class="kn">from</span> <span class="nn">evennia.scripts.scripts</span> <span class="kn">import</span> <span class="n">DefaultScript</span>
@ -604,8 +603,6 @@
<span class="n">require_single</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
<span class="n">return_iterators</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
<span class="n">no_db</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
<span class="n">page_size</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
<span class="n">page_no</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
<span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Find prototypes based on key and/or tags, or all prototypes.</span>

View file

@ -351,22 +351,12 @@
<span class="c1"># i18n</span>
<span class="kn">from</span> <span class="nn">django.utils.translation</span> <span class="kn">import</span> <span class="n">gettext</span> <span class="k">as</span> <span class="n">_</span>
<span class="kn">from</span> <span class="nn">evennia</span> <span class="kn">import</span> <span class="n">CmdSet</span><span class="p">,</span> <span class="n">Command</span>
<span class="kn">from</span> <span class="nn">evennia.commands</span> <span class="kn">import</span> <span class="n">cmdhandler</span>
<span class="kn">from</span> <span class="nn">evennia.utils</span> <span class="kn">import</span> <span class="n">logger</span>
<span class="kn">from</span> <span class="nn">evennia.utils.ansi</span> <span class="kn">import</span> <span class="n">strip_ansi</span>
<span class="kn">from</span> <span class="nn">evennia.utils.evtable</span> <span class="kn">import</span> <span class="n">EvColumn</span><span class="p">,</span> <span class="n">EvTable</span>
<span class="kn">from</span> <span class="nn">evennia.utils.utils</span> <span class="kn">import</span> <span class="p">(</span>
<span class="n">crop</span><span class="p">,</span>
<span class="n">dedent</span><span class="p">,</span>
<span class="n">is_iter</span><span class="p">,</span>
<span class="n">m_len</span><span class="p">,</span>
<span class="n">make_iter</span><span class="p">,</span>
<span class="n">mod_import</span><span class="p">,</span>
<span class="n">pad</span><span class="p">,</span>
<span class="n">to_str</span><span class="p">,</span>
<span class="p">)</span>
<span class="kn">from</span> <span class="nn">evennia.utils.utils</span> <span class="kn">import</span> <span class="n">crop</span><span class="p">,</span> <span class="n">dedent</span><span class="p">,</span> <span class="n">is_iter</span><span class="p">,</span> <span class="n">m_len</span><span class="p">,</span> <span class="n">make_iter</span><span class="p">,</span> <span class="n">mod_import</span><span class="p">,</span> <span class="n">pad</span><span class="p">,</span> <span class="n">to_str</span>
<span class="c1"># read from protocol NAWS later?</span>
<span class="n">_MAX_TEXT_WIDTH</span> <span class="o">=</span> <span class="n">settings</span><span class="o">.</span><span class="n">CLIENT_DEFAULT_WIDTH</span>

View file

@ -7,7 +7,7 @@ Here are some pointers to get you going.
## Start with the tutorial
It's highly recommended that you jump in on the [Starting Tutorial](../Howtos/Beginner-Tutorial/Part1/Beginner-Tutorial-Part1-Intro.md). Even if
It's highly recommended that you jump in on the [Starting Tutorial](../Howtos/Beginner-Tutorial/Part1/Beginner-Tutorial-Part1-Overview.md). Even if
you only the beginning or some part of it, it covers much of the things needed to get started, including giving you are first introduction to Python.
## Explore Evennia interactively

View file

@ -6,7 +6,7 @@ make your game, also if you never coded before. If you are an experienced coder,
## Setting up a workflow
See also the [Beginner Tutorial](../Howtos/Beginner-Tutorial/Beginner-Tutorial-Intro.md).
See also the [Beginner Tutorial](../Howtos/Beginner-Tutorial/Beginner-Tutorial-Overview.md).
```{toctree}
:maxdepth: 2

View file

@ -104,7 +104,7 @@ may store.
When testing, you can stop all tickers in the entire game with `tickerhandler.clear()`. You can also
view the currently subscribed objects with `tickerhandler.all()`.
See the [Weather Tutorial](../Howtos/Weather-Tutorial.md) for an example of using the TickerHandler.
See the [Weather Tutorial](../Howtos/Tutorial-Weather-Effects.md) for an example of using the TickerHandler.
### When *not* to use TickerHandler

View file

@ -42,7 +42,7 @@ Example: To override or modify `evennia/web/website/template/website/index.html`
add/modify `mygame/web/template_overrides/website/index.html`.
The detailed description on how to customize the website is best described in tutorial form. See the
[Web Tutorial](../Howtos/Beginner-Tutorial/Part5/Web-Tutorial.md) for more information.
[Web Tutorial](../Howtos/Web-Changing-Webpage.md) for more information.
### Overloading Django views

View file

@ -1,12 +1,6 @@
# Static In Game Map
# Creating rooms from an ascii map
## Introduction
This tutorial describes the creation of an in-game map display based on a pre-drawn map. It also
details how to use the [Batch code processor](../Components/Batch-Code-Processor.md) for advanced building. There is
also the [Dynamic in-game map tutorial](./Dynamic-In-Game-Map.md) that works in the opposite direction,
by generating a map from an existing grid of rooms.
This tutorial describes the creation of an in-game map display based on a pre-drawn map. It goes with the [Mapbuilder contrib](./Contrib-Mapbuilder.md). It also details how to use the [Batch code processor](../Components/Batch-Code-Processor.md) for advanced building.
Evennia does not require its rooms to be positioned in a "logical" way. Your exits could be named
anything. You could make an exit "west" that leads to a room described to be in the far north. You
@ -41,7 +35,7 @@ map we designed before.
```
We will henceforth assume your game folder is name named `mygame` and that you haven't modified the
default commands. We will also not be using [Colors](../Concepts/Colors.md) for our map since they
dkefault commands. We will also not be using [Colors](../Concepts/Colors.md) for our map since they
don't show in the documentation wiki.
## Planning the Map
@ -84,7 +78,7 @@ In this section we will try to create an actual "map" object that an account can
at.
Evennia offers a range of [default commands](../Components/Default-Commands.md) for
[creating objects and rooms in-game](Beginner-Tutorial/Part1/Beginner-Tutorial-Building-Quickstart.md). While readily accessible, these commands are made to do very
[creating objects and rooms in-game](../Howtos/Beginner-Tutorial/Part1/Beginner-Tutorial-Building-Quickstart.md). While readily accessible, these commands are made to do very
specific, restricted things and will thus not offer as much flexibility to experiment (for an
advanced exception see [the FuncParser](../Components/FuncParser.md)). Additionally, entering long
descriptions and properties over and over in the game client can become tedious; especially when
@ -412,5 +406,5 @@ easily new game defining features can be added to Evennia.
You can easily build from this tutorial by expanding the map and creating more rooms to explore. Why
not add more features to your game by trying other tutorials: [Add weather to your world](Weather-
Tutorial), [fill your world with NPC's](./Tutorial-NPC-Reacting.md) or
[implement a combat system](./Turn-based-Combat-System.md).
Tutorial), [fill your world with NPC's](../Howtos/Tutorial-NPC-Reacting.md) or
[implement a combat system](../Howtos/Turn-based-Combat-System.md).

View file

@ -52,6 +52,8 @@ references to rooms previously created is passed to the build commands.
You then call the command in-game using the path to the MAP and MAP_LEGEND vars
The path you provide is relative to the evennia or mygame folder.
See also the [separate tutorial in the docs](./Contrib-Mapbuilder-Tutorial.md).
## Installation
Use by importing and including the command in your default_cmdsets module.
@ -277,6 +279,11 @@ EXAMPLE2_LEGEND = {
```
```{toctree}
:hidden:
Contrib-Mapbuilder-Tutorial
```
----

View file

@ -1,9 +1,14 @@
# Contribs
```{sidebar} More contributions
Additional Evennia code snippets and contributions can be found
in the [Community Contribs & Snippets][forum] forum.
```
_Contribs_ are optional code snippets and systems contributed by
the Evennia community. They vary in size and complexity and
may be more specific about game types and styles than 'core' Evennia.
This page is auto-generated and summarizes all contribs currently included.
This page is auto-generated and summarizes all **46** contribs currently included
with the Evennia distribution.
All contrib categories are imported from `evennia.contrib`, such as
@ -13,16 +18,34 @@ Each contrib contains installation instructions for how to integrate it
with your other code. If you want to tweak the code of a contrib, just
copy its entire folder to your game directory and modify/use it from there.
> Hint: Additional (potentially un-maintained) code snippets from the community can be found
in our discussion forum's [Community Contribs & Snippets](https://github.com/evennia/evennia/discussions/categories/community-contribs-snippets) category.
If you want to contribute yourself, see [here](../Contributing.md)!
[forum]: https://github.com/evennia/evennia/discussions/categories/community-contribs-snippets
## Index
| | | | | | | |
|---|---|---|---|---|---|---|
| [base_systems](#base_systems) | [full_systems](#full_systems) | [game_systems](#game_systems) | [grid](#grid) | [rpg](#rpg) | [tutorials](#tutorials) | [utils](#utils) |
| | | | | |
|---|---|---|---|---|
| [auditing](#auditing) | [awsstorage](#awsstorage) | [barter](#barter) | [batchprocessor](#batchprocessor) | [bodyfunctions](#bodyfunctions) |
| [buffs](#buffs) | [building_menu](#building_menu) | [character_creator](#character_creator) | [clothing](#clothing) | [color_markups](#color_markups) |
| [components](#components) | [cooldowns](#cooldowns) | [crafting](#crafting) | [custom_gametime](#custom_gametime) | [dice](#dice) |
| [email_login](#email_login) | [evadventure](#evadventure) | [evscaperoom](#evscaperoom) | [extended_room](#extended_room) | [fieldfill](#fieldfill) |
| [gendersub](#gendersub) | [git_integration](#git_integration) | [health_bar](#health_bar) | [ingame_map_display](#ingame_map_display) | [ingame_python](#ingame_python) |
| [mail](#mail) | [mapbuilder](#mapbuilder) | [menu_login](#menu_login) | [mirror](#mirror) | [multidescer](#multidescer) |
| [mux_comms_cmds](#mux_comms_cmds) | [name_generator](#name_generator) | [puzzles](#puzzles) | [random_string_generator](#random_string_generator) | [red_button](#red_button) |
| [rpsystem](#rpsystem) | [simpledoor](#simpledoor) | [slow_exit](#slow_exit) | [talking_npc](#talking_npc) | [traits](#traits) |
| [tree_select](#tree_select) | [turnbattle](#turnbattle) | [tutorial_world](#tutorial_world) | [unixcommand](#unixcommand) | [wilderness](#wilderness) |
| [xyzgrid](#xyzgrid) |
## base_systems
_This category contains systems that are not necessarily tied to a specific
in-game mechanic but is useful for the game as a whole. Examples include
_Systems that are not necessarily tied to a specific
in-game mechanic but which are useful for the game as a whole. Examples include
login systems, new command syntaxes, and build helpers._
```{toctree}
@ -41,7 +64,7 @@ Contrib-Unixcommand.md
```
### Contrib: `awsstorage`
### `awsstorage`
_Contrib by The Right Honourable Reverend (trhr), 2020_
@ -53,7 +76,7 @@ cloud hosting. Great for those serving media with the game.
### Contrib: `building_menu`
### `building_menu`
_Contrib by vincent-lg, 2018_
@ -68,7 +91,7 @@ that will edit any default object, offering to change its key and description.
### Contrib: `color_markups`
### `color_markups`
_Contrib by Griatch, 2017_
@ -80,7 +103,7 @@ Additional color markup styles for Evennia (extending or replacing the default
### Contrib: `components`
### `components`
__Contrib by ChrisLR 2021__
@ -90,7 +113,7 @@ __Contrib by ChrisLR 2021__
### Contrib: `custom_gametime`
### `custom_gametime`
_Contrib by vlgeoff, 2017 - based on Griatch's core original_
@ -103,7 +126,7 @@ in-game times, but now taking this custom calendar into account.
### Contrib: `email_login`
### `email_login`
_Contrib by Griatch, 2012_
@ -115,7 +138,7 @@ it just uses it as the identifier rather than a username.
### Contrib: `ingame_python`
### `ingame_python`
_Contrib by Vincent Le Goff 2017_
@ -132,7 +155,7 @@ this module carefully before continuing.
### Contrib: `menu_login`
### `menu_login`
_Contribution by Vincent-lg 2016. Reworked for modern EvMenu by Griatch, 2019._
@ -144,7 +167,7 @@ menu system `EvMenu` under the hood.
### Contrib: `mux_comms_cmds`
### `mux_comms_cmds`
_Contribution by Griatch 2021_
@ -158,7 +181,7 @@ main `channel` command is still called under the hood.
### Contrib: `unixcommand`
### `unixcommand`
_Contribution by Vincent Le Geoff (vlgeoff), 2017_
@ -178,8 +201,8 @@ library under the hood.
## full_systems
_This category contains 'complete' game engines that can be used directly
to start creating content without no further additions (unless you want to)._
_'Complete' game engines that can be used directly to start creating content
without no further additions (unless you want to)._
```{toctree}
:maxdepth: 1
@ -188,7 +211,7 @@ Contrib-Evscaperoom.md
```
### Contrib: `evscaperoom`
### `evscaperoom`
_Contribution by Griatch, 2019_
@ -207,10 +230,10 @@ content but contains the utilities and base classes and an empty example room.
## game_systems
_This category holds code implementing in-game gameplay systems like
crafting, mail, combat and more. Each system is meant to be adopted
piecemeal and adopted for your game. This does not include
roleplaying-specific systems, those are found in the `rpg` folder._
_In-game gameplay systems like crafting, mail, combat and more.
Each system is meant to be adopted piecemeal and adopted for your game.
This does not include roleplaying-specific systems, those are found in
the `rpg` category._
```{toctree}
:maxdepth: 1
@ -227,7 +250,7 @@ Contrib-Turnbattle.md
```
### Contrib: `barter`
### `barter`
_Contribution by Griatch, 2012_
@ -243,7 +266,7 @@ transactions.
### Contrib: `clothing`
### `clothing`
_Contribution by Tim Ashley Jenkins, 2017_
@ -254,7 +277,7 @@ look of these clothes are appended to the character's description when worn.
### Contrib: `cooldowns`
### `cooldowns`
_Contribution by owllex, 2021_
@ -268,7 +291,7 @@ asynchronous timer that you can query to see if a certain time has yet passed.
### Contrib: `crafting`
### `crafting`
_Contribution by Griatch 2020_
@ -281,7 +304,7 @@ combine 'flour', 'water' and 'yeast' with an 'oven' to bake a 'loaf of bread'.
### Contrib: `gendersub`
### `gendersub`
_Contribution by Griatch 2015_
@ -294,7 +317,7 @@ inspiration and starting point to how to do stuff like this.
### Contrib: `mail`
### `mail`
_Contribution by grungies1138 2016_
@ -307,7 +330,7 @@ on their own.
### Contrib: `multidescer`
### `multidescer`
_Contribution by Griatch 2016_
@ -321,7 +344,7 @@ work well together with the `rpsystem` contrib.
### Contrib: `puzzles`
### `puzzles`
_Contribution by Henddher 2018_
@ -335,7 +358,7 @@ the puzzle entirely from in-game.
### Contrib: `turnbattle`
### `turnbattle`
_Contribution by Tim Ashley Jenkins, 2017_
@ -356,8 +379,8 @@ the participants until the fight ends.
## grid
_Systems related to the game world's topology and structure. This has
contribs related to rooms, exits and map building._
_Systems related to the game world's topology and structure. Contribs related
to rooms, exits and map building._
```{toctree}
:maxdepth: 1
@ -372,7 +395,7 @@ Contrib-XYZGrid.md
```
### Contrib: `extended_room`
### `extended_room`
_Contribution - Griatch 2012, vincent-lg 2019_
@ -385,7 +408,7 @@ supported by new `look` and `desc` commands.
### Contrib: `ingame_map_display`
### `ingame_map_display`
_Contribution - helpme 2022_
@ -398,7 +421,7 @@ directions are ignored.
### Contrib: `mapbuilder`
### `mapbuilder`
_Contribution by Cloud_Keeper 2016_
@ -408,7 +431,7 @@ Build a game map from the drawing of a 2D ASCII map.
### Contrib: `simpledoor`
### `simpledoor`
_Contribution by Griatch, 2016_
@ -420,7 +443,7 @@ destroyable etc.
### Contrib: `slow_exit`
### `slow_exit`
_Contribution by Griatch 2014_
@ -433,7 +456,7 @@ and abort an ongoing traversal, respectively.
### Contrib: `wilderness`
### `wilderness`
_Contribution by titeuf87, 2017_
@ -446,7 +469,7 @@ long as the rooms are relatively similar (name/desc changing).
### Contrib: `xyzgrid`
### `xyzgrid`
_Contribution by Griatch 2021_
@ -466,7 +489,7 @@ current location (useful for displaying the grid as an in-game, updating map).
## rpg
_These are systems specifically related to roleplaying
_Systems specifically related to roleplaying
and rule implementation like character traits, dice rolling and emoting._
```{toctree}
@ -481,7 +504,7 @@ Contrib-Traits.md
```
### Contrib: `buffs`
### `buffs`
_Contribution by Tegiminis 2022_
@ -492,7 +515,7 @@ It is a common design pattern in RPGs, particularly action games.
### Contrib: `character_creator`
### `character_creator`
_Commands for managing and initiating an in-game character-creation menu._
@ -502,7 +525,7 @@ Contribution by InspectorCaracal, 2022
### Contrib: `dice`
### `dice`
_Contribution by Griatch, 2012_
@ -515,7 +538,7 @@ rolls for use by a human game master.
### Contrib: `health_bar`
### `health_bar`
_Contribution by Tim Ashley Jenkins, 2017_
@ -528,7 +551,7 @@ and can be used for any sort of appropriate data besides player health.
### Contrib: `rpsystem`
### `rpsystem`
_Contribution by Griatch, 2015_
@ -544,7 +567,7 @@ very powerful in-emote reference system, for referencing and differentiate targe
### Contrib: `traits`
### `traits`
_Contribution by Griatch 2020, based on code by Whitenoise and Ainneve contribs, 2014_
@ -567,7 +590,8 @@ healed).
_Helper resources specifically meant to teach a development concept or
to exemplify an Evennia system. Any extra resources tied to documentation
tutorials are found here. Also the home of the Tutorial World demo adventure._
tutorials are found here. Also the home of the Tutorial-World and Evadventure
demo codes._
```{toctree}
:maxdepth: 1
@ -582,7 +606,7 @@ Contrib-Tutorial-World.md
```
### Contrib: `batchprocessor`
### `batchprocessor`
_Contibution by Griatch, 2012_
@ -594,7 +618,7 @@ control and then 'applied' to the game to create content.
### Contrib: `bodyfunctions`
### `bodyfunctions`
_Contribution by Griatch, 2012_
@ -605,7 +629,7 @@ character make small verbal observations at irregular intervals.
### Contrib: `evadventure`
### `evadventure`
_Contrib by Griatch 2022_
@ -620,7 +644,7 @@ perfection.
### Contrib: `mirror`
### `mirror`
_Contribution by Griatch, 2017_
@ -630,7 +654,7 @@ A simple mirror object to experiment with. It will respond to being looked at.
### Contrib: `red_button`
### `red_button`
_Contribution by Griatch, 2011_
@ -641,7 +665,7 @@ object with its own functionality and state tracking.
### Contrib: `talking_npc`
### `talking_npc`
_Contribution by Griatch 2011. Updated by grungies1138, 2016_
@ -652,7 +676,7 @@ conversation. Suitable for example as a quest giver or merchant.
### Contrib: `tutorial_world`
### `tutorial_world`
_Contribution by Griatch 2011, 2015_
@ -673,8 +697,7 @@ is a great way to start learning the system.
## utils
_Miscellaneous, optional tools for manipulating text, auditing connections
and more._
_Miscellaneous, tools for manipulating text, security auditing, and more._
```{toctree}
:maxdepth: 1
@ -688,7 +711,7 @@ Contrib-Tree-Select.md
```
### Contrib: `auditing`
### `auditing`
_Contribution by Johnny, 2017_
@ -700,7 +723,7 @@ quality assurance, post-incident investigations and debugging.
### Contrib: `fieldfill`
### `fieldfill`
_Contribution by Tim Ashley Jenkins, 2018_
@ -716,7 +739,7 @@ to any callable of your choice.
### Contrib: `git_integration`
### `git_integration`
_Contribution by helpme (2022)_
@ -726,7 +749,7 @@ A module to integrate a stripped-down version of git within the game, allowing d
### Contrib: `name_generator`
### `name_generator`
_Contribution by InspectorCaracal (2022)_
@ -739,7 +762,7 @@ and used under the [CC BY-SA 4.0 license](https://creativecommons.org/licenses/b
### Contrib: `random_string_generator`
### `random_string_generator`
_Contribution by Vincent Le Goff (vlgeoff), 2017_
@ -752,7 +775,7 @@ passwords and so on. The strings generated will be stored and won't be repeated.
### Contrib: `tree_select`
### `tree_select`
_Contribution by Tim Ashley Jenkins, 2017_

View file

@ -52,7 +52,7 @@ Evennia comes with a default set of commands for the Python newbies and for thos
### I know basic Python, or I am willing to learn
Evennia's source code is [extensively documented](https://www.evennia.com/docs/latest). But while Python is considered a very easy programming language to get into, you do have a learning curve to climb if you are new to programming. Evennia's [Starting-tutorial](Howtos/Beginner-Tutorial/Part1/Beginner-Tutorial-Part1-Intro.md) has a [basic introduction to Python](Howtos/Beginner-Tutorial/Part1/Beginner-Tutorial-Python-basic-introduction.md) but you should probably also sit down with a full Python beginner's tutorial at some point (there are plenty of them on the web if you look around). See also our [link page](./Links.md) for some reading suggestions.
Evennia's source code is [extensively documented](https://www.evennia.com/docs/latest). But while Python is considered a very easy programming language to get into, you do have a learning curve to climb if you are new to programming. Evennia's [Starting-tutorial](Howtos/Beginner-Tutorial/Part1/Beginner-Tutorial-Part1-Overview.md) has a [basic introduction to Python](Howtos/Beginner-Tutorial/Part1/Beginner-Tutorial-Python-basic-introduction.md) but you should probably also sit down with a full Python beginner's tutorial at some point (there are plenty of them on the web if you look around). See also our [link page](./Links.md) for some reading suggestions.
To code your dream game in Evennia you don't need to be a Python guru, but you do need to be able to read example code containing at least these basic Python features:
@ -78,6 +78,6 @@ presence (a website and a mud web client) to play around with ...
## Where to from here?
It's recommended you jump into the [Beginner Tutorial](Howtos/Beginner-Tutorial/Beginner-Tutorial-Intro.md). You can either follow it or jump around to lessons that seem interesting. You can also read the lead developer's [dev blog](https://www.evennia.com/devblog/index.html) for many tidbits and snippets about Evennia's development and structure.
It's recommended you jump into the [Beginner Tutorial](Howtos/Beginner-Tutorial/Beginner-Tutorial-Overview.md). You can either follow it or jump around to lessons that seem interesting. You can also read the lead developer's [dev blog](https://www.evennia.com/devblog/index.html) for many tidbits and snippets about Evennia's development and structure.
Sometimes it's easier to ask for help. Get engaged in the Evennia community by joining our [Discord](https://discord.gg/AJJpcRUhtF) for direct support. Make an introductory post to our [Discussion forum](https://github.com/evennia/evennia/discussions) and say hi!.

View file

@ -1,114 +0,0 @@
# Beginner Tutorial
```{sidebar} Beginner Tutorial Parts
- **[Introduction](./Beginner-Tutorial-Intro.md)**
<br>Getting set up.
- Part 1: [What we have](Part1/Beginner-Tutorial-Part1-Intro.md)
<br>A tour of Evennia and how to use the tools, including an introduction to Python.
- Part 2: [What we want](Part2/Beginner-Tutorial-Part2-Intro.md)
<br>Planning our tutorial game and what to think about when planning your own in the future.
- Part 3: [How we get there](Part3/Beginner-Tutorial-Part3-Intro.md)
<br>Getting down to the meat of extending Evennia to make our game
- Part 4: [Using what we created](Part4/Beginner-Tutorial-Part4-Intro.md)
<br>Building a tech-demo and world content to go with our code
- Part 5: [Showing the world](Part5/Beginner-Tutorial-Part5-Intro.md)
<br>Taking our new game online and let players try it out
```
Welcome to Evennia! This multi-part Beginner 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!
Use the menu on the right to get the index of each tutorial-part. Use the [next](Part1/Beginner-Tutorial-Part1-Intro.md)
and [previous](../Howtos-Overview.md) links to step from lesson to lesson.
## Things you need
- A Command line
- A MUD client (or web browser)
- A text-editor/IDE
- Evennia installed and a game-dir initialized
### A Command line
You need to know how to find your Terminal/Console in your OS. The Evennia server can be controlled
from in-game, but you _will_ need to use the command-line to get anywhere. Here are some starters:
- [Django-girls' Intro to the Command line for different OS:es](https://tutorial.djangogirls.org/en/intro_to_command_line/)
Note that we usually only show forward-slashes `/` for file system paths. Windows users should mentally convert this to
back-slashes `\` instead.
### A MUD client
You might already have a MUD-client you prefer. Check out the [grid of supported clients](../../Setup/Client-Support-Grid.md) for aid.
If telnet's not your thing, you can also just use Evennia's web client in your browser.
> In this documentation we often use the terms 'MUD', 'MU' or 'MU*' interchangeably
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.
### An Editor
You need a text-editor to edit Python source files. Most everything that can edit and output raw
text works (so not Word).
- [Here's a blog post summing up some of the alternatives](https://www.elegantthemes.com/blog/resources/best-code-editors) - these
things don't 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 that's not suitable for beginners.
> Hint: When setting up your editor, make sure that pressing TAB inserts _4 spaces_ rather than a Tab-character. Since
> Python is whitespace-aware, this will make your life a lot easier.
### Set up a game dir for the tutorial
Next you should make sure you have [installed Evennia](../../Setup/Installation.md). 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; it's up to you.
- If you want a new gamedir for the tutorial game and already have Evennia running with another gamedir,
first enter that gamedir and run
evennia stop
> If you want to run two parallel servers, that'd be fine too, but one would have to use
> different ports from the defaults, or there'd be a clash. We will go into changing settings later.
- Now go to where you want to create your tutorial-game. We will always refer to it as `mygame` so
it may be convenient if you do too:
evennia --init mygame
cd mygame
evennia migrate
evennia start --log
Add your superuser name and password at the prompt (email is optional). Make sure you can
go to `localhost:4000` in your MUD client or to [http://localhost:4001](http://localhost:4001)
in your web browser (Mac users: Try `127.0.0.1` instead of `localhost` if you have trouble).
The above `--log` 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 `Ctrl-C` (`Cmd-C` on Mac). To see
the log again just run
evennia --log
You should now be good to go on to [the first part of the tutorial](Part1/Beginner-Tutorial-Part1-Intro.md).
Good luck!
<details>
<summary>
Click here to expand a list of all Beginner-Tutorial sections (all parts).
</summary>
```{toctree}
Part1/Beginner-Tutorial-Part1-Intro
Part2/Beginner-Tutorial-Part2-Intro
Part3/Beginner-Tutorial-Part3-Intro
Part4/Beginner-Tutorial-Part4-Intro
Part5/Beginner-Tutorial-Part5-Intro
```
</details>

View file

@ -0,0 +1,82 @@
# Beginner Tutorial
```{sidebar} Beginner Tutorial Parts
- **[Introduction](./Beginner-Tutorial-Overview.md)**
<br>Getting set up.
- Part 1: [What we have](Part1/Beginner-Tutorial-Part1-Overview.md)
<br>A tour of Evennia and how to use the tools, including an introduction to Python.
- Part 2: [What we want](Part2/Beginner-Tutorial-Part2-Overview.md)
<br>Planning our tutorial game and what to think about when planning your own in the future.
- Part 3: [How we get there](Part3/Beginner-Tutorial-Part3-Overview.md)
<br>Getting down to the meat of extending Evennia to make our game
- Part 4: [Using what we created](Part4/Beginner-Tutorial-Part4-Overview.md)
<br>Building a tech-demo and world content to go with our code
- Part 5: [Showing the world](Part5/Beginner-Tutorial-Part5-Overview.md)
<br>Taking our new game online and let players try it out
```
Welcome to Evennia! This multi-part Beginner Tutorial will help you get off the ground.
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!
Use the menu on the right to get the index of each tutorial-part. Use the [next](Part1/Beginner-Tutorial-Part1-Overview.md) and [previous](../Howtos-Overview.md) links at the top/bottom right of the page to step between lessons.
## Things you need
- A Command line
- A MUD client (or web browser)
- A text-editor/IDE
- Evennia installed and a game-dir initialized
### A Command line
You need to know how to find your Terminal/Console in your OS. The Evennia server can be controlled from in-game, but you _will_ need to use the command-line to get anywhere. Here are some starters:
- [Online Intro to the Command line for different OS:es](https://tutorial.djangogirls.org/en/intro_to_command_line/)
> Note that we usually only show forward-slashes `/` for file system paths. Windows users should mentally convert this to back-slashes `\` instead.
### A MUD client
You might already have a MUD-client you prefer. Check out the [grid of supported clients](../../Setup/Client-Support-Grid.md).
If telnet's not your thing, you can also just use Evennia's web client in your browser.
> In this documentation we often use the terms 'MUD', 'MU' or 'MU*' interchangeably 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.
### A text Editor or IDE
You need a text-editor to edit Python source files. Most everything that can edit and output raw
text works (so not Word).
- [Here's a blog post summing up some of the alternatives](https://www.elegantthemes.com/blog/resources/best-code-editors) - these things don't 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 that's not suitable for beginners.
```{important} Use spaces, not tabs
```
> Make sure to configure your editor so that pressing TAB inserts _4 spaces_ rather than a Tab-character. Since Python is whitespace-aware, this will make your life a lot easier.
### A fresh game dir?
You should make sure you have [installed Evennia](../../Setup/Installation.md). If you followed the instructions you will already have created a game-dir.
You could re-use that or make a new one only for this tutorial, it's up to you.
If you already have a game dir and want a separate one for the tutorial, use `evennia stop` to halt the running server and then [Initialize a new game dir](../../Setup/Installation.md#initialize-a-new-game) somewhere else (_not_ inside the previous game dir!). We refer to it everywhere as `mygame`, so you may want to do the same.
You should now be ready to move on to the [first lesson](Part1/Beginner-Tutorial-Part1-Overview.md)
<details>
<summary>
Click here to expand a list of all Beginner-Tutorial sections (all parts).
</summary>
```{toctree}
Part1/Beginner-Tutorial-Part1-Overview
Part2/Beginner-Tutorial-Part2-Overview
Part3/Beginner-Tutorial-Part3-Overview
Part4/Beginner-Tutorial-Part4-Overview
Part5/Beginner-Tutorial-Part5-Overview
```
</details>

View file

@ -1,17 +1,17 @@
# Part 1: What we have
```{sidebar} Beginner Tutorial Parts
- [Introduction](../Beginner-Tutorial-Intro.md)
- [Introduction](../Beginner-Tutorial-Overview.md)
<br>Getting set up.
- Part 1: **[What we have](./Beginner-Tutorial-Part1-Intro.md)**
- Part 1: **[What we have](./Beginner-Tutorial-Part1-Overview.md)**
<br>A tour of Evennia and how to use the tools, including an introduction to Python.
- Part 2: [What we want](../Part2/Beginner-Tutorial-Part2-Intro.md)
- Part 2: [What we want](../Part2/Beginner-Tutorial-Part2-Overview.md)
<br>Planning our tutorial game and what to think about when planning your own in the future.
- Part 3: [How we get there](../Part3/Beginner-Tutorial-Part3-Intro.md)
- Part 3: [How we get there](../Part3/Beginner-Tutorial-Part3-Overview.md)
<br>Getting down to the meat of extending Evennia to make our game
- Part 4: [Using what we created](../Part4/Beginner-Tutorial-Part4-Intro.md)
- Part 4: [Using what we created](../Part4/Beginner-Tutorial-Part4-Overview.md)
<br>Building a tech-demo and world content to go with our code
- Part 5: [Showing the world](../Part5/Beginner-Tutorial-Part5-Intro.md)
- Part 5: [Showing the world](../Part5/Beginner-Tutorial-Part5-Overview.md)
<br>Taking our new game online and let players try it out
```

View file

@ -1,17 +1,17 @@
# Part 2: What we want
```{sidebar} Beginner Tutorial Parts
- [Introduction](../Beginner-Tutorial-Intro.md)
- [Introduction](../Beginner-Tutorial-Overview.md)
<br>Getting set up.
- Part 1: [What we have](../Part1/Beginner-Tutorial-Part1-Intro.md)
- Part 1: [What we have](../Part1/Beginner-Tutorial-Part1-Overview.md)
<br>A tour of Evennia and how to use the tools, including an introduction to Python.
- **Part 2: [What we want](./Beginner-Tutorial-Part2-Intro.md)**
- **Part 2: [What we want](./Beginner-Tutorial-Part2-Overview.md)**
<br>Planning our tutorial game and what to think about when planning your own in the future.
- Part 3: [How we get there](../Part3/Beginner-Tutorial-Part3-Intro.md)
- Part 3: [How we get there](../Part3/Beginner-Tutorial-Part3-Overview.md)
<br>Getting down to the meat of extending Evennia to make our game
- Part 4: [Using what we created](../Part4/Beginner-Tutorial-Part4-Intro.md)
- Part 4: [Using what we created](../Part4/Beginner-Tutorial-Part4-Overview.md)
<br>Building a tech-demo and world content to go with our code
- Part 5: [Showing the world](../Part5/Beginner-Tutorial-Part5-Intro.md)
- Part 5: [Showing the world](../Part5/Beginner-Tutorial-Part5-Overview.md)
<br>Taking our new game online and let players try it out
```

View file

@ -7,17 +7,17 @@ from it at this time.
```
```{sidebar} Beginner Tutorial Parts
- [Introduction](../Beginner-Tutorial-Intro.md)
- [Introduction](../Beginner-Tutorial-Overview.md)
<br>Getting set up.
- Part 1: [What we have](../Part1/Beginner-Tutorial-Part1-Intro.md)
- Part 1: [What we have](../Part1/Beginner-Tutorial-Part1-Overview.md)
<br>A tour of Evennia and how to use the tools, including an introduction to Python.
- Part 2: [What we want](../Part2/Beginner-Tutorial-Part2-Intro.md)
- Part 2: [What we want](../Part2/Beginner-Tutorial-Part2-Overview.md)
<br>Planning our tutorial game and what to think about when planning your own in the future.
- **Part 3: [How we get there](./Beginner-Tutorial-Part3-Intro.md)**
- **Part 3: [How we get there](./Beginner-Tutorial-Part3-Overview.md)**
<br>Getting down to the meat of extending Evennia to make our game
- Part 4: [Using what we created](../Part4/Beginner-Tutorial-Part4-Intro.md)
- Part 4: [Using what we created](../Part4/Beginner-Tutorial-Part4-Overview.md)
<br>Building a tech-demo and world content to go with our code
- Part 5: [Showing the world](../Part5/Beginner-Tutorial-Part5-Intro.md)
- Part 5: [Showing the world](../Part5/Beginner-Tutorial-Part5-Overview.md)
<br>Taking our new game online and let players try it out
```

View file

@ -1,34 +0,0 @@
# Part 4: Using what we created
```{sidebar} Beginner Tutorial Parts
- [Introduction](../Beginner-Tutorial-Intro.md)
<br>Getting set up.
- Part 1: [What we have](../Part1/Beginner-Tutorial-Part1-Intro.md)
<br>A tour of Evennia and how to use the tools, including an introduction to Python.
- Part 2: [What we want](../Part2/Beginner-Tutorial-Part2-Intro.md)
<br>Planning our tutorial game and what to think about when planning your own in the future.
- Part 3: [How we get there](../Part3/Beginner-Tutorial-Part3-Intro.md)
<br>Getting down to the meat of extending Evennia to make our game
- **Part 4: [Using what we created](./Beginner-Tutorial-Part4-Intro.md)**
<br>Building a tech-demo and world content to go with our code
- Part 5: [Showing the world](../Part5/Beginner-Tutorial-Part5-Intro.md)
<br>Taking our new game online and let players try it out
```
We now have the code underpinnings of everything we need. We have also tested the various components
and has a simple tech-demo to show it all works together. But there is no real coherence to it at this
point - we need to actually make a world.
In part four we will expand our tech demo into a more full-fledged (if small) game by use of batchcommand
and batchcode processors.
## Lessons
_TODO_
```{toctree}
:numbered:
:maxdepth: 2
../../../Unimplemented.md
```

View file

@ -0,0 +1,30 @@
# Part 4: Using what we created
```{sidebar} Beginner Tutorial Parts
- [Introduction](../Beginner-Tutorial-Overview.md)
<br>Getting set up.
- Part 1: [What we have](../Part1/Beginner-Tutorial-Part1-Overview.md)
<br>A tour of Evennia and how to use the tools, including an introduction to Python.
- Part 2: [What we want](../Part2/Beginner-Tutorial-Part2-Overview.md)
<br>Planning our tutorial game and what to think about when planning your own in the future.
- Part 3: [How we get there](../Part3/Beginner-Tutorial-Part3-Overview.md)
<br>Getting down to the meat of extending Evennia to make our game
- **Part 4: [Using what we created](./Beginner-Tutorial-Part4-Overview.md)**
<br>Building a tech-demo and world content to go with our code
- Part 5: [Showing the world](../Part5/Beginner-Tutorial-Part5-Overview.md)
<br>Taking our new game online and let players try it out
```
We now have the code underpinnings of everything we need. We have also tested the various components and has a simple tech-demo to show it all works together. But there is no real coherence to it at this point - we need to actually make a world. In part four we will expand our tech demo into a more full-fledged (if small) game by use of batchcommand and batchcode processors.
## Lessons
_TODO_
```{toctree}
:numbered:
:maxdepth: 2
../../../Unimplemented.md
```

View file

@ -31,7 +31,7 @@ instructions. Initialize a new game directory with `evennia init
<gamedirname>`. In this tutorial we assume your game dir is simply named `mygame`. You can use the
default database and keep all other settings to default for now. Familiarize yourself with the
`mygame` folder before continuing. You might want to browse the
[First Steps Coding](Beginner-Tutorial/Part1/Beginner-Tutorial-Part1-Intro.md) tutorial, just to see roughly where things are modified.
[First Steps Coding](Beginner-Tutorial/Part1/Beginner-Tutorial-Part1-Overview.md) tutorial, just to see roughly where things are modified.
## The Game Master role

View file

@ -1,11 +1,8 @@
# Gametime Tutorial
# Changing game calendar and time speed
A lot of games use a separate time system we refer to as *game time*. This runs in parallel to what
we usually think of as *real time*. The game time might run at a different speed, use different
names for its time units or might even use a completely custom calendar. You don't need to rely on a
game time system at all. But if you do, Evennia offers basic tools to handle these various
situations. This tutorial will walk you through these features.
A lot of games use a separate time system we refer to as *game time*. This runs in parallel to what we usually think of as *real time*. The game time might run at a different speed, use different
names for its time units or might even use a completely custom calendar. You don't need to rely on a game time system at all. But if you do, Evennia offers basic tools to handle these various situations. This tutorial will walk you through these features.
## A game time with a standard calendar
@ -18,8 +15,7 @@ in-game perceived one is easy.
- The intricacies of the real world calendar, with leap years and months of different length etc are
automatically handled by the system.
Evennia's game time features assume a standard calendar (see the relevant section below for a custom
calendar).
Evennia's game time features assume a standard calendar (see the relevant section below for a custom calendar).
### Setting up game time for a standard calendar
@ -39,11 +35,7 @@ TIME_FACTOR = 2.0
TIME_GAME_EPOCH = None
```
By default, the game time runs twice as fast as the real time. You can set the time factor to be 1
(the game time would run exactly at the same speed than the real time) or lower (the game time will
be slower than the real time). Most games choose to have the game time spinning faster (you will
find some games that have a time factor of 60, meaning the game time runs sixty times as fast as the
real time, a minute in real time would be an hour in game time).
By default, the game time runs twice as fast as the real time. You can set the time factor to be 1 (the game time would run exactly at the same speed than the real time) or lower (the game time will be slower than the real time). Most games choose to have the game time spinning faster (you will find some games that have a time factor of 60, meaning the game time runs sixty times as fast as the real time, a minute in real time would be an hour in game time).
The epoch is a slightly more complex setting. It should contain a number of seconds that would
indicate the time your game started. As indicated, an epoch of 0 would mean January 1st, 1970. If
@ -59,8 +51,7 @@ start = datetime(2020, 1, 1)
time.mktime(start.timetuple())
```
This should return a huge number - the number of seconds since Jan 1 1970. Copy that directly into
your settings (editing `server/conf/settings.py`):
This should return a huge number - the number of seconds since Jan 1 1970. Copy that directly into your settings (editing `server/conf/settings.py`):
```python
# in a file settings.py in mygame/server/conf
@ -93,22 +84,15 @@ time updated correctly... and going (by default) twice as fast as the real time.
### Time-related events
The `gametime` utility also has a way to schedule game-related events, taking into account your game
time, and assuming a standard calendar (see below for the same feature with a custom calendar). For
instance, it can be used to have a specific message every (in-game) day at 6:00 AM showing how the
sun rises.
The `gametime` utility also has a way to schedule game-related events, taking into account your game time, and assuming a standard calendar (see below for the same feature with a custom calendar). For instance, it can be used to have a specific message every (in-game) day at 6:00 AM showing how the sun rises.
The function `schedule()` should be used here. It will create a [script](../Components/Scripts.md) with some
additional features to make sure the script is always executed when the game time matches the given
parameters.
The function `schedule()` should be used here. It will create a [script](../Components/Scripts.md) with some additional features to make sure the script is always executed when the game time matches the given parameters.
The `schedule` function takes the following arguments:
- The *callback*, a function to be called when time is up.
- The keyword `repeat` (`False` by default) to indicate whether this function should be called
repeatedly.
- Additional keyword arguments `sec`, `min`, `hour`, `day`, `month` and `year` to describe the time
to schedule. If the parameter isn't given, it assumes the current time value of this specific unit.
- The keyword `repeat` (`False` by default) to indicate whether this function should be called repeatedly.
- Additional keyword arguments `sec`, `min`, `hour`, `day`, `month` and `year` to describe the time to schedule. If the parameter isn't given, it assumes the current time value of this specific unit.
Here is a short example for making the sun rise every day:
@ -140,9 +124,7 @@ The script will be created silently. The `at_sunrise` function will now be calle
at 6 AM. You can use the `@scripts` command to see it. You could stop it using `@scripts/stop`. If
we hadn't set `repeat` the sun would only have risen once and then never again.
We used the `@py` command here: nothing prevents you from adding the system into your game code.
Remember to be careful not to add each event at startup, however, otherwise there will be a lot of
overlapping events scheduled when the sun rises.
We used the `@py` command here: nothing prevents you from adding the system into your game code. Remember to be careful not to add each event at startup, however, otherwise there will be a lot of overlapping events scheduled when the sun rises.
The `schedule` function when using `repeat` set to `True` works with the higher, non-specified unit.
In our example, we have specified hour, minute and second. The higher unit we haven't specified is
@ -156,26 +138,16 @@ such day in February, April etc. Similarly, leap years may change the number of
### A game time with a custom calendar
Using a custom calendar to handle game time is sometimes needed if you want to place your game in a
fictional universe. For instance you may want to create the Shire calendar which Tolkien described
having 12 months, each which 30 days. That would give only 360 days per year (presumably hobbits
weren't really fond of the hassle of following the astronomical calendar). Another example would be
creating a planet in a different solar system with, say, days 29 hours long and months of only 18
days.
Using a custom calendar to handle game time is sometimes needed if you want to place your game in a fictional universe. For instance you may want to create the Shire calendar which Tolkien described having 12 months, each which 30 days. That would give only 360 days per year (presumably hobbits weren't really fond of the hassle of following the astronomical calendar). Another example would be creating a planet in a different solar system with, say, days 29 hours long and months of only 18 days.
Evennia handles custom calendars through an optional *contrib* module, called `custom_gametime`.
Contrary to the normal `gametime` module described above it is not active by default.
### Setting up the custom calendar
In our first example of the Shire calendar, used by hobbits in books by Tolkien, we don't really
need the notion of weeks... but we need the notion of months having 30 days, not 28.
In our first example of the Shire calendar, used by hobbits in books by Tolkien, we don't really need the notion of weeks... but we need the notion of months having 30 days, not 28.
The custom calendar is defined by adding the `TIME_UNITS` setting to your settings file. It's a
dictionary containing as keys the name of the units, and as value the number of seconds (the
smallest unit for us) in this unit. Its keys must be picked among the following: "sec", "min",
"hour", "day", "week", "month" and "year" but you don't have to include them all. Here is the
configuration for the Shire calendar:
The custom calendar is defined by adding the `TIME_UNITS` setting to your settings file. It's a dictionary containing as keys the name of the units, and as value the number of seconds (the smallest unit for us) in this unit. Its keys must be picked among the following: "sec", "min", "hour", "day", "week", "month" and "year" but you don't have to include them all. Here is the configuration for the Shire calendar:
```python
# in a file settings.py in mygame/server/conf
@ -187,12 +159,9 @@ TIME_UNITS = {"sec": 1,
"year": 60 * 60 * 24 * 30 * 12 }
```
We give each unit we want as keys. Values represent the number of seconds in that unit. Hour is
set to 60 * 60 (that is, 3600 seconds per hour). Notice that we don't specify the week unit in this
configuration: instead, we skip from days to months directly.
We give each unit we want as keys. Values represent the number of seconds in that unit. Hour is set to 60 * 60 (that is, 3600 seconds per hour). Notice that we don't specify the week unit in this configuration: instead, we skip from days to months directly.
In order for this setting to work properly, remember all units have to be multiples of the previous
units. If you create "day", it needs to be multiple of hours, for instance.
In order for this setting to work properly, remember all units have to be multiples of the previous units. If you create "day", it needs to be multiple of hours, for instance.
So for our example, our settings may look like this:
@ -215,20 +184,17 @@ TIME_UNITS = {
}
```
Notice we have set a time epoch of 0. Using a custom calendar, we will come up with a nice display
of time on our own. In our case the game time starts at year 0, month 1, day 1, and at midnight.
Notice we have set a time epoch of 0. Using a custom calendar, we will come up with a nice display of time on our own. In our case the game time starts at year 0, month 1, day 1, and at midnight.
> Year, hour, minute and sec starts from 0, month, week and day starts from 1, this makes them
> behave consistently with the standard time.
Note that while we use "month", "week" etc in the settings, your game may not use those terms in-
game, instead referring to them as "cycles", "moons", "sand falls" etc. This is just a matter of you
Note that while we use "month", "week" etc in the settings, your game may not use those terms in- game, instead referring to them as "cycles", "moons", "sand falls" etc. This is just a matter of you
displaying them differently. See next section.
#### A command to display the current game time
As pointed out earlier, the `@time` command is meant to be used with a standard calendar, not a
custom one. We can easily create a new command though. We'll call it `time`, as is often the case
As pointed out earlier, the `@time` command is meant to be used with a standard calendar, not a custom one. We can easily create a new command though. We'll call it `time`, as is often the case
on other MU*. Here's an example of how we could write it (for the example, you can create a file
`gametime.py` in your `commands` directory and paste this code in it):
@ -287,8 +253,7 @@ class CharacterCmdSet(default_cmds.CharacterCmdSet):
self.add(CmdTime()) # <- Add
```
Reload your game with the `@reload` command. You should now see the `time` command. If you enter
it, you might see something like:
Reload your game with the `@reload` command. You should now see the `time` command. If you enter it, you might see something like:
We are in year 0, day 0, month 0.
It's 00:52:17.
@ -298,7 +263,4 @@ And if "months" are called "moons" in your game, this is where you'd add that.
## Time-related events in custom gametime
The `custom_gametime` module also has a way to schedule game-related events, taking into account
your game time (and your custom calendar). It can be used to have a specific message every day at
6:00 AM, to show the sun rises, for instance. The `custom_gametime.schedule` function works in the
same way as described for the default one above.
The `custom_gametime` module also has a way to schedule game-related events, taking into account your game time (and your custom calendar). It can be used to have a specific message every day at 6:00 AM, to show the sun rises, for instance. The `custom_gametime.schedule` function works in the same way as described for the default one above.

View file

@ -1,6 +1,8 @@
# Tutorials and Howto's
All Evennia tutorials. They will often refer to the [components](../Components/Components-Overview.md) or [concepts](../Concepts/Concepts-Overview.md) if you want to dive deeper.
```{sidebar} Want more details about something?
See the documentation about the Evennia core [Components](../Components/Components-Overview.md) and important [Concepts](../Concepts/Concepts-Overview.md).
```
## Beginner Tutorial
@ -13,43 +15,30 @@ Part 3 and onwards are still under development.
```{toctree}
:maxdepth: 3
./Beginner-Tutorial/Beginner-Tutorial-Intro
./Beginner-Tutorial/Part1/Beginner-Tutorial-Part1-Intro
./Beginner-Tutorial/Part2/Beginner-Tutorial-Part2-Intro
./Beginner-Tutorial/Part3/Beginner-Tutorial-Part3-Intro
./Beginner-Tutorial/Part4/Beginner-Tutorial-Part4-Intro
./Beginner-Tutorial/Part5/Beginner-Tutorial-Part5-Intro
./Beginner-Tutorial/Beginner-Tutorial-Overview
./Beginner-Tutorial/Part1/Beginner-Tutorial-Part1-Overview
./Beginner-Tutorial/Part2/Beginner-Tutorial-Part2-Overview
./Beginner-Tutorial/Part3/Beginner-Tutorial-Part3-Overview
./Beginner-Tutorial/Part4/Beginner-Tutorial-Part4-Overview
./Beginner-Tutorial/Part5/Beginner-Tutorial-Part5-Overview
```
## Howto's
```{toctree}
:maxdepth: 2
:maxdepth: 1
Howto-Command-Prompt.md
Howto-Command-Cooldown.md
Howto-Command-Duration.md
Howto-Default-Exit-Errors.md
Howto-Add-Object-Weight.md
```
## Mobs and NPCs
```{toctree}
:maxdepth: 1
Tutorial-NPC-Listening.md
Tutorial-NPC-Reacting.md
Tutorial-NPC-Merchants.md
```
## Vehicles
```{toctree}
:maxdepth: 1
Building-a-mech-tutorial.md
Tutorial-Vehicles.md
Tutorial-Building-a-Mech.md
Tutorial-Building-a-Train.md
```
## Systems
@ -57,37 +46,38 @@ Tutorial-Vehicles.md
:maxdepth: 1
Tutorial-Persistent-Handler.md
Gametime-Tutorial.md
Weather-Tutorial.md
Howto-Game-Time.md
Tutorial-Weather-Effects.md
Tutorial-Coordinates.md
Dynamic-In-Game-Map.md
Static-In-Game-Map.md
Tutorial-Tweeting-Game-Stats.md
Tutorial-Displaying-Room-Map.md
```
## Web-related tutorials
_Some of these will likely move into the Beginner tutorial later_.
```{toctree}
:maxdepth: 1
Web-Changing-Webpage.md
Web-Add-a-wiki.md
Web-Character-Generation.md
Web-Character-View-Tutorial.md
Web-Help-System-Tutorial.md
Web-Extending-the-REST-API
Web-Tweeting-Game-Stats.md
```
## Deep-dives
```{toctree}
:maxdepth: 1
Parsing-commands-tutorial.md
Tutorial-Parsing-Commands.md
Tutorial-Understanding-Color-Tags.md
Evennia-for-roleplaying-sessions.md
Evennia-for-Diku-Users.md
Evennia-for-MUSH-Users.md
Arxcode-Installation.md
Tutorial-Using-Arxcode.md
```
## Old tutorials

View file

@ -1,67 +1,49 @@
# Building a mech tutorial
# Building a giant mech
> This page was adapted from the article "Building a Giant Mech in Evennia" by Griatch, published in
Imaginary Realities Volume 6, issue 1, 2014. The original article is no longer available online,
this is a version adopted to be compatible with the latest Evennia.
Let us create a functioning giant mech in Evennia. Everyone likes a giant mech, right? Start in-game as a character with build privileges (or the superuser).
## Creating the Mech
Let us create a functioning giant mech using the Python MUD-creation system Evennia. Everyone likes
a giant mech, right? Start in-game as a character with build privileges (or the superuser).
@create/drop Giant Mech ; mech
create/drop Giant Mech ; mech
Boom. We created a Giant Mech Object and dropped it in the room. We also gave it an alias *mech*.
Lets describe it.
@desc mech = This is a huge mech. It has missiles and stuff.
desc mech = This is a huge mech. It has missiles and stuff.
Next we define who can “puppet” the mech object.
@lock mech = puppet:all()
lock mech = puppet:all()
This makes it so that everyone can control the mech. More mechs to the people! (Note that whereas
Evennias default commands may look vaguely MUX-like, you can change the syntax to look like
whatever interface style you prefer.)
This makes it so that everyone can control the mech. More mechs to the people! (Note that whereas Evennias default commands may look vaguely MUX-like, you can change the syntax to look like whatever interface style you prefer.)
Before we continue, lets make a brief detour. Evennia is very flexible about its objects and even
more flexible about using and adding commands to those objects. Here are some ground rules well
worth remembering for the remainder of this article:
Before we continue, lets make a brief detour. Evennia is very flexible about its objects and even more flexible about using and adding commands to those objects. Here are some ground rules well worth remembering for the remainder of this article:
- The [Account](../Components/Accounts.md) represents the real person logging in and has no game-world existence.
- Any [Object](../Components/Objects.md) can be puppeted by an Account (with proper permissions).
- [Characters](../Components/Objects.md#characters), [Rooms](../Components/Objects.md#rooms), and [Exits](../Components/Objects.md#exits) are just
children of normal Objects.
- [Characters](../Components/Objects.md#characters), [Rooms](../Components/Objects.md#rooms), and [Exits](../Components/Objects.md#exits) are just children of normal Objects.
- Any Object can be inside another (except if it creates a loop).
- Any Object can store custom sets of commands on it. Those commands can:
- be made available to the puppeteer (Account),
- be made available to anyone in the same location as the Object, and
- be made available to anyone “inside” the Object
- Also Accounts can store commands on themselves. Account commands are always available unless
commands on a puppeted Object explicitly override them.
- Also Accounts can store commands on themselves. Account commands are always available unless commands on a puppeted Object explicitly override them.
In Evennia, using the `@ic` command will allow you to puppet a given Object (assuming you have
puppet-access to do so). As mentioned above, the bog-standard Character class is in fact like any
Object: it is auto-puppeted when logging in and just has a command set on it containing the normal
in-game commands, like look, inventory, get and so on.
In Evennia, using the `ic` command will allow you to puppet a given Object (assuming you have puppet-access to do so). As mentioned above, the bog-standard Character class is in fact like any Object: it is auto-puppeted when logging in and just has a command set on it containing the normal in-game commands, like look, inventory, get and so on.
@ic mech
ic mech
You just jumped out of your Character and *are* now the mech! If people look at you in-game, they
will look at a mech. The problem at this point is that the mech Object has no commands of its own.
The usual things like look, inventory and get sat on the Character object, remember? So at the
moment the mech is not quite as cool as it could be.
@ic <Your old Character>
ic <Your old Character>
You just jumped back to puppeting your normal, mundane Character again. All is well.
> (But, you ask, where did that `@ic` command come from, if the mech had no commands on it? The
answer is that it came from the Account's command set. This is important. Without the Account being
the one with the `@ic` command, we would not have been able to get back out of our mech again.)
> Where did that `ic` command come from, if the mech had no commands on it? The
answer is that it came from the `Account`'s command set. This is important. Without the Account being the one with the `ic` command, we would not have been able to get back out of our mech again.
### Arming the Mech
## Make a Mech that can shoot
Let us make the mech a little more interesting. In our favorite text editor, we will create some new
mech-suitable commands. In Evennia, commands are defined as Python classes.
@ -109,20 +91,12 @@ class CmdLaunch(Command):
```
This is saved as a normal Python module (lets call it `mechcommands.py`), in a place Evennia looks
for such modules (`mygame/commands/`). This command will trigger when the player gives the command
“shoot”, “fire,” or even “fire!” with an exclamation mark. The mech can shoot in the air or at a
target if you give one. In a real game the gun would probably be given a chance to hit and give
This is saved as a normal Python module (lets call it `mechcommands.py`), in a place Evennia looks for such modules (`mygame/commands/`). This command will trigger when the player gives the command “shoot”, “fire,” or even “fire!” with an exclamation mark. The mech can shoot in the air or at a target if you give one. In a real game the gun would probably be given a chance to hit and give
damage to the target, but this is enough for now.
We also make a second command for launching missiles (`CmdLaunch`). To save
space we wont describe it here; it looks the same except it returns a text
about the missiles being fired and has different `key` and `aliases`. We leave
that up to you to create as an exercise. You could have it print "WOOSH! The
mech launches missiles against <target>!", for example.
We also make a second command for launching missiles (`CmdLaunch`). To save space we wont describe it here; it looks the same except it returns a text about the missiles being fired and has different `key` and `aliases`. We leave that up to you to create as an exercise. You could have it print `"WOOSH! The mech launches missiles against <target>!`, for example.
Now we shove our commands into a command set. A [Command Set](../Components/Command-Sets.md) (CmdSet) is a container
holding any number of commands. The command set is what we will store on the mech.
Now we shove our commands into a command set. A [Command Set](../Components/Command-Sets.md) (CmdSet) is a container holding any number of commands. The command set is what we will store on the mech.
```python
# in the same file mygame/commands/mechcommands.py
@ -142,37 +116,29 @@ class MechCmdSet(CmdSet):
self.add(CmdLaunch())
```
This simply groups all the commands we want. We add our new shoot/launch commands. Lets head back
into the game. For testing we will manually attach our new CmdSet to the mech.
This simply groups all the commands we want. We add our new shoot/launch commands. Lets head back into the game. For testing we will manually attach our new CmdSet to the mech.
@py self.search("mech").cmdset.add("commands.mechcommands.MechCmdSet")
py self.search("mech").cmdset.add("commands.mechcommands.MechCmdSet")
This is a little Python snippet (run from the command line as an admin) that searches for the mech
in our current location and attaches our new MechCmdSet to it. What we add is actually the Python
path to our cmdset class. Evennia will import and initialize it behind the scenes.
This is a little Python snippet that searches for the mech in our current location and attaches our new MechCmdSet to it. What we add is actually the Python path to our cmdset class. Evennia will import and initialize it behind the scenes.
@ic mech
ic mech
We are back as the mech! Lets do some shooting!
fire!
BOOM! The mech fires its gun in the air!
There we go, one functioning mech. Try your own `launch` command and see that it works too. We can
not only walk around as the mech — since the CharacterCmdSet is included in our MechCmdSet, the mech
can also do everything a Character could do, like look around, pick up stuff, and have an inventory.
We could now shoot the gun at a target or try the missile launch command. Once you have your own
mech, what else do you need?
There we go, one functioning mech. Try your own `launch` command and see that it works too. We can not only walk around as the mech — since the CharacterCmdSet is included in our MechCmdSet, the mech can also do everything a Character could do, like look around, pick up stuff, and have an inventory. We could now shoot the gun at a target or try the missile launch command. Once you have your own mech, what else do you need?
> Note: You'll find that the mech's commands are available to you by just standing in the same
> You'll find that the mech's commands are available to you by just standing in the same
location (not just by puppeting it). We'll solve this with a *lock* in the next section.
## Making a Mech production line
## Making an army of Mechs
What weve done so far is just to make a normal Object, describe it and put some commands on it.
This is great for testing. The way we added it, the MechCmdSet will even go away if we reload the
server. Now we want to make the mech an actual object “type” so we can create mechs without those
extra steps. For this we need to create a new Typeclass.
server. Now we want to make the mech an actual object “type” so we can create mechs without those extra steps. For this we need to create a new Typeclass.
A [Typeclass](../Components/Typeclasses.md) is a near-normal Python class that stores its existence to the database
behind the scenes. A Typeclass is created in a normal Python source file:
@ -196,42 +162,31 @@ class Mech(Object):
self.db.desc = "This is a huge mech. It has missiles and stuff."
```
For convenience we include the full contents of the default `CharacterCmdSet` in there. This will
make a Characters normal commands available to the mech. We also add the mech-commands from before,
making sure they are stored persistently in the database. The locks specify that anyone can puppet
the meck and no-one can "call" the mech's Commands from 'outside' it - you have to puppet it to be
able to shoot.
For convenience we include the full contents of the default `CharacterCmdSet` in there. This will make a Characters normal commands available to the mech. We also add the mech-commands from before, making sure they are stored persistently in the database. The locks specify that anyone can puppet the meck and no-one can "call" the mech's Commands from 'outside' it - you have to puppet it to be able to shoot.
Thats it. When Objects of this type are created, they will always start out with the mechs command
set and the correct lock. We set a default description, but you would probably change this with
`@desc` to individualize your mechs as you build them.
Thats it. When Objects of this type are created, they will always start out with the mechs command set and the correct lock. We set a default description, but you would probably change this with `desc` to individualize your mechs as you build them.
Back in the game, just exit the old mech (`@ic` back to your old character) then do
@create/drop The Bigger Mech ; bigmech : mech.Mech
create/drop The Bigger Mech ; bigmech : mech.Mech
We create a new, bigger mech with an alias bigmech. Note how we give the python-path to our
Typeclass at the end — this tells Evennia to create the new object based on that class (we don't
have to give the full path in our game dir `typeclasses.mech.Mech` because Evennia knows to look in
the `typeclasses` folder already). A shining new mech will appear in the room! Just use
have to give the full path in our game dir `typeclasses.mech.Mech` because Evennia knows to look in the `typeclasses` folder already). A shining new mech will appear in the room! Just use
@ic bigmech
ic bigmech
to take it on a test drive.
## Future Mechs
### Future Mechs
To expand on this you could add more commands to the mech and remove others. Maybe the mech
shouldnt work just like a Character after all. Maybe it makes loud noises every time it passes from
room to room. Maybe it cannot pick up things without crushing them. Maybe it needs fuel, ammo and
repairs. Maybe youll lock it down so it can only be puppeted by emo teenagers.
Having you puppet the mech-object directly is also just one way to implement a giant mech in
Evennia.
Having you puppet the mech-object directly is just one way to implement a giant mech in Evennia.
For example, you could instead picture a mech as a “vehicle” that you “enter” as your normal
Character (since any Object can move inside another). In that case the “insides” of the mech Object
could be the “cockpit”. The cockpit would have the `MechCommandSet` stored on itself and all the
shooting goodness would be made available to you only when you enter it.
Character (since any Object can move inside another). In that case the “insides” of the mech Object could be the “cockpit”. The cockpit would have the `MechCommandSet` stored on itself and all the shooting goodness would be made available to you only when you enter it.
And of course you could put more guns on it. And make it fly.
To expand on this you could add more commands to the mech and remove others. Maybe the mech shouldnt work just like a Character after all.
Maybe it makes loud noises every time it passes from room to room. Maybe it cannot pick up things without crushing them. Maybe it needs fuel, ammo and repairs. Maybe youll lock it down so it can only be puppeted by emo teenagers.
And of course you could put more guns on it. And make it fly.

View file

@ -1,15 +1,11 @@
# Tutorial Vehicles
# Building a train that moves
> TODO: This should be updated for latest Evennia use.
This tutorial explains how you can create vehicles that can move around in your world. The tutorial
will explain how to create a train, but this can be equally applied to create other kind of vehicles
Vehicles are things that you can enter and then move around in your game world. Here we'll explain how to create a train, but this can be equally applied to create other kind of vehicles
(cars, planes, boats, spaceships, submarines, ...).
## How it works
Objects in Evennia have an interesting property: you can put any object inside another object. This
is most obvious in rooms: a room in Evennia is just like any other game object (except rooms tend to
not themselves be inside anything else).
Objects in Evennia have an interesting property: you can put any object inside another object. This is most obvious in rooms: a room in Evennia is just like any other game object (except rooms tend to not themselves be inside anything else).
Our train will be similar: it will be an object that other objects can get inside. We then simply
move the Train, which brings along everyone inside it.
@ -20,7 +16,7 @@ The first step we need to do is create our train object, including a new typecla
create a new file, for instance in `mygame/typeclasses/train.py` with the following content:
```python
# file mygame/typeclasses/train.py
# in mygame/typeclasses/train.py
from evennia import DefaultObject
@ -35,28 +31,24 @@ class TrainObject(DefaultObject):
Now we can create our train in our game:
```
@create/drop train:train.TrainObject
create/drop train:train.TrainObject
```
Now this is just an object that doesn't do much yet... but we can already force our way inside it
and back (assuming we created it in limbo).
```
@tel train
@tel limbo
tel train
tel limbo
```
## Entering and leaving the train
Using the `@tel`command like shown above is obviously not what we want. `@tel` is an admin command
and normal players will thus never be able to enter the train! It is also not really a good idea to
use [Exits](../Components/Objects.md#exits) to get in and out of the train - Exits are (at least by default) objects
too. They point to a specific destination. If we put an Exit in this room leading inside the train
it would stay here when the train moved away (still leading into the train like a magic portal!). In
the same way, if we put an Exit object inside the train, it would always point back to this room,
regardless of where the Train has moved. Now, one *could* define custom Exit types that move with
the train or change their destination in the right way - but this seems to be a pretty cumbersome
solution.
Using the `tel`command like shown above is obviously not what we want. `@tel` is an admin command and normal players will thus never be able to enter the train!
It is also not really a good idea to use [Exits](../Components/Objects.md#exits) to get in and out of the train - Exits are (at least by default) objects too. They point to a specific destination. If we put an Exit in this room leading inside the train it would stay here when the train moved away (still leading into the train like a magic portal!). In the same way, if we put an Exit object inside the train, it would always point back to this room, regardless of where the Train has moved.
Now, one *could* define custom Exit types that move with the train or change their destination in the right way - but this seems to be a pretty cumbersome solution.
What we will do instead is to create some new [commands](../Components/Commands.md): one for entering the train and
another for leaving it again. These will be stored *on the train object* and will thus be made
@ -81,7 +73,6 @@ class CmdEnterTrain(Command):
"""
key = "enter train"
locks = "cmd:all()"
def func(self):
train = self.obj
@ -102,7 +93,6 @@ class CmdLeaveTrain(Command):
"""
key = "leave train"
locks = "cmd:all()"
def func(self):
train = self.obj
@ -119,39 +109,34 @@ class CmdSetTrain(CmdSet):
Note that while this seems like a lot of text, the majority of lines here are taken up by
documentation.
These commands are work in a pretty straightforward way: `CmdEnterTrain` moves the location of the
player to inside the train and `CmdLeaveTrain` does the opposite: it moves the player back to the
current location of the train (back outside to its current location). We stacked them in a
[cmdset](../Components/Command-Sets.md) `CmdSetTrain` so they can be used.
These commands are work in a pretty straightforward way: `CmdEnterTrain` moves the location of the player to inside the train and `CmdLeaveTrain` does the opposite: it moves the player back to the
current location of the train (back outside to its current location). We stacked them in a [cmdset](../Components/Command-Sets.md) `CmdSetTrain` so they can be used.
To make the commands work we need to add this cmdset to our train typeclass:
```python
# file mygame/typeclasses/train.py
from evennia import DefaultObject
from commands.train import CmdSetTrain
from typeclasses.objects import Object
class TrainObject(DefaultObject):
class TrainObject(Object):
def at_object_creation(self):
self.cmdset.add_default(CmdSetTrain)
```
If we now `@reload` our game and reset our train, those commands should work and we can now enter
and leave the train:
If we now `reload` our game and reset our train, those commands should work and we can now enter and leave the train:
```
@reload
@typeclass/force/reset train = train.TrainObject
reload
typeclass/force/reset train = train.TrainObject
enter train
leave train
```
Note the switches used with the `@typeclass` command: The `/force` switch is necessary to assign our
object the same typeclass we already have. The `/reset` re-triggers the typeclass'
`at_object_creation()` hook (which is otherwise only called the very first an instance is created).
Note the switches used with the `typeclass` command: The `/force` switch is necessary to assign our object the same typeclass we already have. The `/reset` re-triggers the typeclass' `at_object_creation()` hook (which is otherwise only called the very first an instance is created).
As seen above, when this hook is called on our train, our new cmdset will be loaded.
## Locking down the commands
@ -159,17 +144,12 @@ As seen above, when this hook is called on our train, our new cmdset will be loa
If you have played around a bit, you've probably figured out that you can use `leave train` when
outside the train and `enter train` when inside. This doesn't make any sense ... so let's go ahead
and fix that. We need to tell Evennia that you can not enter the train when you're already inside
or leave the train when you're outside. One solution to this is [locks](../Components/Locks.md): we will lock down
the commands so that they can only be called if the player is at the correct location.
or leave the train when you're outside. One solution to this is [locks](../Components/Locks.md): we will lock down the commands so that they can only be called if the player is at the correct location.
Right now commands defaults to the lock `cmd:all()`. The `cmd` lock type in combination with the
`all()` lock function means that everyone can run those commands as long as they are in the same
room as the train *or* inside the train. We're going to change this to check the location of the
player and *only* allow access if they are inside the train.
Since we didn't set a `lock` property on the Command, it defaults to `cmd:all()`. This means that everyone can use the command as long as they are in the same room _or inside the train_.
First of all we need to create a new lock function. Evennia comes with many lock functions built-in
already, but none that we can use for locking a command in this particular case. Create a new entry
in `mygame/server/conf/lockfuncs.py`:
already, but none that we can use for locking a command in this particular case. Create a new entry in `mygame/server/conf/lockfuncs.py`:
```python
@ -187,12 +167,7 @@ def cmdinside(accessing_obj, accessed_obj, *args, **kwargs):
If you didn't know, Evennia is by default set up to use all functions in this module as lock
functions (there is a setting variable that points to it).
Our new lock function, `cmdinside`, is to be used by Commands. The `accessed_obj` is the Command
object (in our case this will be `CmdEnterTrain` and `CmdLeaveTrain`) — Every command has an `obj`
property: this is the the object on which the command "sits". Since we added those commands to our
train object, the `.obj` property will be set to the train object. Conversely, `accessing_obj` is
the object that called the command: in our case it's the Character trying to enter or leave the
train.
Our new lock function, `cmdinside`, is to be used by Commands. The `accessed_obj` is the Command object (in our case this will be `CmdEnterTrain` and `CmdLeaveTrain`) — Every command has an `obj` property: this is the the object on which the command "sits". Since we added those commands to our train object, the `.obj` property will be set to the train object. Conversely, `accessing_obj` is the object that called the command: in our case it's the Character trying to enter or leave the train.
What this function does is to check that the player's location is the same as the train object. If
it is, it means the player is inside the train. Otherwise it means the player is somewhere else and
@ -226,33 +201,28 @@ user ignores lock functions. In order to use this functionality you need to `@qu
Now that we can enter and leave the train correctly, it's time to make it move. There are different
things we need to consider for this:
* Who can control your vehicle? The first player to enter it, only players that have a certain
"drive" skill, automatically?
* Where should it go? Can the player steer the vehicle to go somewhere else or will it always follow
the same route?
* Who can control your vehicle? The first player to enter it, only players that have a certain "drive" skill, automatically?
* Where should it go? Can the player steer the vehicle to go somewhere else or will it always follow the same route?
For our example train we're going to go with automatic movement through a predefined route (its
track). The train will stop for a bit at the start and end of the route to allow players to enter
and leave it.
For our example train we're going to go with automatic movement through a predefined route (its track). The train will stop for a bit at the start and end of the route to allow players to enter and leave it.
Go ahead and create some rooms for our train. Make a list of the room ids along the route (using the
`@ex` command).
Go ahead and create some rooms for our train. Make a list of the room ids along the route (using the `xe` command).
```
@dig/tel South station
@ex # note the id of the station
@tunnel/tel n = Following a railroad
@ex # note the id of the track
@tunnel/tel n = Following a railroad
...
@tunnel/tel n = North Station
> dig/tel South station
> ex # note the id of the station
> tunnel/tel n = Following a railroad
> ex # note the id of the track
> tunnel/tel n = Following a railroad
> ...
> tunnel/tel n = North Station
```
Put the train onto the tracks:
```
@tel south station
@tel train = here
tel south station
tel train = here
```
Next we will tell the train how to move and which route to take.
@ -296,31 +266,27 @@ class TrainObject(DefaultObject):
self.msg_contents(f"The train is moving forward to {room.name}.")
```
We added a lot of code here. Since we changed the `at_object_creation` to add in variables we will
have to reset our train object like earlier (using the `@typeclass/force/reset` command).
We added a lot of code here. Since we changed the `at_object_creation` to add in variables we will have to reset our train object like earlier (using the `@typeclass/force/reset` command).
We are keeping track of a few different things now: whether the train is moving or standing still,
which direction the train is heading to and what rooms the train will pass through.
We also added some methods: one to start moving the train, another to stop and a third that actually
moves the train to the next room in the list. Or makes it stop driving if it reaches the last stop.
We also added some methods: one to start moving the train, another to stop and a third that actually moves the train to the next room in the list. Or makes it stop driving if it reaches the last stop.
Let's try it out, using `@py` to call the new train functionality:
Let's try it out, using `py` to call the new train functionality:
```
@reload
@typeclass/force/reset train = train.TrainObject
enter train
@py here.goto_next_room()
> reload
> typeclass/force/reset train = train.TrainObject
> enter train
> py here.goto_next_room()
```
You should see the train moving forward one step along the rail road.
## Adding in scripts
If we wanted full control of the train we could now just add a command to step it along the track
when desired. We want the train to move on its own though, without us having to force it by manually
calling the `goto_next_room` method.
If we wanted full control of the train we could now just add a command to step it along the track when desired. We want the train to move on its own though, without us having to force it by manually calling the `goto_next_room` method.
To do this we will create two [scripts](../Components/Scripts.md): one script that runs when the train has stopped at
a station and is responsible for starting the train again after a while. The other script will take
@ -389,9 +355,9 @@ class TrainObject(DefaultObject):
```
```
@reload
@typeclass/force/reset train = train.TrainObject
enter train
> reload
> typeclass/force/reset train = train.TrainObject
> enter train
# output:
< The train is moving forward to Following a railroad.
@ -411,12 +377,8 @@ Our train will stop 30 seconds at each end station and then turn around to go ba
This train is very basic and still has some flaws. Some more things to do:
* Make it look like a train.
* Make it impossible to exit and enter the train mid-ride. This could be made by having the
enter/exit commands check so the train is not moving before allowing the caller to proceed.
* Make it impossible to exit and enter the train mid-ride. This could be made by having the enter/exit commands check so the train is not moving before allowing the caller to proceed.
* Have train conductor commands that can override the automatic start/stop.
* Allow for in-between stops between the start- and end station
* Have a rail road track instead of hard-coding the rooms in the train object. This could for
example be a custom [Exit](../Components/Objects.md#exits) only traversable by trains. The train will follow the
track. Some track segments can split to lead to two different rooms and a player can switch the
direction to which room it goes.
* Have a rail road track instead of hard-coding the rooms in the train object. This could for example be a custom [Exit](../Components/Objects.md#exits) only traversable by trains. The train will follow the track. Some track segments can split to lead to two different rooms and a player can switch the direction to which room it goes.
* Create another kind of vehicle!

Some files were not shown because too many files have changed in this diff Show more