I need some help in name inputting......

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. :blush: Thanks a lot! :smile:

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

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.

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:

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

1 Like

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. :stuck_out_tongue: , 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! :slight_smile:

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

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
1 Like

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! :kissing_smiling_eyes: :kissing_smiling_eyes: :kissing_smiling_eyes: