Module:Random world names/doc
This is the documentation page for Module:Random world names.
This module is used to display the table body on World/Name. It uses a seed that changes each second to generate the random examples, hence simply purging the page generates new random examples.
The module has one function to be called,
. It takes a go
argument that is used for generating the $lang
{{gameText}}
strings, so it should be set to the wiki's language code (as returned by {{lang|}}
). It also takes a
argument, which should be set to a comma-separated list of world name composition IDs. The compositions are defined in the $compositions
group of RandomWorldName_Composition
{{gameText}}
(i.e.
through RandomWorldName_Composition.1
). Depending on the language, there may be multiple compositions that are identical, so only the IDs of distinct compositions should be passed to the module function. This avoids duplicate table rows in the output. For example, when using the module in English, it would be sensible to set the parameter to RandomWorldName_Composition.8
|compositions=1,3,5,6,7,8
because the compositions 2 and 4 are duplicates of 1 and 3, respectively.
Furthermore, the
function takes several arguments for properly displaying the "generic" composition in the left cell: go
, $adjective
, and $location
, as replacements for the respective placeholders. The values of these arguments are used for all compositions, but it is possible to overwrite them for specific compositions with arguments of the format $noun
<composition>:<adjective/location/noun>
. For instance, using |3:adjective=foo
in the module invocation sets the adjective placeholder in composition 3 (and only in composition 3) to "foo".
Lastly, the
argument defines the number of random world names that are generated for each composition. It defaults to 3 if omitted.
$count