Template:DropTable: Difference between revisions
(Update docs for droptablerow) |
HiddenDragon (talk | contribs) mNo edit summary |
||
(16 intermediate revisions by one other user not shown) | |||
Line 5: | Line 5: | ||
== Usage == | == Usage == | ||
=== {{[[ | === {{[[Template:Drop table start]]}} === | ||
This template starts a table. | This template starts a table. | ||
<pre>{{ | <pre>{{Drop table start|caption=An optional caption to head the table.|skip_chance=If non-empty will hide the Chance column.}}</pre> | ||
=== {{[[ | === {{[[Template:Drop table row]]}} === | ||
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. | 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. | ||
<pre>{{ | <pre>{{Drop table row | ||
|item=The page name of the item. No square brackets required. | |item=The page name of the item. No square brackets required. | ||
|uid=The UID of the item. If specified, looks up the item instead by its UID. | |||
|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). | |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. | |rarity=The weight of the item in the drop table, specified as a fraction. Write "Always" for guaranteed drops. | ||
|icon=(optional) An image without the File: prefix. If provided, overrides the automatic Cargo icon. | |||
|rarity_override=(optional) If icon is specified, will set the rarity. | |||
|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. | |||
|alias=(optional) If specified, will rename the item link to this. | |||
}}</pre> | }}</pre> | ||
Line 27: | Line 30: | ||
Empty ready-to-copy template. | Empty ready-to-copy template. | ||
<pre>{{ | <pre>{{Drop table row|icon=|item=|quantity=|rarity=}}</pre> | ||
=== {{[[Template: | === {{[[Template:Drop table level]]}} === | ||
Denote a leveled section of a drop table. Lower and upper are optional. | |||
<pre>{{ | <pre>{{Drop table level|lower=|upper=}}</pre> | ||
=== {{[[ | === {{[[Template:Drop table divider]]}} === | ||
Creates a whole-table row with text in it. | |||
<pre>{{Drop table divider|}}</pre> | |||
=== {{[[Template:Drop table gold]]}} === | |||
Creates a row that displays an amount or range of gold. The icon is automatically set to the lower number provided. | |||
<pre>{{Drop table gold|lower=|upper=}}</pre> | |||
=== {{[[Template:Trader gold row]]}} === | |||
Creates a row that displays the amount of gold a trader of a given level and wealth would have. | |||
<pre>{{TraderGoldRow|lower=|upper=|wealth=}}</pre> | |||
=== {{[[Template:Droptable nothing]]}} === | |||
Represents nothing. | |||
<pre>{{Droptable nothing|chance=}}</pre> | |||
=== {{[[Template:Drop table end]]}} === | |||
No parameters. It ends the table. | No parameters. It ends the table. | ||
Line 41: | Line 64: | ||
=== Miscellaneous Test Table === | === Miscellaneous Test Table === | ||
====Describe how many times you roll on this table.==== | |||
{{ | {{Drop table start}} | ||
{{ | {{Drop table row|item=Potion of Healing|quantity=1;3;5|rarity=18/25}} | ||
{{ | {{Drop table row|item=Potion of Superior Healing|quantity=1|rarity=1/25}} | ||
{{ | {{Drop table row|item=Potion of Superior Healing|quantity=2|rarity=1/25}} | ||
{{ | {{Drop table row|item=Potion of Superior Healing|alias=Definitely Not a Healing Potion|quantity=2|rarity=1/25}} | ||
{{Droptable nothing|chance=3/25}} | |||
{{Drop table reroll|chance=1/25}} | |||
{{Drop table end}} | |||
====Levelled tables can use [[Template:DropTableLevel]].==== | |||
{{Drop table start}} | |||
{{DropTableLevel|upper=3}} | |||
{{Drop table gold|lower=5|upper=93}} | |||
{{DropTableLevel|lower=4|upper=9}} | |||
{{Drop table gold|lower=5|upper=93|rarity=1/2}} | |||
{{Drop table gold|lower=20|upper=159|rarity=1/2}} | |||
{{DropTableLevel|lower=10}} | |||
{{Drop table gold|lower=5|upper=93|rarity=1/3}} | |||
{{Drop table gold|lower=20|upper=159|rarity=1/3}} | |||
{{Drop table gold|lower=100|upper=250|rarity=1/3}} | |||
{{Drop table end}} | |||
====Items you always get should have a Rarity of Always.==== | |||
{{Drop table start}} | |||
{{Drop table row|item=Padded Armour +1|quantity=1|rarity=Always}} | |||
{{Drop table row|item=Titanstring Bow|quantity=1|rarity=Always}} | |||
{{Drop table end}} | |||
====No Chance column==== | |||
{{Drop table start|skip_chance=true}} | |||
{{Drop table row|item=Elixir of Necrotic Resistance|quantity=1|skip_chance=true}} | |||
{{Drop table divider|If you are a spooky scary skeleton, shivering in the night:}} | |||
{{Drop table row|item=Elixir of Necrotic Resistance|quantity=2|skip_chance=true}} | |||
{{Drop table end}} | |||
(with only skip chance on table start) | |||
{{Drop table start|skip_chance=true}} | |||
{{Drop table row|item=Elixir of Necrotic Resistance|quantity=1}} | |||
{{ | {{Drop table divider|If you are a spooky scary skeleton, shivering in the night:}} | ||
{{Drop table row|item=Elixir of Necrotic Resistance|quantity=2}} | |||
{{ | {{Drop table end}} | ||
{{ | |||
{{ | |||
{{ | |||
<noinclude>[[Category:Templates]]</noinclude>[[Category:Drop table templates]] | |||
Latest revision as of 19:28, 29 August 2024
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
{{Template:Drop table start}}
This template starts a table.
{{Drop table start|caption=An optional caption to head the table.|skip_chance=If non-empty will hide the Chance column.}}
{{Template:Drop table row}}
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.
{{Drop table row |item=The page name of the item. No square brackets required. |uid=The UID of the item. If specified, looks up the item instead by its UID. |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. |icon=(optional) An image without the File: prefix. If provided, overrides the automatic Cargo icon. |rarity_override=(optional) If icon is specified, will set the rarity. |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. |alias=(optional) If specified, will rename the item link to this. }}
Empty ready-to-copy template.
{{Drop table row|icon=|item=|quantity=|rarity=}}
{{Template:Drop table level}}
Denote a leveled section of a drop table. Lower and upper are optional.
{{Drop table level|lower=|upper=}}
{{Template:Drop table divider}}
Creates a whole-table row with text in it.
{{Drop table divider|}}
{{Template:Drop table gold}}
Creates a row that displays an amount or range of gold. The icon is automatically set to the lower number provided.
{{Drop table gold|lower=|upper=}}
{{Template:Trader gold row}}
Creates a row that displays the amount of gold a trader of a given level and wealth would have.
{{TraderGoldRow|lower=|upper=|wealth=}}
{{Template:Droptable nothing}}
Represents nothing.
{{Droptable nothing|chance=}}
{{Template:Drop table end}}
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 | 18/25 | |
Potion of Superior Healing | 1 | 1/25 | |
Potion of Superior Healing | 2 | 1/25 | |
Definitely Not a Healing Potion | 2 | 1/25 | |
Nothing | 3/25 | ||
Reroll | 1/25 |
Levelled tables can use Template:DropTableLevel.
Item | Quantity | Chance | |
---|---|---|---|
Up to level 3 | |||
Gold | 5 - 93 | Always | |
Level 4 - 9 | |||
Gold | 5 - 93 | Always | |
Gold | 20 - 159 | Always | |
Level 10+ | |||
Gold | 5 - 93 | Always | |
Gold | 20 - 159 | Always | |
Gold | 100 - 250 | Always |
Items you always get should have a Rarity of Always.
Item | Quantity | Chance | |
---|---|---|---|
Padded Armour +1 | 1 | Always | |
Titanstring Bow | 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 |
(with only skip chance on table start)
Item | Quantity | ||
---|---|---|---|
Elixir of Necrotic Resistance | 1 | ||
If you are a spooky scary skeleton, shivering in the night: | |||
Elixir of Necrotic Resistance | 2 |