Welcome to Wargaming.net Wiki!
Variants

Difference between revisions of "Template:TankData"

Jump to: navigation, search
Revision as of 17:26, 17 February 2015
Added Shell Cost calculations
Revision as of 12:03, 6 August 2018
test
42 intermediate revisions by 8 users not shown
Line 1:Line 1:
?<includeonly>+<includeonly><div style="display:none">
?<div style="display:none">+{{#vardefine:tank|{{#if:{{{TankTest|}}}
?{{#vardefine:tank|{{#if:{{{Tank|}}}+ |{{{TankTest|}}}
 + |{{PAGENAME}}
 +}}}}
 +{{#vardefine:tankdummy|{{#if:{{{Tank|}}}
  |{{{Tank|}}}  |{{{Tank|}}}
  |{{PAGENAME}}  |{{PAGENAME}}
Line 15:Line 18:
  |china = China  |china = China
  |japan = Japan  |japan = Japan
 + |czech = Czech
 + |sweden = Sweden
 + |italy = Italy
 + |poland = Poland
 }}}} }}}}
 {{#vardefine:nation2|{{#switch:{{#var:nation}} {{#vardefine:nation2|{{#switch:{{#var:nation}}
Line 24:Line 31:
  |China = Chinese  |China = Chinese
  |Japan = Japanese  |Japan = Japanese
 + |Czech = Czechoslovakian
 + |Sweden = Swedish
 + |Italy = Italian
 + |Poland = Polish
 }}}} }}}}
 {{#vardefine:level|{{#combatchars:{{#var:tank}}|level}}}} {{#vardefine:level|{{#combatchars:{{#var:tank}}|level}}}}
Line 42:Line 53:
  |0 =}}}}  |0 =}}}}
 {{#vardefine:classCode|{{#combatchars:{{#var:tank}}|class}}}} {{#vardefine:classCode|{{#combatchars:{{#var:tank}}|class}}}}
?{{#vardefine:classFooter|{{#switch:{{#var:classCode}}+{{#vardefine:classFooter|{{#switch:{{#combatchars:{{#var:tank}}|class}}
  |lightTank = light  |lightTank = light
  |mediumTank = medium  |mediumTank = medium
Line 49:Line 60:
  |SPG = spg  |SPG = spg
 }}}} }}}}
?{{#vardefine:class|{{#switch:{{#var:classCode}}+{{#vardefine:class|{{#switch:{{#combatchars:{{#var:tank}}|class}}
  |lightTank = Light  |lightTank = Light
  |mediumTank = Medium  |mediumTank = Medium
Line 69:Line 80:
  |TD = [[Tank_Destroyers|tank destroyer]]  |TD = [[Tank_Destroyers|tank destroyer]]
  |SPG = [[Self-Propelled_Guns|self-propelled gun]]  |SPG = [[Self-Propelled_Guns|self-propelled gun]]
? |TTD = turreted [[Tank_Destroyers|tank destroyer]]+ |TTD = turreted [[Tank_Destroyers|tank destroyer]]
  |TSPG = turreted [[Self-Propelled_Guns|self-propelled gun]]  |TSPG = turreted [[Self-Propelled_Guns|self-propelled gun]]
 }}}} }}}}
