I made a Python-with-Evennia tutorial (looking for feedback)


  • Coder

    @golgoth said in I made a Python-with-Evennia tutorial (looking for feedback):

    @faraday Twisted/Zope/Evennia seems to get confused with Ubuntu.

    I'm sorry - I don't understand your point. I was just answering the question "Is DigitalOcean running ubuntu".


  • Coder

    @faraday I was responding with: Twisted/Zope/Evennia seems to get confused with Ubuntu. Or Ubuntu gets confused with the install. Either way, the core problem revolving around the zope issue has historically involved Ubuntu, unfortunately.


  • Tutorialist

    Whoops! Went to bed and forgot to post, @irfit helped me fix it.


  • Coder

    I keep missing to notice these questions until someone else has already helped out. :) Good it was resolved, @Cobaltasaurus.
    .
    Griatch


  • Tutorialist

    @griatch Every time I try to @reload or @reset the game, it typically freaks out and hangs. I have to go into the server and kill it, and then restart everything manually. This happens after I've changed a conf file like connection_screens.py or settings.py.


  • Coder

    @cobaltasaurus said in I made a Python-with-Evennia tutorial (looking for feedback):

    @griatch Every time I try to @reload or @reset the game, it typically freaks out and hangs. I have to go into the server and kill it, and then restart everything manually. This happens after I've changed a conf file like connection_screens.py or settings.py.

    This should not happen and is not an issue I'm aware of. One thing though - is the console in which you started Evennia still running or did you close/kill it? If you close it you are likely killing the little process that is responsible for restarting the Server for you. You should keep that console running (You can minimize it); it's also where you get most log messages by default. Nothing is lost though - You just need to reboot the server manually. If that happens you can start another console, activate the virtualenv and run evennia start from your game folder again - the Server will then start up without you disconnecting from the game.

    ( this is changing in the next version of Evennia which works differently in this respect and decouples better from the console also on Windows).

    If this is not the issue I'll need to get more info from you on what you mean by 'it freaks out and hangs ' more specifically. Especially look for critical syntax errors in the log/console - this indicates one of your changes made your code (like in the connection screen module) not recognizable as valid Python and Evennia could not load it at all.

    I suppose this is on Windows, using themaster (default) branch of Evennia?
    .
    Griatch


  • Tutorialist

    @griatch No, I'm running it off of an ubuntu digitalOcean droplet. So I use putty to SSH into the server, and then have everything set up remotely.

    I ...think I'm understanding what you're saying? So I have to stay connected to the droplet and inside of (pyenv), otherwise the restart won't work because the process is dead?

    ETA: I tried to shut everything down and restart with a connection I was planning to leave open, and it uh... now it's telling me that 'Evennia' is not a command, so I can't restart it.


  • Tutorialist

    @Ifrit helped me figure out the issue, and got me set up with a screen up (derpderp) so I don't have to try and stay permaconnected to the droplet.


  • Tutorialist

    I, um, have a dumb question but so far I can't find it in the documents. How do I get information about an object-- for example location?


  • Coder

    @cobaltasaurus said in I made a Python-with-Evennia tutorial (looking for feedback):

    @Ifrit helped me figure out the issue, and got me set up with a screen up (derpderp) so I don't have to try and stay permaconnected to the droplet.

    Good, then you found out that 'the command evennia is not recignized' is because you've not started the virtualenv in your new terminal. On Linux, using screen is a convenient solution, indeed.
    .
    Griatch


  • Tutorialist

    @griatch Yeah, that's what we ended up doing doing a screen. The problem was that one of the times that I had to restart the game, for some reason loading up pyenv reinstalled it, rather than activating it. So... I had two of them, and one didn't work.


  • Pitcrew

    @cobaltasaurus ALL OF THE PYENVS!


  • Coder

    @cobaltasaurus said in I made a Python-with-Evennia tutorial (looking for feedback):

    I, um, have a dumb question but so far I can't find it in the documents. How do I get information about an object-- for example location?

    The @ex command is a staff command for returning a display with information on an object. You can also examine individual values in its attributehandler with @ex <object>/<attribute>.

    For a lot of things I tend to rely on using @py, which is a powerful command used for executing arbitrary python code. Like I'll frequently do something like: @py x=self.search("whatever");x.do_some_other_call();self.msg(str(x.do_something(some_parameter))) to see the return value of calling a method on some object.


  • Coder

    @tehom said in I made a Python-with-Evennia tutorial (looking for feedback):

    @cobaltasaurus said in I made a Python-with-Evennia tutorial (looking for feedback):

    I, um, have a dumb question but so far I can't find it in the documents. How do I get information about an object-- for example location?

    The @ex command is a staff command for returning a display with information on an object. You can also examine individual values in its attributehandler with @ex <object>/<attribute>.

    For a lot of things I tend to rely on using @py, which is a powerful command used for executing arbitrary python code. Like I'll frequently do something like: @py x=self.search("whatever");x.do_some_other_call();self.msg(str(x.do_something(some_parameter))) to see the return value of calling a method on some object.

    @Cobaltasaurus Also, for completeness, note that you can skip the initial @ for all commands if you want (so examine, py rather than @examine, @py etc) or use some other prefix you prefer like +, / or & (this is configurable in settings).
    .
    Griatch