Hi,
I'm not quite sure to understand the question, so I might not be answering it. The first thing I'm not positive about is your mention of players: players on Evennia (soon to be renamed "accounts" to avoid this problem) are just entities to which you can login to. They don't hold many information besides your username and password. When you connect (using the "connect" command, if you are in multi-session mode 0-1), the player attempts to connect and immediately puppet the character linked with this player.
So in multi-session mode 0-1, there is no "moment" between connection and puppeting. In multi-session 2-3, you need to connect (to a player) and then puppet (a character) with the @ic command. So there is a step in between. However, as far as I know, players don't go in rooms, characters do. Most ofjjects do, actually. I don't know if you can send player objects to rooms. And since in this mode you are not connected to a character yet, I don't know how you could place a character in your lobby room.
There are a lot of ways around this problem however: one solution would be to allow players to use the communication commands (like say, whisper, pose...). The "look" command for players could be just overridden to display a fake decor (that might include all the other connected players at this moment). Player commands aren't very different to design from character commands. Another possibility would be to have players puppet in an object within a room before they use the @ic command. I don't think that's the best solution, but it exists. And doubtless there are many options I haven't thought off.
If you choose a "real" room, removing its exits is quite simple, and you don't need to override anything in code. Just use the builder commands (I would recommend to get familiar with them, they're most useful and will save you from code editing before you really have to). If you really want to have a LobbyRoom typeclass, you can do so quite easily too, just inherit from the Room typeclass (I would say most examples you saw used this strategy but I'm not so sure).
HTH,
Vincent
What would be the best way to achieve a lobby type room. A single type of room and even location that many players will be in my case before they puppet their characters. I looked at the dark room example and the snippets I took, I'll admit I didn't run the tutorial program, but I did try the locks.add("view.false()") and I also tried overriding the room class functions--
def announce_move_from(self, destination, msg=None, mapping=None):
return
def announce_move_to(self, source_location, msg=None, mapping=None):
return
I realize at least now maybe not so much at the time it is the object moving that is announcing. I have seen that the object class has a emit to all objects a message
def msg_contents(self, text=None, exclude=None, from_obj=None, mapping=None, **kwargs):
"""
Emits a message to all objects inside this object.
Args:
which will be my next course and then I will continue. I am assuming of course that the room is the conduit for the player messages of leaving and arriving since it seems to be room dependent. But since objects also can give what objects are in it and which are players the whole thing could be handled by the player/character object. I have looked into the dark room tutorial as I mentioned and a cursory review of the forums I ran into a tree falling in the woods paradigm. It took me 30 minutes to read through it and understand what if anything was desired from that post so I stopped looking in the forums. If this has already been asked though I would gladly look at the post if only I could be directed a bit so I don't waste too much time looking at the forums. Because 30 minutes failing to code correctly can still yield learned results. Reading strange posts unfortunately doesn't always do the same.
Thank you in advance as the community has been very helpful thus far!
PS in case it wasn't clear I'd like a room that displays no exits no objects and recieves no msgs of players coming or going as it will be a shared room by every player logging in or creating a new character but it'll be independent lobbys if that makes any sense.
You received this message because you are subscribed to the Google Groups "Evennia" group.
To unsubscribe from this group and stop receiving emails from it, send an email to evennia+u...@googlegroups.com.
To post to this group, send email to eve...@googlegroups.com.
Visit this group at https://groups.google.com/group/evennia.
To view this discussion on the web visit https://groups.google.com/d/msgid/evennia/94db473b-6606-427c-aee4-0c4c82c3a676%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Players don't have locations. But then players aren't the type of objects that was mentioned, actually. Somebody who better knows Evennia will describe it more accurately, but you have players, scripts, channels, and a few other things that aren't exactly considered "standard" typeclassed objects... though they do have attributes and a few other features. In the object (ObjectDB) table, rooms, exits, objects, characters and whatever else, they all have locations (except for rooms), that is correct.
So when you are in multi-session mode 2-3, and you use the "connect" command, you aren't in a room. What you see (what you sent in your last message) is a custom look command that applies on players. You can override it to "fake" a room description and show the other players, but that's not a room. You can also do it the easy way by overriding a player hook (in your typeclasses/players.py). Its name is "at_look" and takes in argument all your playable characters. So you can ovverride this method and return something else, like a "fake" room description and the list of all connected players. When you puppet a character (using @ic for instance), the character "look" command overrides the player "look" command so this ability is lost. Which is, I believe, what you want to do.
HTH,
Vincent
To view this discussion on the web visit https://groups.google.com/d/msgid/evennia/51bb81c1-17c6-4804-936c-c50ff56319ea%40googlegroups.com.
UPDATE:: Okay so far concept ideaOverride player.pyso that Player recieves attribute locationlook cmd works as character lookCreate Lobby(DefaultRoom)override content_get() so that it includes playersfind/debug other methods effectedCreate global variables in settings.py **no global variable considered unsafeneed PLAYER_START_LOCATION or START_LOBBY_LOCATIONProblem setting id to Lobby Room manually could cause conflicts. Will insert into db and then try catch set location on player where neededCreate Room in db so that global variable is knowncreate limbo on server/at_initial_setup will manually create using cmdset on player for now will test setup laterAlso I am looking into @py commands to easily discover what is being seen on the content_get or on the player attributes. Any help with the syntax of these would be very helpful.I believe@py player.location=here *suggested by vincent-lgthat's it that's all i got lol so any help with that mechanic would be helpful as well
Okay now I am confused lol.
So you login and are OOC Player You see:
Welcome Player --- IE Player "Lobby" # currently this description is handled in the at_look of DefaultPlayer
LFG - look for available games # this could as easily be an exit as a command to a custom room who's descript is built of available lobbies
CG - Create Game
.... blah blah
LFG
Games Descriptions GM No Players #Basically just a table of available tables this part is probably the one advocate for a handler but Rooms
Crunchy MetaGame ME :OD 0 :*( #descriptions can be customized so they are built too.
""" The biggest issue with the handler vs using the location issue already in place is let's say a server reload or they have internet stability issues especially with the webclient now and mobile devices are pretty popular. again I could program in the handler the "location" of the Player Also this "location" will have different cmdset than the 1st Lobby and any table lobby. So the fact that depending on "location" is depending on the "Cmdsets"