Variants are options chosen by players at the start of a game. A generic variant includes information that will be used for displaying the choice to players, the acceptable range of choices, a default choice, and additional forms that may be evaluated if particular values were chosen. Variant values are always numbers.
ModuleProperty: variants
items...
This property defines named variants on this module.
Variants appear as startup options for the game.
The items have the form
([name] type [range/default] [clauses])
.
The name is a string or symbol used to identify the choice to
the players, the type says what sort of change is being enabled,
range/default supplies a range of values and a default value
among them,
and clauses is a list of the form (value forms...
.
A game module may specify any number of variants.
Defaults to ()
.
A number of commonly useful variant types are predefined.
VariantType: world-size
[ width [ height [ circumf [ lat [ lon ] ] ] ] ] [ clauses ]
This variant allows players to choose the size of the world.
The sizes will default to the values in this variant's data.
(width and height can be lists of the form (lo dflt hi)
,
with the obvious interpretation??)
VariantType: world-seen
[ dflt ] [ clauses ]
This variant allows players to choose whether
the terrain of the world will be known at the start of the game.
The default setting will be the value dflt
,
which may be either true
or false
.
VariantType: see-all
[ dflt ] [ clauses ]
This variant allows players to choose whether everything will be seen
always, as with the global variable see-all
.
The default is set by dflt
.
VariantType: sequential
[ dflt ] [ clauses ]
This variant allows players to choose whether to move simultaneously during a turn, or one at a time. The default is set by dflt.
VariantType: real-time
[ total [ perside [ perturn ] ] ] [ clauses ]
This variant allows players to choose realtime limits on the game. The value will default to the values in this variant's data.