How do I make new characters for the story?


#1

Here’s my problem. I just started choicescript and I am having trouble finding out how to make a new character but not showing them until they are introduced. I don’t want to switch the MC, I just want companions in my story. Sort of like The Lost Heir.


#2

Like in the stat screen? Use boolean variables. Create a variable (like “character1”) in startup and set it to false (*create character1 false). Then use an *if statement in the stats screen. It’ll look like this:

*if (character1)
[indent here] *stat_chart
[two indents here] percent charactername

The charactername (percent) variable needs to be titled different from the boolean variable.

Then, when you want the character visible on the stats screen, put *set character1 true in the appropriate part of the chapter.

Note: You will still have to *create the percent variable in startup in order for this to work (*create charactername [insert relationship percent you want MC and the characterto start with–it’ll be a plain number, like 20 for 20%]).


#3

Would you classify this as more of a writing problem, or a coding problem?


#4

Thanks! I really appreciate the help! Also I would count this as coding.


#5

It depends by what you mean by ‘making a character but not showing them until they are introduced.’

By making a character do you mean the player picks options for that character like gender, hair color, background, etc.?

How do you intend to introduce new characters?


#6

I mean that I want to add characters in the story but I’ll tell how they look. I’m in progress in my game and had to give them one choice due to the fact I was stuck. However all I want is to retain the characters name so I don’t have to memorize a really long name or have to reference it every time I forget. And it would help if their stats came up on the screen when I say “Hi I am Nico!” With Nico being the new character.

I really don’t know if my definition is good or not.


#7

So the player gives the character their name?
Or do you name the characters?


#8

I name the character’s. I usually give a few names though to choose from.


#9

Ok cool so if you want to keep track of a name, you just assign whatever name it is to a variable.
Here’s a very brief example of how that would work:

*temp myname

What is your name?

*choice
 #Jamie
  *set myname "Jamie"
  *goto hello_world
 #Adam
  *set myname "Adam"
  *goto hello_world
 #Kari
  *set myname "Kari"
  *goto hello_world
 #Tory
  *set myname "Tory"
  *goto hello_world
 #Grant
  *set myname "Grant"
  *goto hello_world

*label hello_world

Hello, world! My name is ${myname}.