SpriteVariants - originalfoo/Prison-Architect-API GitHub Wiki
Further investigation required
##Overview
The SpriteVariants setting instructs the game to choose a random sprite from those defined in the same definition block.
##Syntax
This optional setting is used in materials.txt and must be within a definition block. It can be used only once per definition block.
SpriteVariants <choices>
Where <choices> is a number stating how many of the defined sprites are available for random selection.
If not specified the first sprite defined in the definition block will be used.
##Example
SpriteVariants 4
##Notes
If <choices> is higher than the number of sprites actually defined, it's not yet tested to see what will happen.
If <choices> is less than the number of sprites actually defined, it will limit the random selection. For example, if you have 4 sprites defined and SpriteVariants 2, then only the first two sprites will be available for random selection. The other two sprites could only be chosen via scripting (see later).
It's recommended to keep all sprites the same format when using SpriteVariants, otherwise the game will get terribly confused.
Scripts can get and set the sprite index in use at any time via the .SubType property. This opens up some interesting possibilities, for example you could set random traits, features or state for your object based on which sprite the game randomly chose for it.
##See Also