Template:Terrain requirement/doc

< Template:Terrain requirement
咯咯炀讨论 | 贡献2020年11月14日 (六) 20:08的版本 (创建页面,内容为“<includeonly>{{template doc page transcluded}}</includeonly><noinclude>{{template doc page viewed directly}}</noinclude> <!-- EDIT TEMPLATE DOCUMENTATION BELOW T…”)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
这是 Template:Terrain requirement模板文档
当直接浏览时,使用变量可能会失效,请不要使用硬编码来代替页面名或地址。

This template can be used for displaying terrain requirements for buildings. Use this template for consistent, easier to update styling between different buildings.

Parameters

Parameter Optional? Description
any Optional (default: no) When set to "yes", will force the template to display a sentence stating that the building may be built in any terrain.
mode Optional (default: table) Sets the formatting of the terrain requirements. Currently supports two modes: "table", with the terrain requirements shown in a yes/no table for each terrain type; and "sentence", with the terrain requirements shown in sentence form. As a guideline, use "sentence" instead of "table" if it would ease readability, such as when the building may only be built in one or two terrain types. If "any" is set to yes, or if all terrain parameters are equal to "yes", the mode does not change the formatting of the template output.
<terrain> Optional (default: no for each terrain) There is a parameter for each terrain type. See below for accepted terrain types. If set to "yes", the building may be built in the corresponding terrain. If all available terrain types are set to "yes", the result is identical to having the "any" parameter set to "yes".

Accepted terrain parameters

The following parameters may be used to define terrain requirements for the building:

Parameter Terrain type
desert  Desert
desert mountains  Desert Mountains
drylands  Drylands
farmlands  Farmlands
floodplains  Floodplains
forest  Forest
hills  Hills
jungle  Jungle
mountains  Mountains
oasis  Oasis
plains  Plains
steppe  Steppe
taiga  Taiga
wetlands  Wetlands

Usage

Syntax
{{terrain requirement|any=yes/no|mode=table/sentence|<terrain>=yes/no...}}

Examples

Tables (default)

One terrain type Two terrain types Three terrain types
Syntax {{terrain requirement|desert=yes}} {{terrain requirement|desert=yes|mountains=yes}} {{terrain requirement|desert=yes|mountains=yes|steppe=yes}}
Example 此建筑可建造于以下地形:
地形 可以建造 地形 可以建造
沙漠 Yes 沙漠山地
旱地 农田
洪泛平原 森林
丘陵 丛林
山地 绿洲
平原 草原
针叶林 湿地
此建筑可建造于以下地形:
地形 可以建造 地形 可以建造
沙漠 Yes 沙漠山地
旱地 农田
洪泛平原 森林
丘陵 丛林
山地 Yes 绿洲
平原 草原
针叶林 湿地
此建筑可建造于以下地形:
地形 可以建造 地形 可以建造
沙漠 Yes 沙漠山地
旱地 农田
洪泛平原 森林
丘陵 丛林
山地 Yes 绿洲
平原 草原 Yes
针叶林 湿地

Sentences

One terrain type Two terrain types Three terrain types
Syntax {{terrain requirement|mode=sentence|desert=yes}} {{terrain requirement|mode=sentence|desert=yes|mountains=yes}} {{terrain requirement|mode=sentence|desert=yes|mountains=yes|steppe=yes}}
Example 此建筑可建造于 沙漠地形。 此建筑可建造于 沙漠和 山地地形。 此建筑可建造于 沙漠, 山地和 草原地形。

All terrain

Syntax
{{terrain requirement|any=yes}}
or
{{terrain requirement|desert=yes|...|wetlands=yes}}
Result
此建筑可以在任何地形上建造。

Subtemplates

See also