Character Name problems

Hi everyone! I’m still kind of new to ChoiceScript, and I’m trying to figure out the naming function. For example, when it’s time for the player to choose their name, they are either offered some names, or they will have the option to create their own name. That aspect, I more or less have it down. The main problem that I have right now is, for my stat chart, I want to be able to display whatever name the player chooses. How would I do that?

1 Like

Use multireplace, just put your variable inside ${ } like ${name}

You can learn more here

In choicescript.txt:

Name: ${name}

If I name my character “jim”, this will show:

Name: jim

You can autocapitalise it with $!{name}

Name: Jim

Or capitalise the whole thing with $!!{name}

Your mother yells "$!!{name}, CLEAN YOUR ROOM!"

Your mother yells “JIM, CLEAN YOUR ROOM!”

You can get pretty creative with this. I used it to set a password system, for example.

The other poster was talking about multireplace, which uses the command @{var |}. It’s a whole other can of worms, though equally (if not more) useful.

6 Likes

The ${ } function to display a variable’s value in the text of the game is actually different from multireplace – both use curly brackets, but multireplace starts with an @, not a $, and they do very different things with what’s inside the brackets.

The answer to this poster’s question absolutely was the ${ } function, you’re right about that. Here’s the wiki article for it:

2 Likes

Thank you all very much!