Most players use a pirated, rather than a licensed, version of the game...
Therefore, when patching the game, installing expansions, templates, files, and other stuff, it may malfunction due to the pirated version. The solution: when creating a random map, on a specific template, you should leave the settings window open, instead of the hero and castle selection window...
It sounds funny, but practice shows that keeping the settings window open before clicking the "start game" button helps to ensure the map is created correctly.
You just need to go back to the settings tab after choosing the factions, check the map size, whether there is an underground level, and what the level is, then go back to the faction selection tab and start.