ServerBlockTicking: Difference between revisions

From Vintage Story Wiki
m
Added game navbox and removed mod navbox.
m (Added game navbox and removed mod navbox.)
 
(10 intermediate revisions by 5 users not shown)
Line 1: Line 1:
== General ==
<languages/><translate>
<!--T:1-->
{{GameVersion|1.19}}
__TOC__
 
== General == <!--T:2-->
By default the server randomly ticks blocks throughout the world every 50ms. It ticks a chunk radius around the player. For each chunk, 16 blocks are sampled at random. Each block is asked whether it would like to receive a game tick. If it says "yes", then a block location will be queued for ticking. Each block decides what happens when it receives a tick and this is different for every block. Most blocks don't receive ticks. Below is a summary of each block that receives ticks and what they do.
By default the server randomly ticks blocks throughout the world every 50ms. It ticks a chunk radius around the player. For each chunk, 16 blocks are sampled at random. Each block is asked whether it would like to receive a game tick. If it says "yes", then a block location will be queued for ticking. Each block decides what happens when it receives a tick and this is different for every block. Most blocks don't receive ticks. Below is a summary of each block that receives ticks and what they do.


== Blocks that tick ==
<!--T:3-->
This is not to be confused with the general server tick rate of 33.33ms.


== Blocks that tick == <!--T:4-->
<!--T:5-->
{| class="wikitable sortable"
{| class="wikitable sortable"
|-
|-
Line 16: Line 25:
| 1.0
| 1.0
|-
|-
| [[Crops]]
| [[Farming#crops|Crops]]
| Grows by 1 stage and cycles back to 1 when fully grown
| Grows by 1 stage and cycles back to 1 when fully grown
| Has to be placed during world gen
| Has to be placed during world gen
Line 29: Line 38:
|}
|}


== How long does it take ==
== How long does it take == <!--T:6-->
Since blocks tick at random it's not entirely deterministic how long it will take for a block to receive a tick. However, here is some information to predict about when it should tick.  
Since blocks tick at random it's not entirely deterministic how long it will take for a block to receive a tick. However, here is some information to predict about when it should tick.  


<!--T:7-->
Every 50ms the server ticks chunks around the player. By default this is a 3 chunk radius including the chunk the player is currently standing in. That means each chunk ticks 20 times per second. Each tick loop, 16 blocks will be ticked. There are 32,768 blocks in a chunk. So that means there is a probability of 16/32768=0.00048828125 of ticking each time or 1/2048. So it will take on average 2048 tick loops for a particular block to tick. Blocks are ticked 20 times per second so it will take on average 2048/20=102.4 seconds for a block to tick.  
Every 50ms the server ticks chunks around the player. By default this is a 3 chunk radius including the chunk the player is currently standing in. That means each chunk ticks 20 times per second. Each tick loop, 16 blocks will be ticked. There are 32,768 blocks in a chunk. So that means there is a probability of 16/32768=0.00048828125 of ticking each time or 1/2048. So it will take on average 2048 tick loops for a particular block to tick. Blocks are ticked 20 times per second so it will take on average 2048/20=102.4 seconds for a block to tick.  


== Configuration ==
== Configuration == <!--T:8-->
You can change the rate at which the server ticks by editing values in the serverconfig.json file.  
You can change the rate at which the server ticks by editing values in the serverconfig.json file.  


Line 59: Line 69:
| 10000
| 10000
|}
|}
== Commands == <!--T:9-->
You can tick a block via the /tickblock command. For example, to tick the block you are standing on you can run the following:
/tickblock ~0 ~-1 ~0
<!--T:10-->
{{Game navbox}}
</translate>
Confirmedusers
536

edits