Server Config: Difference between revisions

From Vintage Story Wiki
no edit summary
(https://discordapp.com/channels/302152934249070593/406473219239968768/688092626276188209)
No edit summary
Line 1: Line 1:
<!--T:1-->
__TOC__
== serverconfig.json ==
This is sample of serverconfig.json with explanations.
This is sample of serverconfig.json with explanations.


Line 248: Line 252:
   "ChatRateLimitMs": 1000
   "ChatRateLimitMs": 1000
}
}
</syntaxhighlight>
== servermagicnumbers.json ==
<syntaxhighlight lang="py">
{
  #The range an entity has to be in order for clients to receive regular updates for it. May be overriden by entities. The value is the max chunk distance. (e.g. 2 => update all entities not further away than 2 chunks in x/y any dir from a player)
  #This value is capped by each players max chunk range.
  "DefaultEntityTrackingRange": 4,
  #Cubic size of the chunks on the server (width, length and height)
  "ServerChunkSize": 32,
  #This is ServerChunkSize - 1 if ServerChunkSize is a multiple of 2 (which it really should be)
  "ServerChunkSizeMask": 31,
  #Size of the chunk column request buffer. Every chunk column of WorldGenPass Done needs to be surrounded by chunks of pass PreDone (3x3).
  #Every PreDone chunk needs to be surrounded by Vegetation (5x5), every Vegetation chunk needs to be surrounded by terrainfeatures (7x7)
  #So in order to complete at least chunk column we have to keep 7x7=49 chunk columns in the queue
  "RequestChunkColumnsQueueSize": 2000,
  #Size of the chunk ready buffer. If buffer is full, the chunk gen thread no longer generates new chunks.
  #This value can probably stay fairly small because if the main thread is not the bottleneck it will never fill up, but when it is the bottleneck we don't want to overburden it with sending gazillions of chunks to clients.
  "ReadyChunksQueueSize": 200,
  #Amount of chunks the SendChunks System may request per tick. Setting this value too high might fill the buffer too quickly and give a disadvantage to other players chunk loading speed.
  "ChunksColumnsToRequestPerTick": 1,
  #Amount of chunks the SendChunks System may send per tick. Setting this value too high might overburden the client or the network.
  "ChunksToSendPerTick": 32,
  #How often (at most) the SendChunks system should be called in ms (thread sleep time)
  "ChunkRequestTickTime": 40,
  #Amount of chunks the LoadChunks System may generate per tick. Setting this value too might overburden the server.
  "ChunkColumnsToGeneratePerThreadTick": 7,
  #How many seconds between each autosave of the game world.
  "ServerAutoSave": 300,
  #Width and Length of the cube of chunks to load for the spawn area. Setting this value to high will overflow the request buffer.
  "SpawnChunksWidth": 7,
  #Amount of entities each client can track at most. If the number of spawned entitites near the player goes beyond this number the player will only see the first ones that spawned until some of them despawned
  "TrackedEntitesPerClient": 1500,
  #Width and Length of Chunk regions
  "ChunkRegionSizeInChunks": 16,
  #After how many seconds a new calendar packet should be sent out to the client. You might want to reduce this interval for very laggy server / client in order for server and client game time to stay in sync.
  "CalendarPacketSecondInterval": 60,
  #After how many ms all the chunks should be checked if they can be unloaded
  "ChunkUnloadInterval": 4000,
  #After how many milliseconds the chunk should get packed
  "UncompressedChunkTTL": 15000,
  #After how many unused milliseconds the chunk should get unloaded
  "CompressedChunkTTL": 45000,
  #How much meter of the client position should leak into sever position (every 150ms), used as motion every 200ms
  "PlayerDesyncTolerance": 0.02,
  #How many intervalls (=150m) shall we toleratate clients position out of sync with servers position before we kick him (not used)
  "PlayerDesyncMaxIntervalls": 20.0,
  #How often the chunk generator should run in ms (thread sleep time)
  "ChunkThreadTickTime": 10
}
</syntaxhighlight>
</syntaxhighlight>
47

edits