Template:Perks/doc: Difference between revisions

From Against the Storm Official Wiki
(Created to provide some documentation for these templates)
 
(More documentation added)
Line 55: Line 55:
|-
|-
| skip_sources || not skipped || Use <code>skip_sources=skip</code> if you want a table that skips the section of five columns indicating the sources of the Perk. This breaks from the naming convention of the other parameters because the template logic is different.
| skip_sources || not skipped || Use <code>skip_sources=skip</code> if you want a table that skips the section of five columns indicating the sources of the Perk. This breaks from the naming convention of the other parameters because the template logic is different.
If you want to hide individual columns to make comparisons easier, see below, but take note of two things: (1) in list or inline display, sources are never shown and (2) if you hide all of the source columns individually, the table layout will
 
If you want to hide individual columns to make comparisons easier, see below, but take note of two things: (1) in list or inline display, sources are never shown and (2) if you hide all of the source columns individually, without skipping the sources section, the table headings will become misaligned.
|-
|-
| show_source_altar || shown || Use <code>show_source_altar=no</code> to '''hide''' the Forsaken Altar source column.
| show_source_altar || shown || Use <code>show_source_altar=no</code> to '''hide''' the Forsaken Altar source column.
Line 78: Line 79:
Work in progress
Work in progress


{{Perks|id=Fedora Hat|show_source_altar=no|show_source_cornerstone=no|show_source_order=no|show_source_relic=no|show_source_trader=no}}
== Errors ==
 
=== No results from search ===
 
If you specify parameters intending to select or search for terms, sometimes there is no result. This can be because you misspelled an id, rarity name, or source name or asked for a search term that was no present in any name or description—or ultimately excluded every item that was found. In this situation, the template, will instead render a plain-text message that nothing was found. (This error display is used for all display modes, table, list, or inline.)
 
<pre>{{Perks
|id=IDs are easy to misspell
}}</pre>
 
Yields:
{{Perks|id=IDs are easy to misspell}}
 
== Table Examples ==
 
=== Selecting Perks by their IDs ===
 
<pre>{{Perks
|id=Accidental Barrels
}}</pre>
 
Yields:
{{Perks|id=Accidental Barrels}}
 
 
You can select multiple Perks this way, by separating multiple IDs by commas.
 
<pre>{{Perks
|id=Amber for Trader Visit, Trader Interval +25, Trading Packs
}}</pre>
 
Yields:
{{Perks|id=Amber for Trader Visit, Trader Interval +25, Trading Packs}}
 
=== Searching names and descriptions ===
 
The following example shows searching the same term in both name and description, but you could search different things in each field or use only one and not the other.
 
<pre>{{Perks
|name=blightrot cyst
|description=blightrot cyst
}}</pre>
 
Yields:
{{Perks|name=blightrot cyst|description=blightrot cyst}}
 
 
=== Filtering by rarity or source ===
 
Rarity and source are filters, not selectors. If you do not select any Perks by id, name, or description, then the entire list of Perks is returned. If you then specify a rarity or source, the results are then filtered to your selections. For example, if the term you searched for in the description returns 20 Perks, but you only filter to <code>source=trader</code>, then only a few of those Perks that match the description will be displayed, the ones that can be purchased from traders.
 
<pre>{{Perks
|description=amber
|source=trader
}}</pre>
 
Yields:
{{Perks|description=amber|source=trader}}
 
 
You can also filter by rarity instead of source. For example, if the term you searched for in the description returns 20 Perks, but you only filter to <code>rarity=Legendary</code>, then only 6 {{c|{{PerkOrange}}|Legendary}} Perks that match the description will be displayed, the ones with that rarity.
 
<pre>{{Perks
|description=amber
|rarity=legendary
}}</pre>
 
Yields:
{{Perks|description=amber|rarity=legendary}}
 
 
In these examples, you can see that filtering by both rarity and source may result in nothing that meets all of your criteria.
 
<pre>{{Perks
|description=amber
|rarity=legendary
|source=trader
}}</pre>
 
