Difference between revisions of "Help:Templates"
Inceptor57 (talk | contribs) m (→Automatic characteristics: Edits) |
(→Automatic characteristics: Edits) |
||
Line 47: | Line 47: | ||
To use automatically substituted data in articles, use the template <code><nowiki>{{</nowiki>[[:Template:Specs|Specs]]<nowiki>|<parameter 1>|<parameter 2>|...}}</nowiki></code> on the vehicle page. | To use automatically substituted data in articles, use the template <code><nowiki>{{</nowiki>[[:Template:Specs|Specs]]<nowiki>|<parameter 1>|<parameter 2>|...}}</nowiki></code> on the vehicle page. | ||
− | List of | + | List of parameters available for use (case does not matter): |
=== For all types of vehicle === | === For all types of vehicle === | ||
Line 54: | Line 54: | ||
! Parameter 1 !! Parameter 2 !! Parameter 3 !! Parameter 4 !! Description | ! Parameter 1 !! Parameter 2 !! Parameter 3 !! Parameter 4 !! Description | ||
|- | |- | ||
− | | | + | | name |
| | | | ||
− | | | + | | |
+ | | | ||
+ | | Full name | ||
|- | |- | ||
− | | | + | | pseudonym |
| | | | ||
− | | | + | | |
+ | | | ||
+ | | Short name | ||
|- | |- | ||
− | | rowspan="2" | article | + | | rowspan="2" | article |
+ | | en (by default) | ||
| | | | ||
| | | | ||
− | | rowspan="2" |Address of the article | + | | rowspan="2" | Address of the article |
|- | |- | ||
− | |ru | + | | ru |
| | | | ||
| | | | ||
|- | |- | ||
− | |image | + | | image |
| | | | ||
| | | | ||
| | | | ||
− | |URL picture of the vehicle (as in the card in | + | | URL of the picture of the vehicle (as in the card in-game) |
|- | |- | ||
− | |icon | + | | icon |
| | | | ||
| | | | ||
| | | | ||
− | |URL icon of the vehicle (as in the research tree) | + | | URL of the icon of the vehicle (as in the research tree) |
|- | |- | ||
− | |type | + | | type |
| | | | ||
| | | | ||
| | | | ||
− | |Type of vehicle. | + | | Type of vehicle. Returns: |
− | |||
* 1 - aircraft | * 1 - aircraft | ||
* 2 - tank | * 2 - tank | ||
Line 94: | Line 98: | ||
* 4 - helicopter | * 4 - helicopter | ||
|- | |- | ||
− | |gift | + | | gift |
| | | | ||
| | | | ||
| | | | ||
− | |Returns 1 if the vehicle is bundle or gift, 0 if not | + | | Returns 1 if the vehicle is bundle or gift, 0 if not |
|- | |- | ||
− | |premium | + | | premium |
| | | | ||
| | | | ||
| | | | ||
− | |Returns 1 if the vehicle is premium, 0 if not | + | | Returns 1 if the vehicle is premium, 0 if not |
|- | |- | ||
− | |squadron | + | | squadron |
| | | | ||
| | | | ||
| | | | ||
− | |Returns 1 if the vehicle is squadron, 0 if not | + | | Returns 1 if the vehicle is squadron, 0 if not |
|- | |- | ||
− | |country | + | | country |
| | | | ||
| | | | ||
| | | | ||
− | |The name of the country to which this vehicle belongs | + | | The name of the country to which this vehicle belongs |
|- | |- | ||
− | |manufacturer | + | | manufacturer |
| | | | ||
| | | | ||
| | | | ||
− | |Returns the code of the vehicle flag in the card if it differs from the flag of the nation in which the vehicle is located | + | | Returns the code of the vehicle flag in the card if it differs from the flag of the nation in which the vehicle is located |
|- | |- | ||
− | | rowspan="2" |class | + | | rowspan="2" | class |
− | | rowspan="2" |Natural number <1..N> | + | | rowspan="2" | Natural number <1...N> |
|<empty> (by default) | |<empty> (by default) | ||
| | | | ||
− | |The name of the | + | | The name of the Nth class of the vehicle in order. |
|- | |- | ||
− | |code | + | | code |
| | | | ||
− | |In-game code of the | + | | In-game code of the Nth class of the vehicle in order. |
|- | |- | ||
| rowspan="2" |rank | | rowspan="2" |rank | ||
− | |value | + | | value |
| | | | ||
| | | | ||
− | | | + | | Tech tree rank in the form of Arabic numerals (4) |
|- | |- | ||
− | |<empty> (by default) | + | | <empty> (by default) |
| | | | ||
| | | | ||
− | | | + | | Tech tree rank in the form of Roman numerals (IV) |
|- | |- | ||
− | | rowspan="3" |br | + | | rowspan="3" | br |
− | |ab | + | | ab |
| | | | ||
| | | | ||
− | |Battle rating in Arcade mode | + | | Battle rating in Arcade mode |
|- | |- | ||
− | |rb (by default) | + | | rb (by default) |
| | | | ||
| | | | ||
− | |Battle rating in Realistic mode | + | | Battle rating in Realistic mode |
|- | |- | ||
− | |sb | + | | sb |
| | | | ||
| | | | ||
− | |Battle rating in Simulator mode | + | | Battle rating in Simulator mode |
|- | |- | ||
− | | rowspan="3" |price | + | | rowspan="3" | price |
− | |currency | + | | currency |
| | | | ||
| | | | ||
− | |Currency in which the vehicle is sold: | + | | Currency in which the vehicle is sold: |
− | |||
* S - Silver Lions | * S - Silver Lions | ||
* Z - Golden Eagles | * Z - Golden Eagles | ||
− | * NA - | + | * NA - Not available for purchase |
|- | |- | ||
− | |value | + | | value |
| | | | ||
| | | | ||
− | |The price of vehicle in the form of a number without a separator (100000) | + | | The price of the vehicle in the form of a number without a separator (100000) |
|- | |- | ||
− | |<empty> (by default) | + | | <empty> (by default) |
| | | | ||
| | | | ||
− | |The price of vehicle in the form of a number with a separator (100 000) | + | | The price of the vehicle in the form of a number with a separator (100 000) |
|- | |- | ||
− | | rowspan="12" |repair | + | | rowspan="12" | repair |
− | | rowspan="4" |ab | + | | rowspan="4" | ab |
− | | rowspan="2" |min | + | | rowspan="2" | min |
− | |value | + | | value |
− | |The minimum cost of repairing vehicle in Arcade mode in the form of a number without a separator | + | | The minimum cost of repairing the vehicle in Arcade mode in the form of a number without a separator |
|- | |- | ||
− | |<empty> (by default) | + | | <empty> (by default) |
− | |The minimum cost of repairing vehicle in Arcade mode in the form of a number with a separator | + | | The minimum cost of repairing the vehicle in Arcade mode in the form of a number with a separator |
|- | |- | ||
− | | rowspan="2" |max (by default) | + | | rowspan="2" | max (by default) |
− | |value | + | | value |
− | |The maximum cost of repairing vehicle in Arcade mode in the form of a number without a separator | + | | The maximum cost of repairing the vehicle in Arcade mode in the form of a number without a separator |
|- | |- | ||
− | |<empty> (by default) | + | | <empty> (by default) |
− | |The maximum cost of repairing vehicle in Arcade mode in the form of a number with a separator | + | | The maximum cost of repairing the vehicle in Arcade mode in the form of a number with a separator |
|- | |- | ||
− | | rowspan="4" |rb (by default) | + | | rowspan="4" | rb (by default) |
− | | rowspan="2" |min | + | | rowspan="2" | min |
− | |value | + | | value |
− | |The minimum cost of repairing vehicle in Realistic mode in the form of a number without a separator | + | | The minimum cost of repairing the vehicle in Realistic mode in the form of a number without a separator |
|- | |- | ||
− | |<empty> (by default) | + | | <empty> (by default) |
− | |The minimum cost of repairing vehicle in Realistic mode in the form of a number with a separator | + | | The minimum cost of repairing the vehicle in Realistic mode in the form of a number with a separator |
|- | |- | ||
− | | rowspan="2" |max (by default) | + | | rowspan="2" | max (by default) |
− | |value | + | | value |
− | |The maximum cost of repairing vehicle in Realistic mode in the form of a number without a separator | + | | The maximum cost of repairing the vehicle in Realistic mode in the form of a number without a separator |
|- | |- | ||
− | |<empty> (by default) | + | | <empty> (by default) |
− | |The maximum cost of repairing vehicle in Realistic mode in the form of a number with a separator | + | | The maximum cost of repairing the vehicle in Realistic mode in the form of a number with a separator |
|- | |- | ||
− | | rowspan="4" |sb | + | | rowspan="4" | sb |
− | | rowspan="2" |min | + | | rowspan="2" | min |
− | |value | + | | value |
− | |The minimum cost of repairing vehicle in Simulator mode in the form of a number without a separator | + | | The minimum cost of repairing the vehicle in Simulator mode in the form of a number without a separator |
|- | |- | ||
− | |<empty> (by default) | + | | <empty> (by default) |
− | |The minimum cost of repairing vehicle in Simulator mode in the form of a number with a separator | + | | The minimum cost of repairing the vehicle in Simulator mode in the form of a number with a separator |
|- | |- | ||
− | | rowspan="2" |max (by default) | + | | rowspan="2" | max (by default) |
− | |value | + | | value |
− | |The maximum cost of repairing vehicle in Simulator mode in the form of a number without a separator | + | | The maximum cost of repairing the vehicle in Simulator mode in the form of a number without a separator |
|- | |- | ||
− | |<empty> (by default) | + | | <empty> (by default) |
− | |The maximum cost of repairing vehicle in Simulator mode in the form of a number with a separator | + | | The maximum cost of repairing the vehicle in Simulator mode in the form of a number with a separator |
|- | |- | ||
− | | rowspan="2" |research | + | | rowspan="2" | research |
− | |value | + | | value |
| | | | ||
| | | | ||
− | |The cost of vehicle research in the form of a number without a separator | + | | The cost of vehicle research in the form of a number without a separator |
|- | |- | ||
− | |<empty> (by default) | + | | <empty> (by default) |
| | | | ||
| | | | ||
− | |The cost of vehicle research in the form of a number with a separator | + | | The cost of vehicle research in the form of a number with a separator |
|- | |- | ||
− | | rowspan="9" |crew | + | | rowspan="9" | crew |
− | | rowspan="2" |basic | + | | rowspan="2" | basic |
− | |value | + | | value |
| | | | ||
− | |The cost of purchasing the basic crew qualification as a number without a separator | + | | The cost of purchasing the basic crew qualification as a number without a separator |
|- | |- | ||
− | |<empty> (by default) | + | | <empty> (by default) |
| | | | ||
− | |The cost of purchasing the basic crew qualification as a number with a separator | + | | The cost of purchasing the basic crew qualification as a number with a separator |
|- | |- | ||
− | | rowspan="2" |experts | + | | rowspan="2" | experts |
− | |value | + | | value |
| | | | ||
− | |The cost of purchasing the expert crew qualification as a number without a separator | + | | The cost of purchasing the expert crew qualification as a number without a separator |
|- | |- | ||
− | |<empty> (by default) | + | | <empty> (by default) |
| | | | ||
− | |The cost of purchasing the expert crew qualification as a number with a separator | + | | The cost of purchasing the expert crew qualification as a number with a separator |
|- | |- | ||
− | | rowspan="2" |aces | + | | rowspan="2" | aces |
− | |value | + | | value |
| | | | ||
− | |The cost of purchasing the aces crew qualification as a number without a separator | + | | The cost of purchasing the aces crew qualification as a number without a separator |
|- | |- | ||
− | |<empty> (by default) | + | | <empty> (by default) |
| | | | ||
− | |The cost of purchasing the aces crew qualification as a number with a separator | + | | The cost of purchasing the aces crew qualification as a number with a separator |
|- | |- | ||
− | | rowspan="2" |aces_research | + | | rowspan="2" | aces_research |
− | |value | + | | value |
| | | | ||
− | |The cost of research in the RP aces crew qualification in the form of a number without a separator | + | | The cost of research in the RP aces crew qualification in the form of a number without a separator |
|- | |- | ||
− | |<empty> (by default) | + | | <empty> (by default) |
| | | | ||
− | |The cost of research in the RP aces crew qualification in the form of a number with a separator | + | | The cost of research in the RP aces crew qualification in the form of a number with a separator |
|- | |- | ||
− | |count | + | | count |
| | | | ||
| | | | ||
− | |Number of crew members | + | | Number of crew members |
|- | |- | ||
− | |expmul | + | | expmul |
| | | | ||
| | | | ||
| | | | ||
− | |The coefficient of accrual of Research Points (not counting bonuses from premium status) | + | | The coefficient of accrual of Research Points (not counting bonuses from premium status) |
|} | |} | ||
[[Category:Help]] | [[Category:Help]] |
Revision as of 23:38, 15 November 2019
Templates are a class of special pages on the MediaWiki engine (on which War Thunder Wiki also works) whose contents can be displayed on any other page using only a short code to insert a template. In this case, the contents of the template will be displayed on another page only in the form in which it is recorded in the template itself.
You can read more about how templates work and are created on the MediaWiki engine in these articles:
- Wikipedia: Templates
- Wikipedia: Help:Template
- Wikipedia: Parser Functions
- MediaWiki: Help:Magic words
This article provides brief information and describes the features of the use of templates in the War Thunder Wiki.
Contents
All templates are categorized according to their purpose. The main category for templates is called Category:Templates , it contains general-purpose templates and subcategories with highly specialized templates.
Some main subcategories are:
- Category:Navigation — navigation templates and navigation tables created using them.
- Category:Design templates — the templates for which articles on aircraft, tanks, ships, their weapons, etc. are made out.
- Category:Article messages — informational messages in articles created using the template Ambox.
- Category:Userboxes — information boxes that users can place on their personal pages.
- Category:Documentation — Template documentation. It is designed using doc and docpage templates .
Applying templates
When using the code editor, templates are invoked as follows: {{Template name|(Parameters)}}
For example, typing {{Main|Help:Templates}}
will produce:
When using the visual editor, go to the "Templates" section of the "Insert" menu, and select the desired template by name.
When using the visual editor, the parameters used in this template will be automatically suggested for some templates. In all other cases, help on using a particular template can be found on its documentation page.
Useful templates
Popular and useful templates implemented in the War Thunder Wiki:
- Template:Main — used to design links to more detailed articles;
- Template:Ge, Template:Sl, Template:Rp, Template:Wb — used to quickly specify currencies;
- Template:Sp-begin — designed to insert hidden text, used in combination with Template:Sp-end;
- Template:Youtube — allows you to embed a framed YouTube video;
- Template:Youtube-gallery — designed to insert a YouTube video gallery;
- Template:Notice — is needed to insert various kinds of warnings into articles;
- Template:Annotation — needed for small annotations;
- Template:Quote — used to highlight quotes in the text.
Automatic characteristics
To use automatically substituted data in articles, use the template {{Specs|<parameter 1>|<parameter 2>|...}}
on the vehicle page.
List of parameters available for use (case does not matter):
For all types of vehicle
Parameter 1 | Parameter 2 | Parameter 3 | Parameter 4 | Description |
---|---|---|---|---|
name | Full name | |||
pseudonym | Short name | |||
article | en (by default) | Address of the article | ||
ru | ||||
image | URL of the picture of the vehicle (as in the card in-game) | |||
icon | URL of the icon of the vehicle (as in the research tree) | |||
type | Type of vehicle. Returns:
| |||
gift | Returns 1 if the vehicle is bundle or gift, 0 if not | |||
premium | Returns 1 if the vehicle is premium, 0 if not | |||
squadron | Returns 1 if the vehicle is squadron, 0 if not | |||
country | The name of the country to which this vehicle belongs | |||
manufacturer | Returns the code of the vehicle flag in the card if it differs from the flag of the nation in which the vehicle is located | |||
class | Natural number <1...N> | <empty> (by default) | The name of the Nth class of the vehicle in order. | |
code | In-game code of the Nth class of the vehicle in order. | |||
rank | value | Tech tree rank in the form of Arabic numerals (4) | ||
<empty> (by default) | Tech tree rank in the form of Roman numerals (IV) | |||
br | ab | Battle rating in Arcade mode | ||
rb (by default) | Battle rating in Realistic mode | |||
sb | Battle rating in Simulator mode | |||
price | currency | Currency in which the vehicle is sold:
| ||
value | The price of the vehicle in the form of a number without a separator (100000) | |||
<empty> (by default) | The price of the vehicle in the form of a number with a separator (100 000) | |||
repair | ab | min | value | The minimum cost of repairing the vehicle in Arcade mode in the form of a number without a separator |
<empty> (by default) | The minimum cost of repairing the vehicle in Arcade mode in the form of a number with a separator | |||
max (by default) | value | The maximum cost of repairing the vehicle in Arcade mode in the form of a number without a separator | ||
<empty> (by default) | The maximum cost of repairing the vehicle in Arcade mode in the form of a number with a separator | |||
rb (by default) | min | value | The minimum cost of repairing the vehicle in Realistic mode in the form of a number without a separator | |
<empty> (by default) | The minimum cost of repairing the vehicle in Realistic mode in the form of a number with a separator | |||
max (by default) | value | The maximum cost of repairing the vehicle in Realistic mode in the form of a number without a separator | ||
<empty> (by default) | The maximum cost of repairing the vehicle in Realistic mode in the form of a number with a separator | |||
sb | min | value | The minimum cost of repairing the vehicle in Simulator mode in the form of a number without a separator | |
<empty> (by default) | The minimum cost of repairing the vehicle in Simulator mode in the form of a number with a separator | |||
max (by default) | value | The maximum cost of repairing the vehicle in Simulator mode in the form of a number without a separator | ||
<empty> (by default) | The maximum cost of repairing the vehicle in Simulator mode in the form of a number with a separator | |||
research | value | The cost of vehicle research in the form of a number without a separator | ||
<empty> (by default) | The cost of vehicle research in the form of a number with a separator | |||
crew | basic | value | The cost of purchasing the basic crew qualification as a number without a separator | |
<empty> (by default) | The cost of purchasing the basic crew qualification as a number with a separator | |||
experts | value | The cost of purchasing the expert crew qualification as a number without a separator | ||
<empty> (by default) | The cost of purchasing the expert crew qualification as a number with a separator | |||
aces | value | The cost of purchasing the aces crew qualification as a number without a separator | ||
<empty> (by default) | The cost of purchasing the aces crew qualification as a number with a separator | |||
aces_research | value | The cost of research in the RP aces crew qualification in the form of a number without a separator | ||
<empty> (by default) | The cost of research in the RP aces crew qualification in the form of a number with a separator | |||
count | Number of crew members | |||
expmul | The coefficient of accrual of Research Points (not counting bonuses from premium status) |