Latest Posts

Topic: New tools to import heightmap and terrain data

TinRacketeer
Avatar
Topic Opener
Joined: 2021-02-06, 04:31
Posts: 10
Ranking
Pry about Widelands
Posted at: 2021-02-06, 05:23

Hi guys,
I had some spare time on my hands recently due to the lockdowns we've had here and I came across this game and have really enjoyed playing it over the last few months.

Anyway, I've recently taken a liking to map making but always found brush based editors to be difficult to work with so I've made a couple of import scripts that take a heightmap and an indexed terrain image and turn it into data that can then be read into a save file. If anyone's interested I'm more than happy to post these scripts here for everyone to use.

The current import process is somewhat involved but if there's interest I'm more than happy to streamline it.

I also want to extend these scripts to include the ability to to set things like resource amounts, port locations and tree placement from image data as well. If anyone can help explain how those things are stored in the save file format it would be much appreciated.

Once I get past the five post limit I'll be able to put up some screenshots and files if people are interested.

Tin.


Top Quote
TinRacketeer
Avatar
Topic Opener
Joined: 2021-02-06, 04:31
Posts: 10
Ranking
Pry about Widelands
Posted at: 2021-02-06, 16:39

*

Edited: 2021-02-06, 16:47

Top Quote
TinRacketeer
Avatar
Topic Opener
Joined: 2021-02-06, 04:31
Posts: 10
Ranking
Pry about Widelands
Posted at: 2021-02-06, 16:39

*

Edited: 2021-02-06, 16:47

Top Quote
TinRacketeer
Avatar
Topic Opener
Joined: 2021-02-06, 04:31
Posts: 10
Ranking
Pry about Widelands
Posted at: 2021-02-06, 16:40

*

Edited: 2021-02-06, 16:46

Top Quote
TinRacketeer
Avatar
Topic Opener
Joined: 2021-02-06, 04:31
Posts: 10
Ranking
Pry about Widelands
Posted at: 2021-02-06, 16:40

* Sorry, needed 5 posts to post content.

Edited: 2021-02-06, 16:58

Top Quote
TinRacketeer
Avatar
Topic Opener
Joined: 2021-02-06, 04:31
Posts: 10
Ranking
Pry about Widelands
Posted at: 2021-02-06, 16:45

Here is the import script and an example for those that are interested.


Attachment:
Map_Import_Script.zip (546.4 KB)

Top Quote
TinRacketeer
Avatar
Topic Opener
Joined: 2021-02-06, 04:31
Posts: 10
Ranking
Pry about Widelands
Posted at: 2021-02-06, 16:55

Here's an image of the map I used in the example.

Imported Map

Edited: 2021-02-06, 16:55

Attachment:
map.png

Top Quote
WorldSavior
Avatar
Joined: 2016-10-15, 04:10
Posts: 2091
OS: Linux
Version: Recent tournament version
Ranking
One Elder of Players
Location: Germany
Posted at: 2021-02-06, 17:22

That image looks nice! Would it be possible to create a Middle Earth map with those tools? And can you upload the maps?


Wanted to save the world, then I got widetracked

Top Quote
TinRacketeer
Avatar
Topic Opener
Joined: 2021-02-06, 04:31
Posts: 10
Ranking
Pry about Widelands
Posted at: 2021-02-06, 17:33

WorldSavior wrote:

That image looks nice! Would it be possible to create a Middle Earth map with those tools? And can you upload the maps?

Sure, all you'd need is a good heightmap, an image editor that could composite some of the terrain output together and enough patience to place all the objects and resources.

As for uploading them, I'd prefer to have something finished first. At the moment this script still leaves a fair amount of work before the map is playable.


Top Quote
TinRacketeer
Avatar
Topic Opener
Joined: 2021-02-06, 04:31
Posts: 10
Ranking
Pry about Widelands
Posted at: 2021-02-06, 18:43

WorldSavior wrote:

That image looks nice! Would it be possible to create a Middle Earth map with those tools? And can you upload the maps?

This is what I've got after a few minutes of testing. I only filled in the main geographic features but I could easily make the terrain look a lot better if I spent a few hours in the image editor.

Edited: 2021-02-06, 18:43

Attachment:
Middle_Earth_Test.zip (87.2 KB)

Top Quote