Jump to content
Sign in to follow this  
ooBartek

Creating your own maps

Recommended Posts

As you can imagine we would like to build a map editor in the future. But at this point the game evolves so fast, that it does not make sense to create one.

That however doesn't mean you cannot create your own maps. While this is semi-official, the map format is text-based and the game picks up custom maps if you place them in the right folder.

As a starting point, download the default map:

Beaverville 128x128.csv

 

I suggest you rename it to something like "My map.csv", then place it in the Maps directory besides the savegames. The Maps directory probably does not exist, so you have to create it.

On Windows it should be something like this:

C:\Users\[user]\AppData\LocalLow\Mechanistry\Timberborn\Maps\My map.csv

Whereas on macOS it should go here:

~/Library/Application Support/Mechanistry/Timberborn/Maps/My map.csv

Once you place the map in the correct directory, open the game and click "New game". You should see "[Custom] My map" on the list.

Map structure

The next step is to open the map file in a text editor of your choice. The high-level structure of the file goes like this:

map width,map height

start x,start y

water start x,water start y

heightmap...

desertmap...

forestmap...

Map size

This is just two numbers separated by a comma. Both dimensions must be multiples of 32, the map can be rectangular.

Starting point

Again, this is just two coordinates.

Water starting point

Also just two coordinates, marking the beginning of a river. Remember! Water can flow only down-slope.

Height map

This is a grid of MapWidth + 1 x MapHeight + 1 numbers. Each cell represents a tile vertex.

There are some restrictions. Mainly, you cannot go above level 5, and the game only supports slopes that are 1 or 2 levels tall. Also, not all slope shapes are supported. If you create a height map that the game does not support, an error will be logged in Player.log.

Desert map

Similar to the Height map. Deserts are the inaccessible, unbuildable areas of the map. A 0 means no desert, a 1 means desert.

Forest map

This one is slightly different. It's size is equal MapWidth  x MapHeight (notice no +1). Each cell represents a tile. 

0 means no tree, 1 means Pine, 2 means Birch, 3 means Maple. When the game is first started, a 1 is translated into a Pine at a random growth stage.

Errors

The game crashes if you try to load a map which does not follow the above format or you do something that is not supported. If that happens, you should get a fairly sensible message in Player.log.

Important!

Note that the current map format is highly experimental. The game keeps evolving and we constantly change the format of a map file. Please treat it as such - you are very much encouraged to tinker with the maps but it's probably too early to create your own editor or map generator.

Share this post


Link to post
Share on other sites

This is just a quick update that we are currently in the process of revamping the terrain structure, so both the file format and the basic elements of a map will be different, which also means that it will not be backward compatible.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

This website uses cookies for the purposes of: collecting information about the website use, saving settings and personalizing the User interface. You may change your cookie settings at any time. Read more in our Privacy Policy and Cookies