Module:ItemSources/doc: Difference between revisions
Created page with "== Module:ItemSources == This module displays item drop sources from NPCs in a table format. === Basic Usage === <pre> {{#invoke:ItemSources|list |source1=NPC Name,Quantity,Rarity |source2=NPC Name,Quantity,Rarity }} </pre> === Source Format === Each source uses the format: <pre> NPC Name,Quantity,Rarity </pre> * '''NPC Name''' - Required. The name of the NPC (used for sprite and link) * '''Quantity''' - Optional. Amount dropped (default: 1). Can be a range like "..." |
|||
| Line 20: | Line 20: | ||
</pre> | </pre> | ||
* '''NPC Name''' - Required. The name of the NPC ( | * '''NPC Name''' - Required. The name of the NPC (automatically linked) | ||
* '''Quantity''' - Optional. Amount dropped (default: 1). Can be a range like "2-4" | * '''Quantity''' - Optional. Amount dropped (default: 1). Can be a range like "2-4" | ||
* '''Rarity''' - Optional. Drop rate like "1/50" or "Always" | * '''Rarity''' - Optional. Drop rate like "1/50", "Rare", or "Always" | ||
=== Parameters === | === Parameters === | ||
| Line 33: | Line 33: | ||
|- | |- | ||
| s1, s2, etc. || No || Shorthand for source1, source2, etc. | | s1, s2, etc. || No || Shorthand for source1, source2, etc. | ||
|} | |} | ||
| Line 69: | Line 65: | ||
<pre> | <pre> | ||
{{#invoke:ItemSources|list | {{#invoke:ItemSources|list | ||
|source1= | |source1=Cave Troll,1 | ||
|source2= | |source2=Tomb Worker,1 | ||
|source3= | |source3=Bear,1,Semi Rare | ||
|source4=Bandit,1,Rare | |||
}} | }} | ||
</pre> | </pre> | ||
| Line 91: | Line 88: | ||
|source2=Boss,1,100% | |source2=Boss,1,100% | ||
|source3=Chest,1-3,Always | |source3=Chest,1-3,Always | ||
}} | }} | ||
</pre> | </pre> | ||
| Line 108: | Line 96: | ||
|- | |- | ||
! Column !! Description | ! Column !! Description | ||
|- | |- | ||
| Source || Linked name of the NPC | | Source || Linked name of the NPC | ||
|- | |- | ||
| Quantity || Amount dropped (can be range) | | Quantity || Amount dropped (can be a range) | ||
|- | |- | ||
| Rarity || Drop rate (only shown if any source has rarity) | | Rarity || Drop rate (only shown if any source has rarity) | ||
| Line 122: | Line 108: | ||
* The Rarity column only appears if at least one source has a rarity value | * The Rarity column only appears if at least one source has a rarity value | ||
* NPC names are automatically linked using <nowiki>[[NPC Name]]</nowiki> | * NPC names are automatically linked using <nowiki>[[NPC Name]]</nowiki> | ||
* Quantity can be a single number or a range (e.g., "1-5", "2-4") | * Quantity can be a single number or a range (e.g., "1-5", "2-4") | ||
[[Category:Modules]] | [[Category:Modules]] | ||
[[Category:Item Templates]] | [[Category:Item Templates]] | ||
Latest revision as of 22:22, 27 January 2026
Module:ItemSources
[edit source]This module displays item drop sources from NPCs in a table format.
Basic Usage
[edit source]{{#invoke:ItemSources|list
|source1=NPC Name,Quantity,Rarity
|source2=NPC Name,Quantity,Rarity
}}
Source Format
[edit source]Each source uses the format:
NPC Name,Quantity,Rarity
- NPC Name - Required. The name of the NPC (automatically linked)
- Quantity - Optional. Amount dropped (default: 1). Can be a range like "2-4"
- Rarity - Optional. Drop rate like "1/50", "Rare", or "Always"
Parameters
[edit source]| Parameter | Required | Description |
|---|---|---|
| source1, source2, etc. | Yes | Source entries in "NPC,Quantity,Rarity" format |
| s1, s2, etc. | No | Shorthand for source1, source2, etc. |
Examples
[edit source]Basic Drop Table
[edit source]{{#invoke:ItemSources|list
|source1=Goblin,1,1/50
|source2=Orc Warrior,2-4,1/100
|source3=Dragon,5,1/500
}}
Without Rarity
[edit source]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
[edit source]Some sources can have rarity while others don't:
{{#invoke:ItemSources|list
|source1=Cave Troll,1
|source2=Tomb Worker,1
|source3=Bear,1,Semi Rare
|source4=Bandit,1,Rare
}}
Using Shorthand
[edit source]{{#invoke:ItemSources|list
|s1=Goblin,1,1/50
|s2=Orc,2,1/100
}}
Guaranteed Drops
[edit source]{{#invoke:ItemSources|list
|source1=Quest Reward,1,Always
|source2=Boss,1,100%
|source3=Chest,1-3,Always
}}
Table Columns
[edit source]| Column | Description |
|---|---|
| Source | Linked name of the NPC |
| Quantity | Amount dropped (can be a range) |
| Rarity | Drop rate (only shown if any source has rarity) |
Notes
[edit source]- The Rarity column only appears if at least one source has a rarity value
- NPC names are automatically linked using [[NPC Name]]
- Quantity can be a single number or a range (e.g., "1-5", "2-4")