ServerBlockTicking: Difference between revisions
No edit summary |
No edit summary |
||
Line 21: | Line 21: | ||
|- | |- | ||
| [[Soil]] | | [[Soil]] | ||
| Grows by | | Grows/Dies by one stage | ||
| | | Tests for the right climate conditions for each stage of grass growth. Not the tall grass block mind you, just the coverage of green grass on the block itself. | ||
| 1.0 | | 1.0 | ||
|- | |- | ||
| [[Farming#crops|Crops]] | | [[Farming#crops|Wild 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. Only applies to wild crops. | ||
| Has to be placed during world gen | | Has to be placed during world gen | ||
| 0.05 | | 0.05 |
Revision as of 09:39, 25 August 2024
This page was last verified for Vintage Story version 1.19.
General
By default the server randomly ticks blocks throughout the world every 300ms (serverconfig value BlockTickInterval). It ticks a chunk radius (serverconfig value BlockTickChunkRange) around the player. For each chunk, 16 blocks (serverconfig value RandomBlockTicksPerChunk) 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. Below is a selection of blocks that receive ticks and what they do.
This is not to be confused with the general server tick rate of 33.33ms (serverconfig value TickTime).
Examples of Blocks that tick
Block | Behavior | Condition | Probability |
---|---|---|---|
Soil | Grows/Dies by one stage | Tests for the right climate conditions for each stage of grass growth. Not the tall grass block mind you, just the coverage of green grass on the block itself. | 1.0 |
Wild Crops | Grows by 1 stage and cycles back to 1 when fully grown. Only applies to wild crops. | 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 • 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 |