LPMuds.net

Lib Discussion => Dead Souls Support => Topic started by: Archaegeo on January 10, 2008, 05:04:29 pm

Title: New Player Login Flowpath
Post by: Archaegeo 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()
Title: Re: New Player Login Flowpath
Post by: tigwyk 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).
Title: Re: New Player Login Flowpath
Post by: quixadhal on January 12, 2008, 10:04:07 am
/me calls for a sticky! :)
Title: Re: New Player Login Flowpath
Post by: Davide 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?
Title: Re: New Player Login Flowpath
Post by: parham 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?
Title: Re: New Player Login Flowpath
Post by: Raudhrskal 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.