Multiple Text Inputs on one screen

I’m having trouble with making custom pronouns in a new choice script game

The issue I’m having is that there doesn’t seem to be a way to either have multiple text inputs on one screen, or manipulate text like in a traditional programming language, which would allow me to just ask people to format it like “she her hers” etc

Does anyone know how you’d go about this?

You’re correct, you can only prompt for one text input at a time

You would have to ask for each pronoun individually, something like

*create him
*create his

Other people use she/him, you use
*input_text him

Other people use his/hers, you use
*input_text his

If you need to capitalize the first letter at the start of the sentence, you can use something like

$!{him}

Choice script has a way for manipulating arrays, but you don’t have a way to split the strings by a character (as you would in a traditional programming language). Also, you have to validate the string after the player inputs it, which is also impossible.

Welcome to the forum!

As others said, there is no way to have multiple text inputs on one screen. However, it’s not too much trouble to ask for each pronoun individually.

e.g.
*title Custom Pronoun Example

*create he ""
*create him ""
*create his ""
*create hers ""
*create himself ""
*create s ""

*label pronoun_setter
What is your subjective pronoun? (ex. he, she, they)
*input_text he

What is your objective pronoun? (ex. him, her, them)
*input_text him

What is your possessive determiner? (ex. his, her, their)
*input_text his

What is your possessive pronoun? (ex. his, hers, theirs)
*input_text hers

What is your reflexive pronoun? (ex. himself, herself, themself, themselves)
*input_text himself ""

And finally, are your pronouns singular or plural?

Singular Example: He is, She is

Plural Example: They are

*fake_choice
    #Singular.
        *set s "s"
    #Plural.
        *set s ""

Please check the text reads correctly:

$!{he} walk${s} to the park every day with ${his} cat. The cat was given to ${him} by a friend of ${hers} and ${he} @{s="s" isn't | aren't} sure how to feel about it. It is a very strange cat, and sometimes ${he} wonder${s} to ${himself} if it really is a cat.

*fake_choice
    #Looks correct.
        *finish
    #Let's try again.
        *goto pronoun_setter

If you’re new to ChoiceScript, I’d recommend checking out these links:


ChoiceScript actually does have string manipulation. You could theoretically have players input all their pronouns as a single string and parse it, but IMO it would be much easier for everyone to just do them one at a time.

How I'd go about it
*title Pronoun Parser Example

*create input ""
*create pointer 1
*create DELIMITER "_"

*create he ""
*create him ""
*create his ""

Please input your pronouns separated by underscores. (ex. he_him_his, she_her_her)

*input_text input

*gosub parse_pronouns

Your pronouns are ${he}, ${him}, and ${his}.
*finish


*comment ==== SUBROUTINES ==========================================

*label parse_pronouns
*gosub read_string "he"
*gosub read_string "him"
*gosub read_string "his"
*return


*label read_string
*params variable
*label read_string_loop
*if ((input#pointer) != DELIMITER)
    *set {variable} {variable}&(input#pointer)
    *if pointer < length(input)
        *set pointer + 1
        *goto read_string_loop
    *else
        *return
*else
    *set pointer + 1
    *return

String parsing is incredibly useful and basically how I run my save/checkpoint system.

If you’re interested learning the more advanced bits of ChoiceScript, these threads are a good place to start:

1 Like

CSLib has some subroutines for working with strings. Perhaps it can help you.