Random map generator

There is no zone limit for decorative objects and overall algorithm is simplest possible. I plan to implement obstacle sets as explained here.

I think it’s enough if we used HoTA interface and map sizes for now.

So it will be properties of objects, which object id/sub id decorations to use with current object?

You mean only XXL added like they did? OK. Maybe when map editor is ready, it can be allowed to generate any sizes.

BTW how large maps you are planning to generate? If larger than about 1000x1000 then it is nearly impossible by “technical” reasons.

1000x1000 will be cool:-)
The problem now, that map sizes are coded as strings like “xl” in VCMI. If we to add new sizes, it either will be coding new signings, or walk to use numbers of sizes.

I mean “standart sizes” at least, like 252x252, 512x512. 1024x1024 will be cool (if computer will be fast enough and will have enough memory).

By the way, is is will be possible in future to generate map with only 1 player?
And place victory condition to take some distant town?

Looks like I found issue:
github.com/vcmi/vcmi/blob/afaf7 … erator.cpp

359 							auto gate1 = new CGTeleport; 
360 							gate1->ID = Obj::SUBTERRANEAN_GATE; 
361 							gate1->subID = 0; 

That’s why templates don’t help - RMG places only subid = 0 object.

It is done on purpose for most of objects, since only objects with subID = 0 exist in basic game.

Most of objects I now adding new subobjects work well:-)
So far only boats and subterranean gates gave me no opportunity to add appearances.

Is there is a way to generate sea zones by RMG?
I found no answer in Wiki.

Possibility to create larger maps is definitely splendid idea, however as you guys said, creating such maps would be resource consuming. For example I managed yesterday to create some big (I mean really big) maps:
300x300 tiles (unfortunately I forgot to measure the time of generation, but it was somewhere about 10 minutes or less),
350x350 tiles - generation time for this map was 20 minutes,
400x400 tiles - here the time was little longer - 40 minutes, and finally
500x500 tiles - this map generating was really time consuming - 2 hours 10 minutes.

As I noticed about memory usage, it’s not really such big (few hundreds of MBytes).
BTW. I include the generated maps (or rather I should call it saves, because maps are not supported yet), so everyone who would like to see these maps can download them.
RMG logs [500x500 tiles].rar (110 KB)
Random map [500x500 tiles].rar (2.91 MB)
Random map [400x400 tiles].rar (1.96 MB)
Random map [350x350 tiles].rar (1.6 MB)
Random map [300x300 tiles].rar (1.32 MB)

So map for 1000x1000 tiles will take a day to generate :mrgreen:

This is what I mean “nearly impossible”

And a year to complete :stuck_out_tongue:

Did you modified sources (or changed size of map in EXE by hex-editor?
Can you share also modified EXE?
I will play and try to create RMG template for big sizes of maps :mrgreen:

Well, every time when I created random map I had to have precompiled binaries, because option to change random map size to any you want to generate in runtime is not implemented yet. I just had to change the two lines in lib\rmg\CMapGenOptions.cpp:

void CMapGenOptions::finalize(CRandomGenerator & rand)
{
   ...
   //setHeight(20);
   //setWidth(50);
}

Fortunately there already was a clue left, so I could use it. If you want to create such a big maps then I think it will be better if you would try to do it yourself, because you would work on already fixed sizes of RGM, as it is on the code showed above.

With latest changes to treasure placement I managed to get dwellings spawn more often with typical templates.

With recent changes related to wood and ore mines placement there now usually up to 8x (4x wood and 4x ore) of them in one area on large map. :slight_smile:

Like this?

Nothing has changed in Jebus template over last 12 years.

They just was way too close to each other and it’s looks weird. Though on smaller maps it’s was totally fine.

Let’s say fair I’m not someone who perfectly know all specifics so who knows, might be it’s have to be this way.

I think you make a great joy to the players, if you eliminate the spell:

Summon Boat, Scuttle Boat in guild and scrolls.

marine artifacts: Sea Captains Hat, Necklace of Okean Guidance, Boots of Levitation

And to prohibit the appearance of navigation skills

On the maps without water.