How To Vary Text in Adult Interactive Stories

This article is intended to help authors of Interactive Fiction understand how to vary words, lines of text, or even full paragraphs to make stories more immersive and more fun for readers. In a standard text story, a reader sees the exact same sentence no matter how many times they reread it. In Interactive Fiction, it’s possible to change a sentence as many times and ways as the author wants. Changes can be simple, like varying the weather or the color of a house, or more complex, like varying the interactions that a character has in a bar.

Before starting on Varying Text, you should be familiar with the basics of writing interactive stories here at Literotica. Make sure you’ve read our “Getting Started With Writing Adult Interactive Stories”, “How To Write Interactive Stories With Choices”, “How To Use Conditionals in Interactive Fiction”, “How To Use Variables in Interactive Fiction”, and “How To Add Randomness to Interactive Stories” articles. The articles on Conditionals, Variables, and Randomness are especially relevant to this article, so please consider reading those.

What Does It Mean To Vary Text?

Varying text in a story simply means making the text dynamic/changing, in contrast to static/non-changing text . This is a static sentence:

You cast a summoning spell. It takes several hours...and a great warrior appears!

This is a dynamic sentence with text that varies each time it is read:

You {cast a summoning spell|try conjuring a warrior|invoke a great warrior|start the magic chant}. It takes {several|2|3|4} {hours|days|tries|attempts}...{a great warrior appears|success, he joins you|you can't believe your eyes, it worked|a warrior appears in front of you}!

The possible outcomes of the dynamic sentence are:

You cast a summoning spell. It takes several hours...a great warrior appears!
You try conjuring a warrior. It takes 2 days...success, he joins you!
You invoke a great warrior. It takes 3 tries...you can't believe your eyes, it worked!
You start the magic chant. It takes 4 attempts...a warrior appears in front of you!

In the above example, we use simple sequential lists that show the next item in the list each time a reader visits the same text block. To make it more dynamic, we could randomize the outcomes (after giving more thought to whether all of the combinations would work together randomly). Using random lists is discussed in detail in our How To Add Randomness To Interactive Stories article.

Varying text can make your story more fun for readers and increase the “replay value” of the story.

How To Vary Text in Literotica Interactive Stories

The simplest way to vary text in an Interactive Story at Literotica is to use lists of phrases, officially called “Alternatives”.

The basic format is the same for most lists:

{phrase 1|phrase 2|phrase 3|phrase 4|phrase 5}

The list is enclosed in curly brackets with list items separated by the pipe symbol.

The most common types of lists are Sequences and Cycles.

A Sequence shows the phrases in the list one after another, in order. When the list reaches the end of a Sequence, it shows the last phrase in the list on subsequent viewings of the list.

{phrase 1|phrase 2|phrase 3|phrase 4}

The first visit to this Sequence will show “phrase 1”. The fourth visit will show “phrase 4”. Every visit after the fourth visit will also show “phrase 4” since that is the final item in the Sequence.

A Cycle also shows the phrases in the list one after another, in order. However, when the list reaches the end of a Cycle, it shows the first phrase in the list again as if the list was a loop.

{&phrase 1|phrase 2|phrase 3|phrase 4}

A Cycle looks exactly like a Sequence, except it starts with an ampersand symbol as the first character inside of the curly brackets. The first visit to this Cycle will show “phrase 1”. The fourth visit will show “phrase 4”. The fifth visit will show “phrase 1” again, the sixth visit will show “phrase 2”, the ninth visit will cycle back to “phrase 1”, and so on.

A special type of Sequence is available called a “Once Only” Sequence.

{!phrase 1|phrase 2|phrase 3|phrase 4}

Once Only sequences start with an exclamation point inside of the curly brackets. A Once Only Sequence works the same as a normal Sequence except that it stops showing anything once the last phrase in the list is used. In the example above, the reader would see “phrase 4” on the fourth visit. On the fifth visit (and any visit after the fifth visit) to this Sequence, the reader would not see any text from the Sequence. You could achieve the same result with a normal sequence with a blank last phrase:

{phrase 1|phrase 2|phrase 3|}

Like a Once Only Sequence, a Sequence with an empty last choice will show nothing to the reader after the initial phrases are used up.

Alternatives can be nested inside of each other, they can contain diverts, and they can be used in Choices.

{phrase 1|phrase 2|phrase 3|{phrase 4|phrase 5|phrase 6|{phrase 7|phrase 8|phrase 9}}}

{phrase 1 -> knot_1|phrase 2 -> knot_2|phrase 3 -> knot_3|phrase 4 -> knot_4}

+ You decide to {go for a swim|test out the water|wade into the lake|run and jump in}.

One of the cool things about Alternatives/lists is that they can be “shuffled” so that the reader gets a random phrase every time they visit the Knot containing the text.

{~phrase 1|phrase 2|phrase 3|phrase 4}

Lists are shuffled if you put the tilde symbol at the start of the list. We wrote an entire tutorial on Shuffled Lists and Random Numbers. Please see that article for more details of how you can randomize text in your story.

Alternatives/lists can be combined with Choices, Conditionals, Variables, Functions, and other features, giving you the power to vary text in every part of your story. Please check our other tutorials to find out more about combining features when writing Interactive Fiction here on Literotica.

Further Reading on Varying Text

The creators of the Ink language have written a detailed help document explaining how to use every advanced feature of the language. If you’re interested in becoming a power user, please see their “Writing With Ink” tutorial for more information. We also have our own growing library of Interactive Story Writing Tutorials and FAQs that you might want to read.

If you’re interested in helping test and give feedback on the new Literotica Interactive Story format, either as an author or a reader, please read this thread in the Literotica Forum: Interactive Adult Story Testers Needed.