Evennia 0.9 released



  • Evennia 0.9 - June 2019

    As of today, version 0.9 of Evennia, the Python MU-creation system is out!

    Jump to the bottom of this post to see upgrade/install instructions.

    This is a rather big release that marks a few important milestones. See
    the changelog
    for more details.

    We drop support for Python2. Evennia now requires at least Python 3.7

    This has been a long time coming. Python2 reaches the end of its upstream
    support at the end of this year. This means that existing game code needs to
    convert to use Python3.7 as well. For most users, this should hopefully not
    be more than an afternoon's work.

    As part of this, we also updated our dependecy versions to match. We are now
    also using the more modern and well-supported Autobahn for webclient support
    (removing the old tmwx library).

    A new webclient UI, using the golden-layout library

    This makes for a much slicker and faster webclient UI. It allows tabs as well
    as click-and-drag of panes. A player can now drag and re-arrange window panes
    as desired, assigning message-types to each pane (like having 'look' output in
    one window and tells in another etc).

    The webclient can also now have any number of input panes, organized and placed
    anywhere on the screen (or tabbed). Each input pane has its own separate
    history.

    Support for Grapevine

    Grapevine is a inter-MUD chat network (https://grapevine.haus). In the same
    vein as for IRC, Grapevine channels can be linked to Evennia in-game channels
    and allow for players to communicate between MUDs.

    The Evennia Game Index now a part of Core

    The client for the Evennia Game Index (originally created by Greg Taylor) was
    moved from being a contrib to being a part of the core. This means it's
    configured not as a server plugin anymore (remove this from the
    mygame/server/conf/server_services_plugins.py if you used it before)

    The new evennia connections wizard will help to set up your game for the game
    index. For now, that's all the wizard does, maybe it will be expanded in the
    future.

    We have also changed the policy a little for the index. You may now list your
    game even if you are not allowing any external players on it yet - just leave
    your telnet/webclient links empty. This allows for very early concept games to
    tell us they exist and potentially make us excited about what to come!

    No more @ in default command names

    We have now dropped the @-prefix from all default commands. So @dig is now
    written as dig in help files etc. Evennia will however ignore several common
    prefixes by default, so you can still write @dig (or +dig) if you prefer.
    And if you explicitly give your command a key starting with @, it will still
    be required, same as now.

    Django standard initiative

    User strikaco has made a series of contributions to make it easier to link
    Evennia typeclasses to Django forms and generic/admin views. This makes it
    easier to build and extend functionality to access resources from a future
    website.

    Several utilities that before were located in default Commands (like creating
    a new character or verifying a password) is now found as helper methods on
    the base typeclasses.

    Signal handlers

    A series of new Django signals now fire for various important event:
    Puppet/Unpuppet, Object create/rename, Login/Logout, Login fails, Account
    create/rename etc. This allows code to plug into the server from anywhere
    in situations where overriding hooks would be less cumbersome. (PRs by Volund).

    Global Scripts

    One can now specify (in settings) global scripts that should always be available. These can
    always be found as properties on the evennia.GLOBAL_SCRIPTS container. (PR by
    Volund).

    Generic Player Options

    The player-options have been partially converted to use a generic format with
    validation. This is specifically used for styling information, and allow e.g.
    a player to specify how EvTables are displayed to them (like changing the
    colors and symbols used). (PR by Volund).

    As part of this, Commands have new helper methods client_width and
    styled_table/header/separator/footer for producing various text decorators
    that are then aware of whatever options the user has set.

    Interactive decorator

    The new @interactive decorator makes it easier to do asynchronous programming
    without needing to use Twisted deferreds and Callbacks. Here is an example:

    from evennia.utils import interactive
    
    @interactive
    def myfunc(caller): 
        caller.msg("First message")
        yield(5)
        caller.msg("Five seconds later")
    
        resp = yield("Write something")
        caller.msg(f"You wrote '{resp}'")
    

    This will will echo a text, wait 5 seconds, echo something else and then ask
    the user for input. All asynchronously without affecing other players. This was
    always possible using call_async, but this style should be easier to read.

    Evscaperoom engine

    Evscaperoom is a full puzzle engine for making multiplayer 'escape rooms' in
    Evennia. This is the engine I created for my entry to the MUD-Coder's Guild
    2019 Game Jam.

    Other

    • Spawner was updated
    • Simplified Chinese translations (by MaxAlex).
    • Lots of Bug fixes

    More detailed info is found in the CHANGELOG.md file.

    Install / Upgrading

    You need to install Python3.7 for your system.

    If you are installing from scratch

    Once you have Python3.7, use the Getting Started Instructions in the wiki.

    Updating an existing game

    Make sure to stop Evennia completely (evennia stop) before you pull the
    latest Evennia version (once Evennia is updated to Py3, the old code will
    fail to stop, if so, manually kill the twistd processes on your machine).

    To be extra safe, make sure to make a copy of your entire game dir.

    If you use a virtualenv (highly recommended), you need to create a new one
    with Python3.7. Deactivate the old one and delete (or rename) the old evenv
    virtualenv folder. Then install Evennia in it with as usual with

    pip install -e evennia

    You should see Evennia 0.9 being installed along with py3 versions of all
    dependencies.

    Most likely you'll need to modify your game dir to change the old Py2 code to
    Py3. You can try using the 2to3 program:

    pip install 2to3

    This should make the 2to3 command directly available in your terminal (make sure
    to backup your game dir first!)

    cd mygame
    2to3 .

    This will go through your game dir and modify the code to be compatible with
    python3. This should handle most differences but you may still need to look
    carefully at the changes to make sure it does what you expect. The most common
    things a regular Evennia dev will need to change are:

    • print txt must now be written as print(txt). The 2to3 should handle
      all of these.
    • mydict.items(), .values() and .keys() now return generators rather
      than listsk. The 2to3 program will likely wrap these in list() to mimic
      the old behavior. This works, but you should consider removing these if you
      are only iterating over the result, having a generator is faster for that.

    When you are satisfied, try

    evennia migrate

    If this fails, you may need to fix some other Py3 conversion. You can find more
    info here: https://docs.python.org/3/howto/pyporting.html Continue until the
    migrations pass. Once they do, try evennia start --log and make sure the server
    starts fully and that the game works correctly.

    What now?

    Now begins a period of bug fixing in the master (0.9) branch. If you like
    bleeding edge and used to follow the develop branch, you are best off
    switching to master right now since that will be the most updated one for a
    while.

    If you find any issues, report them to the issue tracker https://github.com/evennia/evennia/issues.

    Most of the docs have been updated, but there is no doubt going to be some
    things still lagging behind or things not yet properly documented. Please
    report/fix that when you come upon it.

    Enjoy!
    Griatch



  • @Griatch said in Evennia 0.9 released:

    The player-options have been partially converted to use a generic format with
    validation. This is specifically used for styling information, and allow e.g.
    a player to specify how EvTables are displayed to them (like changing the
    colors and symbols used). (PR by Volund).

    Oh thank the lord; this means in my little custom core I've been writing for future projects, I can kill off my @display command; that was meant to let you set all your UI preferences (header/footer colors for all output, EvTable styling, etc.) One less thing in the core, one more thing in the base and globally used... that's a win. Remind me to thank Volund later.

    (Though the idea of converting all of Arx's codebase from Evennia 0.7/Python 2.7 to Evennia 0.9/Python 3.7 gives me a mild feeling of existential terror.)



  • @Sparks said in Evennia 0.9 released:

    @Griatch said in Evennia 0.9 released:

    The player-options have been partially converted to use a generic format with
    validation. This is specifically used for styling information, and allow e.g.
    a player to specify how EvTables are displayed to them (like changing the
    colors and symbols used). (PR by Volund).

    Oh thank the lord; this means in my little custom core I've been writing for future projects, I can kill off my @display command; that was meant to let you set all your UI preferences (header/footer colors for all output, EvTable styling, etc.) One less thing in the core, one more thing in the base and globally used... that's a win. Remind me to thank Volund later.

    This still needs more docs. But it's there. :)

    (Though the idea of converting all of Arx's codebase from Evennia 0.7/Python 2.7 to Evennia 0.9/Python 3.7 gives me a mild feeling of existential terror.)

    Friarzen already made a draft PR for this process for Arx. So hopefully it should not be too horrible.
    .
    Griatch



  • Just in time for Shadowrun 6th edition. Coincidence? I don't think so. ;)

    Also: Love moving async callbacks into a decorator. Significantly lower barrier to entry.


Log in to reply