Unturned

Unturned

View Stats:
KtX2SkD Jun 4, 2016 @ 9:47am
Ticks Per Second
This is based on singleplayer, but common sense tells me that the defaults of any server should be the same to singleplayer. It also tells me that you'll see things in slow-motion or fast-forward if values were ever changed. Corrections are still welcome of course.

TLDR:
  • For most purposes, a second seem to contain ~12.5 ticks.
  • For weapon's FIRERATE, a second seem to contain x3 that number of ticks.
    • UPDATE (2020): For weapons' firerate, you might wanna check information listed here, it might supercede this thread's content.

My Work Steps:
  • I came across FIRERATE in weapon's game files, experimenting with it, I noticed that the less it is, the more bullets per second for the weapon, contrary to common sense.

  • With field tests on Heartbreaker & Honeybadger and a mix of math, I noticed that multiplying FIRERATE with bullets per second gives a constant, regardless of weapon, which is ~36.

  • I brainstormed, and had nothing except for finding out Unturned's ticks per second and then comparing it to the numbers, but no online source for this was found.

  • Then I thought of searching server configurations, found that there's an option for ticks per healing, and per losing food or water..

  • Per a past experiment of mine, a normal character depletes his full food bar in 40 minutes, and his water bar in 36 minutes. I did math on that with the findings above (300 or 270 ticks for food drop or water drop, respectively), and that resulted in 12.5 ticks per second.

  • For verification, I changed the 300 and 270 values in singleplayer to both 12, and that resulted in food & water dropping almost every second, which verifies the 12.5 ticks per second concept.

  • For guns, if you assume FIRERATE to be how many ticks between shots, then it doesn't fit, unless you add in a factor of x3, which then if compared with the ~36 found before, it matches.

Issues:
  • Per my knowledge, I would expect the number of ticks to be an integer, and higher than the noted amounts.
  • I also would expect it to be common & same for all usages, not different per domain.
  • It is only an assumption that FIRERATE corresponds to ticks. There is no definite proof on it, although it fits to a good degree in the current scheme.
  • Sometimes, a heal (or a drop) of 2% happens during a single instance. Perhaps that's related to a randomization factor, and thus ignorable.

I chose posting in sub-forum "General" instead of "Tips & Tricks", since as you can see 1 or 2 things are missing, and some stuff is understandable in how they work but not why they work like that. Hope someone can chip in to make it a complete piece.
Last edited by KtX2SkD; Aug 27, 2020 @ 12:48pm
< >
Showing 1-9 of 9 comments
a Sep 11, 2016 @ 12:32pm 
alrighty then
RainOfPain125 Nov 19, 2016 @ 11:12pm 
a honeybadger can shoot 4 bullets in one tick

i think the tick math is wrong..?
creamcone Nov 19, 2016 @ 11:58pm 
More like
60 divided by weapon firerate in ticks
60 / 6 = 10 shots per second (maplestrike firerate)
creamcone Nov 19, 2016 @ 11:59pm 
One second is 60 ticks.
You cannot change programming.
KtX2SkD Nov 20, 2016 @ 9:11am 
Originally posted by RA:HHR-5 Rain:
a honeybadger can shoot 4 bullets in one tick

i think the tick math is wrong..?
Per above, 36 / 4 = 9, does 9 more or less land near the actual firerate?
Originally posted by Donkey Dong:
One second is 60 ticks.
You cannot change programming.
Ticks as a global name are just an abstract concept, they lack size and actual existence. Only when they're defined in a domain of use (e.g. Unturned) they are granted size and concrete existence, in that domain. Any size is possible provided it's compatible with whatever restrictions the host environment has (e.g. OS, hardware, etc.).
IsSlushi Aug 27, 2020 @ 10:16am 
That makes sense. But just one quick question, (I just wanted to know cuz I want to change the item despawn time if dropped to something else instead of 600) what is 600.00 converted to real time? (Last question:) And what is 5 minutes converted to ticks? I'm too lazy to do the math, I'm sure most people will agree with me.

edit: I just used the "Time" conversion on the calculator and made it convert minutes to milliseconds, so is 5 minutes equal to 300,000 milliseconds or 300 milliseconds?
Last edited by IsSlushi; Aug 27, 2020 @ 10:26am
Loxels Aug 27, 2020 @ 10:21am 
I approve this !!science!!
creamcone Aug 27, 2020 @ 11:18am 
Originally posted by DogeKeen:
That makes sense. But just one quick question, (I just wanted to know cuz I want to change the item despawn time if dropped to something else instead of 600) what is 600.00 converted to real time? (Last question:) And what is 5 minutes converted to ticks? I'm too lazy to do the math, I'm sure most people will agree with me.

edit: I just used the "Time" conversion on the calculator and made it convert minutes to milliseconds, so is 5 minutes equal to 300,000 milliseconds or 300 milliseconds?
FOUR YEARS
KtX2SkD Aug 27, 2020 @ 12:50pm 
Time for item despawn is one of the things using seconds, not ticks, to be set, so it's 600 seconds, not ticks. Same applies for structure & barricade decay.
Originally posted by DogeKeen:
edit: I just used the "Time" conversion on the calculator and made it convert minutes to milliseconds, so is 5 minutes equal to 300,000 milliseconds or 300 milliseconds?
Convert 5 minutes to seconds, and you'll find your answer.
Originally posted by szlifierkaprzegrywa1:
FOUR YEARS
Better than 15 threads on same topic, consolidate everything to one spot, and make use of search function.
Last edited by KtX2SkD; Aug 27, 2020 @ 12:51pm
< >
Showing 1-9 of 9 comments
Per page: 1530 50

Date Posted: Jun 4, 2016 @ 9:47am
Posts: 9