# I need some help in name inputting

**URL:** <https://forum.choiceofgames.com/t/i-need-some-help-in-name-inputting/36800>\
**Category:** ChoiceScript Help\
**Created:** [March 23, 2018, 3:42pm UTC](https://forum.choiceofgames.com/t/i-need-some-help-in-name-inputting/36800 "2018-03-23T15:42:31Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheGreatLucario](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/thegreatlucario/32/51738_2.png) [@TheGreatLucario](https://forum.choiceofgames.com/u/TheGreatLucario)\
**Post date:** [March 23, 2018, 3:42pm UTC](https://forum.choiceofgames.com/t/i-need-some-help-in-name-inputting/36800/1 "2018-03-23T15:42:31Z")

</div>

I’m having trouble with…

It is actually not much of an error but I am stuck. Here’s what I need help for:

I set the code for the “name input” part where players fill in their names, no big deal.

Then here comes the tricky part, how am I able to change the pre-name “your\_name” into something else in the stats screen?

My code looks like this:  
(The stats screen)  
\<\*label main  
\*choice  
# your name  
\*label your\_name  
\*choice  
#your\_name stats  
\*stat\_chart  
percent your\_name\_leadership Leadership  
percent your\_name\_dexerity Dexerity  
opposed\_pair your\_name\_democracy  
Democracy  
Monarchy  
percent your\_name\_strength strength  
percent your\_name\_weapon\_mastery Weapon Mastery  
percent your\_name\_empathy Empathy  
percent your\_name\_intelligence Intelligence  
percent your\_name\_wisdom Wisdom  
percent your\_name\_perception Perception  
opposed\_pair your\_name\_disiplined  
Disiplined  
Rebellious  
percent your\_name\_compassion compassion  
percent your\_name\_charisma Charisma  
opposed\_pair your\_name\_trickery  
Trickery  
Honesty  
\*goto your\_name →

(The name input part)

\*choice  
\*temp your\_name  
#yes  
Oh, my memory seems to be functioning well enough!

```
#No

	Hmm, I see. Dang it! So, what's your full name, then?
	
	*input_text your_name 

	I see! A fine name it is!

```

I just started out yesterday and this is some pretty complex stuff, but I just want to ask you guys if you have any idea about my issue. 😊 Thanks a lot! 😄

---

<div class="post-metadata">

**Author:** ![Avery\_Moore](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/avery_moore/32/57275_2.png) [@Avery\_Moore](https://forum.choiceofgames.com/u/Avery_Moore)\
**Post date:** [March 23, 2018, 4:01pm UTC](https://forum.choiceofgames.com/t/i-need-some-help-in-name-inputting/36800/2 "2018-03-23T16:01:56Z")

</div>

Uhh… Wow, this looks needlessly complicated. Why not just have the stats as:

Leadership  
Dexterity  
Democracy

Instead of:

Your\_Name\_Leadership  
Your\_Name\_Dexterity  
Your\_Name\_Democray

---

<div class="post-metadata">

**Author:** ![GoldenSilver](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/goldensilver/32/110153_2.png) [@GoldenSilver](https://forum.choiceofgames.com/u/GoldenSilver)\
**Post date:** [March 23, 2018, 4:12pm UTC](https://forum.choiceofgames.com/t/i-need-some-help-in-name-inputting/36800/3 "2018-03-23T16:12:24Z")

</div>

Be careful to not confuse normal text with variables. There is no need to use your\_name\_x to every variable. Just leave the attribute name or something like player\_strength for example, makes things much easier to fiddle around with. Since you can give the name to the stat percent bar right after it, there is no need to have a complicated or changing name for the variable at all, since this will never appear for the player.

```choicescript
Name: ${player_name}
*stat_chart
percent player_leadership Leadership
percent player_dexerity Dexerity
opposed_pair player_democracy
Democracy
Monarchy
percent player_strength strength
percent player_weapon_mastery Weapon Mastery
percent player_empathy Empathy
percent player_intelligence Intelligence
percent player_wisdom Wisdom
percent player_perception Perception
opposed_pair player_disciplined
Disciplined
Rebellious
percent player_compassion compassion
percent player_charisma Charisma
opposed_pair player_trickery
Trickery
Honesty

```

Here, I cleaned up the stat screen for you and it should be more understandable now; here is no need to have the player names in the variables. Don’t forget to make the necessary adjustments to variable names in startup.txt

When you want to display a variable, like after the player has chosen their name, you use ${}. To display the player’s name you would use: ${player\_name}, or whatever other variable you wanted to between the ${VARIABLE}.

You can find more tips in coding here:

> **[ChoiceScript Wiki](https://choicescriptdev.fandom.com/wiki/ChoiceScript_Wiki)**

You can also find a program suited for coding in choicescript here:

> [@\[CSIDE\] The ChoiceScript IDE (v1.3.3 Now Available — 05/09/2022)](https://forum.choiceofgames.com/t/cside-the-choicescript-ide/27622):
>
> The new version of CSIDE (The ChoiceScript IDE) is now available! CSIDE (seaside) is an unofficial application designed to help writers of interactive novels who use ChoiceScript, from Choice of Games. Desktop Downloads: [Release ChoiceScript IDE - Public Release · ChoicescriptIDE/main · GitHub](https://github.com/ChoicescriptIDE/main/releases/tag/v1.0.1) Web Version (Requires a Dropbox Account) [ChoiceScript IDE](https://choicescriptide.github.io/web/) More information available at: [https://choicescriptide.github.io/](https://choicescriptide.github.io/)[https://twitter.com/ChoiceScriptIDE](https://twitter.com/ChoiceScriptIDE) And Discord for real-time discussio…

---

<div class="post-metadata">

**Author:** ![TheGreatLucario](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/thegreatlucario/32/51738_2.png) [@TheGreatLucario](https://forum.choiceofgames.com/u/TheGreatLucario)\
**Post date:** [March 23, 2018, 4:35pm UTC](https://forum.choiceofgames.com/t/i-need-some-help-in-name-inputting/36800/4 "2018-03-23T16:35:02Z")

</div>

Sorry, I forgot to tell you guys…My little idea consists of several perspectives and playable characters which kind of circulate between events (so you can choose whether you want them to die or not. 😛 , I want others to know the psychology of each character personally). So each character gets their own stats…

I know this is needlessly complex, but I completed the whole script during my highschool so you can tell that this is a life achievement somehow. I want this game to be published, so gotta give all that effort! 🙂

---

<div class="post-metadata">

**Author:** ![Avery\_Moore](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/avery_moore/32/57275_2.png) [@Avery\_Moore](https://forum.choiceofgames.com/u/Avery_Moore)\
**Post date:** [March 23, 2018, 5:52pm UTC](https://forum.choiceofgames.com/t/i-need-some-help-in-name-inputting/36800/5 "2018-03-23T17:52:39Z")

</div>

> [@TheGreatLucario](#):
>
> Sorry, I forgot to tell you guys…My little idea consists of several perspectives and playable characters which kind of circulate between events

Ah, I see! Well, in that case, you could use a defining characteristic of each character to keep track of them. Such as:

Warrior\_Strength  
Mage\_Strength  
Rogue\_Strength

Or, if the characters don’t have any defining characteristics, you could always go with:

Player\_One\_Strength  
Player\_Two\_Strength  
Player\_Three\_Strength

Or, alternatively, you could just have a default name for each character, and use that name for their stats, regardless of whether the player changes the character’s name or not:

John\_Strength  
Rachel\_Stregth  
David\_Strength

---

<div class="post-metadata">

**Author:** ![GoldenSilver](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/goldensilver/32/110153_2.png) [@GoldenSilver](https://forum.choiceofgames.com/u/GoldenSilver)\
**Post date:** [March 24, 2018, 1:03am UTC](https://forum.choiceofgames.com/t/i-need-some-help-in-name-inputting/36800/6 "2018-03-24T01:03:49Z")

</div>

The way @Avery_Moore suggested is the way to go; make variables for each character, based on like player1\_strength, player2\_strength…etc.

When you do the stats screen, just do a big \*if at the start to show only the stats of the active character. Create 3 variables, player1\_active, player2\_active and player3\_active (the third is not necessary for this but can be used for other things); change them to true or false based on who is active at the moment, just make one true and the rest false.

```
*if (player1_active = true)
   stats for player 1 here
*elseif (player2_active = true)
   stats for player 2 here
*else
   stats for player 3 here

```

---

<div class="post-metadata">

**Author:** ![TheGreatLucario](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/thegreatlucario/32/51738_2.png) [@TheGreatLucario](https://forum.choiceofgames.com/u/TheGreatLucario)\
**Post date:** [March 24, 2018, 3:19pm UTC](https://forum.choiceofgames.com/t/i-need-some-help-in-name-inputting/36800/7 "2018-03-24T15:19:52Z")

</div>

Thank you guys for helping me out! I now have a cute little stat screen which have 6 choices (characters) and within it 2 choices (stats and relationships) but it all goes smoothly! The names can be changed now as well! My code now is:

Startup:  
\*scene\_list  
startup  
chapter1(needs  
chapter2

\*create your\_name “your\_name”  
\*create eastname “eastname”  
\*create westname “westname”  
\*create southname “southname”  
\*create your\_name\_leadership 60  
\*create your\_name\_strength 50  
\*create your\_name\_intelligence 70  
\*create your\_name\_wisdom 30  
…

Chapter 2:

\*choice  
#yes  
Oh, my memory seems to be functioning well enough!  
\*set your\_name “Lunefarka”

```
	*goto capitalname

#No

	Hmm, I see. Dang it! So, what's your full name, then?
	
	*input_text your_name
	*set your_name "${your_name}"

	I see! A fine name it is!

	*goto capitalname

```

…

Stats screen:  
This is a stats screen! (needs a shit ton of work!!!)

\*label main  
\*choice  
# {your\_name} \*label your\_name \*choice #text {your\_name}'s stats  
\*stat\_chart  
percent your\_name\_leadership Leadership  
percent your\_name\_dexerity Dexerity  
opposed\_pair your\_name\_democracy  
Democracy  
Monarchy  
…

Big hugs to you all! 😙😙😙
