How do I set up specific attributes for later?

Hello!

I am really really new to all of this so please feel free to direct me to the wiki or any other places that might have the answer if this is a dumb question. So far I’ve read the introduction, stat block stuff, and fooled around with putting together three scenes for about an hour. That’s the extent of my experience so far, I’ve just learned how to indent, do scene lists, break up pages, use things like: goto, labels, finish, create and set.

So very new.

Anyways I was wondering, lets say I want to set up the chance for people to choose their name or other attributes (appearance, favorite flowers, etc) and I want them to be noted going forward in the story “His green eyes”, “Her long red hair”, “Noticed the daisies on the table” etc… how do I do that? Do I have to write separate scenes for every single choice or can I do something like: “[Pronoun choice] walks through the door and sees the [favorite flower choice] and smiles, [pronoun possessive choice] [eye color choice] eyes twinkling.”

THIS HAS BEEN ANSWERED but I have a follow up question: How do I code custom variables? I’ve read and looked through the privided stuff on variables and ${} and *if and so on but I haven’t been able to find anything on fill in variables. Say I want to give readers the ability to type in a name of their choice, how would I do that?

5 Likes

Welcome to the community.

The basic answer is: you setup variables that you can then use later.

“hair_color” is an example of a variable you can use. “hair_length” can also be a variable.

Here are some wiki pages to help you get started:

Good luck on your project!

3 Likes

Thank you so much! The sources are going to help a lot!

4 Likes

Also check out multireplace, which is basically how to do this:

It seemed intimidating to me when I first started and I tended toward doing what you said (writing a new copy of the section every time) but once you get it down, it’s so helpful and will be used all the time. Good luck! :slight_smile:

2 Likes

There’s a wiki entry for player input that should help you.

Beside that, you are probably better off creating a variable in startup if you want to use it again.

Temp variables only work in the scene file (that is the text file you write in) you created them in.

If you have several text files for several chapters and need a variable to be useable in all of them, temp is not a good idea.

2 Likes