===== Add Stats, RPG Battles, or Just Plain Random Events ===== All of these things will involve some measure of scripting, depending on your needs. If you'd like to add a detailed RPG system to your story, that's completely feasible-- but you (or a friend or two you recruit) will need to write the underpinnings of it yourself. That's not to say this is impossible, though! Try [[http://lambdamaphone.blogspot.com/2015/02/using-twine-for-games-research-part-ii.html|here]] (which uses Harlowe), [[http://twinery.org/forum/discussion/2357/|here]] (Snowman), or [[http://twinery.org/forum/discussion/1618/|here]] (SugarCube) for examples you could adapt for your own needs. If you just would like to add a little randomness to your story, that's pretty simple. Here's an example of how you could write a passage that, every time it's visited, simulates a coin flip. Harlowe: The referee reveals that the coin is (either:"heads","tails"). Snowman: The referee reveals that the coin is <%= (Math.random() > 0.5) ? 'heads' : 'tails' %>. SugarCube: The referee reveals that the coin is <>. ==== External Resources ==== * The Twine Cookbook covers creating a dungeon crawler across different story formats such as [[https://twinery.org/cookbook/dungeonmoving/harlowe/harlowe_dungeonmoving.html|Harlowe]] and [[https://twinery.org/cookbook/dungeonmoving/sugarcube/sugarcube_dungeonmoving.html|SugarCube]]. * AnotherRPGEnthusiast has an [[https://anotherrpgenthusiast.itch.io/another-rpg-engine|example RPG engine]].