Random map generator

Does one player (human+AI) mean one town (no neutral towns?)? Does one town mean one region?

Maybe it’s just me, but it seems there are too many Dragon Utopias, Pandora’s Boxes and Prisons and too few external dwellings, resources in comparison to human-made nice maps. Seer’s Hut would be more involved, I’m guessing.

Still, great work so far! I really really wish to donate you guys, sigh.

Torrasque, when was the last time you played Jebus? Or any random map? Clearly they are nowhere near human-made maps and were never supposed to be.

Wow, I take it back.

Did you just say “there are no external dwellings or resources in human-made maps and were never supposed to be.”?
Are you sure you understand my question?

As for dragon utopias & pandora’s boxes, yes, they usually exist in random maps generated by SoD too (I only play XL, maybe you won’t get them in smaller maps). Not as many as your RMG generates though.
When was the last time you played a random map?

Don’t know anything about Jebus.

I show the screenshots from the most popular template ever so players can compare it with original. if you somehow don’t know Jebus, better go and download it right now.

Thanks, they do look nice.
But my points stand:
[ul]
]The official RMG does generate Pandora’s Box, Dragon Utopia, Prison, whatever. I played hundreds of times. What you’re essentially saying that some web-community has a convention of not using Dragon Utopia etc. in their maps./:m]
] Every player should at least have ore and wood, and other resources should be on the map somewhere./:m]
] And yes, in official Heroes 3 maps as well as the official RMG maps, there are external dwellings./:m]
] # of players (AI + human) appears to be the same as # of zones./:m]
] Can’t see any neutral towns. Again, yes, they usually exist in official Heroes 3 maps as well as the official RMG maps. Don’t know about your community maps./:m][/ul]

We can’t read original templates yet, they all needed to be written for scratch. At the moment there are only 4 templates available for testing.

Still, for same template our RMG should give same results in terms of treasures, monsters strength and of course towns. We used this info for treasure value and rarity, so they should match original game.

And indeed there are external dwellings on all the screenshots as well as neutral towns, not sure what you mean here.

Contrary to Sav’s list, freelancer Guild does not seem to appear on random maps. In fact it turned out to be very spammy with these settings, so I set limit per zone to 1.

It may be useful

forum.heroesworld.ru/showpost.ph … ostcount=8
forum.heroesworld.ru/showpost.ph … ostcount=9

and over heroesworld.ru/forum/showthread.php?t=6313

Isn’t it so then there are too many WOG creatures on these last screens?
They seem to be placed too often compared with classic creatures

I meant we don’t have parser for original templates :laughing:

sorry for my english, you mean the template editor? like this forum.heroesworld.ru/attachment. … 1276110872

Okay, that worked!

Well, it’s not good if the game allows to run high resolution without graphics and outputs no meaningful error message.

BTW: I can’t generate random map with current build (crash), but I see you posted some on DF2 forum?

Of course. Fix already in git.

Because it worked for me?

Now after testing a bit more I do agree with you - RMG fails under some conditions (broken RMG option?). Looks to be crash on server in CMapGenerator::getMapDescription() method.

Besides - right now we have too many situation that result in “Could not create random map that fits current choices” message. For example we can’t generate XL 8 players map.

This means that we should either:
a) set up import of rmg.txt
b) create big enough set of our own templates. Perhaps even use tournament-oriented rmg.txt as base instead of using H3 templates.

UPD: and now when I actually started running VCMI under debugger I can’t catch that crash :frowning:

Ok, I got it.

For now we should first have working and playable maps for SOME templates as well as complete template format, only once this is done we could think about more templates.

And what’s still missing in RMG? I though that the only remaining part was nice object placement which does not affects playability. Generation of random quests does not seems to be present either but I won’t call it essential for playable maps. What else?

And if there are important pieces missing - maybe we should (temporary) increase max size for current templates? This will decrease amount of “can’t generate map” errors even though generated maps may have too much of empty space.

Uhm, game crashes as soon as any object is removed. Was even worse, but I added some workarounds against it.

There are templates that in total support all map sizes but S with no underground. Unfortunatelly they also need specific number of players to work, unlike original templates. For example, you can’t start Jebus with less than 4 players.

On number of players - perhaps we should handle it like this:

  1. assume any “free” human/AI slots to be AI-only (e.g. solo RMG game with 4 human or computer players -> 1 human zone + 3 AI zones)

  2. Same for template - we can accept template if there is enough human slots AND enough total players (AI’s will take human zones if no AI slots are free)

This will a bit increase number of available templates - for example we already have one with AI-only slots. Won’t surprise if this is how it works already though :slight_smile:

  1. Possibly (or user-selectable) - allow empty starting zones. This may create some balance issues - neighbors will have “vacuum” near their lands allowing them to expand easily.

And what do you think of current RMG dialog? It’s obviously far from perfect and AFAIK all other H3 projects made some change in it already (Era, WoG, HotA). Perhaps we should try to reorganize it as well?

And I guess I should move some posts from here to RMG thread…

Okay now everybody, there is fundamental flaw in RMG design:

Map is generated twice on Client and Server. Same random seed is used. However, all objects are created (and allocated) twice so that both maps are inherently out of sync, an in fact are two deep copies of same map.

You may remember, however, that eraly version of RMG created by BeeGee worked nicely. How this is possible and how to solve this problem?

Some (hopefully) simple idea for now: generate map once at server, then serialize it and send to Clients. This would also cut generation time by half.

May order of elements be different in some containers in client/server?

I`ve seen several unordered maps/sets somewhere in the codebase.Are any of them involved in RMG?

We do use unordered maps/sets but don’t forget that they are mostly ordered (by some hash). So as long as elements are added in the same order and on the same system (same hash generator) everything should be OK.

Unless pointers are used as keys in containers (both C++03 containers and new unordered ones) we should be OK.

And to answer you question - no, there are no references to unordered in RMG. And I have no idea what’s causing it either. Will look into it once I’ll fix my branch. Maybe even today.