User Tools

Site Tools


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 here (which uses Harlowe), here (Snowman), or 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.


The referee reveals that the coin is (either:"heads","tails").


The referee reveals that the coin is
<%= (Math.random() > 0.5) ? 'heads' : 'tails' %>.


The referee reveals that the coin is <<print either("heads","tails")>>.

External Resources

twine2/add_stats_rpg_battles_or_just_plain_random_events.txt · Last modified: 2019/07/15 17:51 by videlais