SANDBOX — this is a test environment. No servers are actually deployed and no real payments are charged.
Source-checkedLibraries & compatibility

Algernon's Terrain Sampler Lib

by Algernon · for Vintage Story

Library that lets you quickly see what terrain looks like anywhere in the world

42KDownloads
1.21.6Latest game version
Vintage Story ModDBSource

About Algernon's Terrain Sampler Lib

From Vintage Story ModDB

Library 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) =&gt; (int)getHeightMethod.Invoke(instance, [blockX, blockZ]); </pre>

Then give the height sampler delegate (sampleHeight) to your code that uses terrain height samples.

&nbsp;

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&nbsp;/terrainsampler samplecolumn&nbsp;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

&nbsp;

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.

&nbsp;

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

&nbsp;

Mods using this sampler:

&nbsp;

Looking for help:

Compatability with Conquest Landform Overhaul's configurable landforms&nbsp;

Highlights

From source data

Game 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 catalog
Listed on Vintage Story ModDB as “Library”

Libraries & compatibility

Foundations and fixes other mods build on. Usually installed because something else needs it.

Runs on your server

From source side support

Vintage 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

Algernon's Terrain Sampler Lib, answered

Generated from the mod’s own source data.

Do my players need to install Algernon's Terrain Sampler Lib?

Vintage 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.

Is it free?

Yes. Algernon's Terrain Sampler Lib is free to download from Vintage Story ModDB.

How do I add it to my Nxeon server?

Use “Add to a server” on this page, or open NxLabs from your dashboard. We install it, restart your server and switch it on.

NxLabs

Run Algernon's Terrain Sampler Lib on a Vintage Story server.

Deploy in about a minute from $4.00 a month, then add Algernon's Terrain Sampler Lib in one click.