Capturing Randomness

So there’s a point in “my” game where one location, #open-desert, is a boundless area; it loops back to itself, but varies the text description and some background objects every time you move.

#open-desert
(room *)
(name *) Open Desert
(inherently dark *)
(look *)
    (select)
        Clouds of dust swirl through the air
    (or)
        The dust storm rages around you
    (or)
        Your tracks are swallowed up in moments by the billowing sand
    (or)
        The desert stretches around you in all directions
    (at random)
    , and
    (select)
        you shiver in the chill night air
    (or)
        you plod wearily through the sand
    (or)
        you wish you could see more than twenty feet in front of you
    (or)
        god damn it's dark
    (or)
        every inch of sand looks just like every other
    (at random)
    .
    (par)
    (visible flotsam $Flotsam)
    (select)
        All you can make out in the darkness
        (is $Flotsam) (a $Flotsam)
    (or)
        You can sort of see (a $Flotsam)
    (or)
        Nearby: (a $Flotsam).
        Nothing to write home about
    (or)
        Half-lost in the shadows, you see
        (a $Flotsam)
        and that's about it
    (at random)
    .

The problem with this is that if you look twice in the same room, the description changes.

So I was thinking; could it be possible to “capture” the RNG and restore it? Something like:

(narrate entering *)
    (collect $Flotsam)
        *(desert flotsam $Flotsam)
        (now) ($Flotsam is nowhere)
    (into $List)
    (shuffle list $List into $Shuffled)
    (take 3 from $Shuffled into $Final)
    (exhaust) {
        *($F is one of $Final)
        (now) ($F is #in *)
    }
    (now) (visible flotsam $Final)
    (capture randomness $Random)
    (now) (desert description randomness $Random)
    (par)
    (try [look])

and

(look *)
    (desert description randomness $Random)
    (using randomness $Random) {
        (select)
            Clouds of dust swirl through the air
        (or)
            The dust storm rages around you
        (or)
...
1 Like