Evennia 0.7 is out
-
Evennia 0.7 was just released. Evennia is a MU* creation library in Python. People here on MU soapbox might be most familiar with it being the engine running Arx.
There are a ton of updates and fixes. Many are technical and of more interest to those already into Evennia; here are some of more general interest:
- Evennia separates
Player
objects fromCharacter
objects in that the former is an OOC entity that can puppet one or more of the latter. The namePlayer
was a source of some confusion since this is used differently in other code bases.Player
has now been renamed toAccount
to make its function clearer. - Evennia's in-built website now uses our own theme and
bootstrap
under the hood to make it easier to modify as well as rescale it better on mobile devices (webclient is not updated at this point). - Shared logins between webclient and website, with the ability to log out of each independently of the other if so desired.
- Prefix-ignoring - All default commands are now renamed without their @-prefixes. Both @examine, +examine or examine will now all point to the same command. You can customize which prefixes Evennia simply ignores when searching for a command. The mechanic is clever though - if you create a command with a specific key "+foo", then that will still work and won't clash with another command named just "foo". This idea was borrowed from @faraday's Ares system.
- Easy pause mechanisms using
yield
statements directly in Command code (just doyield 10
in your command code to have it pause ten seconds without blocking anyone else). You can also doretval = yield "Do you want to accept?"
and have the command pause (non-blocking) for the player's input before continuing.
New contribs (optional plugins) (selection, new since 0.6 but many have been available on
master
branch for a while):- The optional In-Game-Python contrib by Vincent le Geoff might be of interest to people here. It allows for coding and scripting in-game using full-fledged Python to make events and triggers. It's not a safe softcode-style language (you have the full power of Python which is not good for untrusted users) but is intended for trusted builders to make complex scripting from the command line.
- Wilderness/maps - Creation of dynamic or static maps based on ascii-maps for dynamically creating rooms and to show when moving around. (titeuf87, Cloud Keeper)
- Full turn-based combat system, meant to expand for a desired system (battlejenkins)
- Alternative Unix-style command base for Evennia, for those that prefer to enter commands like you do on the unix command line (with
--flags
etc) (Vincent le Geoff) - Multidescer, which together with Evennia's nick replacement system can be heavily customized in-game (me).
- Mail - a
@brandymail
-style in-game mail-system (grungies1138) - Clothing system, for layered outfits adding to the wearer's desc when worn (battlejenkins).
... And much more. See the release post on the Evennia mailing list for gritty details.
.
Griatch - Evennia separates
-
Can you explain the use for Yield? Thanks.
-
@Thenomain said in Evennia 0.7 is out:
Can you explain the use for Yield? Thanks.
From what I'm gathering it's like @wait .. Which I think it is used to allow time to do a response. Sort of like:
+bbcleargroup 10
"Please retype the command in 10 seconds or the system will cancel it."
etc... -
@Thenomain said in Evennia 0.7 is out:
Can you explain the use for Yield? Thanks.
yield
is a special Python primitive (likeprint
orreturn
). Evennia, being a single-threaded application, uses an asynchronous event loop to avoid blocking. This essentially means that Evennia will cut up processing into small snippets and quickly jump between them, giving the illusion of true parallelism. The advantage of this over threading is that you have no problems with race conditions and other issues you can face with threading.
What we now allow is toyield
out of the running execution of a given command. Simplistically, this means dropping out of the "snippet" of code currently running, pausing it and giving other codes a chance to run. Theyield 15
form is picked up by the command runner and tells it to continue running the code in 15 seconds. Conversely, thereturn_value = yield "Enter something"
form will not continue until the user has entered something on the command line. While waiting the rest of the server runs on as usual.
You have of course been able to produce the same effect before in Evennia, but this has meant importing and using a helper method. Just using theyield
primitive is shorter, straight forward and its functionality is generally easier to follow in-code. -
@Griatch said in Evennia 0.7 is out:
@Thenomain said in Evennia 0.7 is out:
Can you explain the use for Yield? Thanks.
The advantage of this over threading is that you have no problems with race conditions and other issues you can face with threading.
Let's call it "fewer" and not "no". Coroutines are easier to get right than preemptive threads but are not a silver bullet.
-
I should throw the bboards I made at the contrib directory, once I check if they still work properly on 0.7. I suspect they'll need changes.
-
What does @teqmunkey think about this. (Deleted account? Boo.)
-
@Tempest ADMIN VOICE - it was at the user's request. He's not banned from MSB or under any limitations from my end.
-
@Sparks said in Evennia 0.7 is out:
I should throw the bboards I made at the contrib directory, once I check if they still work properly on 0.7. I suspect they'll need changes.
Tried installing the bboards on a brand new 0.7 install but I get errors about 'returns_typeclass' and 'returns_typeclass_list' when I attempt to do 'evennia makemigrations paxboards'.
-
Sounds like the bboards may use two decorators (
returns _typeclass
andreturns _typeclass_list
) that are no longer in use in Evennia - they were leftovers from an earlier implementation of typeclasses and offer functionality that is no longer needed.
.
Griatch@RnMissionRun said in Evennia 0.7 is out:
@Sparks said in Evennia 0.7 is out:
I should throw the bboards I made at the contrib directory, once I check if they still work properly on 0.7. I suspect they'll need changes.
Tried installing the bboards on a brand new 0.7 install but I get errors about 'returns_typeclass' and 'returns_typeclass_list' when I attempt to do 'evennia makemigrations paxboards'.
-
@Griatch Removed the decorators, changed all references to self.player in the command handlers to self.account and changed some PlayerDB references to AccountDB and it seems to work fine.
-
@RnMissionRun said in Evennia 0.7 is out:
@Griatch Removed the decorators, changed all references to self.player in the command handlers to self.account and changed some PlayerDB references to AccountDB and it seems to work fine.
Great!
.
Griatch -
Also had to replace the deprecated {<ansicode> subs in BoardAdminCmd.
-
@RnMissionRun I don't recall if/where @sparks' bboard code is on github, but if it's there consider making a PR against it to update it, since it sounds like you've done all the work already.
.
Griatch -
Yeah, that would save me a little time. And then I can throw it into contrib if people want to have the chance to beat up on it a bit.
It could probably use changes to do a few things more Evennia-ish, since I came at it from a "I know Django" side rather than an "I know Evennia" side, as a first cut of Evennia work.
-
Diff.