ServerBlockTicking

From Vintage Story Wiki
Revision as of 17:37, 10 March 2024 by Nateonus (talk | contribs) (Added game navbox and removed mod navbox.)
Other languages:

This page was last verified for Vintage Story version 1.19.

General

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.

This is not to be confused with the general server tick rate of 33.33ms.

Blocks that tick

Block Behavior Condition Probability
Soil Grows by 1 stage If grass is surrounding it. Can be 1 block above or 1 block below. 1.0
Crops Grows by 1 stage and cycles back to 1 when fully grown Has to be placed during world gen 0.05
Lava Burns combustible items nearby 3 block radius around the air directly above lava. 4 block radius above that. 3 blocks above that. Lava is 1200 degrees. The block temperature

drops by 100 degrees for each meter away from lava. If the block's burn temperature is lower than the temperature at that block position then the block will burn when lava is ticked.

1.0

How long does it take

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.

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

You can change the rate at which the server ticks by editing values in the serverconfig.json file.

Property Controls Default
RandomTickDistance How many chunks around the player to tick 3
RandomTickSamples The number of blocks to tick each loop 16
RandomTickInterval How often the tick loop runs in milliseconds 50
MaxRandomTicks Max queued ticks to process each loop. You shouldn't ever need to touch this 10000

Commands

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


Wiki Navigation
Vintage Story Guides[[::Category:Guides| ]]Frequently Asked Questions Soundtrack Versions Controls
Game systems Crafting Knapping Clay forming Smithing Cooking Temperature Hunger Mining Temporal stability Mechanical power Trading Farming Animal husbandry
World World generation Biomes Weather Temporal storms
Items Tools Weapons Armor Clothing Bags Materials Food
Blocks Terrain Plants Decorative Lighting Functional Ore
Entities Hostile entities Animals NPCs Players
Miscellaneous List of client commands List of server commands Creative Starter Guide Bot System WorldEdit Cinematic Camera Adjustable FPS Video Recording ServerBlockTicking