Difference between revisions of "Template:TankMobility"

From War Thunder Wiki
Jump to: navigation, search
(a bit late to the party)
 
(Fix rounding on x.x5 AoA)
 
(30 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<includeonly>{| class="wikitable" style="text-align:center" width="70%"
+
<includeonly>{{#if:{{{AoAweight|}}}|{{#vardefine:emptyweight|{{#expr:{{{weight|{{Specs|mass}}}}}-{{{AoAweight|}}}}}}}|{{#vardefine:emptyweight|{{{weight|{{Specs|mass}}}}}}}}}<!--
 +
-->{| class="wikitable" style="text-align:center" width="70%"
 
! rowspan="2" | Game Mode
 
! rowspan="2" | Game Mode
! colspan="3" | Mobility characteristics
+
! colspan="2" | Max Speed (km/h)
 +
! {{#if:{{{AoAweight|}}}|colspan="2" {{!}}|rowspan="2" {{!}}}} Weight (tons)
 
! colspan="2" | Engine power (horsepower)
 
! colspan="2" | Engine power (horsepower)
 
! colspan="2" | Power-to-weight ratio (hp/ton)
 
! colspan="2" | Power-to-weight ratio (hp/ton)
 
|-
 
|-
! Max Speed
+
! Forward
! {{Annotation|Weight|Vehicle Weight (Tons)}}
+
! Reverse
! {{Annotation|AoA Weight|Add on Armour Weight (Tons)}}
+
{{#if:{{{AoAweight|}}}|! Stock
! Stock
+
! {{Annotation|AoA|Add-on Armour}}}}
! Upgraded
 
 
! Stock
 
! Stock
 
! Upgraded
 
! Upgraded
 +
! {{Annotation|Stock|without Add-on Armour}}
 +
! {{Annotation|Upgraded|with Add-on Armour}}
 
|-
 
|-
 
! Arcade
 
! Arcade
| {{{abSpeed|}}} || rowspan="2" | {{{weight|}}} || rowspan="2" | {{{AoAweight|N/A}}} || {{{abMinHp|}}}|| {{{abMaxHp|}}}|| {{#if:{{{abMinHp|}}}|{{#expr:{{{abMinHp|}}}/{{{weight|}}} round 2}}|__.__}} || {{#if:{{{abMaxHp|}}}|{{#expr:{{{abMaxHp|}}}/{{{weight|}}} round 2}}|__.__}}
+
| {{{abForwardSpeed|{{Specs|speed|forward|ab}}}}}
 +
| {{{abReverseSpeed|{{Specs|speed|back|ab}}}}}
 +
| rowspan="2" | {{#expr: floor({{#var:emptyweight}} * 10) / 10}}
 +
{{#if:{{{AoAweight|}}}|{{!}} rowspan="2" {{!}} {{{AoAweight|}}}}}
 +
| {{{abMinHp|_,___}}}
 +
| {{{abMaxHp|{{#replace:{{#unit:{{#var:me}}|engine|мощность|ab|format=1}}||,}}}}}
 +
| {{#if:{{{abMinHp|}}}|{{#expr:{{#replace:{{{abMinHp}}}|,}}/{{#var:emptyweight}} round 2}}|__.__}}
 +
| {{#if:{{{abMaxHp|{{Specs|engine|мощность|ab}}}}}|{{#expr:{{#replace:{{{abMaxHp|{{Specs|engine|мощность|ab}}}}}|,}}/{{#replace:{{{weight|{{Specs|mass}}}}}}} round 2}}|__.__}}
 
|-
 
|-
 
! {{Annotation|Realistic|Simulator uses Realistic FMs}}
 
! {{Annotation|Realistic|Simulator uses Realistic FMs}}
| {{{rbSpeed|}}} || {{{rbMinHp|}}}|| {{{rbMaxHp|}}}|| {{#if:{{{rbMinHp|}}}|{{#expr:{{{rbMinHp|}}}/{{{weight|}}} round 2}}|__.__}} || {{#if:{{{rbMaxHp|}}}|{{#expr:{{{rbMaxHp|}}}/{{{weight|}}} round 2}}|__.__}}
+
| {{{rbForwardSpeed|{{Specs|speed|forward}}}}}
 +
| {{{rbReverseSpeed|{{Specs|speed|back}}}}}
 +
| {{{rbMinHp|_,___}}}
 +
| {{{rbMaxHp|{{#replace:{{#unit:{{#var:me}}|engine|мощность|rb|format=1}}||,}}}}}
 +
| {{#if:{{{rbMinHp|}}}|{{#expr:{{#replace:{{{rbMinHp}}}|,}}/{{#var:emptyweight}} round 2}}|__.__}}
 +
| {{#if:{{{rbMaxHp|{{Specs|engine|мощность|rb}}}}}|{{#expr:{{#replace:{{{rbMaxHp|{{Specs|engine|мощность|rb}}}}}|,}}/{{#replace:{{{weight|{{Specs|mass}}}}}}} round 2}}|__.__}}
 
|}</includeonly><noinclude>
 
|}</includeonly><noinclude>
Generates power to weight ratio
+
{{doc}}
<nowiki>{{tankMobility|weight= |AoAweight= |abSpeed= |abMinHp= |abMaxHp= |rbSpeed= |rbMinHp= |rbMaxHp= }}</nowiki>
+
[[Category:Templates]]
 
</noinclude>
 
</noinclude>

Latest revision as of 19:58, 25 February 2024

Description

This template inserts a standardised ground vehicle mobility table using values from Template:Specs. These can be overridden with the template parameters.

Parameters

  • (automatic) weight - Weight of the tank (including add-on armour)
  • AoAweight - Weight of the tank's add-on armour packages
  • (automatic) abForwardSpeed - Maximum forward speed of the tank in Arcade modes
  • (automatic) abReverseSpeed - Maximum reverse speed of the tank in Arcade modes
  • abMinHp - Stock horsepower output of the tank's engine in AB
  • (automatic) abMaxHp - Spaded horsepower output of the tank's engine in AB
  • (automatic) rbForwardSpeed - Maximum forward speed of the tank in Realistic/Simulator modes
  • (automatic) rbReverseSpeed - Maximum reverse speed of the tank in Realistic/Simulator modes
  • rbMinHp - Stock horsepower output of the tank's engine in RB/SB
  • (automatic) rbMaxHp - Spaded horsepower output of the tank's engine in RB/SB

Manual parameters are optional and must be added by the Wiki user.

Examples of use

The default table filled automatically from data of the Type 90 (B)

Game Mode Max Speed (km/h) Weight (tons) Engine power (horsepower) Power-to-weight ratio (hp/ton)
Forward Reverse Stock Upgraded Stock Upgraded
Arcade 81 38 50.2 _,___ 2,862 __.__ 57.01
Realistic 73 34 _,___ 1,500 __.__ 29.88
{{tankMobility}}


Use of the template supplemented by non-automatic values

Game Mode Max Speed (km/h) Weight (tons) Engine power (horsepower) Power-to-weight ratio (hp/ton)
Forward Reverse Stock AoA Stock Upgraded Stock Upgraded
Arcade 81 38 40.2 10 2,032 2,862 50.55 57.01
Realistic 73 34 1,327 1,500 33.01 29.88
{{tankMobility|abMinHp=2,032|rbMinHp=1,327|AoAweight=10}}