About Algernon's Terrain Sampler Lib
From Vintage Story ModDBLibrary that lets you quickly see what terrain looks like anywhere in the world
A simple tool for efficiently getting the generated terrain's height anywhere in the world.
Even if the chunk hasn't been created or even loaded yet, this still works. You could sample 2 billion blocks away as long as it's within the world boundary.
Use /terrainsampler columnheight ingame to test it out.
To get this function working in your mod, reflect this mod's assembly, then reflect sampleHeight as shown here:
<pre class="language-csharp">foreach (Assembly assembly in AppDomain.CurrentDomain.GetAssemblies()) { Type modType = assembly.GetType("AlgernonsTerrainSampler.TerrainSamplerMod"); if (modType == null) continue;
PropertyInfo instanceProperty = modType.GetProperty("Instance", BindingFlags.Public | BindingFlags.Static); MethodInfo getHeightMethod = modType.GetMethod("GetBlockColumnHeight", BindingFlags.Public | BindingFlags.Instance, null, [typeof(int), typeof(int)], null); if (instanceProperty == null || getHeightMethod == null) break;
object instance = instanceProperty.GetValue(null); int sampleHeight(int blockX, int blockZ) => (int)getHeightMethod.Invoke(instance, [blockX, blockZ]);
</pre> Then give the height sampler delegate (sampleHeight) to your code that uses terrain height samples.
1.3.0 Update: new sample types courtesy of Chrisunfocused from Fast Map
You can now sample for rainfall, temperature, geologic activity, forest density, and shrub density, as well as height.
Use /terrainsampler samplecolumn ingame to test it out.
To get these detailed samples working in your mod, reflect this mod's assembly, then reflect SampleColumn similar to how FastMap did it here:
https://gist.github.com/Algernon733/d0c4301197ad98adb9753c496cbd579a
The terrain generation usually changes every major update, so don't use this on a different major version than the one it's made for.
This tool was made to help Farseer and the other two LOD mods in development, but you could use it for a lot of different things.
Originally, this came from the Watersheds mod. Terrain sampling is the core foundation of what enabled me to create terrain-respecting streams.
Here are some mod ideas you could make from terrain sampling:
- Terrain erosion effects
- Rain shadows
- Realistic wind flows
- Very long roads that respect the terrain, maybe between story structures
- Very long pathfinding routes, maybe for animal herds or trader routes
- Rivers and streams
- Realistic pond, lake, and spring placement
- Realistic snow depths (unsheltered areas have less snow, sheltered has more snow)
- Realistic fog areas (in sheltered areas)
- Groundwater and aquifers (a basic groundwater system is in Watersheds)
- Strategic/believable placement of ruins/structures/villages
Mods using this sampler:
Looking for help:
Compatability with Conquest Landform Overhaul's configurable landforms
Highlights
From source dataGame versions
Supports 13 Vintage Story versions, the newest being 1.21.6.
Footprint
Rated a light load on a server.
Algernon's Terrain Sampler Lib on Nxeon
From our catalogue- One-click install
- Supported on Nxeon Vintage Story servers. We download it from Vintage Story ModDB, place it, and restart the server.
- Server side
- Required on the server
- Server load
- light
- Smallest plan we suggest
- Vintage Story — 1 GB (1 GB RAM). This follows our own load rating above, not a benchmark.
Run Algernon's Terrain Sampler Lib on a Vintage Story server
Pick a server or deploy a new one above; it is installed in one click.
What kind of mod it is
From the catalogLibraries & compatibility
Foundations and fixes other mods build on. Usually installed because something else needs it.
Runs on your server
From source side supportVintage Story ModDB lists Algernon's Terrain Sampler Lib as required on the server. Check its Vintage Story ModDB page to see whether players need it too.
Compatibility
- Game
- Vintage Story
- Runs on
- Serverrequired on the server
- Game versions
- 1.21.6 and 12 earlier
Verified at the source
- ✓Vintage Story ModDBOfficial listing, checked 2026-09-24Open ↗
- ✓AuthorAlgernon, as published on Vintage Story ModDB
- ✓LicenseNot published by the sourceFree











