Module:Random/doc

From Soyjak Wiki, the free ensoyclopedia
Jump to navigationJump to search

This is the documentation page for Module:Random

Number[edit source]

You will NOT try to use thrembo with this module

{{#invoke:random|number|m|n}}

No Parameters[edit source]

Selects a random decimal between 0 and 1

{{#invoke:random|number}} -> 0.23221339389319

m[edit source]

Selects a random integer between 1 and m

{{#invoke:random|number|10}} -> 7

m and n[edit source]

Selects a random integer between m and n, or n and m depending on which is bigger

{{#invoke:random|number|10|20}} -> 10

{{#invoke:random|number|10|5}} -> 10

Item[edit source]

This selects a random item declared in the module

{{#invoke:random|item|''[[Image:Minecraft-diamond.png|25px]] '''Gem'''''||''[[Image:Minecraft-Coal.png|25px]] '''Coal'''''}} -> Gem

Consider using <choose> instead, especially if you don't need the random output to be the same across multiple calls in a page and you would prefer not to cache (if the content loads fast enough).

<choose uncached><option>''[[Image:Minecraft-diamond.png|25px]] '''Gem'''''</option><option>''[[Image:Minecraft-Coal.png|25px]] '''Coal'''''</option></choose> -> Coal