New Evennia and a new Question

167 views
Skip to first unread message

Mark Mayo

unread,
Oct 23, 2017, 12:16:50 PM10/23/17
to Evennia
   My Evennia based game needs to be configured such that an ACCOUNT may only be used by one SESSION at a time (MULTISESSION_MODE = 0, I think).
  
   The first time an ACCOUNT is created, a menu (displayed in the OOC screen) would present the following options:
  
         GAME RULES
         ABOUT 'game name' WORLD
         ROLEPLAY GUIDELINES
         CREATE A CHARACTER
         HELP
        
   NOTE: HELP - provides help on OOC commands only for ACCOUNTS with
                perm = PLAYER. For higher perm levels additional
                command helps and guidelines will be available.
  
   I want each ACCOUNT to be able to select one of five possible CHARACTERS, created and owned by the ACCOUNT, to puppet when In-Character (IC). (MAX_NR_CHARS = 5, I think)
  
   Once an ACCOUNT has created one or more CHARACTERS, the OOC menu will change to:
  
         GAME RULES
         ABOUT 'game name' WORLD
         ROLEPLAY GUIDELINES
         CREATE A CHARACTER
         DELETE A CHARACTER
         PUPPET A CHARACTER
         HELP
        
   If an ACCOUNT is currently puppeting a CHARACTER, goes OOC, then selects PUPPET A CHARACTER on the menu the following will occur:
  
    1. A warning will be given indicating that a CHARACTER is being
       currently puppeted. The ACCOUNT will be asked if they are sure
       that they want to puppet a different CHARACTER.
      
    2. If the ACCOUNT responds with a Y or YES, then the first puppet
       will be released (I hope it will be saved in its current
       location and status) and the newly selected CHARACTER will be
       activated and the ACCOUNT will be set to IC.
      
   At no time may an ACCOUNT puppet more than one CHARACTER. The concept behind this is to help prevent players (ACCOUNTS) from hoarding 'special' objects and to help prevent one ACCOUNT CHARACTER from unfairly aiding another of the same ACCOUNT's CHARACTERs.
  
   I realize that there are 'work-arounds', but my game concept makes it a bit more cumbersome and prevents my staff members from having to constantly monitor this type of situation.
  
   The concept of having multiple CHARACTERS owned by a single ACCOUNT also allows some staff members and 'special' ACCOUNTS to have IC presence (for certain CHARACTER types only if required (deities, demons, NPC control, ... etc.)
  
  
   My primary question:
       "Where do I make the changes to accomplish my concepts on these
       issues?" (folders and filenames if possible)

   I am not looking for exact code at this time, as I am truly trying to force myself to learn Evennia, PYTHON, newer/better concepts of game administration, and all the other things that my mind needs to update.
  
   My game world has been in development for nearly forty years. My online game development began with DIKU (have a hosted game for about 12yrs, which has not been functional for about 6yrs due to my own fumbles). Decided to start new with Evennia about three years ago, but was unable to allot time as required due a number of personal issues.
  
   Now it is time to build my online game, and finish it, or else scrap it and scratch yet another item off my bucket list.
  
   BTW I am old, retired, micro-computer/pre-PC derelict that downgraded from PC guru to PC user over the last twenty years (to save my sanity while in the real world of employment, answering/solving computer/programming problems for people who found it easier to just let me 'do it'.) Now retired and needing to upgrade some computing and programming skills. :)
  
   Any help or suggestions, other than, "Give up!", will be appreciated, in some form or other.

Nicholas Matlaga

unread,
Oct 23, 2017, 2:15:51 PM10/23/17
to eve...@googlegroups.com
I know this isn't the most detailed response, but https://github.com/evennia/evennia/wiki/Connection-Screen tells you more about the connection screen, which is a good start!

Edit: Sorry if that's actually too basic of an answer. To respond to your primary question, you would make your changes in your own game folder - in particular server/conf/connection_screens.py for the non-logged in connection screen, and actually, take a look at the chargen contrib for a character gen screen setup!

