Talk:Use time

?
Terraria uses  for rating a weapon's speed in the tooltip, rather than. I think we're missing something. --Lunboks 10:36, 14 August 2011 (UTC)


 * useAnimation is probably the time it takes for the animation to conclude. A slow broadsword takes a while to swing through its entire range, therefore it's considered "slow", and that is a useful statistic; though it'll be closely related to Use Time, since for most weapons you can't use it again before the previous animation concluded. The description here might be off if you're correct that the game uses that stat instead when calculating the item speed, though I don't think it will usually make much difference.  Equazcion ( talk ) 10:45, 14 Aug 2011 (UTC)


 * useAnimation is the time used for the item. I tried rebuilding the game with the only change that I set useAnimation to 10 times higher than normal for one item and that item took way longer to use. After that I tried the same for useTime and the speed was the same as it normally was. Also read comment below --Icke 19:44, 29 October 2011 (UTC)

Times are off
Most of the swords say 100 use time, but there's no way that's true. Just guessing here, but it should be closer to 19 for muramasa and light's bane, 25 for phaseblade, and I know for absolutely sure that a light's bane, phaseblade and fiery greatsword have different swing rates. I'd measure them more accurately if I had an auto clicker that could work with terraria. The 100's should be changed to question marks, if nothing else. Aru 21:22, 19 September 2011 (UTC)


 * Yeah... I looked at the 1.0.6.1 code and did some more tests on copper/gold pick and muramasa, and I'm pretty sure that the swing/damage rate is (useAnimation - ~1). Maybe it restarts the swing animation one frame before the previous one finishes? And pretty sure that useTime is the tool speed. How fast you mine/chop/hammer. Aru 09:51, 21 September 2011 (UTC)


 * It is indeed the useAnimation that is used(read comment above) and the time needed is indeed useAnimation-1, I'll be updating things now. --Icke 19:44, 29 October 2011 (UTC)

times
um is it just me, or did a lot of times change in a recent update? almost all of the use time numbers are off...

EDIT: for example, when I look megashark says use time:7.


 * And why is that time wrong? --Icke 11:25, 26 February 2012 (UTC)


 * the wiki says the use time is 6. thats just an example, there are a lot of differences really.


 * If you read the rest of the discussion you would see that the real use time = useAnimation-1. --Icke 19:59, 26 February 2012 (UTC)


 * so, of what significance is the use time parameter? does the wiki list literal use time for tools, or swing time? Also, in my code, it says that star cannon use time is 12, and megashark use time is 7. if one is subtracted from each, why does your wiki list 6 for megashark, and 12 for the star cannon? why does the -1 formula apply to one gun, but not the other? Amazonian7825 22:36, 26 February 2012 (UTC)


 * Because someone made a wrong update for the new use time in the v1.1.1 patch. I've fixed the page now. --Icke 11:32, 27 February 2012 (UTC)


 * Got it. Does the Use Time parameter do anything at all, then? Why does it exist? How can you be sure of the -1 formula, unless that formula can be found in the code?Amazonian7825 01:04, 28 February 2012 (UTC)


 * The use time is how long it takes before you can use an item again (as it is described on the page). The -1 formula is caused by the order that the game handles the use time. --Icke 10:40, 28 February 2012 (UTC)

Formula confirmation
Has anyone checked the real formula in game code? "Assuming it is similar to damage formula" makes me wonder if i should math around with this.. FunAlways (talk) 05:05, 25 July 2015 (UTC)

Final words on item.use VS item.useAnimation
From the above discussions, it can be concluded that the "Use Time" Value on the wiki should be item.useAnimation -1, and "Tool Speed" should be item.use.

May I enquire what is the point of item.use on weapons, if the actual use time is item.useAnimation? Thecatchyname (talk) 00:34, 6 September 2016 (UTC)

Doubts about (wiki) Use time = (source) item.useAnimation - 1
Did a little practical experiment to test if use time is item.useAnimation - 1. Took an S.D.M.G. without prefixes(useAnimation = 5 in source) and Endless Musket Pouch, wore bunch of accessories and armor to get my ranged crit to 100%+(to get a constant 2 damage per hit), and tested my DPS vs Dungeon guardian while flying away from him in UFO mount at a very close range. Results after dps settled were 23 most of the time, sometimes 24, and rarely 25. This would be consistent with use time = item.useAnimation = 5 (60fps/item.useAnimation=12->12*2damage/bullet=24dps) Whereas with use time = item.useAnimation - 1 = 4, dps should be closed to 30 (60fps/item.useAnimation-1=15->15*2damage/bullet=30dps) Also tested with Chain gun without prefixes(useAnimation = 4 in source), still 100 crit chance. DPS showed 29, sometimes 30, whereas with use time = item.useAnimation - 1, it should 40. If someone can find logic flaw with the test, please tell. Would be nice if someone could independently confirm the test results. 86.115.19.146 17:49, 23 October 2017 (UTC)


 * You are right, use time is always equal to . The original view of use time being equal to   likely results from the anomaly with autoswinging swords (see notes). Credit for research and clarification on this topic goes to W1K. So, as of now: use time on the wiki =   in the source code. Note that there might be some infoboxes displaying incorrect values, as we are still in the process of correcting them. --Rye Greenwood (talk) 14:24, 11 June 2019 (UTC)

Incorrect melee use time calculations
The algorithm that is given for melee use time is broken and does not match values that you actually get in game. I have a full dps calculator  and the only part on it that is just fully broken is melee use time. I tested out nights edge with different accessories and armor increases, and use time is broken in every single one of them, So it should either be removed for now because it is misleading or updated. Redageddon (talk) 23:25, 6 December 2020 (UTC)