Template:Construction

From Against the Storm Official Wiki


Overview

A template to populate small, well-aligned tables of construction goods.

Parameters

You may elect to name the parameters explicitly (Planks=) or use them in the order specified in the table. The exception is Wood, which must be declared explicitly, but is placed at the beginning of the table.

Parameter Type Description
Planks number The number of Planks Planks required.
Bricks number The number of Bricks Bricks required.
Fabric number The number of Fabric Fabric required.
Parts number The number of Parts Parts required.
Wood number The number of Wood Wood required. This will appear at the top of the table. This must be named, like Wood=
Crystalized Dew number The number of Crystalized Dew Crystalized Dew required. This must be named, like Crystalized Dew=
Pipes number The number of Pipes Pipes required. This must be named, like Pipes=
Wildfire Essence number The number of Wildfire Essence Wildfire Essence required. This must be named, like Wildfire Essence=

Examples

This table shows all possible values. {{Construction|Planks=12|Bricks=8|Fabric=4|Parts=2|Wood=10|Pipes=4|Crystalized Dew=2|Wildfire Essence=1}} yields:

12 Planks Planks
8 Bricks Bricks
4 Fabric Fabric
2 Parts Parts
2 Crystalized Dew Crystalized Dew
1 Wildfire Essence Wildfire Essence
10 Wood Wood
4 Pipes Pipes

Alternatively, you do not have to name some of the parameters. {{Construction|12|8|4|2|Wood=10|Pipes=4|Crystalized Dew=2|Wildfire Essence=1}} yields the same thing:

12 Planks Planks
8 Bricks Bricks
4 Fabric Fabric
2 Parts Parts
2 Crystalized Dew Crystalized Dew
1 Wildfire Essence Wildfire Essence
10 Wood Wood
4 Pipes Pipes

You can also mix naming and not-naming to make it easier to write when skipping over building materials. {{Construction|8|Parts=2}} yields:

8 Planks Planks
2 Parts Parts

Remember you need to declare the amount of Wood, Crystalized Dew, Pipes, and Wildfire Essence explicitly. This is because {{Construction|Wood=10|Parts=3}} is much easier to read than {{Construction||||3|Wood=10}} and affords the ability to declare most construction requirements with Planks. Here's the result:

3 Parts Parts
10 Wood Wood

Errors

A template called without parameters results in a simple error message.

{{Construction}}

Yields: [Resource stack needs at least one resource]

The template also does not prevent you from mixing both named and unnamed parameters, but the result will be whichever is defined last.

{{Construction||10|Bricks=12}}

Yields:

12 Bricks Bricks

Finally, even though no buildings currently require it, this template does permit you to display both Wood and Planks.

{{Construction|2|Wood=8}}

Yields:

2 Planks Planks
8 Wood Wood