rb:random

Description

Randomly chooses an item inside the tags based on the weights provided.

rb:random allows the developer to input a series of tags, of which one or more are shown randomly. Each item can have a weight and the tag can be specified to show more than one choice. Each option should be wrapped in an rb:random-option tag.

 

Attributes

optional pick int The number of items to choose from the random subset. (default value is 1)
unique bool Indicates whether to force uniqueness if pick > 1. (default value is true)

 


Notes

  • Weights of options are relative to the number of options left, which shrinks if unique==true and pick>1.
  • Weights of options can be any float > 0. The weights are relative to each other, not necessarily to 1.
  • This tag may contain rb:random-option.