Template:TorpedoTravelTime/Documentation

From War Thunder Wiki
< Template:TorpedoTravelTime
Revision as of 15:00, 29 October 2023 by Jareel_Skaj (talk | contribs) (Documentation for TorpedoTravelTime)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Description

Calculate torpedo travel time for a given speed and distance. Outputted value is a raw number of seconds, without any formatting or units. It can be used as a direct input for other templates or parser functions.
For realistic battles it's calculated using the real torpedo speed, for arcade battles it's using speed multiplier introduced in Update "Red Skies":

Quote icon.png

Torpedo speed multiplier in AB:
Up to 4 km the multiplier is 3;
From 4 to 8 km multiplier drops linearly from 3 to 1;
Over 8 km the multiplier is 1.

Parameters

  • distance - Distance travelled by the torpedo in kilometers. Default: 10
  • speed - Torpedo speed as indicated in the game interface in kilometers per hour (km/h). Default: 91
  • mode - One of: AB or Arcade, alternatively RB or Realistic, case-sensitive. Default: RB
  • round - To how many decimal places should output be rounded. Default: 0 means that 332.67326733 will be rounded to 333. Non-default shouldn't be used for any times that go in minutes.

Examples of use

S.I. 250/533,4X7,5 Tipo A (533 mm) time to reach maximum range in Realistic battles:

189 s

{{TorpedoTravelTime|distance=4|speed=76}} s
Type 93 Model 1, Mod 2 (610 mm) travel time for a typical spawn-to-spawn range (12 km) in Arcade battles:

527 s (≈9 minutes)

{{TorpedoTravelTime|mode=AB|distance=12|speed=91}} s (≈{{#expr:{{TorpedoTravelTime|mode=AB|distance=12|speed=91}}/60 round 0}} minutes)
G7a (533 mm) travel time with and without torpedo mode compared at 4 kilometers:

Without torpedo mode: 59 s; With torpedo mode: 86 s

Without torpedo mode: {{TorpedoTravelTime|mode=AB|distance=4|speed=81}} s; With torpedo mode: {{TorpedoTravelTime|mode=AB|distance=4|speed=56}} s
Model 1923DT (550 mm) comparison between RB and AB:
Torpedo Mode Travel time to 8 km (s)
Arcade Battles Realistic Battles
No 267 400
Yes 296 444
{| class="wikitable" style="text-align:center" width="auto"
! rowspan="2" | Torpedo Mode !! colspan="2" | Travel time to 8 km (s)
|-
! Arcade Battles !! Realistic Battles
|-
| {{Annotation|No|'Torpedo Mode' modification uninstalled}} || {{TorpedoTravelTime|mode=AB|distance=8|speed=72}} || {{TorpedoTravelTime|mode=RB|distance=8|speed=72}}
|-
| {{Annotation|Yes|'Torpedo Mode' modification installed}} || {{TorpedoTravelTime|mode=AB|distance=8|speed=64.8}} || {{TorpedoTravelTime|mode=RB|distance=8|speed=64.8}}
|}