Template:DropsLine: Difference between revisions
InvalidCards (talk | contribs) (Count coins as a value of 1 coin per coin) |
(Don't error if {{{name}}} is empty or not given, which is done as a placeholder on new pages) |
||
(15 intermediate revisions by 5 users not shown) | |||
Line 3: | Line 3: | ||
<td>{{#if:{{{displayname|}}}|[[{{{name}}}|{{{displayname}}}]]|[[{{{name}}}]]}}</td> |
<td>{{#if:{{{displayname|}}}|[[{{{name}}}|{{{displayname}}}]]|[[{{{name}}}]]}}</td> |
||
<td>{{#if:{{{quantity|}}}|{{{quantity}}}|Unknown}}</td> |
<td>{{#if:{{{quantity|}}}|{{{quantity}}}|Unknown}}</td> |
||
{{#switch:{{lc:{{{ |
{{#switch:{{lc:{{{frequency|}}}}} |
||
|always = <td data-sort-value="1" class="table-bg-blue"><span>Always</span></td> |
|always = <td data-sort-value="1" class="table-bg-blue"><span>Always</span></td> |
||
|common = <td data-sort-value="16" class="table-bg-green"><span>Common</span></td> |
|common = <td data-sort-value="16" class="table-bg-green"><span>Common</span></td> |
||
Line 11: | Line 11: | ||
|#default = <td data-sort-value="65536" class="table-bg-grey"><span>Unknown</span></td> |
|#default = <td data-sort-value="65536" class="table-bg-grey"><span>Unknown</span></td> |
||
}} |
}} |
||
<td>{{#vardefine:value|{{#ifeq:{{{name}}}|Coins| |
<td>{{#vardefine:value|{{#ifeq:{{{name}}}|Coins|1|{{#ask:[[{{#if:{{{name|}}}|{{{name}}}|Project:No page}}]]|?Value=|mainlabel=-}}}}}}{{#if:{{#var:value}}|{{#if:{{{quantity|}}}|{{#ifeq:{{#rpos:{{{quantity}}}|-}}|-1|{{Currency|{{#var:value}}*{{{quantity}}}}}|{{Currency|{{#var:value}}*{{#explode:{{{quantity}}}|-|0}}}} – {{Currency|{{#var:value}}*{{#explode:{{{quantity}}}|-|1}}}}}}|{{Currency|{{#var:value}}}}}}|Unknown}}</td> |
||
</tr>{{#subobject:DROP_{{{name}}}_{{#if:{{{rarity|}}}|{{{rarity}}}|Unknown}}|Dropped from={{FULLPAGENAME}}|Dropped item={{{name}}}|Dropped quantity={{#if:{{{quantity|}}}|{{{quantity}}}|Unknown}}|Rarity={{#if:{{{ |
</tr>{{#subobject:DROP_{{{name}}}_{{#if:{{{rarity|}}}|{{{rarity}}}|Unknown}}|Dropped from={{FULLPAGENAME}}|Dropped item={{{name}}}|Dropped quantity={{#if:{{{quantity|}}}|{{{quantity}}}|Unknown}}|Rarity={{#if:{{{frequency|}}}|{{{frequency}}}|Unknown}}}}</includeonly><noinclude>{{/doc}}</noinclude> |
Latest revision as of 19:57, 19 November 2024
The DropsLine templates are used to list a monster's drops. Three templates are used to form the drop logs:
{{DropsTableHead}}
- Contains table headers for the top of the drop table{{DropsLine}}
- Template for all of the individual drop lines{{DropsTableBottom}}
- Contains table footers for the bottom of the drop table
Usage
{{DropsTableHead}} {{DropsLine |name = Name of item |displayname = Alternate name to show in the drops table |quantity = Quantity(s) dropped by source. Separate with commas. If unknown, leave blank or use "Unknown." |frequency = How frequent the item is, specify as a fraction (eg. "1/128") or use: Always, Common, Uncommon, Rare, Unknown |image = (Optional) Manual addition or override of the image icon. Don't add [[File:_]] }} {{DropsTableBottom}}
The template should be used in one line, like the examples below.
Unfilled drop lines for quick copy-paste
- Standard
{{DropsLine|name=|quantity=|frequency=}}
- Alternative name
{{DropsLine|name=|displayname=|quantity=|frequency=}}
- Alternative image
{{DropsLine|name=|image=|quantity=|frequency=}}
Parameter details
name
Name of the item/drop, should link directly to the article.
displayname (optional)
If the link to the dropped item should have text that does not match its article name, this parameter can be used to adjust the displayed text for the link.
quantity
Quantity of the item dropped by the source. If multiple quantities are randomly dropped, list them all and separate with commas. Do not use commas as thousand separators. If a range is dropped specify this with a dash as in 1-3.
The quantity column automatically detects several types of ranges:
- Several individual values separated with commas, e.g. 1,4,7
- Uses the first and the last values (not max and min; numbers in the middle ignored), so make sure to order them in ascending order.
- A range in the form min-max, e.g. 1-10
- Uses the number on the left of the - as min, and the right as max
- A combination of the above two, e.g. 1-3,5,7-9,11
- First separates by commas, then if the first is a range, uses the left of the - as min; if the last is a range, uses the right of the - as max; otherwise if either is not a range uses the number that is there as min or max, respectively. In the example, the min number would be 1 and the max 11. Make sure they're ordered in ascending order.
frequency
Frequency of the item being dropped. Frequency can either be a number or a category, a number is preferred.
Note: This is not the rarity of a piece of equipment.
Number
They should generally be added as a fraction, e.g. 1/128
, 10/512
, 1/5000
etc. The template will automatically provide colors and similar.
Category
Categories should be used if there's no good way to find an accurate drop chance. There are 6 available options:
Frequency | Explanation |
---|---|
Always | Always dropped |
Common | The most common of items. Renowned for being common. Nearly always dropped. |
Uncommon | Dropped sometimes, but not necessarily renowned for being common. |
Rare | Rarely dropped. Will take quite a few drops to obtain. |
Very rare | Renowned for being rare among players. Hardly ever dropped. |
image (optional)
A manual configuration of the item's image. Only use this parameter when the image name (minus extension) does not exactly match the item name. Casing is important, so be sure the name
parameter also leads directly to the item's page. Do not add square brackets and the "File:" prefix. Just use "Name.png".
Template data
Show/hide template's data | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
The following information is used by extensions and applications, such as VisualEditor, to help users implement this template onto pages. Please ensure that it is up-to-date. Template for an individual drop line inside drop tables.
|