If I want to write a story where the reader can input an age (say 48) and later on in the story I want it to add 1 to it so that it is 49, can I do that in some way? Like setting the game variable to the players input in the customizable field?
There's not a way to do this exactly, but there's a potential way to do something like this, easier or harder depending on what you want to do. Say you want to let the player input an age, and in the course of the story, have that number increase by 1. The easiest way would seem to be this. For the purpose of this example, I'll say you want the ages to be 20, 30, or 40, but you could really do as many as you wanted if you care to spend the time on it. 1. Create a chapter which ends with the question, "How old are you?" 2. Create a following chapter where the title is "I'm 20 years old," and have an age variable set to 20 in the chapter. Have the story continue from that chapter. 3. Do the same for 30 and 40, and have link chapters from each which link to the continuation from the 20 chapter. 4. Now, whenever you want a year to have passed in the story, you can simply have it add 1 to the Age variable. On a small personal note, if I am reading a story and see a huge number of options for a choice like this with no readily apparent point, it may hurt my impression of the story. Unless there's a reason to let the reader input a wide variety of ages here, I'd limit it to a small number of representative examples.
If you want a two-digit number, the easiest way would be to use one chapter to let the reader choose the tens' place and another chapter to let the reader choose the ones' place. If you want to use this for age, make sure that you end up with a number of 18 or above. (If it isn't done like that, the respective character will be considered underage.) Two ways of doing that: 1. Let the reader choose the tens' place first. If it is 10, disable the options of 0 to 7 when choosing the ones' place. 2. Let the reader choose any number and then apply a minimum value. This might make things easier if you want to use a system where you can incrementally change the value. E.g. with +10, -10, +5, -5, +1, -1 To apply the minimum value, add the following score changes before the reader can leave the age choice section. variable type: numerical (4 score changes) Code: age - 100 000 age - 18 age + 100 000 age + 18 variable type: progress (2 score changes) Code: age - 18 age + 18 (This approach can also be used to apply other minimum or maximum values to variables.) If you want to use the "20" chapter for the continuation, you need to take into account that score changes of both the link and destination chapter will be applied one after another. So you should use the following setup: Choose 20 (directly accessible and link chapter: age+20 (age=20 won't work here) Choose 30 (link chapter): age+10 or age=10 Choose 40 (link chapter): age+20 or age=20 Choose 50 (link chapter): age+30 or age=30