
Vintage Story Mod DB · Vintage Story mod
Algernon's Terrain Sampler Lib
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 /ter
Quick answer
Which Algernon's Terrain Sampler Lib release should I use?
Algernon's Terrain Sampler Lib 1.3.0 targets 1.22.0, 1.22.1, 1.22.2. It must be installed on the client. Installation on the dedicated server is optional. No extra mods listed for this file.
Where it goes
Is Algernon's Terrain Sampler Lib required on the client, server, or both?
It must be installed on the client. Installation on the dedicated server is optional.
This release supports both sides, but the source does not require it on the server.
What else does Algernon's Terrain Sampler Lib 1.3.0 need?
1.3.0. Change the file and its required mods may change too.
This file does not list any required mods. Do not add a library just because a different file uses it.
This file does not list any required or optional mods.
Before you install it
Add Algernon's Terrain Sampler Lib without breaking your instance.
Built for Algernon's Terrain Sampler Lib 1.3.0. Pick another file and the loader, install side or required mods may change.
- 01
Stick to this file
Use 1.3.0. It targets 1.22.0, 1.22.1, 1.22.2; another release may have different loader, side or dependency requirements.
- 02
Bring the mods it needs
This file does not list any required mods. Do not add a library just because a different file uses it.
- 03
Put it on the correct side
It must be installed on the client. Installation on the dedicated server is optional.
- 04
Pick the file you checked
Use the “Get this file” button beside 1.3.0. It opens that exact file at the source.
About this project
What does Algernon's Terrain Sampler Lib add?
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:
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]);
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
Project description from Vintage Story Mod DB.
Pick your setup
Algernon's Terrain Sampler Lib releases for each Vintage Story version.
Choose the version and loader you play, then open the matching release.
1.22.6
1 loader build1.22.5
1 loader build1.22.4
1 loader build1.22.3
1 loader build1.22.2
1 loader build1.22.1
1 loader build1.22.0-rc.8
1 loader build1.22.0
1 loader build1.21.6-rc.1
1 loader build1.21.6
1 loader build1.21.5
1 loader buildShowing the newest 12 of 22 game versions. Older files are in the list below.
Check the dependencies, then try the file in a copied instance before changing a world you care about.
Recent files
Algernon's Terrain Sampler Lib versions and loaders
1.3.0
algernonsterrainsampler_1.3.0.zip
23 May 2026
1.2.1
algernonsterrainsampler_1.2.1.zip
27 Apr 2026
1.2.0
algernonsterrainsampler_1.2.0.zip
15 Apr 2026
1.0.1
algernonsterrainsampler_1.0.1.zip
26 Mar 2026
Looking for an older file? The official Vintage Story Mod DB project page is in Resources.