<pclass="last">You are reading an old version of the Evennia documentation. <ahref="https://www.evennia.com/docs/latest/index.html">The latest version is here</a></p>.
<p>This extends the normal <codeclass="docutils literal notranslate"><spanclass="pre">Room</span></code> typeclass to allow its description to change
with time-of-day and/or season. It also adds ‘details’ for the player to look at
in the room (without having to create a new in-game object for each). The room is
supported by new <codeclass="docutils literal notranslate"><spanclass="pre">look</span></code> and <codeclass="docutils literal notranslate"><spanclass="pre">desc</span></code> commands.</p>
<sectionid="installation-testing">
<h2>Installation/testing:<aclass="headerlink"href="#installation-testing"title="Permalink to this headline">¶</a></h2>
<p>Adding the <codeclass="docutils literal notranslate"><spanclass="pre">ExtendedRoomCmdset</span></code> to the default character cmdset will add all
new commands for use.</p>
<p>In more detail, in <codeclass="docutils literal notranslate"><spanclass="pre">mygame/commands/default_cmdsets.py</span></code>:</p>
<p>Then reload to make the new commands available. Note that they only work
on rooms with the typeclass <codeclass="docutils literal notranslate"><spanclass="pre">ExtendedRoom</span></code>. Create new rooms with the right
typeclass or use the <codeclass="docutils literal notranslate"><spanclass="pre">typeclass</span></code> command to swap existing rooms. Note that since
this contrib overrides the <codeclass="docutils literal notranslate"><spanclass="pre">look</span></code> command, you will need to add the
<codeclass="docutils literal notranslate"><spanclass="pre">extended_room.ExtendedRoomCmdSet</span></code> to the default character cmdset <em>after</em>
super().at_cmdset_creation(), or it will be overridden by the default look.</p>
</section>
<sectionid="features">
<h2>Features<aclass="headerlink"href="#features"title="Permalink to this headline">¶</a></h2>
<sectionid="time-changing-description-slots">
<h3>Time-changing description slots<aclass="headerlink"href="#time-changing-description-slots"title="Permalink to this headline">¶</a></h3>
<p>This allows to change the full description text the room shows
depending on larger time variations. Four seasons (spring, summer,
autumn and winter) are used by default. The season is calculated
on-demand (no Script or timer needed) and updates the full text block.</p>
<p>There is also a general description which is used as fallback if
one or more of the seasonal descriptions are not set when their
<p>The room uses the <codeclass="docutils literal notranslate"><spanclass="pre">evennia.utils.gametime.GameTime</span></code> global script. This is
started by default, but if you have deactivated it, you need to
supply your own time keeping mechanism.</p>
</section>
<sectionid="in-description-changing-tags">
<h3>In-description changing tags<aclass="headerlink"href="#in-description-changing-tags"title="Permalink to this headline">¶</a></h3>
<p>Within each seasonal (or general) description text, you can also embed
time-of-day dependent sections. Text inside such a tag will only show
during that particular time of day. The tags looks like <codeclass="docutils literal notranslate"><spanclass="pre"><timeslot></span><spanclass="pre">...</span><spanclass="pre"></timeslot></span></code>. By default there are four timeslots per day - morning,
afternoon, evening and night.</p>
</section>
<sectionid="details">
<h3>Details<aclass="headerlink"href="#details"title="Permalink to this headline">¶</a></h3>
<p>The Extended Room can be “detailed” with special keywords. This makes
use of a special <codeclass="docutils literal notranslate"><spanclass="pre">Look</span></code> command. Details are “virtual” targets to look
at, without there having to be a database object created for it. The
Details are simply stored in a dictionary on the room and if the look
command cannot find an object match for a <codeclass="docutils literal notranslate"><spanclass="pre">look</span><spanclass="pre"><target></span></code> command it
will also look through the available details at the current location
if applicable. The <codeclass="docutils literal notranslate"><spanclass="pre">detail</span></code> command is used to change details.</p>
</section>
<sectionid="extra-commands">
<h3>Extra commands<aclass="headerlink"href="#extra-commands"title="Permalink to this headline">¶</a></h3>
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">CmdExtendedRoomDetail</span></code> - command allowing to manipulate details in this room
as well as listing them</p></li>
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">CmdExtendedRoomGameTime</span></code> - A simple <codeclass="docutils literal notranslate"><spanclass="pre">time</span></code> command, displaying the current
time and season.</p></li>
</ul>
<hrclass="docutils"/>
<p><small>This document page is generated from <codeclass="docutils literal notranslate"><spanclass="pre">evennia/contrib/grid/extended_room/README.md</span></code>. Changes to this
file will be overwritten, so edit that file rather than this one.</small></p>
<pclass="last">You are reading an old version of the Evennia documentation. <ahref="https://www.evennia.com/docs/latest/index.html">The latest version is here</a></p>.