Template:DropTable/doc

From Outward Wiki
Jump to navigation Jump to search
Template-info.svg Documentation

Template for displaying a drop table (for enemies, merchants, loot containers, and gatherables).

Items defined with this template will be found by the ItemSources template.

Invokes the DropTable Module.

Usage

For Enemies and Loot Containers, the drop table should be defined as a template - see the existing format in Category:Droptable Templates. For Merchants and Gatherables, the drop table should be defined directly on their page.

  • Title = the title displayed above the drop table
  • Location = For Merchants and Loot Containers, location where this drop table is found
  • Type = One of: Merchant, Enemy, LootContainer, Gatherable
  • ShowRecipes = Define with anything to show recipes, or leave blank to hide (default)
  • Random = Define with anything for this to be treated as a random droptable. Leave undefined for guaranteed tables.
    • MinRolls = Minimum number of rolls
    • MaxRolls = Maximum number of rolls
    • NoDrop = Empty drop chance per roll

The unnamed arguments are used for the drop table entries. Each entry must have 4 unnamed arguments.

  • | ItemName | Minimum quantity | Maximum quantity | Chance
    • note: guaranteed drops still need to define the chance with something!
  • eg, | Iron Sword | 1 | 1 | -1 for a guaranteed Iron Sword drop
  • eg, | Salt | 2 | 3 | 25 for a 25% chance of receiving 2-3 Salt per drop

For formatting, each drop table entry should be on a new line, as shown in the examples below.

Examples

Random Table

  • Random is defined to treat this as a random droptable
  • ShowRecipes is defined to show recipes
{{DropTable | Title=Random Table Test | Type=Merchant | ShowRecipes=yes | MinRolls=2 | MaxRolls=5 | Random=yes | NoDrop=20
|Iron Sword | 1 | 2 | 50
|Salt | 1 | 1 | 15
|Waterskin | 5 | 25 | 5
|Tsar Stone| 4 | 4 | 1
|Crafting: Fire Rag | 1 | 1 | 5
}}
Random Table Test
This drop table will be rolled 2 to 5 times.
ItemsChance *
Empty drop20%
Iron Sword.png Iron Sword (1-2)50% (91%)
Salt.png Salt (1)15% (43%)
Waterskin.png Waterskin (5-25)5% (16%)
Tsar Stone.png Tsar Stone (4)1% (3%)
Recipe Scroll.png Crafting: Fire Rag (1)5% (16%)
* The second number indicates the total chance of receiving the drop at least once, from an average 3.5 rolls.

Guaranteed Table

  • Random is undefined to treat this as a guaranteed droptable
  • ShowRecipes is undefined to hide recipes
  • The "chance" arguments (every 4th unnamed argument for the drop table entries) are still defined. Leaving them undefined breaks the table.
{{DropTable
|Title=Guaranteed Table Test | Type=Enemy
|Iron Sword | 1 | 2 | -1
|Salt | 1 | 1 | -1
|Waterskin | 5 | 25 | -1 
|Tsar Stone| 4 | 4 | -1
|Crafting: Fire Rag | 1 | 1 | -1
}}
Guaranteed Table Test
Items
Iron Sword.png Iron Sword (1-2)
Salt.png Salt (1)
Waterskin.png Waterskin (5-25)
Tsar Stone.png Tsar Stone (4)

This is the documentation page, it should be transcluded into the main template page. See Template:Doc for more information.