Would you like to react to this message? Create an account in a few clicks or log in to continue.

Official Community Forums
 
HomeHome  SearchSearch  Latest imagesLatest images  RegisterRegister  Log in  The Wiki  Website  github Project  

 

 Character Creation - Select name from list

Go down 
3 posters
AuthorMessage
Tristan
Administrator
Administrator
Tristan


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

Character Creation - Select name from list Empty
PostSubject: Character Creation - Select name from list   Character Creation - Select name from list EmptyWed 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
AWM Mars


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

Character Creation - Select name from list Empty
PostSubject: Re: Character Creation - Select name from list   Character Creation - Select name from list EmptyWed 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
avatar


Posts : 424
Join date : 2011-08-03

Character Creation - Select name from list Empty
PostSubject: Re: Character Creation - Select name from list   Character Creation - Select name from list EmptyThu 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
Tristan


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

Character Creation - Select name from list Empty
PostSubject: Re: Character Creation - Select name from list   Character Creation - Select name from list EmptyThu 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
Tristan


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

Character Creation - Select name from list Empty
PostSubject: Re: Character Creation - Select name from list   Character Creation - Select name from list EmptySat 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
avatar


Posts : 424
Join date : 2011-08-03

Character Creation - Select name from list Empty
PostSubject: Re: Character Creation - Select name from list   Character Creation - Select name from list EmptyTue 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





Character Creation - Select name from list Empty
PostSubject: Re: Character Creation - Select name from list   Character Creation - Select name from list Empty

Back to top Go down
 
Character Creation - Select name from list
Back to top 
Page 1 of 1
 Similar topics
-
» Demo World Available - New York Times Square
» Character Creation Options
» new account character creation failed{resolved}
» No Default Instance at Character Creation Screen
» Character selection screen world?

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