Author Topic: New Player Login Flowpath  (Read 8215 times)

Offline Archaegeo

  • Acquaintance
  • *
  • Posts: 33
    • View Profile
New Player Login Flowpath
« on: January 10, 2008, 05:04:29 PM »
Just cause I figure there are more folks than me out there who like to know such things, this is the flowpath a new player goes through during loing (hence where you would branch them off or change things to affect such things as racial choices, stat generation, etc).

Code: [Select]
Player Login flowpath

NEW PLAYER PATH
Driver calls connect() in master.c
/secure/daemon/master.c
object connect(int port)

Driver calls logon() in object returned by connect call
/secure/lib/connect.c
varargs static void logon(mixed foo)
static void InputName(string namen, string kill_me)
static void eventCreatePlayer(string cap)
static void ConfirmName(string ans, string cap)
static void AgeCheck(string ans, string cap)
static void CreatePassword(string pass, string cap)
static void ConfirmPassword(string control, string cap, string pass)
static void InputGender(string str, string cap)
static void InputCapName(string name, string cap)
static void InputEmail(string email)
static void InputRealName(string rname)
static void InputRace(string str)
static void cmdPick(string args)
void eventCompleteChar()
Player->SetRace(raza)
Player->SetProperty("brand_spanking_new",1)
Player->AddCurrency("silver",random(100)+57)
Player->SetRace(raza)
Player->SetPassword(Passwort)
Player->SetGender(Gendre)
Player->SetCapName(CapNamen)
Player->SetEmail(E_Mail)
Player->SetRealName(TrueName)
Player->SetLanguage("Common",100)
Player->SetDefaultLanguage("Common")
this_player()->SetWimpy(20)
this_player()->SetTerminal("ansi")
PLAYERS_D->AddPlayerInfo(Name)
static private void eventEnterGame()

Offline tigwyk

  • Acquaintance
  • *
  • Posts: 45
    • View Profile
Re: New Player Login Flowpath
« Reply #1 on: January 11, 2008, 09:04:43 PM »
This is actually pretty handy, thanks dude. I hated going through and figuring this out (I was going to make stat's randomly rolled but because of the order I did it they were overwritten by the racial config files).

Offline quixadhal

  • BFF
  • ***
  • Posts: 631
    • View Profile
    • WileyMUD
Re: New Player Login Flowpath
« Reply #2 on: January 12, 2008, 10:04:07 AM »
* quixadhal calls for a sticky! :)

Offline Davide

  • Acquaintance
  • *
  • Posts: 1
    • View Profile
Re: New Player Login Flowpath
« Reply #3 on: March 26, 2008, 07:42:47 AM »
Sorry if I this has already been asked, but I've been searching for way to do this for some time, and haven't found anything so I might as well ask...how does the lib, by default, generate stats? After creating several test characters, it seems like they are random but influenced by race...now, If I wanted the starting stats to start at a fixed value, which daemon or file handles the starting stats?

Offline parham

  • Acquaintance
  • *
  • Posts: 30
    • View Profile
Re: New Player Login Flowpath
« Reply #4 on: September 05, 2008, 10:57:00 PM »
And also, how can new prompts be added? How to tell the driver to call this function too after, let's say, race selection?

Offline Raudhrskal

  • BFF
  • ***
  • Posts: 214
  • The MUD community needs YOUR help!
    • View Profile
Re: New Player Login Flowpath
« Reply #5 on: September 06, 2008, 02:31:42 AM »
Same way as all prompts are done.

Previous function has to print prompt, and call input_to().
The new one verifies the input. If if's wrong, print message, reprint prompt, and input_to() itself. If it's OK, print a new promt and input_to() next function.

To plug yours between others, you have to modify last lines of preceding function to forward to yours, and make your func forward to the one that should be next.

Everything's in connect.c of course.
I think, therefore i may be wrong.
Please note that if you met a Raudhrskal in a place that's not related to muds, it wasn't me. *sigh*... back when I started there was zero hits on google for that name...