Hello :)
I am fairly new with Twine and been trying to work out a character creation for players... I want them to be able to type in a name they want and choose from a list of variables their characters looks.
I created something using this link https://twinery.org/forum/discussion/2990/remembering-character-creation-options
I put this into the StoryInit:
<<set $name to "Jane">>
<<set $Age to "18">>
<<set $BodyType to "Slender">>
<<set $BodyHeight to "5 ft 7 inches">>
<<set $SkinColor to "Pale">>
<<set $HairColor to "Blonde">>
I put into the start box [[Character Creations]] which opened a new passage. Inside that new passage with that name on it which contains now this:
1) [[Skin color]]: $SkinColor
2) [[Body Type]]: $BodyType
3) [[Body Height]]: $BodyHeight
4) [[Hair Color]]: $HairColor
5) [[Age]]: $Age
<<textbox "$name" "Type your name, here!">>
[[Stats]]
Each of those added variable such as $BodyHeight has made a new passage. To put out just one example, I will show what is inside the $SkinColor string passage:
[[Pale Skin|Character Creations][$SkinColor to "Pale Skin"]]
[[Light Skin|Character Creations][$SkinColor to "Light Skin"]]
[[Light-Brown Skin|Character Creations][$SkinColor to "Light-Brown Skin"]]
[[Ebony Skin|Character Creations][$SkinColor to "Ebony Skin"]]
[[Dark Skin|Character Creations][$SkinColor to "Dark Skin"]]
Then I got a Stats passage which contains this:
<b>Name:</b> <<display $name>>
<b>Age:</b> <<display $Age>>
<b>Skin Color:</b> <<display $SkinColor>>
<b>Body Type:</b> <<display $BodyType>>
<b>Body Height:</b> <<display $BodyHeight>>
<b>Hair Color:</b> <<display $HairColor>>
My original means had been to make the stats passage show the choosen stats before you continue to the actual game, but I get a message saying:
Error: <<display>>: passage "Jane" does not exist
It seem to detect the choices one makes correctly. If i change the name for example from the default name, Jane, to something else the error message has that instead of Jane listed...
I am pretty sure, I am missing out on something but I fail to see what. Can someone help me figure it out?
Later on, I mean to bind these variables with some strings to make an NPC rate the PC based on the character sets... but for now, I would be already happy someone helps me out discovering how to correctly get it displayed. :)
Thank you a lot in advance
Mr. Peppermint