Working on an rpg-esque sample story in Harlowe. This will be used as an example for an intro coding course for youth, so I would like to avoid using java or anything outside of the included twine commands.
I want to let them rank three stats at the beginning (Strength, Dexterity, and Wisdom, for what it's worth) and let these affect their success at certain choices they make within the story, shown by giving them random "die rolls" and comparing them to a target number, with the stats they ranked higher getting a better chance of success. My original plan was to set each stat to a variable with a number range, so that their high stat would be 3-18, mid stat 2-14, low stat 1-8, and then when they chose an action the corresponding stat variable would be asked to spit out a random number and compare it to the target value. My problem is that I (incorrectly) though assigning a variable to (random: 1-8) would have it keep randomly selecting values, instead of selecting that value once and sticking with it.
Is there any way to do this that wouldn't require a ton of code for every test? I thought perhaps arrays or datasets would help me, but haven't been able to sort it out yet. Since I want them to be able to play through with different choices for stat rankings, I need to be able to set it at the beginning and have later tests be able to reference what they selected for their high and low stats.
Thanks for any assistance!