[purge]
This is the documentation page. It should be transcluded into the main template page. See Template:Documentation for more informationThis template uses Module:Downloadlinks, with data stored in Module:Downloadlinks/hashes.
These scripts are written in Lua.
These scripts are written in Lua.
This template's purpose is to show download links using hashes stored in the module's data module.
Usage
{{downloadlink|1|2[|3|nocat=1|force_download=1]}}
In here:
|1=- The version of the game. Mandatory.
|2=- The variant of the version. One of the following values:
client,server,windows/windows_serverorjson/json_package. Mandatory. - Internally,
windowswill be converted towindows_server.jsonwill be converted tojson_package, though if no hash could be found for that key,jsonwill be used instead, thus prompting a download window rather than opening the JSON in browser.
|3=- Description. Optional. When no description will be provided, the following text will be displayed for variant given in
|2=:
| Variant | Description |
|---|---|
client |
Client |
server |
Server |
windows/windows_server |
.exe |
json/json_package |
.json |
|force_download=- When set, the module will look for the key
jsonin the version's hashes, rather than using the keyjson_package. Only works forjsonand thus has no influence on any other link. Optional, defaults to0.
|nocat=- Whether or not the page should be added to the category invalid download link when the module outputs an error. Optional, defaults to
0.
Example
* {{downloadlink}}
* {{downloadlink|18w20c|client}}
* {{downloadlink|18w20c|server}}
* {{downloadlink|18w20c|json|Only data, no game!}}
* {{downloadlink|1.5.1|windows|Deprecated version!}}
- gives
Missing version
When no download link could be constructed, the page is automatically added to the Category:Invalid download link. Missing hashes can be added to the data module, provided the hashes are correct.