How Seed climate lookup was built
Raw game files read
worldgen/blockpatches/*.json (climate bands matched against the result)worldgen/treengenproperties.json (tree/shrub climate bands)blocktypes/plant/fruittreebranch.json (fruit tree climate bands)No game asset feeds the generator itself: it is a port of the game's C# climate code (see below)
Processing
This tool is different from the other pages: the climate numbers are not read from a game data
file, because the game computes them in C# at world-generation time. apps/vs-wiki/site/assets/climate.js
is a port of that code, written against the game's own source (vsessentialsmod
Systems/WorldGen/Standard/ChunkGen/0.GenMaps/ and vsapi Common/Climate.cs,
read from local reference clones that are not part of the build). The only game data it uses is the
set of wild-patch, tree and fruit-tree climate bands the rest of the wiki already extracted, to say what grows
at the computed climate.
What is ported
- The seeded random generator (
NoiseBase): a 64-bit linear congruential generator, reseeded for every 512-block noise cell. It needs 64-bit wraparound integer maths, done withBigInt. - The realistic climate (
NoiseClimateRealistic): a north–south triangle-wave temperature gradient plus per-cell random variation in temperature, rainfall and geologic activity. The seed picks a position in the starting-climate range, which shifts the gradient so the middle of the map sits at the spawn temperature. - The cell blend (
MapLayerClimate): the four surrounding cells combined with a smoothstep, including the 14-map-pixel offset between the block grid and the noise grid that comes from how regions are generated. - The altitude formulas (
Climate.cs): temperature falls 1 stored unit per 1.5 blocks above sea level (y=110), and the rainfall height adjustment. - C#
floatrounding (Math.fround) and(int)truncation, where the original uses them.
What is not ported
The results are approximate.
- The map wobble. After the stage above, the game warps the whole climate map with a six-octave
simplex noise (
MapLayerPerlinWobble), displacing it by up to about 29 map pixels (roughly 900 blocks). This is the main source of error for any given block. - Text seeds. The game converts a text seed to its integer seed inside
VintagestoryLib.dll, which is closed source, so only numeric seeds are accepted. The open source contains two candidate string hashes, but neither is confirmed for world seeds. - Everything else that shapes what you actually see: forest and shrub maps, landforms and terrain height, and seasons. Plant and tree matching uses temperature and rainfall at the chosen height only, not fertility, forest density or terrain.
- The X/Z inputs are blocks from the world center, assumed to match the in-game coordinate display.
How it was checked
No running game was available, so there is no comparison against real worlds. Instead
test/climate.test.ts checks the port against an independent re-implementation of the same C#
arithmetic (64-bit wraparound, signed shifts, float rounding) on several seeds, and checks properties such as
the spawn temperature landing in the chosen starting-climate range. This catches arithmetic mistakes, not a
misreading of the C#. Comparing a few readouts from a real save would be the best further validation.