mirror of
https://github.com/evennia/evennia.git
synced 2026-03-19 14:26:30 +01:00
219 lines
No EOL
14 KiB
HTML
219 lines
No EOL
14 KiB
HTML
|
||
<!DOCTYPE html>
|
||
|
||
<html>
|
||
<head>
|
||
<meta charset="utf-8" />
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<title>2. The Tutorial World — 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" />
|
||
</head><body>
|
||
<div class="related" role="navigation" aria-label="related navigation">
|
||
<h3>Navigation</h3>
|
||
<ul>
|
||
<li class="right" style="margin-right: 10px">
|
||
<a href="../../../genindex.html" title="General Index"
|
||
accesskey="I">index</a></li>
|
||
<li class="right" >
|
||
<a href="../../../py-modindex.html" title="Python Module Index"
|
||
>modules</a> |</li>
|
||
<li class="nav-item nav-item-0"><a href="../../../index.html">Evennia 1.0-dev</a> »</li>
|
||
<li class="nav-item nav-item-this"><a href=""><span class="section-number">2. </span>The Tutorial World</a></li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="document">
|
||
<div class="documentwrapper">
|
||
<div class="bodywrapper">
|
||
<div class="body" role="main">
|
||
|
||
<div class="section" id="the-tutorial-world">
|
||
<h1><span class="section-number">2. </span>The Tutorial World<a class="headerlink" href="#the-tutorial-world" title="Permalink to this headline">¶</a></h1>
|
||
<p><a class="reference internal" href="Building-Quickstart.html"><span class="doc">prev lesson</span></a> | <a class="reference internal" href="Python-basic-introduction.html"><span class="doc">next lesson</span></a></p>
|
||
<p>The <em>Tutorial World</em> is a small and functioning MUD-style game world shipped with Evennia.<br />It’s a small showcase of what is possible. It can also be useful for those who have an easier
|
||
time learning by deconstructing existing code.</p>
|
||
<p>Stand in the Limbo room and install it with</p>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">batchcommand</span> <span class="n">tutorial_world</span><span class="o">.</span><span class="n">build</span>
|
||
</pre></div>
|
||
</div>
|
||
<p>What this does is to run the build script
|
||
<a class="reference external" href="https://github.com/evennia/evennia/blob/master/evennia/contrib/tutorial_world/build.ev">evennia/contrib/tutorial_world/build.ev</a>.
|
||
This is pretty much just a list of build-commands executed in sequence by the <code class="docutils literal notranslate"><span class="pre">batchcommand</span></code> command.
|
||
Wait for the building to complete and don’t run it twice. A new exit should have appeared named <em>Tutorial</em>.</p>
|
||
<p>The game consists of a single-player quest and has some 20 rooms that you can explore as you seek
|
||
to discover the whereabouts of a mythical weapon. Make sure you don’t play as superuser:</p>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">quell</span>
|
||
</pre></div>
|
||
</div>
|
||
<p>Enter the new exit by writing <code class="docutils literal notranslate"><span class="pre">tutorial</span></code>. Enjoy! If you succeed you will eventually
|
||
end up back in Limbo.</p>
|
||
<div class="section" id="gameplay">
|
||
<h2><span class="section-number">2.1. </span>Gameplay<a class="headerlink" href="#gameplay" title="Permalink to this headline">¶</a></h2>
|
||
<p><img alt="the castle off the moor" src="https://images-wixmp-ed30a86b8c4ca887773594c2.wixmp.com/f/22916c25-6299-453d-a221-446ec839f567/da2pmzu-46d63c6d-9cdc-41dd-87d6-1106db5a5e1a.jpg/v1/fill/w_600,h_849,q_75,strp/the_castle_off_the_moor_by_griatch_art_da2pmzu-fullview.jpg?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1cm46YXBwOiIsImlzcyI6InVybjphcHA6Iiwib2JqIjpbW3siaGVpZ2h0IjoiPD04NDkiLCJwYXRoIjoiXC9mXC8yMjkxNmMyNS02Mjk5LTQ1M2QtYTIyMS00NDZlYzgzOWY1NjdcL2RhMnBtenUtNDZkNjNjNmQtOWNkYy00MWRkLTg3ZDYtMTEwNmRiNWE1ZTFhLmpwZyIsIndpZHRoIjoiPD02MDAifV1dLCJhdWQiOlsidXJuOnNlcnZpY2U6aW1hZ2Uub3BlcmF0aW9ucyJdfQ.omuS3D1RmFiZCy9OSXiIita-HxVGrBok3_7asq0rflw" /></p>
|
||
<p><em>To get into the mood of this miniature quest, imagine you are an adventurer out to find fame and
|
||
fortune. You have heard rumours of an old castle ruin by the coast. In its depth a warrior princess
|
||
was buried together with her powerful magical weapon - a valuable prize, if it’s true. Of course
|
||
this is a chance to adventure that you cannot turn down!</em></p>
|
||
<p><em>You reach the ocean in the midst of a raging thunderstorm. With wind and rain screaming in your
|
||
face you stand where the moor meets the sea along a high, rocky coast …</em></p>
|
||
<hr class="docutils" />
|
||
<div class="section" id="hints">
|
||
<h3><span class="section-number">2.1.1. </span>Hints:<a class="headerlink" href="#hints" title="Permalink to this headline">¶</a></h3>
|
||
<ul class="simple">
|
||
<li><p>Look at everything. While a demo, this is not necessarily trivial, depending on your experience with
|
||
text-based adventure games. Just remember that everything can be solved or bypassed.</p></li>
|
||
<li><p>Some things cannot be damaged by mortal weapons. In that case it’s OK to run away. Expect
|
||
to be chased though.</p></li>
|
||
<li><p>Some objects are interactive in more than one way. Use the normal <code class="docutils literal notranslate"><span class="pre">help</span></code> command to get a feel for
|
||
which commands are available at any given time.</p></li>
|
||
<li><p>Use the command <code class="docutils literal notranslate"><span class="pre">tutorial</span></code> to get insight behind the scenes of the game.</p></li>
|
||
<li><p>In order to fight, you need to first find some type of weapon.</p>
|
||
<ul>
|
||
<li><p><em>slash</em> is a normal attack</p></li>
|
||
<li><p><em>stab</em> launches an attack that makes more damage but has a lower chance to hit.</p></li>
|
||
<li><p><em>defend</em> will lower the chance to taking damage on your enemy’s next attack.</p></li>
|
||
</ul>
|
||
</li>
|
||
<li><p>Being defeated is a part of the experience. You can’t actually die, but getting knocked out
|
||
means being left in the dark …</p></li>
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="once-you-are-done-or-had-enough">
|
||
<h2><span class="section-number">2.2. </span>Once you are done (or had enough)<a class="headerlink" href="#once-you-are-done-or-had-enough" title="Permalink to this headline">¶</a></h2>
|
||
<p>Afterwards you’ll either have conquered the old ruin and returned in glory and triumph … or
|
||
you returned limping and whimpering from the challenge through <code class="docutils literal notranslate"><span class="pre">telport</span> <span class="pre">limbo</span></code>.
|
||
Either way you should now be back in Limbo, able to reflect on the experience.</p>
|
||
<p>Some features exemplified by the tutorial world:</p>
|
||
<ul class="simple">
|
||
<li><p>Rooms with custom ability to show details (like looking at the wall in the dark room)</p></li>
|
||
<li><p>Hidden or impassable exits until you fulfilled some criterion</p></li>
|
||
<li><p>Objects with multiple custom interactions (like swords, the well, the obelisk …)</p></li>
|
||
<li><p>Large-area rooms (that bridge is actually only one room!)</p></li>
|
||
<li><p>Outdoor weather rooms with weather (the rain pummeling you)</p></li>
|
||
<li><p>Dark room, needing light source to reveal itself (the burning splinter even burns out after a while)</p></li>
|
||
<li><p>Puzzle object (the wines in the dark cell; hope you didn’t get stuck!)</p></li>
|
||
<li><p>Multi-room puzzle (the obelisk and the crypt)</p></li>
|
||
<li><p>Aggressive mobile with roam, pursue and battle state-engine AI (quite deadly until you find the right weapon)</p></li>
|
||
<li><p>Weapons, also used by mobs (most are admittedly not that useful against the big baddie)</p></li>
|
||
<li><p>Simple combat system with attack/defend commands (teleporting on-defeat)</p></li>
|
||
<li><p>Object spawning (the weapons in the barrel and the final weapoon is actually randomized)</p></li>
|
||
<li><p>Teleporter trap rooms (if you fail the obelisk puzzle)</p></li>
|
||
</ul>
|
||
<div class="sidebar">
|
||
<p class="sidebar-title">Extra Credit</p>
|
||
<p>If you have previous programming experience (or after you have gone
|
||
through this Starter tutorial) it may be instructive to dig a little deeper into the Tutorial-world
|
||
code to learn how it achieves what it does. The code is heavily documented.
|
||
You can find all the code in <a class="reference external" href="../../api/evennia.contrib.tutorial_world.html">evennia/contrib/tutorial_world</a>,
|
||
the build-script is <a class="reference external" href="https://github.com/evennia/evennia/blob/master/evennia/contrib/tutorial_world/build.ev">here</a>.</p>
|
||
<p>When reading and learning from the code, however, keep in mind that <em>Tutorial World</em> was created with a very
|
||
specific goal in mind: to install easily and to not permanently modify the rest of the server. It therefore
|
||
goes to some length to use only temporary solutions and to clean up after itself. This is not something
|
||
you will usually need to worry about when making your own game.</p>
|
||
</div>
|
||
<p>Quite a lot of stuff crammed in such a small area!</p>
|
||
</div>
|
||
<div class="section" id="uninstall-the-tutorial-world">
|
||
<h2><span class="section-number">2.3. </span>Uninstall the tutorial world<a class="headerlink" href="#uninstall-the-tutorial-world" title="Permalink to this headline">¶</a></h2>
|
||
<p>Once are done playing with the tutorial world, let’s uninstall it.
|
||
Uninstalling the tutorial world basically means deleting all the rooms and objects it consists of.
|
||
Make sure you are back in Limbo, then</p>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span> <span class="n">find</span> <span class="n">tut</span><span class="c1">#01</span>
|
||
<span class="n">find</span> <span class="n">tut</span><span class="c1">#16</span>
|
||
</pre></div>
|
||
</div>
|
||
<p>This should locate the first and last rooms created by <code class="docutils literal notranslate"><span class="pre">build.ev</span></code> - <em>Intro</em> and <em>Outro</em>. If you
|
||
installed normally, everything created between these two numbers should be part of the tutorial.
|
||
Note their #dbref numbers, for example 5 and 80. Next we just delete all objects in that range:</p>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span> <span class="k">del</span> <span class="mi">5</span><span class="o">-</span><span class="mi">80</span>
|
||
</pre></div>
|
||
</div>
|
||
<p>You will see some errors since some objects are auto-deleted and so cannot be found when the delete
|
||
mechanism gets to them. That’s fine. You should have removed the tutorial completely once the
|
||
command finishes.</p>
|
||
<p>Even if the game-style of the Tutorial-world was not similar to the one you are interested in, it
|
||
should hopefully have given you a little taste of some of the possibilities of Evennia. Now we’ll
|
||
move on with how to access this power through code.</p>
|
||
<p><a class="reference internal" href="Building-Quickstart.html"><span class="doc">prev lesson</span></a> | <a class="reference internal" href="Python-basic-introduction.html"><span class="doc">next lesson</span></a></p>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
<div class="clearer"></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
|
||
<div class="sphinxsidebarwrapper">
|
||
<p class="logo"><a href="../../../index.html">
|
||
<img class="logo" src="../../../_static/evennia_logo.png" alt="Logo"/>
|
||
</a></p>
|
||
<div id="searchbox" style="display: none" role="search">
|
||
<h3 id="searchlabel">Quick search</h3>
|
||
<div class="searchformwrapper">
|
||
<form class="search" action="../../../search.html" method="get">
|
||
<input type="text" name="q" aria-labelledby="searchlabel" />
|
||
<input type="submit" value="Go" />
|
||
</form>
|
||
</div>
|
||
</div>
|
||
<script>$('#searchbox').show(0);</script>
|
||
<p><h3><a href="../../../index.html">Table of Contents</a></h3>
|
||
<ul>
|
||
<li><a class="reference internal" href="#">2. The Tutorial World</a><ul>
|
||
<li><a class="reference internal" href="#gameplay">2.1. Gameplay</a><ul>
|
||
<li><a class="reference internal" href="#hints">2.1.1. Hints:</a></li>
|
||
</ul>
|
||
</li>
|
||
<li><a class="reference internal" href="#once-you-are-done-or-had-enough">2.2. Once you are done (or had enough)</a></li>
|
||
<li><a class="reference internal" href="#uninstall-the-tutorial-world">2.3. Uninstall the tutorial world</a></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
|
||
<div role="note" aria-label="source link">
|
||
<!--h3>This Page</h3-->
|
||
<ul class="this-page-menu">
|
||
<li><a href="../../../_sources/Howto/Starting/Part1/Tutorial-World-Introduction.md.txt"
|
||
rel="nofollow">Show Page Source</a></li>
|
||
</ul>
|
||
</div>
|
||
<h3>Versions</h3>
|
||
<ul>
|
||
<li><a href="Tutorial-World-Introduction.html">1.0-dev (develop branch)</a></li>
|
||
<li><a href="../../../../0.9.1/index.html">0.9.1 (master branch)</a></li>
|
||
</ul>
|
||
|
||
</div>
|
||
</div>
|
||
<div class="clearer"></div>
|
||
</div>
|
||
<div class="related" role="navigation" aria-label="related navigation">
|
||
<h3>Navigation</h3>
|
||
<ul>
|
||
<li class="right" style="margin-right: 10px">
|
||
<a href="../../../genindex.html" title="General Index"
|
||
>index</a></li>
|
||
<li class="right" >
|
||
<a href="../../../py-modindex.html" title="Python Module Index"
|
||
>modules</a> |</li>
|
||
<li class="nav-item nav-item-0"><a href="../../../index.html">Evennia 1.0-dev</a> »</li>
|
||
<li class="nav-item nav-item-this"><a href=""><span class="section-number">2. </span>The Tutorial World</a></li>
|
||
</ul>
|
||
</div>
|
||
<div class="footer" role="contentinfo">
|
||
© Copyright 2020, The Evennia developer community.
|
||
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.1.1.
|
||
</div>
|
||
</body>
|
||
</html> |