Official Community Forums
 
HomeHome  FAQFAQ  SearchSearch  MemberlistMemberlist  UsergroupsUsergroups  RegisterRegister  Log in  The Wiki  Website  github Project  

Share | 
 

 Character Creation - Select name from list

View previous topic View next topic Go down 
AuthorMessage
Tristan
Administrator
Administrator
avatar

Posts : 306
Join date : 2011-08-03
Location : Liverpool, UK

PostSubject: Character Creation - Select name from list   Wed 25 Apr - 1:54


With my project, I'd like people to choose from a list of names, instead of having usernames like 'L33TP0WNA'..

I don't know if it still does, but last time I checked, Second Life uses this system, and you choose a first name and surname from 2 lists.

If a Python table (or would it need to be SQL?) were to be created, containing a 2 lists of names (forenames and surnames), how would I go about connecting that to the Character Creation screen, and then applying it to the character?
Back to top Go down
http://www.3dmodeller.info
AWM Mars
Well-Known Member
Well-Known Member
avatar

Posts : 78
Join date : 2012-02-23
Location : Wiltshire, United Kingdom

PostSubject: Re: Character Creation - Select name from list   Wed 25 Apr - 9:32

Just a sideline update, Second Life used to use that method, now you can use any name, and even link that to your old prefixed name Smile
Back to top Go down
Delurin
Head of Platform Development


Posts : 424
Join date : 2011-08-03

PostSubject: Re: Character Creation - Select name from list   Thu 26 Apr - 2:55

I stored the names in txt files and loaded it on start up.


Once they selected the two names I concatenated the string and set their name to it

Code:
def GetMaleFirstNames():
    names = []
    try:
      filename = ClientAPI.GetAssetPath("malenames.txt")
      nameInput = open(filename, 'r')
     
      for line in nameInput:
     names.append(line.rstrip())
    except:
      ClientAPI.Log("Error opening malenames.txt")
    return names
Back to top Go down
Tristan
Administrator
Administrator
avatar

Posts : 306
Join date : 2011-08-03
Location : Liverpool, UK

PostSubject: Re: Character Creation - Select name from list   Thu 26 Apr - 6:25

Delurin wrote:
I stored the names in txt files and loaded it on start up.


Once they selected the two names I concatenated the string and set their name to it

Code:
def GetMaleFirstNames():
    names = []
    try:
      filename = ClientAPI.GetAssetPath("malenames.txt")
      nameInput = open(filename, 'r')
     
      for line in nameInput:
     names.append(line.rstrip())
    except:
      ClientAPI.Log("Error opening malenames.txt")
    return names

Ok, and how do I go about showing a selectable [menu] in the Character Creation screen?
Back to top Go down
http://www.3dmodeller.info
Tristan
Administrator
Administrator
avatar

Posts : 306
Join date : 2011-08-03
Location : Liverpool, UK

PostSubject: Re: Character Creation - Select name from list   Sat 28 Apr - 9:56

I presume it goes in one of the Character Creation files? (SampleCharacterCreation.py or character_factory.py)
Back to top Go down
http://www.3dmodeller.info
Delurin
Head of Platform Development


Posts : 424
Join date : 2011-08-03

PostSubject: Re: Character Creation - Select name from list   Tue 1 May - 1:20

yes you would put it in the SampleCharacterCreation and if you wanted to verify that the character name is valid you would have to put a similar one in character_factory.py but you would need to replace the ClientAPI.GetAssetPath with a different way to get the file
And you would need to remove the ClientAPI.Log
Back to top Go down
Sponsored content




PostSubject: Re: Character Creation - Select name from list   

Back to top Go down
 
Character Creation - Select name from list
View previous topic View next topic Back to top 
Page 1 of 1
 Similar topics
-
» Fallout 4 character creation
» Grand Fantasia Chat
» My speculation of the start of Monster Hunter 4
» Sega Genesis/MegaDrive -- Warriors of The Eternal Sun, an undying love story
» Expeditions: Conquistador

Permissions in this forum:You cannot reply to topics in this forum
 :: Development :: Client Scripting and Development-
Jump to: