Mods / ChunkMap Pregenerator

Tags: #Utility #Worldgen
Authors: Chilimunyaka, Chilimunyaka
Side: Both
Created: Sep 25th at 11:04 AM
Last modified: Sep 25th at 11:23 AM
Downloads: 520
Follow Unfollow 42

Latest release (for Vintage Story 1.21.1, potentially outdated):
ChunkMapPregenerator.zip  1-click install


Description

A small tool for Vintage Story 1.21 that quickly generates a colored PNG "land/sea" map for a selected area. One image pixel represents a group of chunks (configurable scale), making it easy to get an overview of large areas quickly.

Note: The generation in the screenshots was tested with the Plainsandvalleys-v1.0.12 mod.

What it does

⦁ Produces a PNG where 1 pixel = N×N chunks (scale parameter).
⦁ For speed and safety, surface data is obtained before full chunk generation, so the heavy worldgen phases are not triggered.
⦁ At scale = N the mod samples only every Nth grid position, greatly speeding up large-area processing.
⦁ Launched from chat/console and runs as a background task; progress is written to the log and (for the caller) to chat.

Key features

⦁ Fast generation of a land/sea overview PNG.
⦁ Configurable radius and scale.
⦁ Works both in single‑player and on servers.
⦁ Simple progress notifications to log/chat.

Limitations

⦁ Compatibility: Vintage Story 1.21.
⦁ Supported OS: Windows (build uses System.Drawing and was not tested on Linux/macOS).
⦁ Avoid extremely large radii with small scale — such tasks may take a long time and use a lot of memory.

Command (syntax)

⦁ /chunkmap here <radius> [scale] <outPath>
⦁ Generates a map around your current position.
⦁ /chunkmap <chunkX> <chunkZ> <radius> [scale] <outPath>
⦁ Generates a map centered at the specified chunk coordinates.

Important — chunk coordinates

⦁ chunkX and chunkZ are chunk coordinates, not world (absolute) block coordinates.
⦁ To get chunk coordinates: obtain your absolute position (in blocks) and divide X and Z by 32 (integer division).

Examples

⦁ /chunkmap here 100 C:/users/map.png
Radius 100 chunks (result ≈ 201×201 px at scale = 1), file saved as C:/users/map.png.
⦁ /chunkmap 16000 16000 500 4 C:/users/world_ocean_4x.png
Radius 500, scale = 4 — one pixel = 4×4 chunks; every 4th chunk is sampled; file C:/users/world_ocean_4x.png.

Mod Version Mod IdentifierFor Game version Downloads Released Changelog Download 1-click mod install*
1.0.0 chunkmappregenerator 520 Sep 25th at 11:23 AM Empty ChunkMapPregenerator.zip 1-click install

21 Comments (oldest first | newest first)

💬 cyberlogia, Nov 25th at 11:42 PM

Khaln I just tested it with Terra Prety 7.0.8 and it worked great!

💬 Khaln, Nov 6th at 7:21 PM

Is this compatabile with Terra Prety: Coastlines & Continents ? 

💬 Blizzzardofoz, Oct 31st at 3:23 AM

I just want to comment and say this mod is EXACTLY what I've been looking for! A way to auto-generate a large-scale representation of my map!! I love the resolution setting too, as I am wanting to see the geography as a whole. How big are the landmasses? How much water separates them? That's it. I've spent days flying around maps testing different world gen settings and was considering making a mod like this myself. Thank you!

💬 CaptainKlutz, Oct 30th at 3:02 PM

CrimsonSteam got the same error. Try saving in C:\Users\Public\Downloads\target.png instead, seems to work for me.

💬 eerino, Oct 14th at 12:46 PM

MidoOeuf, I look forward to th cross-platform compatibility! I'm on Mac (unfortunately cheapest pc I could get) 

💬 Tahvohck, Oct 2nd at 6:17 PM

For some reason, running this from the server fails. If I trigger it from a client it works just fine however.

💬 CrimsonSteam, Oct 2nd at 1:42 AM

Hey, I'm attempting to generate a map but it keeps giving me the error, "Failed saving PNG: A generic error occured in GDI+"
Not really sure where to go from here but the command i'm using is just /chunkmap here 50 2 C:\Users\crims\Pictures\Screenshots

💬 Chilimunyaka , Sep 28th at 7:10 PM

Samogitia,

Generating at large 1:1 scales is expensive in terms of CPU usage. The idea behind this mod is to generate maps at larger scales, but with less detail—for example, 1:10 or 1:5.
Perhaps we'll find a faster way to do this later, but I can't promise anything.

💬 Chilimunyaka , Sep 28th at 7:03 PM

mtgeekman,

Sorry, but no. I might implement it in future versions if I have free time. :)

💬 Chilimunyaka , Sep 28th at 6:59 PM

MidoOeuf, I plan to fix this. I'm working on cross-platform compatibility.

 

💬 MidoOeuf, Sep 28th at 1:11 PM

Look like System.Drawing dont work anymore on Non-Windows OS since .NET 7. Sadly we cant us the mod on Linux and surely mac too. 

💬 Samogitia, Sep 27th at 5:45 AM

Is generation slow for performance reasons, or my machine just that bad. Even 200 at scale 1 takes hours, way longer than any play session. Is it possible to have some kind of force option, to make it run as fast as possible even if it makes game unplayable?

💬 mtgeekman, Sep 26th at 8:22 PM

Any chance we can get decimal scales? Like being able to a .25 scale to get a 4px per chunk map? 

💬 Chilimunyaka , Sep 26th at 4:20 PM

Ensorcelled, I don't think there are any technical limitations to writing code that would split the task of generating a large map into smaller subtasks. It would be a more complex mod. When I have time, I'll try to implement the project.

💬 Ensorcelled, Sep 26th at 3:00 PM

Interesting Sthil I used a teleport every 1500 method for a 25k map and it only took 12 hours and Save was 26gb in size, map was 7gb.
I was just hoping for something faster, OR if not faster, something approaching reasonable. LOL

 

Thankfully a 51k map is only 4x longer and should be 106gb by my calculations.

The problem with /wgen pregen 800 is the memory cap. The queue size is maxed at 65536, making it larger in the magic numbers does nothing.

So eventually it errors out and runs out of ram, even with 128gb even with max threads assigned in magicnumbers. (seems to be 14 no matter how many assigned)

thank you both for your time though, it was an idea worht asking about.

💬 Sthil, Sep 26th at 9:50 AM (modified Sep 26th at 9:59 AM)

I tested with /wgen pregen 625 method (from -20k to +20k both directions (40k x2) -1.56 million chunks) world with ryzen 7 5800x and 64Gb DDr4 ram. It took 44 hours to pregen that area roughly (10 chunks per second).File size is around 50GB. A faster way would be via a headless server but its still slow (needs to be tested). For /wgen pregen 8000 (512k x 512k world, 8.2 TB of data) - about 296 days of non stop generating (9.7 months) with 10 chunks per second.

💬 Sthil, Sep 26th at 9:43 AM (modified Sep 26th at 9:43 AM)

Hi. Is it possible to use this mod for game version 1.20.12?

💬 Chilimunyaka , Sep 26th at 7:02 AM

Ensorcelled, You can pregenerate a map like this with the command /wgen pregen 8000. However, be ready: it may take a very long time to run and will need a lot of memory (RAM)

💬 Ensorcelled, Sep 25th at 10:09 PM

Yes, nice mod. I also would love if someone came up with a map walker function for actual chunk generation, so you could set a size and let it run to wgen the map.
I have a 51k x 51k x 256 map I'd love to have fully wgen'd before I go live with my server. thats SO much less ticks, because it's already done. Free up the server for other things, like more players.

But if it's not a branch you'd like to explore, I understand. I will still be using this mod to find the seed I want. THANK YOU for that at the very least.

 

💬 Chilimunyaka , Sep 25th at 3:56 PM

Ryilo, The mod uses IWorldManagerAPI.PeekChunkColumn and stops generation before the Terrain stage, so chunks are not generated and nothing is written to the game save or the player's map. Only a PNG file is produced.
I think it's possible to add this functionality. I'll try to implement this option in upcoming versions.

💬 Ryilo, Sep 25th at 3:38 PM

Chilimunyaka : I see how it can be useful to determine if a seed generates a decent size landform/ocean, and where they are. Does it generate chunks that are written in the save file/map file?

Can it be modified to be in color and show at leaste the surface rock type?

 (edit comment delete)
Основной веб-сайт | Почтовый сервер | FTP сервер | Административная панель | API интерфейс | Content Delivery Network | Статические файлы | Ресурсы сайта | Изображения | Файловое хранилище | Блог | Интернет-магазин | Техническая поддержка | Справочная система | Документация | Форум | Новости | Загрузки | Демонстрация | Тестовая среда | Приложение | Медиа контент | Разработка | Промежуточная среда | Бета версия | Безопасная зона | Вход в систему | Панель управления | Портал | Система управления контентом