Template:DropTable: Difference between revisions
m (→A showcase of the DropTable templates: use icon version of gold) |
(Add skip_chance example) |
||
Line 9: | Line 9: | ||
This template starts a table. | This template starts a table. | ||
<pre>{{DropTableStart|caption=An optional caption to head the table.}}</pre> | <pre>{{DropTableStart|caption=An optional caption to head the table.|skip_chance=If non-empty will hide the Chance column.}}</pre> | ||
=== {{[[DropTableRow]]}} === | === {{[[DropTableRow]]}} === | ||
Line 22: | Line 22: | ||
|rarity=The weight of the item in the drop table, specified as a fraction. Write "Always" for guaranteed drops. | |rarity=The weight of the item in the drop table, specified as a fraction. Write "Always" for guaranteed drops. | ||
|note=(optional) A note to add on the item link. It will be inserted as-is, so use the <ref> tag. | |note=(optional) A note to add on the item link. It will be inserted as-is, so use the <ref> tag. | ||
|skip_chance=If non-empty will hide the Chance column. | |||
}}</pre> | }}</pre> | ||
Line 41: | Line 42: | ||
=== Miscellaneous Test Table === | === Miscellaneous Test Table === | ||
====Describe how many times you roll on this table.==== | |||
{{DropTableStart}} | {{DropTableStart}} | ||
{{DropTableRow|item=Potion of Healing|quantity=1;3;5|rarity=19/25}} | {{DropTableRow|item=Potion of Healing|quantity=1;3;5|rarity=19/25}} | ||
Line 48: | Line 49: | ||
{{DropTableEnd}} | {{DropTableEnd}} | ||
====Levelled tables can use [[Template:DropTableDivider]].==== | |||
{{DropTableStart}} | {{DropTableStart}} | ||
{{DropTableDivider|Level 1 - 3}} | {{DropTableDivider|Level 1 - 3}} | ||
Line 61: | Line 62: | ||
{{DropTableEnd}} | {{DropTableEnd}} | ||
====Items you always get should have a Rarity of Always.==== | |||
{{DropTableStart}} | {{DropTableStart}} | ||
{{DropTableRow|icon=Skull A Icon.webp|item=Skull|quantity=1|rarity=Always}} | {{DropTableRow|icon=Skull A Icon.webp|item=Skull|quantity=1|rarity=Always}} | ||
{{DropTableRow|icon=Skull B Icon.webp|item=Skull|quantity=1|rarity=Always}} | {{DropTableRow|icon=Skull B Icon.webp|item=Skull|quantity=1|rarity=Always}} | ||
{{DropTableEnd}} | |||
====No Chance column==== | |||
{{DropTableStart|skip_chance=true}} | |||
{{DropTableRow|item=Elixir of Necrotic Resistance|quantity=1|skip_chance=true}} | |||
{{DropTableDivider|If you are a spooky scary skeleton, shivering in the night:}} | |||
{{DropTableRow|item=Elixir of Necrotic Resistance|quantity=2|skip_chance=true}} | |||
{{DropTableEnd}} | {{DropTableEnd}} |
Revision as of 09:52, 7 September 2023
The DropTable templates should be used to exhaustively describe drops. Drops is a loose term: they can include merchant stock, container contents, and, of course, the stuff you get from killing somebody. Drops are fixed but with some variance. They can depend on the player's level as well. The game files are the most thorough source of information, particularly `TreasureTable.txt`, though some drops are specified in level files and others in Character files. For example, Auntie Ethel can sell a Potion of Invisibility but this is not listed in the `DEN_Ethel` drop table.
Usage
{{DropTableStart}}
This template starts a table.
{{DropTableStart|caption=An optional caption to head the table.|skip_chance=If non-empty will hide the Chance column.}}
{{DropTableRow}}
The meat and potatoes of a drop table, each invocation of this template adds an item row to the drop table. If an icon or icon_override is specified, that icon is used. Otherwise, the icon is automatically fetched and included, if one exists.
{{DropTableRow |icon=(optional) The item's icon without a File: prefix. |icon_override=(optional) The item's icon. This will be included directly into the template, so you will need to format it properly. |item=The page name of the item. No square brackets required. |quantity=How many of the item is dropped. It can be a range (e.g. 3 - 5) or a set of possibilities (1;3;5). |rarity=The weight of the item in the drop table, specified as a fraction. Write "Always" for guaranteed drops. |note=(optional) A note to add on the item link. It will be inserted as-is, so use the <ref> tag. |skip_chance=If non-empty will hide the Chance column. }}
Empty ready-to-copy template.
{{DropTableRow|icon=|item=|quantity=|rarity=}}
{{Template:DropTableDivider}}
Creates a whole-table row with text in it. This is useful for noting levelled sections of a drop table.
{{DropTableDivider|}}
{{DropTableEnd}}
No parameters. It ends the table.
A showcase of the DropTable templates
Miscellaneous Test Table
Describe how many times you roll on this table.
Item | Quantity | Chance | |
---|---|---|---|
Potion of Healing | 1;3;5 | 19/25 | |
Potion of Superior Healing | 1 | 1/5 | |
Potion of Superior Healing | 2 | 1/25 |
Levelled tables can use Template:DropTableDivider.
Item | Quantity | Chance | |
---|---|---|---|
Level 1 - 3 | |||
Gold | 5 - 93 | Always | |
Level 4 - 9 | |||
Gold | 5 - 93 | 1/2 | |
Gold | 20 - 159 | 1/2 | |
Level 10+ | |||
Gold | 5 - 93 | 1/3 | |
Gold | 20 - 159 | 1/3 | |
Gold | 50 - 210 | 1/3 |
Items you always get should have a Rarity of Always.
Item | Quantity | Chance | |
---|---|---|---|
Skull | 1 | Always | |
Skull | 1 | Always |
No Chance column
Item | Quantity | ||
---|---|---|---|
Elixir of Necrotic Resistance | 1 | ||
If you are a spooky scary skeleton, shivering in the night: | |||
Elixir of Necrotic Resistance | 2 |