Yields:
{{Perks|description=amber|rarity=legendary|source=trader}}
 
=== Skipping source columns ===
 
Compare the following table with the one above. If the sources are not as relevant to your purposes, but the descriptions are (and they usually are), then you may want to skip the entire section of the table on sources with <code>skip_sources=skip</code>.
 
<pre>{{Perks
|description=amber
|rarity=legendary
|skip_sources=skip
}}</pre>
 
Yields:
{{Perks|description=amber|rarity=legendary|skip_sources=skip}}
 


== Errors ==
You can also skip individual columns. For example, none of the following "Delivery Line" Perks are available from the Forsaken Altar or from traders, so we can safely hide those columns without hiding valuable information from the reader.
 
{{Perks|name=delivery line|show_source_altar=no|show_source_trader=no}}
 
Work in progress

Revision as of 14:57, 5 May 2024

Overview

Displays data about Perks, Cornerstones, and other effects based on search parameters and exclusions. There are a few ways the data can be displayed.

Parameters

All parameters are optional. If no parameters are given, a table of all 300+ Perks will be displayed, showing their icon and name linking to the Perk's page, descriptions, rarity, sources, and price when purchased from a trader.

Selection, Filtering, and Exclusion

You may combine the first three parameters to return more Perks. The result will be the union of your selections, without duplicates. Then use exclude to remove any Perks that are unrelated to your purposes with their IDs or filter by rarity or source.

Remember that IDs are not visible int he game, so you may need to look them up first.

Parameter Description
id A list of IDs of Perks, Cornerstones, and effects, separated by commas. Since IDs are unique, each matched ID adds exactly one Perk to the table. Will not throw an error if an ID is invalid.
name Searches names for this string, and adds Perks with any part of their names matching that string to the table.
description Searches descriptions for this string, and adds Perks with any part of their descriptions matching that string to the table.
rarity Filters any Perks found by the first search parameters by the specified rarity. Does not throw an error if you misspell the term; here are the correct options:
  • Uncommon
  • Rare
  • Epic
  • Legendary
  • Mythic
source Filters any Perks found by the first search parameters by the specified source. Does not throw an error if you misspell the term; here are the correct options:
  • Altar (the Forsaken Altar)
  • Cornerstone
  • Order
  • Relic (from Glade Events)
  • Trader
exclude A list of IDs, separated by commas, that will be excluded from the display. Will not throw an error if an ID is invalid.

Output Overrides

These parameters allow you to customize the appearance of the results.

