Opened 7 years ago

Last modified 6 years ago

#4816 closed enhancement

[PATCH] Create random map heightmap from atlas — at Initial Version

Reported by: elexis Owned by:
Priority: Should Have Milestone: Alpha 23
Component: Maps Keywords:
Cc: Patch:

Description

The following tool by _kali allows exporting the current heightmap and the terrain textures to a JSON array which can in turn be loaded by random map scripts:

https://github.com/kali0ad/AtlasRandomMapGen

It was used by _kali to edit alpha 21 random maps (red sea, mediterranean, ...).

It has a very interesting use case, as it allos the creation of a well defined terrain in atlas, only requiring the random map author to define where objects (resources, actors, ...) are placed.

Of that code on git, we don't really need the JS and JSON file. The readme of that code proposes to amend the "Save" button functionality to write the heightmap to said JS file.

But it would be more useful if there was an "Export to heightmap..." button below the "Import heightmap" button that just writes the huge JSON heightmap to a *.hmap file. (Eventually the image formats could be supported to if we want that)

The random map author can then just write one or two lines of code to use the heightmap file (like the other maps of that time do following r20157).

A related side quest would be saving the starting positions to that JSON object as well. Currently the locations are magic numbers and have to be modified with pure guesswork. The map writer could just save the locations of default_civil_centre. This way the random map author can place the civic centers as he sees fit without having to take a look at the actual numbers.

Change History (0)

Note: See TracTickets for help on using tickets.