Hello! I'm new-ish to twine (and have no coding experience to speak of), and using Sugarcube 2 on 1.4.2. I've tried searching the forums and via google, but haven't found anything that quite fits my situation.
What I'm currently doing is allowing player customization of their character, for things like gender, eye color, hair color &etc. Their choices are stored in variables ($gender, $eyeColor, $hairColor &etc....), and in a character description page and elsewhere, these choices are displayed and shown. To keep all descriptions from being really static and same-y every time, I'm having a random word associated with that variable display.
So, the line for gender reads like:
You are <<if $gender is 1>><<print either("male", "a guy", "a dude", "a man")>>.<<elseif $gender is 2>><<print either("female", "a lady", "a girl", "a woman")>>.<<endif>>
...and each time the player views that page, there's a chance of seeing a slightly different description. Same with eye color, hair &etc.
Other uses I'm planning are things like running into an angry animal. But maybe sometimes the animal is ferocious, or ill-tempered, or feral. So the player would see something a little different each time.
The problem I've realized I'll run into, is that every single time
I want to have a random description, I'll have to copy-paste the entire string of choices into the passage for each possible variable. If it were just gender, that would be no problem. But I'm planning a large amount of customization, so that's impractical due to the space it would take. And eve more so because, if I decide to add or remove a possible random word, I'll need to change it in every single location that it may appear in the story.
So I'm wondering, is there a way to simplify this down to something like,
You are <<if $gender is 1>><<print RANDOM WORD FROM $gender is 1 LIST>>.<<elseif $gender is 2>><<print RANDOM WORD FROM $gender is 2 LIST>>.<<endif>>
And then just have the list of words stored off in their own passage that I can add and subtract from freely, without worrying about combing through the entire thing every time I want to make a change?