Twine: example uses for <<revision>>

The <<revision>> macros provide a good deal of expressive power, though some potential uses may not be immediately obvious. Here are a few examples which may provide some inspiration.

An extended form of <<cyclinglink>>

This combination of <<cycle>> and <<set>> changes a variable every time you cycle the passage using the link.

<<cycle attire>>
<<set $shirt="red">>[<img[redshirt.png]] You eagerly slip on a red shirt.
<<becomes>>
<<set $shirt="blue">>[<img[blueshirt.png]] No! Clearly, a blue shirt is required.
<<becomes>>
<<set $shirt="vermillion">>[<img[yellowshirt.png]] Nope, it ''has'' to be vermillion! Or so you think...
<<endcycle>>
<<revise attire "Reconsider shirt">>

A music picker

This uses my HTML5 sound macros to create a link that changes the currently playing music when you click it. (If the music isn't meant to loop, of course substitute <<loopsound>> with <<playsound>>)

<<cycle music>>
<<stopallsound>><<loopsound "piano.ogg">>Piano music
<<becomes>>
<<stopallsound>><<loopsound "chiptune.ogg">>Chiptune music
<<becomes>>
<<stopallsound>><<loopsound "acapella.ogg">>A capella music
<<endcycle>>
<<revise music "Change current music">>

More info / Less info

This functions similar to <<replace>> but also provides a link to hide the inserted text after it's been shown.

<<revision info>>You see here a spotted stripe frog.<<revise info "(More info)">><<gains>>
Poisonous in 3 countries and illegal contraband in 7, this fearsomely shaded amphibian is an aesthetic and biological terror.
<<revert info "(Less info)">>
<<endrevision>>

More examples to come...

Comments

Nice examples...

I'm already finding many uses for the ((revision)) macro, and these examples just further illustrate it's usefulness. I'm making use of it in this way (which is slightly different to previous examples in that I put the 'link' prior to the text change):

You were up late. Too late. ((revise lastnight "Thinking back")), last night seemed a good idea...((cycle lastnight))it was only a few drinks at the bar.((becomes))you stayed up late with your study group.((becomes))you watched a late night movie.((endcycle))

So basically, it allows the player to change elements of the story by clicking specific elements in the text related to the change. I think it would be a nice addition to the macro if the clickable/link element of the macro could also change. It can be achieved via the revert function if you only want to change the clickable/link element twice i.e.

You see
((revision gender))
((set $gender = "male" ; $him = "him" ; $he = "he" ; $his = "his"))
((becomes))((set $gender = "female" ; $him = "her" ; $he = "she" ; $his = "her"))
((endrevision))
((revise gender "a guy"))
((revert gender "a girl")) looking back at you.

but it'd be nice if that could be unlimited for the clickable part of the macro. So for example:

((revise colour "blue" "yellow" "black"))
You paint the wall ((cycle colour)) a light shade of blue.((becomes))a garish shade of yellow((becomes))black. Just plain black.((endcycle))

I guess allowing a variable in the ((revise x $variable)) line would also allow people to achieve a similar thing. :)

EDIT: Awesome - I see the changes have been implemented. :) I love the flexibility of this macro, as it allows the reader to make many tweaks in passage without having to navigate away from it. No idea if you were going to implement the changes anyway (would make sense given your cyclinglink macro) but many thanks!

pensive-mosquitoes