Parameter Default Description
caption "Perks and Cornerstones" Captions are calculated automatically based on your search and filtering criteria. However, if you want to override the default caption for the table, you can specify it here.
show_id hidden Use show_id=show if you want to show a first column in the table that shows the ID of the Perk. (In list or inline display, the ID is shown in parentheses after the Perk's name.)
show_rarity shown Use show_rarity=no if you want to hide the rarity column from the table. (In list or inline display, the rarity is never shown.)
show_description shown Use show_description=no if you want to hide the description column from the table. (In list or inline display, the description is never shown.)
skip_sources not skipped Use skip_sources=skip if you want a table that skips the section of five columns indicating the sources of the Perk. This breaks from the naming convention of the other parameters because the template logic is different.

If you want to hide individual columns to make comparisons easier, see below, but take note of two things: (1) in list or inline display, sources are never shown and (2) if you hide all of the source columns individually, without skipping the sources section, the table headings will become misaligned.

show_source_altar shown Use show_source_altar=no to hide the Forsaken Altar source column.
show_source_cornerstone shown Use show_source_cornerstone=no to hide the Cornerstone source column.
show_source_order shown Use show_source_order=no to hide the Order source column.
show_source_relic shown Use show_source_relic=no to hide the Glade Event Relic source column.
show_source_trader shown Use show_source_trader=no to hide the Trader source column.
show_price shown Use show_price=no to hide the price column from the table. (In list or inline display, the price is never shown.)
display a table For use when including these Perks inside other tables or within paragraphs, the display parameter condenses the output to just the links to the pages on each Perk:
  • Use display=list to convert the table layout into a basic bulleted list with simple links and no icons.
  • Use display=inline to convert the table into an inline list of links, separated by commas, also with no icons.
list_type bullet When displaying as a list instead of a table, you can specify list_type=number to show the list as a numbered list instead.

Work in progress

Errors

No results from search

If you specify parameters intending to select or search for terms, sometimes there is no result. This can be because you misspelled an id, rarity name, or source name or asked for a search term that was no present in any name or description—or ultimately excluded every item that was found. In this situation, the template, will instead render a plain-text message that nothing was found. (This error display is used for all display modes, table, list, or inline.)

{{Perks
|id=IDs are easy to misspell
}}

Yields: No matching Perks found.

Table Examples

Selecting Perks by their IDs

{{Perks
|id=Accidental Barrels
}}

Yields:

1 Perk with ID 'Accidental Barrels'
Name Rarity Description Sources Price
Alt Cor Ord Rel Tra
Over-Diligent Woodworkers Over-Diligent Woodworkers Legendary Some woodworkers just can't stop working. Gain 3 Barrels Barrels for every 10 Planks Planks produced. x Cor x x x 0


You can select multiple Perks this way, by separating multiple IDs by commas.

{{Perks
|id=Amber for Trader Visit, Trader Interval +25, Trading Packs
}}

Yields:

3 Perks with selected IDs
Name Rarity Description Sources Price
Alt Cor Ord Rel Tra
Bed and Breakfast Bed and Breakfast Epic This time, it's the guild who’s going to pay you, not the other way around. Gain 10 Amber Amber every time a trader arrives. x Cor x x x 0
Trade Contract Trade Contract Rare Traders will arrive 25% quicker. x x Ord Rel Tra 18
Trade Logs Trade Logs Epic Detailed notes on different traders and their wares. Gain 1 additional active trade route slot. Traders will arrive 25% quicker. x Cor Ord x Tra 28

Searching names and descriptions

The following example shows searching the same term in both name and description, but you could search different things in each field or use only one and not the other.

{{Perks
|name=blightrot cyst
|description=blightrot cyst
}}

Yields:

5 Perks named 'blightrot cyst' and mentioning 'blightrot cyst'
Name Rarity Description Sources Price
Alt Cor Ord Rel Tra
Baptism of Fire Baptism of Fire Legendary Every 3 burnt Blightrot Cysts lowers Hostility by 10. While the Hearth is corrupted, you’re unable to sacrifice resources. x Cor x x x 0
Blight Filter Blight Filter Legendary A crystalline filter designed to mitigate the negative environmental impact of infused rainwater. Blightrot Cysts appear 50% slower when using rain engines, but Reputation from Resolve is generated 90% slower for the next 2 Reputation Points. x Cor x x x 0
Blightrot Pruner Blightrot Pruner Legendary Blightrot spores aren't technically eggs, but they taste the same. You gain 5 Eggs Eggs when a Blightrot Cyst appears in your settlement. x Cor x x x 0
Burnt to a Crisp Burnt to a Crisp Legendary Gain 20 Coal Coal for every 3 burned Blightrot Cysts. x Cor x Rel x 0
Overexploitation Overexploitation Legendary Global gathering speed is increased by 30%, and newly discovered resource nodes have more charges (+10 charges to small deposits, +25 charges to large deposits). Every 40 node charges used, a Blightrot Cyst will spawn. x Cor x x x 0


Filtering by rarity or source

Rarity and source are filters, not selectors. If you do not select any Perks by id, name, or description, then the entire list of Perks is returned. If you then specify a rarity or source, the results are then filtered to your selections. For example, if the term you searched for in the description returns 20 Perks, but you only filter to source=trader, then only a few of those Perks that match the description will be displayed, the ones that can be purchased from traders.

{{Perks
|description=amber
|source=trader
}}

Yields:

2 Perks from Traders and mentioning 'amber'
Name Rarity Description Sources Price
Alt Cor Ord Rel Tra
Blood Price Contract Blood Price Contract Epic A shady, but lucrative deal. Gain 10 Amber Amber every time a villager dies or leaves. x Cor x x Tra 29
Lucky Charm Lucky Charm Rare A strange talisman made from an extremely rare gemstone - blue Amber. Grants 1 additional cornerstone reroll charge. x x x x Tra 20


You can also filter by rarity instead of source. For example, if the term you searched for in the description returns 20 Perks, but you only filter to rarity=Legendary, then only 6 Legendary Perks that match the description will be displayed, the ones with that rarity.

{{Perks
|description=amber
|rarity=legendary
}}

Yields:

8 Legendary Perks and mentioning 'amber'
Name Rarity Description Sources Price
Alt Cor Ord Rel Tra
Counterfeit Amber Counterfeit Amber Legendary Apparently, there is a technique for extracting crystals similar to Amber from rainwater. Gain 10 Amber Amber every time you use 50 units of water in Rain Engines, but traders will have 1 less perk or blueprint for sale. x Cor x x x 0
Free Samples Free Samples Legendary Gain 1 Parts Parts every time you sell goods worth 25 Amber. x Cor x x x 0
Lumber Tax Lumber Tax Legendary Gain 1 Amber Amber for every 50 Wood Wood produced. x Cor x x x 0
Prosperous Settlement Prosperous Settlement Legendary Gain +1 to Global Resolve every time you sell goods worth 50 Amber Amber, but scouts work 10% slower on Glade Events. x Cor x x x 0
Protected Trade Protected Trade Legendary The forest recedes, as heavily guarded trade caravans pour into the settlement. Hostility is reduced by 15 points every time you sell goods worth 30 Amber, but Complex Food needs grant 1 less Resolve Point. x Cor x x x 0
Queen's Gift Queen's Gift Legendary A mysterious amber orb with a magical flame trapped within. Increases the Ancient Hearth's resistance by 150 for every woodcutter in your settlement. x Cor x x x 0
Stormwalker Tax Stormwalker Tax Legendary A joint venture with the Stormwalker Guild can be very profitable. You gain 15 Amber Amber every time you accept a newcomer group from the Citadel, but you’ll lose all stored Amber upon choosing this cornerstone. x Cor x x x 0
Trade Hub Trade Hub Legendary The settlement is known for being a major trade hub in the region. Gain 1 Reputation Point every time you sell goods worth 60 Amber, but fulfilling Orders awards 50% less Reputation. x Cor x x x 0


In these examples, you can see that filtering by both rarity and source may result in nothing that meets all of your criteria.

{{Perks
|description=amber
|rarity=legendary
|source=trader
}}

Yields: No matching Perks found.

Skipping source columns

Compare the following table with the one above. If the sources are not as relevant to your purposes, but the descriptions are (and they usually are), then you may want to skip the entire section of the table on sources with skip_sources=skip.

{{Perks
|description=amber
|rarity=legendary
|skip_sources=skip
}}

Yields:

8 Legendary Perks and mentioning 'amber'
Name Rarity Description Price
Counterfeit Amber Counterfeit Amber Legendary Apparently, there is a technique for extracting crystals similar to Amber from rainwater. Gain 10 Amber Amber every time you use 50 units of water in Rain Engines, but traders will have 1 less perk or blueprint for sale. 0
Free Samples Free Samples Legendary Gain 1 Parts Parts every time you sell goods worth 25 Amber. 0
Lumber Tax Lumber Tax Legendary Gain 1 Amber Amber for every 50 Wood Wood produced. 0
Prosperous Settlement Prosperous Settlement Legendary Gain +1 to Global Resolve every time you sell goods worth 50 Amber Amber, but scouts work 10% slower on Glade Events. 0
Protected Trade Protected Trade Legendary The forest recedes, as heavily guarded trade caravans pour into the settlement. Hostility is reduced by 15 points every time you sell goods worth 30 Amber, but Complex Food needs grant 1 less Resolve Point. 0
Queen's Gift Queen's Gift Legendary A mysterious amber orb with a magical flame trapped within. Increases the Ancient Hearth's resistance by 150 for every woodcutter in your settlement. 0
Stormwalker Tax Stormwalker Tax Legendary A joint venture with the Stormwalker Guild can be very profitable. You gain 15 Amber Amber every time you accept a newcomer group from the Citadel, but you’ll lose all stored Amber upon choosing this cornerstone. 0
Trade Hub Trade Hub Legendary The settlement is known for being a major trade hub in the region. Gain 1 Reputation Point every time you sell goods worth 60 Amber, but fulfilling Orders awards 50% less Reputation. 0


You can also skip individual columns. For example, none of the following "Delivery Line" Perks are available from the Forsaken Altar or from traders, so we can safely hide those columns without hiding valuable information from the reader.

26 Perks named 'delivery line'
Name Rarity Description Sources Price
Cor Ord Rel
Ale Delivery Line Ale Delivery Line Epic 5 Ale Ale per minute. x Ord Rel 0
Barrel Delivery Line Barrel Delivery Line Epic 5 Barrels Barrels per minute. x Ord x 0
Biscuit Delivery Line Biscuit Delivery Line Epic 5 Biscuits Biscuits per minute. x Ord x 0
Clay Delivery Line Clay Delivery Line Epic 3 Clay Clay per minute. Cor x x 0
Clay Delivery Line Clay Delivery Line Epic 5 Clay Clay per minute. x Ord x 0
Coal Delivery Line Coal Delivery Line Epic 5 Coal Coal per minute. x Ord x 0
Coat Delivery Line Coat Delivery Line Epic 5 Coats Coats per minute. x Ord x 0
Fiber Delivery Line Fiber Delivery Line Epic 3 Plant Fiber Plant Fiber per minute. Cor x x 0
Fish Delivery Line Fish Delivery Line Epic 5 Fish Fish per minute. x Ord x 0
Grain Delivery Line Grain Delivery Line Epic 3 Grain Grain per minute. Cor x x 0
Grain Delivery Line Grain Delivery Line Epic 5 Grain Grain per minute. x Ord x 0
Herb Delivery Line Herb Delivery Line Epic 5 Herbs Herbs per minute. x Ord x 0
Incense Delivery Line Incense Delivery Line Epic 5 Incense Incense per minute. x Ord x 0
Insect Delivery Line Insect Delivery Line Epic 5 Insects Insects per minute. x Ord x 0
Meat Delivery Line Meat Delivery Line Epic 5 Meat Meat per minute. x Ord x 0
Metal Delivery Line Metal Delivery Line Epic 4 Copper Bars Copper Bars per minute. x Ord x 0
Mushroom Delivery Line Mushroom Delivery Line Epic 5 Mushrooms Mushrooms per minute. x Ord x 0
Oil Delivery Line Oil Delivery Line Epic 5 Oil Oil per minute. x Ord Rel 0
Pickled Goods Delivery Line Pickled Goods Delivery Line Epic 5 Pickled Goods Pickled Goods per minute. x Ord x 0
Pottery Delivery Line Pottery Delivery Line Epic 5 Pottery Pottery per minute. x Ord x 0
Reed Delivery Line Reed Delivery Line Epic 5 Reed Reed per minute. x Ord x 0
Root Delivery Line Root Delivery Line Epic 3 Roots Roots per minute. Cor x x 0
Root Delivery Line Root Delivery Line Epic 5 Roots Roots per minute. x Ord x 0
Stone Delivery Line Stone Delivery Line Epic 5 Stone Stone per minute. x Ord x 0
Tea Delivery Line Tea Delivery Line Epic 5 Tea Tea per minute. x Ord x 0
Training Gear Delivery Line Training Gear Delivery Line Epic 5 Training Gear Training Gear per minute. x Ord x 0

Work in progress