evennia/docs/1.0-dev/Howto/Starting/Part1/Tutorial-World-Introduction.html
2021-06-13 22:50:03 +02:00

251 lines
No EOL
15 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

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

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<title>The Tutorial World &#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="Starting to code Evennia" href="Python-basic-introduction.html" />
<link rel="prev" title="Using the game and building stuff" href="Building-Quickstart.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="Python-basic-introduction.html" title="Starting to code Evennia"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="Building-Quickstart.html" title="Using the game and building stuff"
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="Starting-Part1.html" accesskey="U">Starting Tutorial (Part 1)</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">The Tutorial World</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="the-tutorial-world">
<h1>The Tutorial World<a class="headerlink" href="#the-tutorial-world" title="Permalink to this headline"></a></h1>
<p>The <em>Tutorial World</em> is a small and functioning MUD-style game world shipped with Evennia.<br />Its 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 dont 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 dont 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>
<section id="gameplay">
<h2>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 its 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" />
<section id="hints">
<h3>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 its 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 enemys next attack.</p></li>
</ul>
</li>
<li><p>Being defeated is a part of the experience. You cant actually die, but getting knocked out
means being left in the dark …</p></li>
</ul>
</section>
</section>
<section id="once-you-are-done-or-had-enough">
<h2>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 youll 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 didnt 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>
<aside 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>
</aside>
<p>Quite a lot of stuff crammed in such a small area!</p>
</section>
<section id="uninstall-the-tutorial-world">
<h2>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, lets 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. Thats 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 well
move on with how to access this power through code.</p>
</section>
</section>
<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="#">The Tutorial World</a><ul>
<li><a class="reference internal" href="#gameplay">Gameplay</a><ul>
<li><a class="reference internal" href="#hints">Hints:</a></li>
</ul>
</li>
<li><a class="reference internal" href="#once-you-are-done-or-had-enough">Once you are done (or had enough)</a></li>
<li><a class="reference internal" href="#uninstall-the-tutorial-world">Uninstall the tutorial world</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="Building-Quickstart.html"
title="previous chapter">Using the game and building stuff</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="Python-basic-introduction.html"
title="next chapter">Starting to code Evennia</a></p>
<div role="note" aria-label="source link">
<!--h3>This Page</h3-->
<ul class="this-page-menu">
<li><a href="../../../_sources/Howto/Starting/Part1/Tutorial-World-Introduction.md.txt"
rel="nofollow">Show Page Source</a></li>
</ul>
</div><h3>Links</h3>
<ul>
<li><a href="https://www.evennia.com">Home page</a> </li>
<li><a href="https://github.com/evennia/evennia">Evennia Github</a> </li>
<li><a href="http://games.evennia.com">Game Index</a> </li>
<li><a href="http://webchat.freenode.net/?channels=evennia&uio=MT1mYWxzZSY5PXRydWUmMTE9MTk1JjEyPXRydWUbb">IRC</a> -
<a href="https://discord.gg/NecFePw">Discord</a> -
<a href="https://groups.google.com/forum/#%21forum/evennia">Forums</a>
</li>
<li><a href="http://evennia.blogspot.com/">Evennia Dev blog</a> </li>
</ul>
<h3>Versions</h3>
<ul>
<li><a href="Tutorial-World-Introduction.html">1.0-dev (develop branch)</a></li>
<li><a href="../../../../0.9.5/index.html">0.9.5 (v0.9.5 branch)</a></li>
</ul>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../../genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="../../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="Python-basic-introduction.html" title="Starting to code Evennia"
>next</a> |</li>
<li class="right" >
<a href="Building-Quickstart.html" title="Using the game and building stuff"
>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="Starting-Part1.html" >Starting Tutorial (Part 1)</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">The Tutorial World</a></li>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2020, The Evennia developer community.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.2.1.
</div>
</body>
</html>