Template:RandomItemSequence/doc: Difference between revisions
Faintfulness (talk | contribs) (Created page with "Generic wrapper template to render randomized sequences of items. ==Usage== Create your own templates that extend this one and populate them with the items that you want to render. Then use those templates directly in your pages. Helps avoid the clutter of long strings of semicolon-separated items that would otherwise would have to be recurred to with the ItemSlot template. ==Parameters== * items – semicolon-separated list of item names * tooltip – optional toolti...") |
Faintfulness (talk | contribs) No edit summary |
||
| Line 1: | Line 1: | ||
Generic wrapper template to render randomized sequences of items. | Generic wrapper template to render randomized sequences of items. | ||
==Usage== | == Usage == | ||
This template is intended to be extended by other templates that define specific item groups in an indiscriminately randomized sequence. In addition, when using this as a wrapper it avoids repeatedly passing long lists of semicolon-separated items in multiple page invocations to reduce clutter. | |||
==Parameters== | Example: | ||
* items – | <pre> | ||
* tooltip – | {{RandomItemSequence | ||
* link – optional | | items = Milk Bucket; Moomoo Milk; Water Bucket | ||
| tooltip = Example items | |||
| link = OptionalLink | |||
}} | |||
</pre> | |||
Produces: | |||
{{RandomItemSequence | |||
| items = Milk Bucket; Moomoo Milk; Water Bucket | |||
| tooltip = Example items | |||
| link = OptionalLink | |||
}} | |||
== Parameters == | |||
* '''items''' (required) – Semicolon-separated list of item names. | |||
* '''tooltip''' (optional) – Text displayed when hovering over the item sequence. Defaults to the first item if omitted. | |||
* '''link''' (optional) – Page to link to when the item sequence is clicked. | |||
* '''reseed''' (optional) – Set to "false" for deterministic output (the sequence stays the same across multiple invocations on the same page). Default is true, so every invocation has a new random order. | |||
== Notes == | |||
* Use this wrapper to create specific templates for different item groups (e.g., flavor seasonings, effect seasonings, bait seasonings) so editors don’t have to input long lists each time while also avoiding repetitive sequences of materials for better aesthetics. | |||
* The template relies on [[Module:RandomItemSequence]] for shuffling and rendering. | |||
* Multiple invocations on the same page will have independent random orders unless "reseed=false" is used. | |||
Revision as of 04:06, 28 December 2025
Generic wrapper template to render randomized sequences of items.
Usage
This template is intended to be extended by other templates that define specific item groups in an indiscriminately randomized sequence. In addition, when using this as a wrapper it avoids repeatedly passing long lists of semicolon-separated items in multiple page invocations to reduce clutter.
Example:
{{RandomItemSequence
| items = Milk Bucket; Moomoo Milk; Water Bucket
| tooltip = Example items
| link = OptionalLink
}}
Produces:
Parameters
- items (required) – Semicolon-separated list of item names.
- tooltip (optional) – Text displayed when hovering over the item sequence. Defaults to the first item if omitted.
- link (optional) – Page to link to when the item sequence is clicked.
- reseed (optional) – Set to "false" for deterministic output (the sequence stays the same across multiple invocations on the same page). Default is true, so every invocation has a new random order.
Notes
- Use this wrapper to create specific templates for different item groups (e.g., flavor seasonings, effect seasonings, bait seasonings) so editors don’t have to input long lists each time while also avoiding repetitive sequences of materials for better aesthetics.
- The template relies on Module:RandomItemSequence for shuffling and rendering.
- Multiple invocations on the same page will have independent random orders unless "reseed=false" is used.