Line 104:Line 115:
 * History}} * History}}
 }}{{#if:{{{HistoricalGallery|}}}||[[Category:Append: Historical Gallery]]{{#vardefine:append|1}}{{#vardefine:appendContent|{{#var:appendContent}} }}{{#if:{{{HistoricalGallery|}}}||[[Category:Append: Historical Gallery]]{{#vardefine:append|1}}{{#vardefine:appendContent|{{#var:appendContent}}
?* Historical Gallery}}}}{{#if:{{{Ref_references|}}}||{{#if:{{{Ref_sources|}}}||{{#if:{{{Ref_links|}}}||[[Category:Append: Sources and External Links]]{{#vardefine:append|1}}{{#vardefine:appendContent|{{#var:appendContent}}+* Historical Gallery}}}}{{#if:{{{Ref_references|}}}||{{#if:{{{Ref_sources|}}}||{{#if:{{{Ref_links|}}}||[[Category:Append: Sources and External Links]]}}}}
?* Sources and External Links}}}}}}+}}{{#ifeq:{{#var:append}}|1|{{Append|{{#var:appendContent}}}}}}
?}}{{#ifeq:{{#var:append}}|1|<div class="b-status b-status__info">{{Append|{{AppendContentNavbar|{{#var:appendContent}}}}}}</div>}}+
 {{Sidebar {{Sidebar
 |name={{#var:name}} |name={{#var:name}}
Line 131:Line 141:
 |turretTraverse={{#combatchars:turret:{{#var:tank}}::stock|turretTraverse}} |turretTraverse={{#combatchars:turret:{{#var:tank}}::stock|turretTraverse}}
 |turretTraverseTop={{#combatchars:turret:{{#var:tank}}::top|turretTraverse}} |turretTraverseTop={{#combatchars:turret:{{#var:tank}}::top|turretTraverse}}
?|gunTraverseArc={{#expr:{{#combatchars:{{#var:tank}}|traverseLeft}}+{{#combatchars:{{#var:tank}}|traverseRight}}}}+|gunTraverseArc={{#iferror: {{#expr:{{#combatchars:{{#var:tank}}|traverseLeft}}+{{#combatchars:{{#var:tank}}|traverseRight}}}} | | {{#expr:{{#combatchars:{{#var:tank}}|traverseLeft}}+{{#combatchars:{{#var:tank}}|traverseRight}}}} }}
 |gunVerticalLimits={{#combatchars:{{#var:tank}}|depression}}/{{#combatchars:{{#var:tank}}|elevation}} |gunVerticalLimits={{#combatchars:{{#var:tank}}|depression}}/{{#combatchars:{{#var:tank}}|elevation}}
 |gunVerticalLimitsTop={{#combatchars:gun:{{#var:tank}}::top|depression}}/{{#combatchars:gun:{{#var:tank}}::top|elevation}} |gunVerticalLimitsTop={{#combatchars:gun:{{#var:tank}}::top|depression}}/{{#combatchars:gun:{{#var:tank}}::top|elevation}}
Line 139:Line 149:
 |shellsstock={{ShellsTypeBreakdown|{{#var:tank}}|stock}} |shellsstock={{ShellsTypeBreakdown|{{#var:tank}}|stock}}
 |shellstop={{ShellsTypeBreakdown|{{#var:tank}}|top}} |shellstop={{ShellsTypeBreakdown|{{#var:tank}}|top}}
?|shellcoststock={{ShellsCostCalc|{{#var:tank}}|stock|stock}}+|shellcoststock={{ShellsCostCalc|{{#var:tank}}|stock|stock|{{#var:nation}}}}
?|shellcoststock={{ShellsCostCalc|{{#var:tank}}|top|top}}+|shellcosttop={{ShellsCostCalc|{{#var:tank}}|top|top|{{#var:nation}}}}
 |damage={{#combatchars:{{#var:tank}}|damage1}}/{{#combatchars:{{#var:tank}}|damage2}}/{{#combatchars:{{#var:tank}}|damage3}} |damage={{#combatchars:{{#var:tank}}|damage1}}/{{#combatchars:{{#var:tank}}|damage2}}/{{#combatchars:{{#var:tank}}|damage3}}
 |damageTop={{#combatchars:gun:{{#var:tank}}::top|damage1}}/{{#combatchars:gun:{{#var:tank}}::top|damage2}}/{{#combatchars:gun:{{#var:tank}}::top|damage3}} |damageTop={{#combatchars:gun:{{#var:tank}}::top|damage1}}/{{#combatchars:gun:{{#var:tank}}::top|damage2}}/{{#combatchars:gun:{{#var:tank}}::top|damage3}}
Line 206:Line 216:
 |SubArc_6_Elv={{{Sidebar_SubArc_6_Elv|}}} |SubArc_6_Elv={{{Sidebar_SubArc_6_Elv|}}}
 }} }}
?{{TankDescription|{{Flag|{{#var:nation}}|{{#var:tank}}}}<p>The '''{{#var:name}}''' is a{{#ifeq:{{#var:nation2}}|American|n|}} [[{{#var:nation}}|{{#var:nation2}}]] tier {{#var:level}}{{#var:premiumLink}} {{#var:classLink}}. {{#ifeq:{{#var:gift}}|yes|{{#var:giftDesc}}}}</p><p>{{#wotstr:{{#combatchars:{{#var:tank}}|description}}}}</p><p>{{{1|}}}</p>{{#ifeq:{{#var:premium}}|Premium||<p>{{#var:children}}</p>}}}}+{{TankDescription|{{Flag|{{#var:nation}}|{{#var:tank}}}}<p>The '''{{#var:name}}''' is a{{#ifeq:{{#var:nation2}}|American|n|}}{{#ifeq:{{#var:nation2}}|Italian|n|}} [[{{#var:nation}}|{{#var:nation2}}]] tier {{#var:level}}{{#var:premiumLink}} {{#var:classLink}}. {{#ifeq:{{#var:gift}}|yes|{{#var:giftDesc}}}}</p><p>{{#wotstr:{{#combatchars:{{#var:tank}}|description}}}}</p><p>{{{1|}}}</p>{{#ifeq:{{#var:premium}}|Premium||<p>{{#var:children}}</p>}}}}
 <div class="b-wiki-panel"> <div class="b-wiki-panel">
 {{Popup {{Popup
 |header=<h3>Modules / Available Equipment and Consumables</h3> |header=<h3>Modules / Available Equipment and Consumables</h3>
 |content= |content=
?<h3 id="modulesBlockH2">Modules</h3>+{{ModulesNexus|{{#var:tank}}}}
?<div id="codeValue" style="display: none;">{{#var:tank}}</div>+
?<div id="modulesBlock" class="b-modules" data-tank="{{#var:tank}}">+
?{{#gw_vehicle_modules:{{#var:tank}}}}+
?</div></div>+
 <h3>Compatible Equipment</h3> <h3>Compatible Equipment</h3>
?{{#gw_vehicle_devices:{{#var:tank}} }}+{{Equipment|{{#var:tank}}}}
 <h3>Compatible Consumables</h3> <h3>Compatible Consumables</h3>
?{{#gw_vehicle_equipments:{{#var:tank}} }} }}+{{Consumables|{{#var:tank}}}}
 +}}
 {{#if:{{{InTheGame_pros|}}}{{{InTheGame_cons|}}}{{{InTheGame_performance|}}}{{{InTheGame_research|}}}{{{InTheGame_equipment|}}}| {{#if:{{{InTheGame_pros|}}}{{{InTheGame_cons|}}}{{{InTheGame_performance|}}}{{{InTheGame_research|}}}{{{InTheGame_equipment|}}}|
 {{InTheGame|pros={{{InTheGame_pros|}}} {{InTheGame|pros={{{InTheGame_pros|}}}
Line 250:Line 257:
 |links={{{Ref_links|}}} |links={{{Ref_links|}}}
 }}|}} }}|}}
?{{Navbox-nation|collapse={{{collapse}}}|Header={{#var:nation}}|group1=[[Light Tanks]]|list1={{TankList|nation = {{#var:nationCode}} |class = light | style = text |order = level |divider =&nbsp;&nbsp;}}+<div class="b-tech-nav">
?|group2=[[Medium Tanks]]|list2={{TankList|nation = {{#var:nationCode}} |class = medium | style = text |order = level |divider =&nbsp;&nbsp;}}+{{#gw_nav_table:
?|group3=[[Heavy Tanks]]|list3={{TankList|nation = {{#var:nationCode}} |class = heavy | style = text |order = level |divider =&nbsp;&nbsp;}}+name = {{#var:nation}} |
?|group4=[[Tank Destroyers]]|list4={{TankList|nation = {{#var:nationCode}} |class = td | style = text |order = level |divider =&nbsp;&nbsp;}}+Light Tanks#{{#gw_vehicle_list:wot: nation = {{#var:nationCode}} | class = lightTank | order = level | style = text | divider = • }} |
?|group5=[[Self-Propelled Guns]]|list5={{TankList|nation = {{#var:nationCode}} |class = spg | style = text |order = level |divider =&nbsp;&nbsp;}}+Medium Tanks#{{#gw_vehicle_list:wot: nation = {{#var:nationCode}} | class = mediumTank | order = level | style = text | divider = • }} |
 +Heavy Tanks#{{#gw_vehicle_list:wot: nation = {{#var:nationCode}} | class = heavyTank | order = level | style = text | divider = • }} |
 +Tank Destroyers#{{#gw_vehicle_list:wot: nation = {{#var:nationCode}} | class = AT-SPG | order = level | style = text | divider = • }} |
 +Self-Propelled Artillery#{{#gw_vehicle_list:wot: nation = {{#var:nationCode}} | class = SPG | order = level | style = text | divider = • }}
 }} }}
?{{Navbox-type|Header={{#var:classFooter2}}|group1=[[USA]]|list1={{TankList|nation = usa |class = {{#var:classFooter}} | style = text |order = level |divider =&nbsp;&nbsp;}}+{{#gw_nav_table:
?|group2=[[UK]]|list2={{TankList|nation = uk |class = {{#var:classFooter}} | style = text |order = level |divider =&nbsp;&nbsp;}}+name = {{#var:classFooter2}} |
?|group3=[[Germany]]|list3={{TankList|nation = germany |class = {{#var:classFooter}} | style = text |order = level |divider =&nbsp;&nbsp;}}+USA#{{#gw_vehicle_list:wot: nation = usa | class = {{#var:classCode}} | order = level | style = text | divider = • }} |
?|group4=[[France]]|list4={{TankList|nation = france |class = {{#var:classFooter}} | style = text |order = level |divider =&nbsp;&nbsp;}}+UK#{{#gw_vehicle_list:wot: nation = uk | class = {{#var:classCode}} | order = level | style = text | divider = • }} |
?|group5=[[USSR]]|list5={{TankList|nation = ussr |class = {{#var:classFooter}} | style = text |order = level |divider =&nbsp;&nbsp;}}+Germany#{{#gw_vehicle_list:wot: nation = germany | class = {{#var:classCode}} | order = level | style = text | divider = • }} |
?|group6=[[China]]|list6={{TankList|nation = china |class = {{#var:classFooter}} | style = text |order = level |divider =&nbsp;&nbsp;}}+France#{{#gw_vehicle_list:wot: nation = france | class = {{#var:classCode}} | order = level | style = text | divider = • }} |
?|group7=[[Japan]]|list7={{TankList|nation = japan |class = {{#var:classFooter}} | style = text |order = level |divider =&nbsp;&nbsp;}}+USSR#{{#gw_vehicle_list:wot: nation = ussr | class = {{#var:classCode}} | order = level | style = text | divider = • }} |
 +China#{{#gw_vehicle_list:wot: nation = china | class = {{#var:classCode}} | order = level | style = text | divider = • }} |
 +Japan#{{#gw_vehicle_list:wot: nation = japan | class = {{#var:classCode}} | order = level | style = text | divider = • }}|
 +Czechoslovakia#{{#gw_vehicle_list:wot: nation = czech | class = {{#var:classCode}} | order = level | style = text | divider = • }}|
 +Sweden#{{#gw_vehicle_list:wot: nation = sweden | class = {{#var:classCode}} | order = level | style = text | divider = • }}|
 +Italy#{{#gw_vehicle_list:wot: nation = italy | class = {{#var:classCode}} | order = level | style = text | divider = • }} |
 +Poland#{{#gw_vehicle_list:wot: nation = poland | class = {{#var:classCode}} | order = level | style = text | divider = • }}
 }} }}
 {{#ifeq:{{#var:premium}}|Premium {{#ifeq:{{#var:premium}}|Premium
?|{{Navbox-type|Header=Premium Tanks|group1=[[USA]]|list1={{TankList|nation = usa |gold = 1 | style = text |order = level |divider =&nbsp;&nbsp;}}+|{{#gw_nav_table:
?|group2=[[UK]]|list2={{TankList|nation = uk |gold = 1 | style = text |order = level |divider =&nbsp;&nbsp;}}+name = Premium tanks |
?|group3=[[Germany]]|list3={{TankList|nation = germany |gold = 1 | style = text |order = level |divider =&nbsp;&nbsp;}}+USA#{{#gw_vehicle_list:wot: nation = usa | gold = 1 | order = level | style = text | divider = • }} |
?|group4=[[France]]|list4={{TankList|nation = france |gold = 1 | style = text |order = level |divider =&nbsp;&nbsp;}}+UK#{{#gw_vehicle_list:wot: nation = uk | gold = 1 | order = level | style = text | divider = • }} |
?|group5=[[USSR]]|list5={{TankList|nation = ussr |gold = 1 | style = text |order = level |divider =&nbsp;&nbsp;}}+Germany#{{#gw_vehicle_list:wot: nation = germany | gold = 1 | order = level | style = text | divider = • }} |
?|group6=[[China]]|list6={{TankList|nation = china |gold = 1 | style = text |order = level |divider =&nbsp;&nbsp;}}+France#{{#gw_vehicle_list:wot: nation = france | gold = 1 | order = level | style = text | divider = • }} |
?|group7=[[Japan]]|list7={{TankList|nation = japan |gold = 1 | style = text |order = level |divider =&nbsp;&nbsp;}}+USSR#{{#gw_vehicle_list:wot: nation = ussr | gold = 1 | order = level | style = text | divider = • }} |
 +China#{{#gw_vehicle_list:wot: nation = china | gold = 1 | order = level | style = text | divider = • }} |
 +Japan#{{#gw_vehicle_list:wot: nation = japan | gold = 1 | order = level | style = text | divider = • }}|
 +Czechoslovakia#{{#gw_vehicle_list:wot: nation = czech | gold = 1 | order = level | style = text | divider = • }}|
 +Sweden#{{#gw_vehicle_list:wot: nation = sweden | gold = 1 | order = level | style = text | divider = • }}|
 +Italy#{{#gw_vehicle_list:wot: nation = italy | gold = 1 | order = level | style = text | divider = • }}|
 +Poland#{{#gw_vehicle_list:wot: nation = poland | gold = 1 | order = level | style = text | divider = • }}
 }} }}
?|}}+}}
 +{{OtherLangs}}
 +</div>
 </includeonly><noinclude> </includeonly><noinclude>
?==Notes== 
?*Tank code should be used to specify the tank. The tank codes are listed here: https://wiki.wargaming.net/ru/WoT:Коды_техники in the Code column (the 3rd column). 
 ==Usage== ==Usage==
 *<nowiki>{{TankData</nowiki> ''This places the core panels supported by the auto gen data.'' *<nowiki>{{TankData</nowiki> ''This places the core panels supported by the auto gen data.''
Line 296:Line 318:
 For ease of reading while in the edit panel please place anything you add to the sections on the line below the = (except for the first | and the sources). For ease of reading while in the edit panel please place anything you add to the sections on the line below the = (except for the first | and the sources).
 ==Template== ==Template==
?<big>'''WARNING: DO NOT FILL IN TANK= UNLESS YOU KNOW WHAT YOU ARE DOING AND WHAT WILL HAPPEN PERFECTLY. LEAVE IT BLANK. '''</big> 
? 
? 
 <pre> <pre>
?{{TankData|Tank=+{{TankData|Tank= ''Please leave space after ''='' blank except in specific circumstances''
?|+
  
?|Gallery=+| ''Free text - intro section''
  
?|InTheGame_pros=+|Gallery= ''Gallery of (ingame) tank images''
  
?|InTheGame_cons=+|InTheGame_pros= ''Short highlights of most useful attributes of tank''
  
?|InTheGame_performance=+|InTheGame_cons= ''Short highlights of most challenging attributes of tank''
  
?|InTheGame_research=+|InTheGame_performance= ''Free space for description of how a tank plays '''in its elite configuration'''''
 + 
 +|InTheGame_research= ''Space to overview research progression and any major aspects of the experience while advancing the vehicle''
  
 |InTheGame_equipment= |InTheGame_equipment=
  
 |InTheGame_Equipment_Builds= |InTheGame_Equipment_Builds=
 +
 |InTheGame_builds= |InTheGame_builds=
 (both will activate the same section) (both will activate the same section)
  
?|External_Reviews=+|External_Reviews= ''For external review links (Youtube, etc)''
  
?|History=+|History= ''History of the tank''
  
?|HistoricalGallery=+|HistoricalGallery= ''Historical images of the tank''
  
 |Ref_references= |Ref_references=
Line 333:Line 354:
 }} }}
 </pre> </pre>
 +<hr>
 +''Cut dried version for reasons of laziness''
 +<pre>
 +{{TankData|Tank=
  
?[[Category:Haswell's_Storage_of_Spare_Time]]+|
?[[Category:Force's Muddling Attempts at Self-Actualization]]+ 
 +|Gallery=
 + 
 +|InTheGame_pros=
 + 
 +|InTheGame_cons=
 + 
 +|InTheGame_performance=
 + 
 +|InTheGame_research=
 + 
 +|InTheGame_equipment=
 + 
 +|InTheGame_Equipment_Builds=
 + 
 +|External_Reviews=
 + 
 +|History=
 + 
 +|HistoricalGallery=
 + 
 +|Ref_references=
 + 
 +|Ref_sources=
 + 
 +|Ref_links=
 + 
 +}}
 +</pre>
 [[Category:C/P Templates]] [[Category:C/P Templates]]
 </noinclude> </noinclude>

Revision as of 12:03, 6 August 2018

Usage

  • {{TankData This places the core panels supported by the auto gen data.
  • |Tank= Specify the tank code. See Notes above. Required for CombatChars automation. If not specified, it will default to the page's name.
  • | This leaves a field to place optional custom text that is included in the description. Will not place {{append}} if left blank.
  • |InTheGame_pros= Pros for the Player Opinion panel. Please use * and a new line for each "pro". Usage of "above average" will be removed. Will place {{append}} if left blank.
  • |InTheGame_cons= Cons for the Player Opinion panel. Please use * and a new line for each "con". Usage of "below average" will be removed. Will place {{append}} if left blank.
  • |InTheGame_performance= General area for in game tank performance info for the Player Opinion panel. Please use regular paragraph structure for this area. You can use images and tables as needed. Will place {{append}} if left blank.
  • |InTheGame_research= Optional general area for early research info for the Player Opinion panel. For those tanks where it is not obvious, use this area to detail a suggested research path. A good use for this area is to mention if you need to research tracks before a gun upgrade, etc. Will not place {{append}} if left blank.
  • |InTheGame_equipment= Suggested equipment list for the Player Opinion panel using the Template:EquipmentPanel. Please use the format found there. Will place {{append}} if left blank.
  • |Gallery= Additional image content for the gallery panel. The four screenshots ({{PAGENAME}}_front_left.jpg etc.) are added automatically. Place each image on a new line. Will place {{append}} if left blank and none of the four screenshots if found.
  • |History= General area for tank history info. Please use regular paragraph structure for this area. You can use images and tables as needed. Will place {{append}} if left blank.
  • |HistoricalGallery= Image content for the historical gallery panel. Place each image on a new line. Will place {{append}} if left blank.
  • |Ref_references= see below
  • |Ref_sources= see below
  • |Ref_links= see below
Panels for references, sources and external links. We don't have a reference list template ( {{reflist}} ) so place any references manually with [number] in the text. Then in the References section please use # (the actual # symbol, not a number) and a new line for each reference cited. If not referenced in the text with a [number] leave References blank and use Sources and/or External Links to cite where you found the info used in the article. Place a book's or other offline resource's bibliography info in Sources. For online resources use External Links. Please use * and a new line for each entry. If left blank after the = will place {{append}}
  • }}

For ease of reading while in the edit panel please place anything you add to the sections on the line below the = (except for the first | and the sources).

Template

{{TankData|Tank= ''Please leave space after ''='' blank except in specific circumstances''

| ''Free text - intro section''

|Gallery= ''Gallery of (ingame) tank images''

|InTheGame_pros= ''Short highlights of most useful attributes of tank''

|InTheGame_cons= ''Short highlights of most challenging attributes of tank''

|InTheGame_performance= ''Free space for description of how a tank plays '''in its elite configuration'''''

|InTheGame_research= ''Space to overview research progression and any major aspects of the experience while advancing the vehicle''

|InTheGame_equipment=

|InTheGame_Equipment_Builds=

|InTheGame_builds=
(both will activate the same section)

|External_Reviews= ''For external review links (Youtube, etc)''

|History= ''History of the tank''

|HistoricalGallery= ''Historical images of the tank''

|Ref_references=

|Ref_sources=

|Ref_links=

}}

Cut dried version for reasons of laziness

{{TankData|Tank= 

| 

|Gallery= 

|InTheGame_pros= 

|InTheGame_cons= 

|InTheGame_performance= 

|InTheGame_research= 

|InTheGame_equipment=

|InTheGame_Equipment_Builds=

|External_Reviews= 

|History= 

|HistoricalGallery= 

|Ref_references=

|Ref_sources=

|Ref_links=

}}
Category: