Name choosing

linus2002pop
28 Jun 2014, 23:34
I was wondering if it is possibe to make like a name system as i want the player to choose their own name. Can someone please tell me if this is possible?

the NAME attribute is the ID attribute for quest, so no two can be the same

the ALIAS attribute is for what we, the players~users of the game, would know as it's 'name', so you can have multiple things with the same ALIAS attribute.

for example, I and only I, have my genetic code sequence. This is a (biological absolute) 'ID (Identifcation)' for who~what I am, there's only one 'me'.

whereas, many people could have my first name and last name, so which I can't be truly identified by it, ie: do you mean this person, that person, or me?

object1.name = HK
object2.name= HK
// ERROR, there can't be two 'HK' Objects!

object1.name = player1
object1.alias = HK
object2.name = player2
object2.alias = HK
// ah, there's two objects (player1 and player2), with the 'HK' alias, which one do you want to act upon, or do you want to act upon both?

-------

http://quest5.net/wiki/Character_Creation

------

now, if you want your own custom labeling (I am going to use 'labeling' so not to get confused between our general usage of 'naming' and quest's specific NAME:ID attribute), such as a first name and last name:

<asl version="550">
<game name="blah">
// blah code lines
<start type="script">
character_creation_function
</start>
</game>
<function name="character_creation_function">
msg ("What is your first name?")
get input {
// during game play, you type in: john
player.first_name = ToString (result)
msg ("What is your last name?")
get input {
// during game play, you type in: doe
player.last_name = ToString (result)
msg ("Your name is " + player.first_name + " " + player.last_name + ".")
// returns~outputs: Your name is john doe.
}
}
</function>
</asl>


-------

or, in the GUI~Editor:

player -> attributes (tab) -> attributes -> add ->

Attribute Name: first_name
Attribute Type: string
Attribute Value: unknown // this will be then changed based on your typed-in input (via the 'get input' in your character creation script)

player -> attributes (tab) -> attributes -> add ->

Attribute Name: last_name
Attribute Type: string
Attribute Value: unknown // this will be then changed based on your typed-in input (via the 'get input' in your character creation script)

linus2002pop
29 Jun 2014, 09:36
Thanks! It helped alot and i will make sure to put you in the credits of the game!