Template:SDRH/documentation

From Guild Wars 2 Wiki
Jump to navigationJump to search

Description[edit]

This template creates the header portion of a drop table, it defines the column headers of the respective input parameters. This template is to be used along with {{SDRL}} and {{SDRF}} to create standardized drop tables.

It can cope with upto 50 different items. It makes extensive use of the #arraymaps parser function provided by the Semantic MediaWiki extension.

Parameters[edit]

Parameter Description Default Example
Required parameters
1 ... 50
(unnamed)
These are the names of possible drops. They will appear at the top of the /Drop research table. These parameters will also set the default images and links. Bank Access Express
title The displayed title of the row that hosts all of the images. Daily items
Optional parameters
class Sets the entire table formatting as {{STDT}} would. See GW2W:TABLE#List of STDT parameters. mech1 promo
labels If set equal to yes then this parameter will display another row beneath the image row. The values it displays will depend on the given parameters label1 through to label50. no yes
noheading If set equal to true, the warning text above the template will be hidden. false true
size This sets the size of all the images. Don't specify the px suffix. 50 40
subject What the drop rate refers to. {{BASEPAGENAME}} the [[Daily]] [[achievement]]
i1 ... i50 Image. The image changes to the value set. Do specify the suffix. Don't specify the File: prefix. unnamed parameter 1 ... 50.png Asuran Trident.png
is1 ... is50 Image Size. These change the size of individual images. {{{size}}} 60
l1 ... l50 Link. The destination of the icon link is changed to the value set by this parameter. By default all links are set to the unnamed parameters. Unnamed parameter 1 ... 50 Coin
label1 ... label50 The text label displayed beneath each image. Use <br> to break up longer item names to save horizontal space. Unnamed parameter 1 ... 50 No extra<br>item
s1 ... s50 Shortcut. These will be set as the parameter names to be referenced in the {{SDRL}} line template. Unnamed parameter 1 ... 50 Salvage
manual totals Determines whether or not to display heading text which indicates that only the bottom totals/averages are updated, and that users must enter their own line totals. yes no
totals label If using manual totals and labels are shown, this parameter allows the text to the left of the first item label to be adjusted. Items opened Trees chopped

Example[edit]

The following would setup the top part of a drop rate research table.
  • The title has been set to display as "Daily items".
  • The 11th unnamed parameter has been called "No item given" as it records receiving no additional item, the i11 parameter makes it display Cross red.png, the is11 parameter sets the image size to 20px instead of the default 50px, and the empty l11 parameter stops the "no" icon linking to anything.
  • Names of the parameters used in the line template have been setup in the column after the item name.
  • Labels for each item have been setup in the third column - note the usage of <br> to cause the longer titles to take up less page width.
{{SDRH
 | title = Daily items | class = | labels = yes | size = 50
  | Bank Access Express         | s1  = Bank        | label1 = Bank<br>Access<br>Express
  | Basic Transmutation Stone   | s2  = Basic Stone | label2 = Basic<br>Transmutation<br>Stone
  | Black Lion Chest (Locked)   | s3  = Chest       | label3 = Chest
  | Black Lion Key              | s4  = Key         | label4 = Key
  | Black Lion Merchant Express | s5  = Merchant    | label5 = Merchant<br>Express
  | Black Lion Salvage Kit      | s6  = Salvage     | label6 = Salvage<br>Kit
  | Black Lion Trader Express   | s7  = Trader      | label7 = Trader<br>Express
  | Fine Transmutation Stone    | s8  = Fine Stone  | label8 = Fine<br>Transmutation<br>Stone
  | Instant Repair Canister     | s9  = Repair      | label9 = Instant<br>Repair<br>Canister
  | Mystic Forge Stone          | s10 = Mystic      | label10 = Mystic<br>Forge<br>Stone
  | No extra item                                   | label11 = No extra<br>item | i11 = Cross red.png | is11 = 20 | l11=
}}

And the following would setup the rest of it:

<!-- Data starts here: -->
{{SDRL | Total = 16 | Bank = 0 | Basic Stone = 0 | Chest = 0 | Key = 0 | Merchant = 1 | Salvage = 0 | Trader = 0 | Fine Stone = 0 | Repair = 0 | Mystic = 0 | No extra item = 15 | Example user. 00:00, 1st example month 2012 }}
<!-- Add new lines above this line, using the following format:
{{SDRL | Total = 0 | Bank = 0 | Basic Stone = 0 | Chest = 0 | Key = 0 | Merchant = 0 | Salvage = 0 | Trader = 0 | Fine Stone = 0 | Repair = 0 | Mystic = 0 | No extra item = 0  | ~~~~ }}
-->
{{SDRF}}
Full example in use