Jump to content

Save map to image?


Recommended Posts

Hi,

I want to plan DST sessions beforehand with my buddies and the possibility to save the explored map to a high-res image file would be a huge benefit. Unfortunately, screenshots are not that great quality. I recently found this thread, however it does not seem to work for me. Does anyone have an idea if it is even possible?

Link to comment
Share on other sites

14 hours ago, zypthora said:

Hi,

I want to plan DST sessions beforehand with my buddies and the possibility to save the explored map to a high-res image file would be a huge benefit. Unfortunately, screenshots are not that great quality. I recently found this thread, however it does not seem to work for me. Does anyone have an idea if it is even possible?

Why not use cartographer's desk?

Link to comment
Share on other sites

Personally I use the IrfanView image viewer to save screenshots instead of Steam's native screenshot functionality, because you're right, they're not very high quality. It doesn't allow me to make map images bigger than what will fit on my screen at once in-game, I have to either zoom out far enough to show the whole map or take multiple screenshots and stitch them together, but if I take the screenshots with the printscreen key, alt-tab and paste them into IrfanView, then save as PNG, they stay about the same quality as they were when I was originally looking at them.

Link to comment
Share on other sites

16 hours ago, zypthora said:

I recently found this thread, however it does not seem to work for me. Does anyone have an idea if it is even possible?

I made a similar thing a while ago as a test, didn't even know someone else did it too.  Neat.

For the procedure, you'd generate a map and then load up that map's session in a lua state by running it and storing it into some global variable.

var.map.height + var.map.width are the dimensions, var.map.tiles is a base64 encoded tilemap, var.ents are your entities.

For each tile in the decoded blob they are 2 bytes each.  First byte is the tile ID, and the second is tile data for other information related to worldgen.

There's also the var.nav that's similar to the var.map.tiles formatting but holds information related to pathfinding.

 

For each tile ID you'll need to color it some color representation as there's no real definition of the color from ID anywhere in the base code, and create an image with it.

Here's an example when I was toying around with it to create an image that shows approximate entity densities in 1x1 in-game unit squares per pixel:

0000000002_entity_density.thumb.png.84a428f6c23c58cb08235ba226c3194f.png

Link to comment
Share on other sites

@CarlZalph thank you for your elaborate reply, however I have neither the skills nor the time to make such a mod myself. Are you planning on continuing your map export project? If so, please keep me updated! I am very much interested in the topic

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
×
  • Create New...