Template:Deposit/doc

From Against the Storm Official Wiki

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 Ashen Thicket Bamboo Flats Coastal Grove Coral Forest Cursed Royal Woodlands Marshlands Rocky Ravine Royal Woodlands Scarlet Orchard Sealed Forest
Herb Node (Large) 70 Herbs Berries
40%
Plant Fiber
20%
x Bamboo Flats x Coral Forest Cursed Royal Woodlands x Rocky Ravine x Scarlet Orchard x
Herb Node (Small) 15 Herbs Berries
20%
— x Bamboo Flats x Coral Forest Cursed Royal Woodlands x Rocky Ravine x Scarlet Orchard x

Required Building

Small Herbalists' Camp Small Herbalists' Camp


{{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

Name Building Charges Primary Bonus In Biomes
#1 #2 #3 #4 Ashen Thicket Bamboo Flats Coastal Grove Coral Forest Cursed Royal Woodlands Marshlands Rocky Ravine Royal Woodlands Scarlet Orchard Sealed Forest
Algae Pond (Large) Small Fishing Hut 80 2 Algae 2 Herbs
50%
2 Fish
20%
— — Ashen Thicket x Coastal Grove x x Marshlands Rocky Ravine x x Sealed Forest
Algae Pond (Small) Small Fishing Hut 60 Algae Herbs
40%
— — — Ashen Thicket x Coastal Grove x x Marshlands Rocky Ravine x x Sealed Forest
Ancient Proto Wheat Foragers' Camp 999 Grain Reed
40%
Herbs
40%
Oil
30%
Amber
5%
x x x x x Marshlands x x x x
Root Node (Large) Foragers' Camp 70 Roots Herbs
30%
Resin
30%
— — Ashen Thicket x Coastal Grove x x x x Royal Woodlands Scarlet Orchard Sealed Forest
Root Node (Small) Foragers' Camp 15 Roots Herbs
20%
— — — Ashen Thicket x Coastal Grove x x x x Royal Woodlands Scarlet Orchard Sealed Forest


{{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

Name Charges Primary Bonus In Biomes
#1 Ashen Thicket Bamboo Flats Coastal Grove Coral Forest Cursed Royal Woodlands Marshlands Rocky Ravine Royal Woodlands Scarlet Orchard Sealed Forest
Bleeding Tooth Mushroom (Small) 15 Mushrooms Insects
20%
Ashen Thicket x x x Cursed Royal Woodlands x x Royal Woodlands x Sealed Forest
Dewberry Bush (Small) 15 Berries Berries
20%
x Bamboo Flats Coastal Grove x x x x Royal Woodlands Scarlet Orchard Sealed Forest
Grasscap Mushrooms (Small) 15 Mushrooms Insects
20%
x x x x x Marshlands x x x x
Herb Node (Small) 15 Herbs Berries
20%
x Bamboo Flats x Coral Forest Cursed Royal Woodlands x Rocky Ravine x Scarlet Orchard x

Required Building

Small Herbalists' Camp Small Herbalists' Camp


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

Name Building Charges Primary Bonus In Biomes
#1 #2 Ashen Thicket Bamboo Flats Coastal Grove Coral Forest Cursed Royal Woodlands Marshlands Rocky Ravine Royal Woodlands Scarlet Orchard Sealed Forest
Clay Node (Large) Stonecutters' Camp 60 Clay Copper Ore
75%
Roots
30%
Ashen Thicket x Coastal Grove x Cursed Royal Woodlands x Rocky Ravine Royal Woodlands x Sealed Forest
Clay Node (Small) Stonecutters' Camp 20 Clay Copper Ore
50%
Roots
20%
Ashen Thicket x Coastal Grove x Cursed Royal Woodlands x Rocky Ravine Royal Woodlands x Sealed Forest
Copper Vein Mine 75 Copper Ore Clay
30%
— Ashen Thicket x x x Cursed Royal Woodlands Marshlands Rocky Ravine x Scarlet Orchard Sealed Forest
Flax Field (Large) Harvesters' Camp 60 Plant Fiber Clay
50%
Insects
30%
Ashen Thicket Bamboo Flats x x Cursed Royal Woodlands x x Royal Woodlands x x
Flax Field (Small) Harvesters' Camp 20 Plant Fiber Clay
25%
Insects
20%
Ashen Thicket Bamboo Flats x x Cursed Royal Woodlands x x Royal Woodlands x x
Reed Field (Large) Harvesters' Camp 60 Reed Roots
40%
Clay
40%
x x Coastal Grove Coral Forest x x Rocky Ravine x Scarlet Orchard Sealed Forest
Reed Field (Small) Harvesters' Camp 20 Reed Roots
20%
Clay
20%
x x Coastal Grove Coral Forest x x Rocky Ravine x Scarlet Orchard Sealed Forest


{{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

Name Charges Primary Bonus In Biomes
#1 #2 Ashen Thicket Bamboo Flats Coastal Grove Coral Forest Cursed Royal Woodlands Marshlands Rocky Ravine Royal Woodlands Scarlet Orchard Sealed Forest
Copper Vein 75 Copper Ore Clay
30%
— Ashen Thicket x x x Cursed Royal Woodlands Marshlands Rocky Ravine x Scarlet Orchard Sealed Forest
Flax Field (Large) 60 Plant Fiber Clay
50%
Insects
30%
Ashen Thicket Bamboo Flats x x Cursed Royal Woodlands x x Royal Woodlands x x
Flax Field (Small) 20 Plant Fiber Clay
25%
Insects
20%
Ashen Thicket Bamboo Flats x x Cursed Royal Woodlands x x Royal Woodlands x x
Reed Field (Large) 60 Reed Roots
40%
Clay
40%
x x Coastal Grove Coral Forest x x Rocky Ravine x Scarlet Orchard Sealed Forest
Reed Field (Small) 20 Reed Roots
20%
Clay
20%
x x Coastal Grove Coral Forest x x Rocky Ravine x Scarlet Orchard Sealed Forest

Required Building

Harvesters' Camp Harvesters' Camp


{{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.