<inputtype="image"src="https://www.paypalobjects.com/en_US/SE/i/btn/btn_donateCC_LG.gif"border="0"name="submit"title="PayPal - The safer, easier way to pay online!"alt="Donate with PayPal button"/>
<p>As part of our new use of <ahref="https://semver.org/">semantic versioning</a>, Evennia
2.0.0 was released today. Evennia is a Python <code>MU*</code> creation framework and
server. As the change of the major version indicates, this is a backwards
incompatible change ... well, <em>maybe</em>. It depends on your use-case. Read on.</p>
<p>In this post I'll go over some of the new things since the release of Evennia
1.0 some six months ago.</p>
<h2>New version of the ExtendedRoom</h2>
<p>The main thing that <em>may</em> be backwards income is the <code>ExtendedRoom</code> contrib.
This contrib extends the standard room with the ability to look at 'details' and
to have descriptions that change by season and by time-of-day in the game. I
originally wrote the <code>ExtendedRoom</code> contrib more than a decade ago and it was
in dire need to be recactored and cleaned up to use the modern tools available
in Evennia. Not to mention make use of my additional years of experience since
first creating it.</p>
<p>Here are the <ahref="https://github.com/evennia/evennia/discussions/3200">new features</a>:</p>
<ul>
<li>All rooms can now have any number of "room states", like "burning", "flooded",
"dark", "crowded" or what have you. The <code>season</code> and <code>time_of_day</code> are now just
treated as any other room-states except that they auto-change with in-game time.</li>
<li>Rooms can have any number of swappable room-descriptions, just by adding an
Attribute <code>desc_<roomstate></code> to the room. This will be used when a given
room-state is set on the room. If no room state matches, the traditional
<code>desc</code> Attribute is used.</li>
<li>In the old contrib, you could add special tags, like <code><morning>...</morning></code>
in your descriptions and have those parts of the texts only appear when it's
morning in-game. This still works, but only ever supported time-of-day states.
The new way is to make use Evennia's FuncParser to embed functions in the text
directly. The <code>ExtendedRoom</code> understands the new <code>state</code> inline function. This
can be used with <em>any</em> room state (including seasons and time-of-day). For
example: <code>$state(morning, The morning sun is shining in.)</code> or
<code>$state(burning, This place is on fire!)</code>.</li>
<li>The room still supports <code>details</code> - the ability to look at things in the room
without needing to create a new database object first. This hasn't changed.</li>
<li>The <code>ExtendedRoom</code> now also has simple support for echoing random messages now
and then to the room.</li>
</ul>
<p>Overall, the code was completely re-written and cleaned up, making use of the
latest Evennia tooling. It also has much better unit-test coverage. All the unit
tests of the old implementation passes for the new one, but the changes are
so big that it's nevertheless possible people making heavy use of
this contrib may see side effects from upgrading.</p>
<p>Now, a contrib is not part of the core, so it (potentially) being
backwards-incompatible should normally not warrant a major version bump. But I
feel the <code>ExtendedRoom</code> contrib is used by so many in the Evennia community that
it's prudent to up the major version to let people know that they should
keep an eye out when upgrading.</p>
<h2>More on the Beginner Tutorial</h2>
<p>Most of my time has been spent continuing to work on the new <ahref="https://www.evennia.com/docs/latest/Howtos/Beginner-Tutorial/Beginner-Tutorial-Overview.html">Beginner Tutorial</a>. Notably on <ahref="https://www.evennia.com/docs/latest/Howtos/Beginner-Tutorial/Part3/Beginner-Tutorial-Part3-Overview.html">part three</a>, where
we are making a whole little Evennia MUD game from scratch. While still not
done, I have now added detailed lessons on</p>
<ul>
<li>Creating RPG dice rollers and rule systems (in our example we are using the
<em>Knave</em> TTRPG ruleset).</li>
<li>Organizing Player Character data, and character generation.</li>
<li>In-game objects and items.</li>
<li>Handling equipment and weapons.</li>
<li>In-game rooms.</li>
<li>Non-player characters.</li>
<li>Two types of Combat systems (Twitch-based and Turn based).</li>
</ul>
<p>TODOs are Monster/NPC AI, Dynamical generation of rooms, Questin, Shops and some
more bits and bobs. And of course a separate session on building the game world
and tying all these systems together into a little example game.</p>
<h2>A truckload of new features!</h2>
<p>As usual, the Evennia community ame through with a bunch of new useful stuff since
the release of Evennia 1.0.</p>
<ul>
<li><code>Containers</code> - A new contrib with a typeclass and commands to make and manage
all sorts of containers, from chests to crates and jars, along with commands
to put things in them and take things out of them. A great place to start
tweaking for your own game implementation (InspectorCaracal).</li>
<li>The ANSI color fallbacks (for use when your client does not support XTerm256)
were improved to make more sense (InspectorCaracal).</li>
<li>New <code>logger.delete_log</code> method for deleting log files from inside the server (aMiss-aWry).</li>
<li>For those intending to override the <code>SessionHandler</code>, it was cleaned up and
refactored to make it less prone to cause circular import issues (Volund).</li>
<li>New <code>create_channel(attr=...)</code> keyword, for setting channel Attributes
directly on creation, especially from channels defined in <code>settings.DEFAULT_CHANNELS</code> (me)</li>
<li>Attributes will now properly save Python <code>deques</code> with <code>maxlen=...</code> set (me).</li>
<li><ahref="https://www.evennia.com/docs/latest/Components/Tags.html#tagcategoryproperty"><code>TagCategoryProperty</code></a> - A new way to define tags with a particular category on a class at creation-time, without having to do so in the <code>at_object_creation</code> method (me).</li>
<li>A lot of bug fixes; <ahref="https://www.evennia.com/docs/latest/Coding/Changelog.html">see the CHANGELOG</a> for all the details!</li>
</ul>
<h2>Continuing</h2>
<p>Over summer, my development usually slows down a bit, but I plan to keep pushing
on getting that Beginner tutorial done. We are also seeing more people joing
the <ahref="https://discord.gg/AJJpcRUhtF">evennia discord</a>, which means more eyes on
the code and more bugs and edge cases being detected (and ironed out). So a lot
of maintenance work to be done in the short term.</p>
<p>In the longer term, there are a lot of exciting plans for Evennia in the pipe,
but we'll get there when we get there. :)</p>
<p>Have a nice summer!</p>
<footerclass="devblog-footer">
<spanclass="devblog-copyrights">
<p>Image by Luc Viatour / <ahref="https://lucnix.be">https://lucnix.be/</a>, released under Creative Commons.</p>
</span>
<aclass="devblog-to-toplink"href="2023.html#2023-06-10-evennia-2.0.0-released-today"title="Link to top of post">⇬(top)</a>