Module:Random world names/doc

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, go. It takes a $lang argument that is used for generating the gameText strings, so it should be set to the wiki's language code (as returned by ). It also takes a $compositions argument, which should be set to a comma-separated list of world name composition IDs. The compositions are defined in the RandomWorldName_Composition group of gameText (i.e. RandomWorldName_Composition.1 through RandomWorldName_Composition.8). 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  because the compositions 2 and 4 are duplicates of 1 and 3, respectively.

Furthermore, the go function takes several arguments for properly displaying the "generic" composition in the left cell: $adjective, $location, and $noun, 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. For instance, using  in the module invocation sets the adjective placeholder in composition 3 (and only in composition 3) to "foo".