Module:ItemSources/doc
This is the documentation page for Module:ItemSources
Module:ItemSources
This module displays item drop sources from NPCs in a table format.
Basic Usage
{{#invoke:ItemSources|list
|source1=NPC Name,Quantity,Rarity
|source2=NPC Name,Quantity,Rarity
}}
Source Format
Each source uses the format:
NPC Name,Quantity,Rarity
- NPC Name - Required. The name of the NPC (used for sprite and link)
- Quantity - Optional. Amount dropped (default: 1). Can be a range like "2-4"
- Rarity - Optional. Drop rate like "1/50" or "Always"
Parameters
| Parameter | Required | Description |
|---|---|---|
| source1, source2, etc. | Yes | Source entries in "NPC,Quantity,Rarity" format |
| s1, s2, etc. | No | Shorthand for source1, source2, etc. |
| title | No | Section title (default: "Item sources") |
| spriteSize | No | Size of NPC sprites in pixels (default: 24) |
Examples
Basic Drop Table
{{#invoke:ItemSources|list
|source1=Goblin,1,1/50
|source2=Orc Warrior,2-4,1/100
|source3=Dragon,5,1/500
}}
Without Rarity
If no sources have rarity specified, the Rarity column is automatically hidden:
{{#invoke:ItemSources|list
|source1=Goblin,1
|source2=Orc Warrior,3
|source3=Chest,1
}}
Mixed Rarity
Some sources can have rarity while others don't:
{{#invoke:ItemSources|list
|source1=Goblin,1,1/50
|source2=Shop,1
|source3=Dragon,5,1/500
}}
Using Shorthand
{{#invoke:ItemSources|list
|s1=Goblin,1,1/50
|s2=Orc,2,1/100
}}
Guaranteed Drops
{{#invoke:ItemSources|list
|source1=Quest Reward,1,Always
|source2=Boss,1,100%
|source3=Chest,1-3,Always
}}
Custom Sprite Size
{{#invoke:ItemSources|list
|spriteSize=32
|source1=Dragon,1,1/1000
}}
Table Columns
| Column | Description |
|---|---|
| (icon) | Sprite of the NPC |
| Source | Linked name of the NPC |
| Quantity | Amount dropped (can be range) |
| Rarity | Drop rate (only shown if any source has rarity) |
Notes
- The Rarity column only appears if at least one source has a rarity value
- NPC names are automatically linked using [[NPC Name]]
- Sprites are loaded using {{Sprite|NPC Name|size}}
- Quantity can be a single number or a range (e.g., "1-5", "2-4")