Using *Rand for Replay Value

I have a question for fellow writers/coders here. What are your thoughts on using *rand to increase replay value in your IF?

I know the CoG site discourages its use because it makes coding and testing more difficult. It also doesn’t make a difference to the player unless they replay the game. And although I personally love to replay my favorite IF games, I don’t know if what the majority of people do.

For context, I’m writing and IF and thinking of randomizing the location of a hidden item the player is meant to look for. The actual location doesn’t matter, so I thought it might be fun to randomize it so it can show up in any one of three locations on different play-throughs… but at the same time, I’m not sure if coding/writing all that out would be worth the trouble since I would also have to offer different hints depending on that play-through’s location.

What are other people’s experiences using *rand in their IF? Or just your opinion as a player?

Solely as a player (and I might be the minority in this). I hate randomness in IF. Where a random item is hidden would add absolutely nothing to replayability for me, it would act solely as a roadblock to me getting to the true replayability and that is seeing the different routes/character interactions.

Although the site is called Choice of GAMES they are actually interactive fiction and the gameplay is very far down on my list of things I care about. Usually it is more of an annoyance than a drawcard. Unless the randomness adds something to your narrative I would say leave it out.

I could see it potentially being used for a good narrative purpose. Say, for example, a bomb planted somewhere random, but it only works if that bomb exploding has narrative impact and potentially diverges the story somewhat.


That’s a fair point. I figure that this kind of randomness could be either “fun easter egg” or “just plain annoying,” but it’s not really an easter egg if it doesn’t add anything to the narrative.

Depends on the game. Rand can lead to more “gamey” games. It can also provide some nice variation in scenes without it seeming unnatural. A number of HG authors have used it in published games (including me). I don’t think it really makes most uses of it significant harder to test. I do think if it’s a live or die type situation in a medium to long game (like a battle outcome) there needs to be a fail safe (redo or cheat option) as there’s nothing worse than being sent back to the beginning of a long game because of chance.

With your example I’d be concerned about player frustration if the object location changes. I could certainly work but you’d need some way to make sure the reader knows this.

Lots of threads on the fact that most people are only playing games once or twice. Doesn’t mean you shouldn’t make it replayable though. Do what you feel is going to make you happiest with it.


I used rand in the gamier sections of Rebels. It has an impact at the margins; mostly it’s there to prevent there being a single fully predictable path to an optimal outcome. I wanted people to be able to pick their strategy with a reasonable idea of the outcome, but not a precise one.

People… tolerated it? :slight_smile:


If you desire to experience a game that doubled down on the use of the *rand feature, I suggest playing Talon City by Eric Moser.

During its development, I remember many people voicing their preference against the feature, but ultimately, it worked out okay.

I say “okay” because the inherent weaknesses with the feature as implemented by Choice Script really skew the benefit to cost outcome in using it.

The way it determines the random number it arrives at, the fact that it can be changed rather easy by the player using “gamey” methods and the sometimes silly ways you need to counter these just turn me off from it.

With that said, I use it to help my execution of certain choices, because it does help provide some wiggle room that would not exist for them.

When I use it, I do not care if the player games the mechanic, and implement it in such a way that expects such gamey behavior of the reader to happen.

Putting on my player hat, as with all mechanics and systems, I “like” something based on its execution. 90% of the use I’ve experienced with this feature has me reacting with a big “meh.”

I enjoyed Talon City, despite the use of *rand, and feel that the game is underrated, partly because of its use of *rand.


Overall, I am definitely in the pro-randomization crowd. As an avid TTRPG player, I always found complaints about how randomness screws the player over in IF circles to be a tad overblown. Just yesterday I played a session where I got beaten up by a random enemy despite having >99% chance of winning quickly, and we still spun something interesting out of it. And that’s in a medium where doing something again usually isn’t an option, not one that will at least let you restart if you really want to.

That said, I’m not really randomizing stuff in my projects, largely because ChoiceScript is (intentionally?) unfriendly towards that sort of thing. Even I’m not into dice rolls enough to force such mechanics onto a language that struggles to comprehend negative numbers, let alone more complex probability mechanics.

1 Like

It’s so interesting to hear from so many perspectives! I suppose the fact that it’s IF as opposed to some other medium also sets up different expectations in people’s minds. People accept in a tabletop game that random chance is involved, but I guess it makes sense for it to be less tolerated in a medium where your choices are supposed to be the deciding factor.

I’ll probably back off on it, then, at least for now. Less work that way, anyway. :joy: Thanks to everyone for offering your input!

1 Like

Seems I’m a bit late to the discussion but might as well add my two cents.

I’m not at all a fan, especially if it’s being used in a situation where a random dice roll determines your success or failure in a task, rather than your stats and/or choices. For one thing, it runs counter to the whole emphasis on your choices mattering, which is a big selling point for COG/HG games. It’s also probably going to be confusing and frustrating for your players (unless you make it very clear every time you use it), since the general assumption amongst the playerbase is that these games are deterministic by nature, and that you can leverage your accumulated knowledge to achieve better outcomes in future playthroughs.

If you want to increase your game’s replayability, I think the best option is to add more choices, more branching, more ROs—just more content in general to make people actually want to replay your game. Even if you have a whole complex system with randomisation where every fight or challenge has 50 different potential outcomes, if your story has two factions total, with only one being palatable to side with, or only a single RO that actually appeals to me, I’m not going to replay your game.

1 Like

One situation where I enjoyed using rand was to generate a random password (the WIP was computer terminal based) that the player would need to find to proceed. It doesn’t fundamentally change the game or disadvantage people it just ensures they can’t speed through it a second time (or post cheats online).

1 Like

That’s kind of how I was thinking of using mine. But the more I think about it, the more I think it would be better to have a fixed location in my case. Mainly because it could improve the narrative a bit more if the location were meaningful rather than random. (Well, I like to think so, anyway.)

I do like facing new challenges on replay, though, so maybe that’s why the idea appealed to me in the first place.