Template:Deposit/doc
Overview
Creates a detailed table showing glade deposits, ores, and trees.
Use whenever you need to show a wiki-linked, user-friendly, sortable, and always-up-to-date table of resources found in glades. You can get very specific and narrow down the table to only one or two deposits by using the parameters.
The table imitates the in-game display of primary and bonus resources per deposit, but adds buildings per deposit and in which biomes the deposit can appear.
The table is completely data-driven, based on the parameters. It validates input, retrieves all necessary data, and handles all formatting.
The normal usage for this template produces a large table that typically fills the width of the article. (In rare cases, the table can overrun into the margin. This is a known issue and steps have already been taken to reduce the width of the table.)
Parameters
Primary and Bonus Resources and Buildings
At least one of these is required, and combinations are allowed. All names provided must be spelled (and, for buildings, punctuated) correctly to match the in-game name. These names will be the same as the articles for those goods and buildings.
If you do not wish to write the code product=, you may skip that.
| Parameter | Type | Description | |
|---|---|---|---|
| product | string | The name of the primary resource extracted from a deposit. | At least one of these is required. |
| bonus | string | The name of one bonus resource extracted from a deposit. You currently cannot search for more than one bonus resource. | |
| building | string | The name of a building that can harvest deposits. | |
| display | "list" | Planned but not yet implemented. | |
Examples
Basic usage
{{Deposit|Herbs}}
Makes a table of just one or two deposits where the specified resource is the primary product of those deposits.
2 Deposits for Herbs.
Gathering Nodes
| Name | Charges | Primary | Bonus | In Biomes | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| #1 | #2 | |||||||||||||
| Herb Node (Large) | 70 | 40% |
20% |
x | x | x | x | x | ||||||
| Herb Node (Small) | 15 | 20% |
— | x | x | x | x | x | ||||||
Required Building
{{Deposit|bonus=Herbs}}
Makes a table of several deposits where the specified resource is a bonus resource of those deposits. Note that some deposits feature the same resource as both a primary and bonus resource, and those deposits will appear when searching by primary or bonus resources.
5 Deposits where Herbs is a bonus.
Gathering Nodes & Fishing Ponds
{{Deposit|building=Small Herbalists' Camp}}
Makes a table of the deposits exploitable by the specified building. This does take grade into account, so making a table based on small gathering camps will include fewer deposits than a table based on their larger versions.
4 Deposits exploited by the Small Herbalists' Camp.
Gathering Nodes
Required Building
Other examples
{{Deposit|product=Clay|bonus=Clay}}
Specifying the same resource as both primary and bonus makes a table that search for either, making it ideal for pages featuring that resource. When using the template this way, the resource name must be the same. You cannot currently make a table with both deposits for one products and another bonus resource.
7 Deposits for Clay or as a bonus.
Mining Vein & Gathering Nodes
{{Deposit|Clay|display=list}}
Planned but not yet implemented.
{{Deposit|bonus=Clay|building=Harvesters' Camp}}
Specifying resource takes precedence over buildings; when resources are specified, the building selection is ignored. It does not filter the list further.
5 Deposits where Clay is a bonus.
Mining Vein & Gathering Nodes
Required Building
{{Deposit|product=Copper Bars}}
{{Deposit|building=Clay Pit}}
Asking for resources or buildings with no deposits does not result in an error, but an empty table.
0 Deposits for Copper Bars.
No deposits.
0 Deposits exploited by the Clay Pit.
No deposits.
Errors
The following are error messages generated by calling the template incorrectly.
Note: If you are having trouble understanding how the template is understanding your parameters, the caption can help!
{{Deposit}}
With no parameters: Lua error in Module:GladeResourcesController at line 651: You must specify the name of a product, a bonus resource, or a building—and as it's spelled in the game.
{{Deposit|product=Herb}}
{{Deposit|building=Harvester's Hut}}
Misspelling the name of a resource: Lua error in Module:GladeResourcesController at line 651: You must specify the name of a product, a bonus resource, or a building—and as it's spelled in the game.
Or the name of a building: Lua error in Module:GladeResourcesController at line 651: You must specify the name of a product, a bonus resource, or a building—and as it's spelled in the game.
{{Deposit|Mine}}
Forgetting the parameter name building= before specifying a building name Lua error in Module:GladeResourcesController at line 651: You must specify the name of a product, a bonus resource, or a building—and as it's spelled in the game.
{{Deposit|product=Lettuce}}
Naming a product (or building) that doesn't exist in the game: Lua error in Module:GladeResourcesController at line 651: You must specify the name of a product, a bonus resource, or a building—and as it's spelled in the game.


