I'm playing around with the new game features and would like to be able to to a die roll once per time a chapter is visited. Right now it can be done once per story, or as many times as the user wants. It would be nice to be able to do something like this: {roll d6 as game:damage if game:rolled=false set game:rolled=true} or make a new keyword similar to once that works once per chapter visit. I would also like to add a request I've seen others make to be able to do mathematical operations with two variables.
You could do a Game State Change with a random number. That will create the roll whenever the reader accesses the chapter. But then, you won't have a button to roll the dice in the chapter. Though you could work with Reveal or Action to create a similar interface. Another possibility might be to use Roll without "once" and put it into an if-statement that hides it as soon as game:damage has a value. To do that, you need to add a Game State Change for damage and use the operator Remove. (You can do it in the chapter where the dice is rolled.) To prevent the reader from rerolling, you can then use sth like {if game:damage >= 1}You rolled {game:damage}{else}{roll d6 as game:damage}{endif}
Yes, there are different workarounds, but they all have downsides. I'm currently rolling with the game state change, but that is completely hidden from the user. Using an if works, but the die roller disappears before it's even possible to see the result. It's workable but not optimal.