Use time

From Terraria Wiki
(Redirected from Use Time)
Jump to navigation Jump to search

Use time is a statistic that applies to weapons, tools and other usable items. It determines the time that must pass, after use, before the same item or another item can be used again. In basic terms, this is the "rate of fire", as measured in game ticks[1]. A lower use time means a faster weapon. The shortswords, for example, usually have a use time between 10 and 13, meaning that they can be used in quick succession, as compared to the exceptionally slow Volcano, which has a use time of 40 – a much slower weapon which cannot be used as often.

Use time is particularly useful in comparing the speed of tools and weapons. The in-game tooltips for these items automatically group these values into categories like "Very fast" or "Very slow". They are grouped as following:

Value In-game text
≤8 Insanely fast speed
9–20 Very fast speed
21–25 Fast speed
26–30 Average speed
31–35 Slow speed
36–45 Very slow speed
46–55 Extremely slow speed
≥56 Snail speed

Modified use times

A modifier which applies "+10% speed" actually means "−10% use time". The modified value is rounded and produces the new use time. Due to rounding, the actual bonuses come in diverse percentages. The table below compares the rapidly firing Megashark and the much slower Musket.

Weapon Modifier Bonus Modified use time Actual bonus
Megashark
Megashark
Base use time: 7
Unreal +10% speed 6 +14% speed (+4%)
Rapid +15% speed 6 +14% speed (-1%)
Musket
Musket
Base use time: 32
Nimble +5% speed 30 +6% speed (+1%)
Unreal +10% speed 29 +9% speed (-1%)
Rapid +15% speed 27 +16% speed (+1%)

Calculation

Assuming the calculation for use time is similar to damage, the calculation is as follows: (see below)

[math]\displaystyle{ \mathit{total\ use\ time} = \left\lfloor \operatorname{round} \left( \mathit{base\ use\ time} \times \left( 1 - \frac{\mathit{weapon\ modifier}}{100} \right) \right) \times \frac{1}{1 + \frac{\mathit{total\ attack\ speed\ modifiers}}{100} } \right\rfloor + \mathit{use\ delay} }[/math]

Note: Total attack speed is only used when the weapon's damage type is melee, as that is what it affects.

[math]\displaystyle{ \mathit{secondary\ use\ time\ (if\ not\ autofire)} = \mathit{total\ use\ time} \times \left\lceil \frac{\mathit{total\ use\ time}}{\mathit{secondary\ use\ time\ as\ calculated\ with\ above\ formula}} \right\rceil }[/math]

Notes

  • The "fire rate" per second is calculated by dividing the frames per second (60) by the item's use time: [math]\displaystyle{ \mathit{fire\ rate} = \frac{60}{\mathit{use\ time}} }[/math]
For instance, a Megashark has a use time of 7. Its rate of fire can be calculated by inserting this in the formula above: [math]\displaystyle{ \mathit{fire\ rate} = \frac{60}{ 7 } \approx 8.57 }[/math]
Multiplying this with 60 reveals the rate of fire per minute, which is about 514.29 rounds per minute for the Megashark.
  • There are exceptions for certain items, such as recovery potions like Mushrooms and Lesser Healing Potions, which have a special cooldown period, or flails and boomerangs that must return before being fired again.
  • Some weapons, such as some projectile melee weapons, have secondary attacks. These usually have their own use time which differs from their standard use time. Speed and attack/melee speed modifiers still affect these secondary attacks. However, if such a weapon does not have autofire and if the secondary attack's use time is different from the standard use time, then, after the use time on the second attack is over, it cannot fire again until the primary attack finishes.
  • Some weapons, such as the Clockwork Assault Rifle, have an independent attribute called use delay. This is not affected by speed modifiers or attack speed/melee speed modifiers and acts as a base increase to use time.
  • An item's use time is represented by its useAnimation property in the game's source code.
  • Swords that are capable of autoswing are a special case. When such a sword reaches the last frame of its swinging animation, it skips back to the first one, therefore skipping one frame. This means that its actual use time is one value lower than the one stated in the source code, in the sword's tooltip, and here on the wiki.

History

  • Desktop 1.0.6:
    • The tooltip text "Very fast" is now applied to all items up to a use time of 20. Shifted the other groups accordingly:
      • "Very fast" is now 9–20 instead of 9–15.
      • "Fast" is now 21–25 instead of 16–20.
      • "Average" is now 25–30 instead of 21–25.
      • "Slow" is now 31–35 instead of 26–30.
      • "Very slow" is now 36–45 instead of 31–40.
      • "Extremely slow" is now 46–55 instead of 41–50.
      • "Snail" is now ≥56 instead of ≥51.
As a result, some items are now listed as being faster even though their actual use time did not change.
  • Desktop 1.0.3: Fixed a typo in a use time tooltip text: "Extremly slow speed" → "Extremely slow speed".

Footnotes

  1. A tick is a time unit countable by the software. Most of Terraria's updating logic happens every tick. A tick has the length of 1/60th of a second, hence there are 60 ticks in a second and 3600 ticks in a minute.