New dev blog 2023-06-10

This commit is contained in:
Griatch 2023-06-10 18:19:30 +02:00
parent 4ebe332687
commit 60207cd347
21 changed files with 6359 additions and 2761 deletions

View file

@ -70,6 +70,7 @@ class BlogPost:
"""
title: str
title_short: str
blurb: str
permalink: str
pagelink: str
@ -199,6 +200,12 @@ def md2html():
image_copyrights = line[12:]
image_copyrights = mistletoe.markdown(image_copyrights)
# merge two lines if they are not separated by a blank line
# (this is to allow for markdown to be split over multiple lines)
lines = " ".join(lines)
lines = lines.split("\n\n")
# get first paragraph as blurb
markdown_blurb = "\n".join(
[line for line in lines if line and not line.startswith("!")][:3]
@ -213,8 +220,11 @@ def md2html():
pagelink = OUTFILE_TEMPLATE.format(year=date.year)
permalink = "{}#{}".format(pagelink, anchor)
shortlink_len = 18
blogpost = BlogPost(
title=title,
title_short=title[:shortlink_len] + "..." if len(title) > shortlink_len + 2 else title,
blurb=blurb,
permalink=permalink,
pagelink=pagelink,

View file

@ -1,5 +1,5 @@
title: Tutorial-writing and Attributes galore
copyrights: [Alpha Stock Images](http://alphastockimages.com/) (released under [CC BY-SA 3.0](https://creativecommons.org/licenses/by-sa/3.0/) )
copyrights: Image from [Alpha Stock Images](http://alphastockimages.com/) (released under [CC BY-SA 3.0](https://creativecommons.org/licenses/by-sa/3.0/) )
---

View file

@ -1,66 +1,66 @@
title: Project plans and Splitting a Setting in two
copyright: Image from [freeimageslive.co.uk](http://www.freeimageslive.co.uk/free_stock_image/pausebreakkeyjpg), released under CC Attribution 3.0. Image by freeimageslive - stockmedia.cc.
copyrights: Image from [freeimageslive.co.uk](http://www.freeimageslive.co.uk/free_stock_image/pausebreakkeyjpg), released under CC Attribution 3.0. Image by freeimageslive - stockmedia.cc.
---
---
![Pause/Break button](images/pause_break_key.jpg)
As those following Evennia development should be aware of for now, we are approaching the 1.0 release of Evennia, the MU*-building framework.
As those following Evennia development should be aware of for now, we are approaching the 1.0 release of Evennia, the MU*-building framework.
Thing is, that release has been coming 'soon' for quite a while now. Since some time you can already test Evennia 1.0-dev by checking out the Evennia `develop` branch ([here](https://github.com/evennia/evennia/discussions/2640) for help on how). Evennia 1.0-dev is still changing, but it's already stable enough that It's gotten to the point that people in chat now recommend new users to start fresh with 1.0-dev rather than the 'stable' version 0.9.5, which is now 1.5 years old and is not seeing more updates.
Thing is, that release has been coming 'soon' for quite a while now. Since some time you can already test Evennia 1.0-dev by checking out the Evennia `develop` branch ([here](https://github.com/evennia/evennia/discussions/2640) for help on how). Evennia 1.0-dev is still changing, but it's already stable enough that It's gotten to the point that people in chat now recommend new users to start fresh with 1.0-dev rather than the 'stable' version 0.9.5, which is now 1.5 years old and is not seeing more updates.
## Changes to 1.0 release plans
### In short:
I plan to pause the work on the new beginner tutorial and release 1.0 with that piece of the documentation unfinished. It still has a large swathes of useful info, but the new from-scratch game will not be ready.
### In short:
I plan to pause the work on the new beginner tutorial and release 1.0 with that piece of the documentation unfinished. It still has a large swathes of useful info, but the new from-scratch game will not be ready.
### Longer:
One of the reasons for 1.0 not being released is that I have been working on a new beginner-tutorial to go with the new system. This involves making a full little MUD game from scratch, and I'm making a full system you can both follow lesson-per-lesson as well as implementing it for those that prefer to pull apart code.
### Longer:
One of the reasons for 1.0 not being released is that I have been working on a new beginner-tutorial to go with the new system. This involves making a full little MUD game from scratch, and I'm making a full system you can both follow lesson-per-lesson as well as implementing it for those that prefer to pull apart code.
Writing good code as well as full tutorial lessons is however a big, full-time job (next to my actual real-life full-time job) and thus I expect it will take a good while longer before the new tutorial is done. Worse, in the meantime I can't spend much time resolving the 1.0-dev bugs that has been reported by community testers and also block release.
Writing good code as well as full tutorial lessons is however a big, full-time job (next to my actual real-life full-time job) and thus I expect it will take a good while longer before the new tutorial is done. Worse, in the meantime I can't spend much time resolving the 1.0-dev bugs that has been reported by community testers and also block release.
So I will map out the remaining pieces of the tutorial with informational "Work in progress" markers, merge what I have, and stop work on it for now.
So I will map out the remaining pieces of the tutorial with informational "Work in progress" markers, merge what I have, and stop work on it for now.
I'll continue finishing the tutorial in smaller sub-releases after the main 1.0 release.
### What's left for 1.0-dev
### What's left for 1.0-dev
So, with the main bulk of work (the beginner tutorial) on hold, what's left to do?
So, with the main bulk of work (the beginner tutorial) on hold, what's left to do?
- Cleanup the rest of the docs! There's still much to do there, including removing old tutorials that are now covered in the parts of the beginner-tutorial already finished. Also need to connect all pages and structure the docs better.
- Cleanup the rest of the docs! There's still much to do there, including removing old tutorials that are now covered in the parts of the beginner-tutorial already finished. Also need to connect all pages and structure the docs better.
- Get into the bug backlog of Evennia 1.0-dev that people have reported. Also work to merge some outstanding PRs. I'll need to triage issues more, but hopefully I can get some help fixing simpler bugs during October's [Hacktoberfest](https://github.com/evennia/evennia/discussions/2858).
## MULTISESSION_MODE changes (this will affect your current game!)
That said, now to some recent changes in 1.0-dev. This one is important since it affects your existing game.
That said, now to some recent changes in 1.0-dev. This one is important since it affects your existing game.
### In short:
The functionality of `MULTISESSION_MODE` has been broken into smaller sub-settings. This makes it a lot more flexible, but if you used the 'side-effects' of a higher `MULTISESSION_MODE` in your game, you now need to set a few other settings to get that back.
### In short:
The functionality of `MULTISESSION_MODE` has been broken into smaller sub-settings. This makes it a lot more flexible, but if you used the 'side-effects' of a higher `MULTISESSION_MODE` in your game, you now need to set a few other settings to get that back.
### Longer:
The `MULTISESSION_MODE` is a long-standing Evennia setting. It controls how many sessions you can connect to the game at a time. In other words, how many game clients you can open against the same accoung login at the same time.
### Longer:
The `MULTISESSION_MODE` is a long-standing Evennia setting. It controls how many sessions you can connect to the game at a time. In other words, how many game clients you can open against the same accoung login at the same time.
- Mode 0: A single session. Connecting a new one will disconnect the previous one.
- Mode 1: Multiple sessions can be connected. When you puppet a Character, each session will see the same output.
- Mode 2: Multiple sessions can be connected. Each session can puppet one Character each.
- Mode 1: Multiple sessions can be connected. When you puppet a Character, each session will see the same output.
- Mode 2: Multiple sessions can be connected. Each session can puppet one Character each.
- Mode 3: Multiple sessions can be connected. Multiple sessions can puppet a Character, each session will see the same output.
Thing is that for the longest time, this setting has _also_ controlled other things:
Thing is that for the longest time, this setting has _also_ controlled other things:
- Mode 0,1: A Character of the same name as the Account is auto-created when first connecting.
- Mode 0,1: You auto-connect to your last character whenever you log in.
- Mode 2,3: You don't get an auto-created character and end up in and OOC 'character' select screen when logging in.
- Mode 2,3: You don't get an auto-created character and end up in and OOC 'character' select screen when logging in.
These things don't really belong together. For example, if you want players to be able to choose between multiple characters (a character selection screen) but only play one at a time (`MULTISESSION_MODE` 0 or 1), you'd need to work around Evennia's default.
As of today, I've merged a change to Evennia 1.0-dev (`develop` branch) which changes this.
As of today, I've merged a change to Evennia 1.0-dev (`develop` branch) which changes this.
- `MULTISESSION_MODE` now _only_ controls how sessions connect and how they can puppet characters.
- `MULTISESSION_MODE` now _only_ controls how sessions connect and how they can puppet characters.
- `MAX_NR_SIMULTANEOUS_PUPPETS` is a new setting that controls how many puppets you can control for `MULTISESSION_MODE` 2 and 3. This will not change anything for modes 0 and 1 (always acts as 1 due to how those modes work).
- `AUTO_CREATE_CHARACTERS_WITH_ACCOUNT` allows you to turn off the auto-creation of a character with the same name as the Account when you register. This used to be enforced as a part of `MULTISESSION_MODE` 0 or 1.
- `AUTO_PUPPET_ON_LOGIN` controls if you will auto-connect to the last thing you puppet when you login, of if you'll end up OOC (by default at a character selection screen). Again, this used to be enforced by `MULTISESSION_MODE` 0 or 1.
- `MAX_NR_CHARACTERS` existed before. It controls how many characters the default `charcreate` command will allow you to create.
- `MAX_NR_CHARACTERS` existed before. It controls how many characters the default `charcreate` command will allow you to create.
By default these settings are all setup to mimic the old `MULTISESSION_MODE` 0, so you should not notice any difference in a fresh game.
By default these settings are all setup to mimic the old `MULTISESSION_MODE` 0, so you should not notice any difference in a fresh game.
The drawback is that if you use a higher `MULTISESSION_MODE` in your existing game, you will need to tweak these settings to get back what you had before. Also, if you overrode `Account` or the default login commands, you may need to tweak things to match the new upstream default.
The drawback is that if you use a higher `MULTISESSION_MODE` in your existing game, you will need to tweak these settings to get back what you had before. Also, if you overrode `Account` or the default login commands, you may need to tweak things to match the new upstream default.

View file

@ -1,47 +1,47 @@
title: Evennia 1.0 released!
copyright: Griatch
copyrights: Screenshot by Griatch
---
---
![screenshot](https://user-images.githubusercontent.com/294267/205434941-14cc4f59-7109-49f7-9d71-0ad3371b007c.jpg)
<br>
As of today, [Evennia 1.0 released](https://github.com/evennia/evennia/discussions/3017)! This has been a long time coming. Not only were there a lot of fixes and features to add, we also moved to a completely new documentation system. With many moving parts and my wish to get as much as possible into this release, it took a while to get things aligned.
As of today, [Evennia 1.0 released](https://github.com/evennia/evennia/discussions/3017)! This has been a long time coming. Not only were there a lot of fixes and features to add, we also moved to a completely new documentation system. With many moving parts and my wish to get as much as possible into this release, it took a while to get things aligned.
This release is also the first one where we distribute Evennia on Pypi, so you can install with `pip install evennia`. This also led to a lot of new work and documentation to write.
This release is also the first one where we distribute Evennia on Pypi, so you can install with `pip install evennia`. This also led to a lot of new work and documentation to write.
That said, it would have taken even longer if I had been alone - and I was not. The Evennia community is growing ever more active, and we now have a regular influx of PRs. I even get help fixing bugs at times! Not to mention a bunch of very sweet new contribs and implemented features. It feels super-luxurious to wake up and find a bug has been fixed for me!
That said, it would have taken even longer if I had been alone - and I was not. The Evennia community is growing ever more active, and we now have a regular influx of PRs. I even get help fixing bugs at times! Not to mention a bunch of very sweet new contribs and implemented features. It feels super-luxurious to wake up and find a bug has been fixed for me!
Thanks a lot, everyone!
## Moving forward
The linked announcement above covers the new features of 1.0. Check it out - there's a lot of fun stuff. In this dev-blog, I wanted to talk a little bit about the future instead.
The linked announcement above covers the new features of 1.0. Check it out - there's a lot of fun stuff. In this dev-blog, I wanted to talk a little bit about the future instead.
### Main is where it's at
### Main is where it's at
As usual when the `develop` branch merges, activity shifts. So moving forward, the `main` branch (which is now what we use instead of `master`) will be the 'active' branch.
As usual when the `develop` branch merges, activity shifts. So moving forward, the `main` branch (which is now what we use instead of `master`) will be the 'active' branch.
All new PRs and features should now be made against `main`. The `develop` branch will likely make its return as the bleeding-edge, but I hope that it will be mainly for testing individual complex features rather than for a huge new version like in the past.
### Versioning
### Versioning
In the past we have made big version changes: `0.5->0.6->0.7->0.8->0.9`. Then we got sort of stuck preparing for `1.0`, and there was an interim `0.9.5` release just to hold us over. In the end, `1.0` took almost two years to complete.
In the past we have made big version changes: `0.5->0.6->0.7->0.8->0.9`. Then we got sort of stuck preparing for `1.0`, and there was an interim `0.9.5` release just to hold us over. In the end, `1.0` took almost two years to complete.
Having the `develop` branch open for this long is not good. Users of `0.9.5` were stuck with the old docs (just a plain import from the github wiki) since I couldn't maintain both. It meant stagnation for people downloading `master` branch. And while people in the know eventually switched to use `develop` branch (helping a lot of with testing!) it's still not an ideal state of affairs. I don't want something similar to happen leading up to 2.0.
Having the `develop` branch open for this long is not good. Users of `0.9.5` were stuck with the old docs (just a plain import from the github wiki) since I couldn't maintain both. It meant stagnation for people downloading `master` branch. And while people in the know eventually switched to use `develop` branch (helping a lot of with testing!) it's still not an ideal state of affairs. I don't want something similar to happen leading up to 2.0.
So for that reason I plan to move Evennia to [semantic versioning](https://semver.org/) going forward. Semantic versioning means that we'll use `Major.Minor.Patch` versioning. For you as a developer of an Evennia game (using `pip install` - if you follow `main` on git, it's less relevant, you'll have bleeding edge), this versioning means
So for that reason I plan to move Evennia to [semantic versioning](https://semver.org/) going forward. Semantic versioning means that we'll use `Major.Minor.Patch` versioning. For you as a developer of an Evennia game (using `pip install` - if you follow `main` on git, it's less relevant, you'll have bleeding edge), this versioning means
- `1.0.x` - changes (`1.0.1`, `1.0.2` etc) are _patches_. Bug fixes. Security fixes. Should always be safe to upgrade to without anything breaking.
- `1.x.0` - changes (`1.1.0`, `1.2.0` etc) are _minor version changes_. This can introduce new functionality that is _backwards compatible_. So a new default command, a new contrib, stuff like that. Maybe bigger bug fixes and refactoring that don't change existing functionality. So Minor versions are also usually worthwhile to update to.
- `1.x.0` - changes (`1.1.0`, `1.2.0` etc) are _minor version changes_. This can introduce new functionality that is _backwards compatible_. So a new default command, a new contrib, stuff like that. Maybe bigger bug fixes and refactoring that don't change existing functionality. So Minor versions are also usually worthwhile to update to.
- `x.0.0` - changes (`2.0.0`, `3.0.0` etc) are _major version changes_. These versions include changes that are _backwards-incompatible_. The change may still be small! The gist of it is that they are changes that require you to take some action.
With semantic versioning, Evennia 2.0, 3.0 etc may happen sooner than you may think - even changing how a setting should be written is technically a backwards-incompatible change. I think this will help make those major versions be less daunting too - meaning we won't get stuck at 1.9.5 again.
With semantic versioning, Evennia 2.0, 3.0 etc may happen sooner than you may think - even changing how a setting should be written is technically a backwards-incompatible change. I think this will help make those major versions be less daunting too - meaning we won't get stuck at 1.9.5 again.
### Finishing the beginner tutorial
### Finishing the beginner tutorial
The new [Beginner Tutorial](https://www.evennia.com/docs/latest/Howtos/Howtos-Overview.html#beginner-tutorial) is not ready yet.
The new [Beginner Tutorial](https://www.evennia.com/docs/latest/Howtos/Howtos-Overview.html#beginner-tutorial) is not ready yet.
As mentioned in my previous devblog, I had to pause work on it or 1.0 wouldn't get out this year. That said, I think the first two parts that are finished are already useful to newcomers. In the coming months I will continue with the tutorial-game and finish all the code. In the end I aim to have the reader make a complete little MUD from scratch if they follow the tutorial from beginning to end.
@ -49,6 +49,6 @@ As mentioned in my previous devblog, I had to pause work on it or 1.0 wouldn't g
After the 1.0 release we are now officially in the 'bug fix and cleanup' phase. So report all the issues you find - especially with the new docs!
So moving forward, I expect to mainly do patches and minor versions for a while. I don't intend to start any major work until after the beginner-tutorial is complete.
So moving forward, I expect to mainly do patches and minor versions for a while. I don't intend to start any major work until after the beginner-tutorial is complete.
For now though, let's just be happy that 1.0 is out! :D
For now though, let's just be happy that 1.0 is out! :D

View file

@ -0,0 +1,112 @@
title: Evennia 2.0.0 released today
copyrights: Image by Luc Viatour / [https://lucnix.be/](https://lucnix.be), released under Creative Commons.
---
![screenshot](https://upload.wikimedia.org/wikipedia/commons/c/c4/Field_Hamois_Belgium_Luc_Viatour.jpg)
<br>
As part of our new use of [semantic versioning](https://semver.org/), Evennia
2.0.0 was released today. Evennia is a Python `MU*` creation framework and
server. As the change of the major version indicates, this is a backwards
incompatible change ... well, _maybe_. It depends on your use-case. Read on.
In this post I'll go over some of the new things since the release of Evennia
1.0 some six months ago.
## New version of the ExtendedRoom
The main thing that _may_ be backwards income is the `ExtendedRoom` 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 `ExtendedRoom` 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.
Here are the [new features](https://github.com/evennia/evennia/discussions/3200):
- All rooms can now have any number of "room states", like "burning", "flooded",
"dark", "crowded" or what have you. The `season` and `time_of_day` are now just
treated as any other room-states except that they auto-change with in-game time.
- Rooms can have any number of swappable room-descriptions, just by adding an
Attribute `desc_<roomstate>` to the room. This will be used when a given
room-state is set on the room. If no room state matches, the traditional
`desc` Attribute is used.
- In the old contrib, you could add special tags, like `<morning>...</morning>`
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 `ExtendedRoom` understands the new `state` inline function. This
can be used with _any_ room state (including seasons and time-of-day). For
example: `$state(morning, The morning sun is shining in.)` or
`$state(burning, This place is on fire!)`.
- The room still supports `details` - the ability to look at things in the room
without needing to create a new database object first. This hasn't changed.
- The `ExtendedRoom` now also has simple support for echoing random messages now
and then to the room.
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.
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 `ExtendedRoom` 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.
## More on the Beginner Tutorial
Most of my time has been spent continuing to work on the new [Beginner Tutorial](https://www.evennia.com/docs/latest/Howtos/Beginner-Tutorial/Beginner-Tutorial-Overview.html). Notably on [part three](https://www.evennia.com/docs/latest/Howtos/Beginner-Tutorial/Part3/Beginner-Tutorial-Part3-Overview.html), where
we are making a whole little Evennia MUD game from scratch. While still not
done, I have now added detailed lessons on
- Creating RPG dice rollers and rule systems (in our example we are using the
_Knave_ TTRPG ruleset).
- Organizing Player Character data, and character generation.
- In-game objects and items.
- Handling equipment and weapons.
- In-game rooms.
- Non-player characters.
- Two types of Combat systems (Twitch-based and Turn based).
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.
## A truckload of new features!
As usual, the Evennia community ame through with a bunch of new useful stuff since
the release of Evennia 1.0.
- `Containers` - 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).
- The ANSI color fallbacks (for use when your client does not support XTerm256)
were improved to make more sense (InspectorCaracal).
- New `logger.delete_log` method for deleting log files from inside the server (aMiss-aWry).
- For those intending to override the `SessionHandler`, it was cleaned up and
refactored to make it less prone to cause circular import issues (Volund).
- New `create_channel(attr=...)` keyword, for setting channel Attributes
directly on creation, especially from channels defined in `settings.DEFAULT_CHANNELS` (me)
- Attributes will now properly save Python `deques` with `maxlen=...` set (me).
- [`TagCategoryProperty`](https://www.evennia.com/docs/latest/Components/Tags.html#tagcategoryproperty) - A new way to define tags with a particular category on a class at creation-time, without having to do so in the `at_object_creation` method (me).
- A lot of bug fixes; [see the CHANGELOG](https://www.evennia.com/docs/latest/Coding/Changelog.html) for all the details!
## Continuing
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 [evennia discord](https://discord.gg/AJJpcRUhtF), 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.
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. :)
Have a nice summer!

View file

@ -12,7 +12,7 @@
<script src="../javascripts/scale.fix.js">
</script>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<meta name="description" content="
<!--meta name="description" content="
Latest Evennia dev blog: {{ latest_title }}: {{ latest_blurb }} ...
---
Evennia is a modern Python library and server for creating text-based
@ -57,8 +57,8 @@
{% endif %}
{% for blogpost in page.posts %}
<li class="devblog-calendar-post devblog-calendar-tooltip">
<a href="{{ blogpost.permalink }}">{{ blogpost.date_short}}
<span class="devblog-calendar-tooltip-text">{{ blogpost.title }}</span>
<span class="devblog-calendar-tooltip-text">{{ blogpost.title }}</span>
<a href="{{ blogpost.permalink }}">{{ blogpost.title_short }}
</a>
</li>
{% endfor %}