evennia/docs/2.x/Contribs/Contrib-Evscaperoom.html
Evennia docbuilder action e535f5782a Updated HTML docs.
2023-10-19 20:22:27 +00:00

274 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>EvscapeRoom &#8212; Evennia 2.x 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="Barter system" href="Contrib-Barter.html" />
<link rel="prev" title="Unix-like Command style" href="Contrib-Unixcommand.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="Contrib-Barter.html" title="Barter system"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="Contrib-Unixcommand.html" title="Unix-like Command style"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Evennia 2.x</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="Contribs-Overview.html" accesskey="U">Contribs</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">EvscapeRoom</a></li>
</ul>
</div>
<div class="document">
<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"/>
</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>
<h3><a href="../index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">EvscapeRoom</a><ul>
<li><a class="reference internal" href="#introduction">Introduction</a></li>
<li><a class="reference internal" href="#installation">Installation</a></li>
<li><a class="reference internal" href="#making-your-own-evscaperoom">Making your own evscaperoom</a><ul>
<li><a class="reference internal" href="#other-useful-settings">Other useful settings</a></li>
</ul>
</li>
<li><a class="reference internal" href="#playing-the-game">Playing the game</a></li>
<li><a class="reference internal" href="#technical">Technical</a></li>
<li><a class="reference internal" href="#design-philosophy">Design Philosophy</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="Contrib-Unixcommand.html"
title="previous chapter">Unix-like Command style</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="Contrib-Barter.html"
title="next chapter">Barter system</a></p>
<div role="note" aria-label="source link">
<!--h3>This Page</h3-->
<ul class="this-page-menu">
<li><a href="../_sources/Contribs/Contrib-Evscaperoom.md.txt"
rel="nofollow">Show Page Source</a></li>
</ul>
</div><h3>Links</h3>
<ul>
<li><a href="https://www.evennia.com/docs/latest/index.html">Documentation Top</a> </li>
<li><a href="https://www.evennia.com">Evennia Home</a> </li>
<li><a href="https://github.com/evennia/evennia">Github</a> </li>
<li><a href="http://games.evennia.com">Game Index</a> </li>
<li>
<a href="https://discord.gg/AJJpcRUhtF">Discord</a> -
<a href="https://github.com/evennia/evennia/discussions">Discussions</a> -
<a href="https://evennia.blogspot.com/">Blog</a>
</li>
</ul>
<h3>Doc Versions</h3>
<ul>
<li><a href="Contrib-Evscaperoom.html">2.x (main branch)</a></li>
<ul>
<li><a href="../1.3.0/index.html">1.3.0 (v1.3.0 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="bodywrapper">
<div class="body" role="main">
<section class="tex2jax_ignore mathjax_ignore" id="evscaperoom">
<h1>EvscapeRoom<a class="headerlink" href="#evscaperoom" title="Permalink to this headline"></a></h1>
<p>Contribution by Griatch, 2019</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
can join to solve a room together. This is the engine created for EvscapeRoom, which won
the MUD Coders Guild “One Room” Game Jam in April-May, 2019. The contrib has no game
content but contains the utilities and base classes and an empty example room.</p>
<p>The original code for the contest is found at
<a class="reference external" href="https://github.com/Griatch/evscaperoom">https://github.com/Griatch/evscaperoom</a> but the version on the public Evennia
demo is more updated, so if you really want the latest bug fixes etc you should
rather look at <a class="reference external" href="https://github.com/evennia/evdemo/tree/master/evdemo/evscaperoom">https://github.com/evennia/evdemo/tree/master/evdemo/evscaperoom</a>
instead. A copy of the full game can also be played on the Evennia demo server
at <a class="reference external" href="https://demo.evennia.com">https://demo.evennia.com</a> - just connect to the server and write <code class="docutils literal notranslate"><span class="pre">evscaperoom</span></code>
in the first room to start!</p>
<section id="introduction">
<h2>Introduction<a class="headerlink" href="#introduction" title="Permalink to this headline"></a></h2>
<p>Evscaperoom is, as it sounds, an escaperoom in text form. You start locked into
a room and have to figure out how to get out. This engine contains everything
needed to make a fully-featured puzzle game of this type!</p>
</section>
<section id="installation">
<h2>Installation<a class="headerlink" href="#installation" title="Permalink to this headline"></a></h2>
<p>The Evscaperoom is installed by adding the <code class="docutils literal notranslate"><span class="pre">evscaperoom</span></code> command to your
character cmdset. When you run that command in-game youre ready to play!</p>
<p>In <code class="docutils literal notranslate"><span class="pre">mygame/commands/default_cmdsets.py</span></code>:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span>
<span class="kn">from</span> <span class="nn">evennia.contrib.full_systems.evscaperoom.commands</span> <span class="kn">import</span> <span class="n">CmdEvscapeRoomStart</span>
<span class="k">class</span> <span class="nc">CharacterCmdSet</span><span class="p">(</span><span class="o">...</span><span class="p">):</span>
<span class="c1"># ...</span>
<span class="bp">self</span><span class="o">.</span><span class="n">add</span><span class="p">(</span><span class="n">CmdEvscapeRoomStart</span><span class="p">())</span>
</pre></div>
</div>
<p>Reload the server and the <code class="docutils literal notranslate"><span class="pre">evscaperoom</span></code> command will be available. The contrib
comes with a small (very small) escape room as an example.</p>
</section>
<section id="making-your-own-evscaperoom">
<h2>Making your own evscaperoom<a class="headerlink" href="#making-your-own-evscaperoom" title="Permalink to this headline"></a></h2>
<p>To do this, you need to make your own states. First make sure you can play the
simple example room installed above.</p>
<p>Copy <code class="docutils literal notranslate"><span class="pre">evennia/contrib/full_systems/evscaperoom/states</span></code> to somewhere in your game folder (lets
assume you put it under <code class="docutils literal notranslate"><span class="pre">mygame/world/</span></code>).</p>
<p>Next you need to re-point Evennia to look for states in this new location. Add
the following to your <code class="docutils literal notranslate"><span class="pre">mygame/server/conf/settings.py</span></code> file:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span> <span class="n">EVSCAPEROOM_STATE_PACKAGE</span> <span class="o">=</span> <span class="s2">&quot;world.states&quot;</span>
</pre></div>
</div>
<p>Reload and the example evscaperoom should still work, but you can now modify and
expand it from your game dir!</p>
<section id="other-useful-settings">
<h3>Other useful settings<a class="headerlink" href="#other-useful-settings" title="Permalink to this headline"></a></h3>
<p>There are a few other settings that may be useful:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">EVSCAPEROOM_START_STATE</span></code> - default is <code class="docutils literal notranslate"><span class="pre">state_001_start</span></code> and is the name of
the state-module to start from (without <code class="docutils literal notranslate"><span class="pre">.py</span></code>). You can change this if you
want some other naming scheme.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">HELP_SUMMARY_TEXT</span></code> - this is the help blurb shown when entering <code class="docutils literal notranslate"><span class="pre">help</span></code> in
the room without an argument. The original is found at the top of
<code class="docutils literal notranslate"><span class="pre">evennia/contrib/full_systems/evscaperoom/commands.py</span></code>.</p></li>
</ul>
</section>
</section>
<section id="playing-the-game">
<h2>Playing the game<a class="headerlink" href="#playing-the-game" title="Permalink to this headline"></a></h2>
<p>You should start by <code class="docutils literal notranslate"><span class="pre">look</span></code>ing around and at objects.</p>
<p>The <code class="docutils literal notranslate"><span class="pre">examine</span> <span class="pre">&lt;object&gt;</span></code> command allows you to focus on an object. When you do
youll learn actions you could try for the object you are focusing on, such as
turning it around, read text on it or use it with some other object. Note that
more than one player can focus on the same object, so you wont block anyone
when you focus. Focusing on another object or use <code class="docutils literal notranslate"><span class="pre">examine</span></code> again will remove
focus.</p>
<p>There is also a full hint system.</p>
</section>
<section id="technical">
<h2>Technical<a class="headerlink" href="#technical" title="Permalink to this headline"></a></h2>
<p>When connecting to the game, the user has the option to join an existing room
(which may already be in some state of ongoing progress), or may create a fresh
room for them to start solving on their own (but anyone may still join them later).</p>
<p>The room will go through a series of states as the players progress through
its challenges. These states are describes as modules in .states/ and the
room will load and execute the State-object within each module to set up
and transition between states as the players progress. This allows for isolating
the states from each other and will hopefully make it easier to track
the logic and (in principle) inject new puzzles later.</p>
<p>Once no players remain in the room, the room and its state will be wiped.</p>
</section>
<section id="design-philosophy">
<h2>Design Philosophy<a class="headerlink" href="#design-philosophy" title="Permalink to this headline"></a></h2>
<p>Some basic premises inspired the design of this.</p>
<ul class="simple">
<li><p>You should be able to resolve the room alone. So no puzzles should require the
collaboration of multiple players. This is simply because there is no telling
if others will actually be online at a given time (or stay online throughout).</p></li>
<li><p>You should never be held up by the actions/inactions of other players. This
is why you cannot pick up anything (no inventory system) but only
focus/operate on items. This avoids the annoying case of a player picking up
a critical piece of a puzzle and then logging off.</p></li>
<li><p>A rooms state changes for everyone at once. My first idea was to have a given
room have different states depending on who looked (so a chest could be open
and closed to two different players at the same time). But not only does this
add a lot of extra complexity, it also defeats the purpose of having multiple
players. This way people can help each other and collaborate like in a real
escape room. For people that want to do it all themselves I instead made it
easy to start “fresh” rooms for them to take on.</p></li>
</ul>
<p>All other design decisions flowed from these.</p>
<hr class="docutils" />
<p><small>This document page is generated from <code class="docutils literal notranslate"><span class="pre">evennia/contrib/full_systems/evscaperoom/README.md</span></code>. Changes to this
file will be overwritten, so edit that file rather than this one.</small></p>
</section>
</section>
</div>
</div>
</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="Contrib-Barter.html" title="Barter system"
>next</a> |</li>
<li class="right" >
<a href="Contrib-Unixcommand.html" title="Unix-like Command style"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Evennia 2.x</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="Contribs-Overview.html" >Contribs</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">EvscapeRoom</a></li>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2023, The Evennia developer community.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.2.1.
</div>
</body>
</html>