Updated HTML docs.

This commit is contained in:
Evennia docbuilder action 2023-03-18 11:15:28 +00:00
parent 39c310dee7
commit cfb30bf8fd
56 changed files with 951 additions and 381 deletions

View file

@ -217,9 +217,9 @@ are expected to copy&amp;paste the changes you need from <a class="reference int
<li><p><a class="reference external" href="https://github.com/evennia/evennia/blob/main/evennia/game_template/typeclasses/accounts.py">accounts.py</a> (Python-path: <code class="docutils literal notranslate"><span class="pre">typeclasses.accounts</span></code>) - An <a class="reference internal" href="../../../Components/Accounts.html"><span class="doc std std-doc">Account</span></a> represents the player connecting to the game. It holds information like email, password and other out-of-character details.</p></li>
<li><p><a class="reference external" href="https://github.com/evennia/evennia/blob/main/evennia/game_template/typeclasses/channels.py">channels.py</a> (Python-path: <code class="docutils literal notranslate"><span class="pre">typeclasses.channels</span></code>) - <a class="reference internal" href="../../../Components/Channels.html"><span class="doc std std-doc">Channels</span></a> are used to manage in-game communication between players.</p></li>
<li><p><a class="reference external" href="https://github.com/evennia/evennia/blob/main/evennia/game_template/typeclasses/objects.py">objects.py</a> (Python-path: <code class="docutils literal notranslate"><span class="pre">typeclasses.objects</span></code>) - <a class="reference internal" href="../../../Components/Objects.html"><span class="doc std std-doc">Objects</span></a> represent all things having a location within the game world.</p></li>
<li><p><a class="reference external" href="https://github.com/evennia/evennia/blob/main/evennia/game_template/typeclasses/characters.py">characters.py</a> (Python-path: <code class="docutils literal notranslate"><span class="pre">typeclasses.characters</span></code>) - The <a class="reference internal" href="../../../Components/Objects.html#characters"><span class="std std-doc">Character</span></a> is a subclass of Objects, controlled by Accounts - they are the players avatars in the game world.</p></li>
<li><p><a class="reference external" href="https://github.com/evennia/evennia/blob/main/evennia/game_template/typeclasses/rooms.py">rooms.py</a> (Python-path: <code class="docutils literal notranslate"><span class="pre">typeclasses.rooms</span></code>) - A <a class="reference internal" href="../../../Components/Objects.html#rooms"><span class="std std-doc">Room</span></a> is also a subclass of Object; describing discrete locations. While the traditional term is room, such a location can be anything and on any scale that fits your game, from a forest glade, an entire planet or an actual dungeon room.</p></li>
<li><p><a class="reference external" href="https://github.com/evennia/evennia/blob/main/evennia/game_template/typeclasses/exits.py">exits.py</a> (Python-path: <code class="docutils literal notranslate"><span class="pre">typeclasses.exits</span></code>) - <a class="reference internal" href="../../../Components/Objects.html#exits"><span class="std std-doc">Exits</span></a> is another subclass of Object. Exits link one Room to another.</p></li>
<li><p><a class="reference external" href="https://github.com/evennia/evennia/blob/main/evennia/game_template/typeclasses/characters.py">characters.py</a> (Python-path: <code class="docutils literal notranslate"><span class="pre">typeclasses.characters</span></code>) - The <span class="xref myst">Character</span> is a subclass of Objects, controlled by Accounts - they are the players avatars in the game world.</p></li>
<li><p><a class="reference external" href="https://github.com/evennia/evennia/blob/main/evennia/game_template/typeclasses/rooms.py">rooms.py</a> (Python-path: <code class="docutils literal notranslate"><span class="pre">typeclasses.rooms</span></code>) - A <span class="xref myst">Room</span> is also a subclass of Object; describing discrete locations. While the traditional term is room, such a location can be anything and on any scale that fits your game, from a forest glade, an entire planet or an actual dungeon room.</p></li>
<li><p><a class="reference external" href="https://github.com/evennia/evennia/blob/main/evennia/game_template/typeclasses/exits.py">exits.py</a> (Python-path: <code class="docutils literal notranslate"><span class="pre">typeclasses.exits</span></code>) - <span class="xref myst">Exits</span> is another subclass of Object. Exits link one Room to another.</p></li>
<li><p><a class="reference external" href="https://github.com/evennia/evennia/blob/main/evennia/game_template/typeclasses/scripts.py">scripts.py</a> (Python-path: <code class="docutils literal notranslate"><span class="pre">typeclasses.scripts</span></code>) - <a class="reference internal" href="../../../Components/Scripts.html"><span class="doc std std-doc">Scripts</span></a> are out-of-character objects. They have no location in-game and can serve as basis for anything that needs database persistence, such as combat, weather, or economic systems. They also have the ability to execute code repeatedly, on a timer.</p></li>
</ul>
</section>

View file

@ -128,7 +128,7 @@ Lets describe it.</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><span class="xref myst">Characters</span>, <span class="xref myst">Rooms</span>, and <span class="xref myst">Exits</span> 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>

View file

@ -149,7 +149,7 @@ and back (assuming we created it in limbo).</p>
<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">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>It is also not really a good idea to use <span class="xref myst">Exits</span> 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
@ -446,7 +446,7 @@ train again., and were ready to ride it around!</p>
<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 <span class="xref myst">Exit</span> 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>

View file

@ -112,7 +112,7 @@ location.</p>
<p>What we will need is the following:</p>
<ul class="simple">
<li><p>An NPC typeclass that can react when someone enters.</p></li>
<li><p>A custom <a class="reference internal" href="../Components/Objects.html#rooms"><span class="std std-doc">Room</span></a> typeclass that can tell the NPC that someone entered.</p></li>
<li><p>A custom <span class="xref myst">Room</span> typeclass that can tell the NPC that someone entered.</p></li>
<li><p>We will also tweak our default <code class="docutils literal notranslate"><span class="pre">Character</span></code> typeclass a little.</p></li>
</ul>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="c1"># in mygame/typeclasses/npcs.py (for example)</span>