17 Mar, ’21

Evennia social hangout system

by Cal

I was bemoaning the lack of good text chat mediums with B the other day and the convo went from IRC to my previous idea of setting up a social MU* instead of an IRC server, for a variety of reasons. Anyway, the last time I toyed with that idea - which was only a couple of months ago, SOMEHOW - I found this MU* engine written in Python called Evennia1 which basically gives you the functional core framework and you build game mechanics off of it. It comes with a bunch of contributed modules packaged into the source code which you can import if you want to use them, they cover a lot of core functions you'd want in various types of RPGs.

....ANYWAY. I picked it up again to see if I could make a nice simple social hangout server. I added some of the fun RP contrib stuff too because, I mean. I love fun RP stuff. ahem. But for being a social hangout server, I had a specific idea of what I wanted it to be able to do and I had to code that myself. And I have! Although I still gotta test the invite command itself, that needs two characters and so far I just have the one.

So, here's how it works. You start with one main room - that's the room where people can congregate and hang out with whoever else is around. A public space, basically. Then, you add any number of private rooms attached to it. I have it set up to work with two kinds of rooms - regular rooms, which are just... regular... rooms... and roleplay rooms, which I haven't coded yet but are gonna be special stage rooms that allow the "GM" (person who requested the room) to do things they ordinarily they wouldn't be able to do, like change the room's description or a simplified speak-as-NPC command.

I'm not decided on whether players should get an extra command to "put on" an IC description because I imported the rpsystem already and that has the "mask" functionality, which lets you disguise yourself as whoever and removes the recog nicks, so that already does the functionality.

On the other hand, I've been trying to decide if having that system added is an overcomplication for what's supposed to be a social MU*, especially since it means I probably need to add the sdesc handler to invite someone with that system on. But ehh. decisions.

....wow okay I totally went off on a tangent there. Rolling back to the actual topic, now....

So, you start with one main room, and then you add any number of private rooms attached to it. I made a custom command for that to manage the "bookkeeping" side of things, since the system requires that certain flags and attributes be set to the new room and to the exit leading to the room and that certain values between them be consistent and it's much easier to just do it all in one fell swoop.

Okay so once you've built the rooms is where the fun starts. By default, nobody can see any of the doors leading to the private rooms, or go through them. What you do is you use a request room command from the main hall. The system checks if there are any free private chat rooms and grabs the first one it finds. (You can also specify if you want a regular chat room or a roleplay room, and it'll only check for available rooms of that type.)

Once it finds an available room for you, it gives you access to the room! The door magically appears and you can go in! Tada~ Of course, a private chat room of one isn't especially useful, so the next thing you'd want to do is invite another player. (You can invite as many other people as you want, but each person can only have one room invitation at a time.) As long as they don't already have an invitation to another room, they're given access to your room and the door now magically appears for them, too.