evennia/docs/6.x/Contribs/Contrib-Evscaperoom.html
2026-02-15 19:06:04 +01:00

299 lines
No EOL
16 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 lang="en" data-content_root="../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>EvscapeRoom &#8212; Evennia latest documentation</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=d75fae25" />
<link rel="stylesheet" type="text/css" href="../_static/nature.css?v=279e0f84" />
<link rel="stylesheet" type="text/css" href="../_static/custom.css?v=e4a91a55" />
<script src="../_static/documentation_options.js?v=c6e86fd7"></script>
<script src="../_static/doctools.js?v=9bcbadda"></script>
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="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="Achievements" href="Contrib-Achievements.html" />
<link rel="prev" title="Unix-like Command style" href="Contrib-Unixcommand.html" />
</head><body>
<div class="related" role="navigation" aria-label="Related">
<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-Achievements.html" title="Achievements"
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</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="bodywrapper">
<div class="body" role="main">
<section class="tex2jax_ignore mathjax_ignore" id="evscaperoom">
<h1>EvscapeRoom<a class="headerlink" href="#evscaperoom" title="Link to this heading"></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 only
very minimal game content, it contains the utilities and base classes and an empty example room.</p>
<section id="introduction">
<h2>Introduction<a class="headerlink" href="#introduction" title="Link to this heading"></a></h2>
<p>Evscaperoom is, as it sounds, an <a class="reference external" href="https://en.wikipedia.org/wiki/Escape_room">escape room</a> in text form. You start locked into
a room and have to figure out how to get out. This contrib contains everything
needed to make a fully-featured puzzle game of this type. It also contains a
lobby for creating new rooms, allowing players to join another persons room
to collaborate solving it!</p>
<p>This is the game engine for the original <em>EvscapeRoom</em>. It
allows you to recreate the same game experience, but it doesnt contain any of
the story content created for the game jam. If you want to see the full game
(where you must escape the cottage of a very tricky jester girl or lose the
villages pie-eating contest…), you can find it at Griatchs github page <a class="reference external" href="https://github.com/Griatch/evscaperoom">here</a>,
(but the recommended version is the one that used to run on the Evennia demo server which has
some more bug fixes, found <a class="reference external" href="https://github.com/evennia/evdemo/tree/master/evdemo/evscaperoom">here instead</a>).</p>
<p>If you want to read more about how <em>EvscapeRoom</em> was created and designed, you can read the
dev blog, <a class="reference external" href="https://www.evennia.com/devblog/2019.html#2019-05-18-creating-evscaperoom-part-1">part 1</a> and <a class="reference external" href="https://www.evennia.com/devblog/2019.html#2019-05-26-creating-evscaperoom-part-2">part 2</a>.</p>
</section>
<section id="installation">
<h2>Installation<a class="headerlink" href="#installation" title="Link to this heading"></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="w"> </span><span class="nn">evennia.contrib.full_systems.evscaperoom.commands</span><span class="w"> </span><span class="kn">import</span> <span class="n">CmdEvscapeRoomStart</span>
<span class="k">class</span><span class="w"> </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="Link to this heading"></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="Link to this heading"></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="Link to this heading"></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="Link to this heading"></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="Link to this heading"></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 class="clearer"></div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="Main">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../index.html">
<img class="logo" src="../_static/evennia_logo.png" alt="Logo of Evennia"/>
</a></p>
<search 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" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</search>
<script>document.getElementById('searchbox').style.display = "block"</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>
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="Contrib-Unixcommand.html"
title="previous chapter">Unix-like Command style</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="Contrib-Achievements.html"
title="next chapter">Achievements</a></p>
</div>
<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="https://www.evennia.com/docs/latest/index.html">latest (main branch)</a>
</li>
<li>
<a href="https://www.evennia.com/docs/6.x/index.html">v6.0.0 branch (outdated)</a>
</li>
<li>
<a href="https://www.evennia.com/docs/5.x/index.html">v5.0.0 branch (outdated)</a>
</li>
<li>
<a href="https://www.evennia.com/docs/4.x/index.html">v4.0.0 branch (outdated)</a>
</li>
<li>
<a href="https://www.evennia.com/docs/3.x/index.html">v3.0.0 branch (outdated)</a>
</li>
<li>
<a href="https://www.evennia.com/docs/2.x/index.html">v2.0.0 branch (outdated)</a>
</li>
<li>
<a href="https://www.evennia.com/docs/1.x/index.html">v1.0.0 branch (outdated)</a>
</li>
<li>
<a href="https://www.evennia.com/docs/0.x/index.html">v0.9.5 branch (outdated)</a>
</li>
</ul>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="Related">
<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-Achievements.html" title="Achievements"
>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</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 2024, The Evennia developer community.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 8.2.3.
</div>
</body>
</html>