Griatch Art

unread,
Oct 23, 2017, 3:47:47 PM10/23/17
to Evennia
Hi Mark and welcome to Evennia!

You have quite a lot of questions there, let's see if I can give some ideas and hints. Note that since your questions are pretty specific, I'll have to give rather specific answers. If you are new to Python/Evennia (I don't know which concepts are familiar to you or not) some of this may sound a bit intimidating. If so, I recommend some resources to read throughout.


First of all, you are correct that if you use MULTISESSION_MODE = 0, then you will only have one Session per Account and Character. That is, if you connect to your account from somewhere else (like another browser), the first Session will be disconnected. You can read about the different modes in my blog post here.

When you first connect to your game a series of methods on your Account object will be called. The important one in this case is the at_first_login() hook and the at_post_login() hook on the Account class (you override these from your gamedir, in typeclasses/accounts.py). The default at_post_login hook is defined here and will by default (in MULTISESSION_MODE = 0) automaticallly puppet a character with the same name as your Character. If you use some other multisession mode, this will work differently. In your case, since you want to keep one-Session-per-Account but show an OOB menu instead, you'll need to override this hook (or at least part of it) to do something else.

How you handle your 'menu' is really up to you. There are two main ways to do it:

  • Modify your OOCLook command so that when you look around you see the list of options you want. You could have the look-command analyze you every time you use it so that it can see that you have multiple Characters etc and can show different screens. You will then also need to create several Command-Sets for each such menu state and swap those out to match the commands listed (otherwise the user won't actually be able to chose any of the options. Here is how you add Commands. Here is also the documentation on Commands and Command sets to peek at.
  • Alternatively you can implement your OOC menu using EvMenu, Evennia's native menu-creation tool. This will let you design your menu as simple functions ("nodes"). You can just fire off EvMenu in your Account's at_post_login hook as above. EvMenu will make the menu-creation easier, but you will likely have to think hard on how you want to then sequester out into your character creation and how to organize things. If you are not too familiar with Python, just displaying the options and supply individual Commands like the first point above might be better to start with.

As for puppeting of Characters from an Account, Evennia already supports this natively (it's the reason we separate Accounts and Objects/Characters in the first place). The whole mechanism around puppeting, warning etc is available in the default @ic command, which allows you to "become" any Character or even Object you have permission to puppet. You could steal havily from this when you tie together your PUPPET menu option. The source for the default @ic command is here. You may also want to look at the @ooc command which is used to un-puppet a Character and return to an OOC mode. You could either decide to use these as-is, copy them into your game dir and modify them to your purposes, or rip out pieces of them as needed ...



... If you are new to Evennia and Python both, I would recommend you don't dive into all this immediately though. Rather I would recommend you go through some of our tutorials. For example the A small MUSH-like game tutorial will step-by step let you build a simple MUSH-style game. Even if you are not interested in MUSHes per se, that one gives a rundown of the various Evennia components and how they hang together - and you end up with a small little game that you can expand on later if you want. All useful skills to use with your own game later.


Hope that helps for getting started! Don't be shy to ask questions, here or in the IRC chat.
.
Griatch

Mark Mayo

unread,
Oct 23, 2017, 6:27:33 PM10/23/17
to Evennia

Mark Mayo

unread,
Oct 23, 2017, 8:19:48 PM10/23/17
to Evennia
You and Nicholas have both pointed me in directions that I will now follow - thanks guys.

the chargen contrib is being studied for clues/hints/methods of actually creating various species and CHARACTER backgrounds during CHARACTER creation.

The things I am finding most relative to what I have been missing are references and mentions about OOB, look command, at_first_login, and at_post_login. I think I can visualize/understand how to solve these issues now.

If this works, I will post a message about how I accomplished it.

once again thanks than you realize - keeping text games alive is more important than non-readers realize.
Reply all
Reply to author
Forward
0 new messages