Skip to content

SHUFFLE

Vera Chellgren edited this page Sep 18, 2021 · 2 revisions

SHUFFLE allows you to change the ordering of gen items.

For example, suppose you had a gen called person which had 5 people in it. Only one of these is considered active at any time. If you were to use the SHIFT command, that would move the active one to the next item, but the order would remain the same. If you want to change the order of the gen items, you would use the SHUFFLE command. SHUFFLE randomly re-orders that gen.

Syntax

SHUFFLE genname

where genname is the name of the gen as a whole. For example, if you have a gen called person then you would use SHUFFLE person

Important note

The SHUFFLE command keeps the gen pointer on the same item afterward. If you wish to move on to a different item, follow up with a SHIFT command. The reason that the SHUFFLE command keeps the gen pointer on the same item is to allow the user to know what to expect. Without this ability, it could quickly get confusing when writing dialog containing SHUFFLE commands because sometimes the person speaking would remain the same as in the previous bit of dialog, and sometimes not.

Caveat: SHUFFLE does not force a rearrangement, so small gens have a random chance of coming back in the same order they started in - this is particularly likely for ones of size 2 or 3. Gens of size 1 or 0 are returned unchanged.

Related commands

SHIFT, GEN, ASSIGNGEN

Clone this wiki locally