fodev.net

FOnline Development => Questions and Answers => Topic started by: Rikers on May 21, 2015, 03:28:28 am

Title: "Skipping" Character creation
Post by: Rikers on May 21, 2015, 03:28:28 am
As in topic, is this possible? To be exact, can you define the character stats/perks/name/age whatever and use that exact character when starting the game? (Obviously this is meant for single/solo gameplay)
Title: Re: "Skipping" Character creation
Post by: loord on May 22, 2015, 12:33:55 am
you dont need create new character every time when you start play, just run server, login and continue game.
Title: Re: "Skipping" Character creation
Post by: Rikers on May 22, 2015, 01:27:12 am
Hmm, maybe I wasn't exactly precise... The thing is, I want to, force the player to use a predefined one - (separating login nick from @pname would be ideal, dunno if that's possible tho) so starting a new game would just mean a single click and voila, the player spawns in start location.
Title: Re: "Skipping" Character creation
Post by: Wipe on May 22, 2015, 08:14:14 am
First part [registering] is easily doable in newer SDK - you'll need at least version which have registration screen moved to scripts, as it also exposes required stuff.

Second should be doable as well, there was option to change on-head name in 2238 using lexems [search for "$@" in scripts]; changing CritterCl::NameOnHead, just like 'name colorizing' does, would be even simpler but would work only in SP.
Now for removing name completly from registration:
Singleplayer: you just send string with name and/or use NameOnHead, no magick here; boooriiing :P
Multiplayer: i'd try with changing name argument in player_register() to something unique, like critter id and in critter_init(), if firstTime is true, set name-lexem basing on which preset player selected [client needs to send such info as param]. I'm not sure if player_register() works how i assumed [can't check source now] so it may become a problem.

Setting critter params can be done in client or server, your choice. I'd personally make shared .fos with data, use client only for display (http://1.bp.blogspot.com/-pWcn74feWh4/VKPSfgf5bXI/AAAAAAAABB4/DvBBx96NzY8/s1600/Fallout%2BScreenshot%2B1.png) and set everything on server [critter_init() + firstTime again] but that's just me thinking multiplayer and preventing possible hacks, it may be pointless for you ;)
Title: Re: "Skipping" Character creation
Post by: Rikers on May 22, 2015, 09:08:24 am
Thankee! Yeah, it's intended for single player only.