Random Map Generator for H4

The old Heroes games developed by New World Computing. Please specify which game you are referring to in your post.

Moderator: Moderators

User avatar
Duzeom_
Conscript
Conscript
Posts: 235
Joined: 07 Mar 2011

Random Map Generator for H4

Postby Duzeom_ » Feb 14 2015, 8:18

I have recently thought "would it was wonderful if there was a map generator for H4?", but I recalled that H4util has such option. Did anyone use it? I found that it creates really "random" maps, so they are rather not playable.

I have an idea how to improve it. I have programming skills and I think I am able to create such a program from scratch. I sent an e-mail to creators of H4util but with no response.

To programmaticaly create a map I must know how to programmaticaly put objects on the map. This narrows down to two questions:
- What is h4 map inside coding?
- How objects are represented in H4 map - probably by id, but how do I know which object has which id?

Anyone help?
Last edited by Anonymous on Feb 24 2015, 12:42, edited 1 time in total.

User avatar
Duzeom_
Conscript
Conscript
Posts: 235
Joined: 07 Mar 2011

Postby Duzeom_ » Feb 19 2015, 22:45

Ok. Not going deep with the details, there is a some possibility that new RMG can be created. But before I *must* know if it is needed? I think making such programme is a challange and big joy - but still it's hard task and will take lot of time to do.

So there is no one really to think it is awesome to have random map generator for H4? Speak up these H4 lovers!

User avatar
Karmakeld
CH Staff
CH Staff
Posts: 1121
Joined: 12 Nov 2011

Postby Karmakeld » May 2 2015, 12:04

I'd rather you'd spent tour energy on a fellow map Makers campaign, than s RMG. Don't think I'd Be Using it, simply cause I'd most likely had to redo to much for a desired map.
I'm silent in seven languages - and I got all my familys fear.
Everytime you throw dirt, you loose a little ground

User avatar
jeff
Moderator
Moderator
Posts: 3726
Joined: 06 Jan 2006

Postby jeff » May 2 2015, 13:43

I have used the h4util rmg, but only it shorten creating a map for one of my campaigns. I would have it generate 10-12 maps; I'd pick the one closest to what I wanted then I would edit it. In the long run it didn't save a lot of time, but it did reduce the amount of landscaping required, which I never enjoyed doing.
Mala Ipsa Nova :bugsquash:

User avatar
Namerutan
Equilibris Team
Equilibris Team
Posts: 43
Joined: 23 Jan 2006
Location: Sevilla, Spain
Contact:

Postby Namerutan » May 2 2015, 13:47

I'd rather you'd spent tour energy on a fellow map Makers campaign, than s RMG. Don't think I'd Be Using it, simply cause I'd most likely had to redo to much for a desired map.
Can you answer me what do you expect from a random map generator in order to get a playable map without redoing it?

User avatar
Karmakeld
CH Staff
CH Staff
Posts: 1121
Joined: 12 Nov 2011

Postby Karmakeld » May 2 2015, 16:02

Spot on :-D My point was that, like Jeff not feeling he'd saved at lot of time, I'd still have to redo the parts that doesn't fit my Ideas, thus I might as well have made it from scratch to begin with.
The question was not what I would expect but would I use it.
For my sake, being in the process of campaign making, I don't see the need for a RMG, simply because of the randomness. I aim for a connection between landscape, decorations and the storyline. And I don't see how a RMG will make that work easier.
If the map design isn't important in relation to a story a RMG is fine, but If your story takes place near an ocean with a part of a mainland and many islands, I don't see how the RMG Can be usefull for your work.
I'm silent in seven languages - and I got all my familys fear.
Everytime you throw dirt, you loose a little ground

User avatar
Taro
Scout
Scout
Posts: 163
Joined: 11 Feb 2011
Location: Poland

Postby Taro » May 2 2015, 20:06

Random map generator would be useful for multiplayer, but not for other reason. Online players should tell their thoughts.

User avatar
GreatEmerald
CH Staff
CH Staff
Posts: 3330
Joined: 24 Jul 2009
Location: Netherlands

Postby GreatEmerald » May 2 2015, 21:12

I think you'll get different answers from map makers and (offline/LAN) players themselves. I'm the latter, and having a random map option would be amazing, because that's pretty much the only thing I play in HoMM3 and I sorely miss it in HoMM4. Playing custom maps isn't as nice because many of them can be scripted, have gimmicks etc. whereas random maps are straightforward. The randomisation might result in some unfortunate situations at times, yes, but they are entertaining to see anyway.

User avatar
Namerutan
Equilibris Team
Equilibris Team
Posts: 43
Joined: 23 Jan 2006
Location: Sevilla, Spain
Contact:

Postby Namerutan » May 3 2015, 2:56

Thanks to all you that gave me different answers.

What I deducted is if Duzeom (or anybody) makes a Random Map Generator, it should be considered with different approachs depending on the main purpose:
- Multiplayer game: straightforward map, well balanced; define amount of players and gameplay time (map richness, starting goodies, medium size maps).
- Solo game: challenging map, not need to be balanced; define map size and difficulty, add some quests (some story would be amazing, but hard to implement).
- Base for manually mapmaking: nice landscapes with well defined map conditions; map size, distribution of terrains (water/different lands), decorative options.

I need to think about all this, but I guess the less wanted approach would be the last (mapmaking base).

User avatar
GreatEmerald
CH Staff
CH Staff
Posts: 3330
Joined: 24 Jul 2009
Location: Netherlands

Postby GreatEmerald » May 3 2015, 8:48

Yea, that sounds about right, and in the right order of priority.

Hmm, in HoMM3 I tend to play random maps with strong guards and large maps, because that makes for interesting opportunities of exploring lands that don't belong to anyone, so it becomes something of a race to colonise them, and in the end you get really spectacular fights with lots of strong creatures.

Thinking about it, in HoMM4 this would be even more the case. Hero level ups are a lot more fun in HoMM4, and developing their skill branches results in focused, unique strategies for every hero. You can hardly ever make a good Demoniac or Stealth hero in a medium scale map, after all.

User avatar
Karmakeld
CH Staff
CH Staff
Posts: 1121
Joined: 12 Nov 2011

Postby Karmakeld » May 3 2015, 9:17

I don't agree that the last one is the least wanted, but I do believe it's the one with the requirements that are hardest to fulfill. It would ease my work if I had the option to decide that the top right corner should be swampy, left corner lush grass, a lake in the middle, and xx in the bottom.
If I wanted to do a multiplayer map, would I be able to set that I want e.g 10 scattered power ups, but none of them should be xp boosters?
The more options/settings you could define the better.
If you could create bars to choose the density of certain terrains, amount of resource piles, neutrals, numbers of towns etc. I think it might be useful for all 3 groups.
Now I haven't played around with the H3 editor for the past 15 years, so I have no memory of how the rmg worked in H3 (great emerald, please fill me in).
Does it places all things, creatures, buildings etc..? How much can you predefine? And what about connections between terrain and decorations?
I tend to use brushes for larger areas of decoration. Ofcourse there also some corrections to do, but that allows me to control the type of decorations for each area.
Duzeom, regarding codes get the extractor and search these forums. I found some modding treads some time ago, which I recall addressed the issue of each objects code.
I'm silent in seven languages - and I got all my familys fear.
Everytime you throw dirt, you loose a little ground

User avatar
GreatEmerald
CH Staff
CH Staff
Posts: 3330
Joined: 24 Jul 2009
Location: Netherlands

Postby GreatEmerald » May 3 2015, 10:11

The more options/settings you could define the better.
If you could create bars to choose the density of certain terrains, amount of resource piles, neutrals, numbers of towns etc. I think it might be useful for all 3 groups.
In a sense. For the first two groups, however, you'd also have to include a button to randomise the options themselves. (Which isn't very hard to do :) )
Now I haven't played around with the H3 editor for the past 15 years, so I have no memory of how the rmg worked in H3 (great emerald, please fill me in).
Does it places all things, creatures, buildings etc..? How much can you predefine? And what about connections between terrain and decorations?
The RMG there is actually quite complex and surprisingly modable. What it does is it uses templates (spreadsheets) to define zones and their connections. A zone can be a starting place for a player, a place with a neutral town, or a "treasure" zone (think Dragon Utopias and artifacts). I think you can define the richness (mine/resource amounts) of each zone. Then the templates define which zone is connected to which. Also, each template can define what sizes it allows. From within the game you can choose the map size, players, guard strength and water type (no water, some water or islands). The game then chooses a random template that fits the parameters, picks random terrain for each zone in the template, populates zones with resources and other points of interest and spawns guards next to them, and makes sure that each zone is connected as defined by the template (spawning portals when necessary, otherwise having direct land connections).

The terrain defines what type of decorations spawn, of course. Water terrain can only hold water objects and snow terrain uses the snow-type mines and magic schools.

User avatar
Taro
Scout
Scout
Posts: 163
Joined: 11 Feb 2011
Location: Poland

Postby Taro » May 4 2015, 9:43

I was thinking about making rmg with brush from map editor. This brush would paint zones but it's pretty hard to make it work properly.

User avatar
Karmakeld
CH Staff
CH Staff
Posts: 1121
Joined: 12 Nov 2011

Postby Karmakeld » May 4 2015, 16:38

Well the H3 rmg does sound quite complex, and it does sound like you actually get a playable map. My concerns would be if treasures and resources would be guarded and if it could check for passibility.
With features as described above I think it could be usefull, but still it's a question of How many ppl. will potentially use it and how many new maps it Will generate..
I'm silent in seven languages - and I got all my familys fear.
Everytime you throw dirt, you loose a little ground

User avatar
GreatEmerald
CH Staff
CH Staff
Posts: 3330
Joined: 24 Jul 2009
Location: Netherlands

Postby GreatEmerald » May 4 2015, 17:58

Well the H3 rmg does sound quite complex, and it does sound like you actually get a playable map. My concerns would be if treasures and resources would be guarded and if it could check for passibility.
Yea, the HoMM3 one does make sure to generate passable things. I'm not sure how the internals work, but I'd imagine it's something like: generate a zone landmass, populate it with mines and other buildings and random obstacles, then delete all obstacles in between the zone edges so heroes could pass between (the RMG also puts a road between those, if you can reach a town by going from one zone to another), then delete the least amount of obstacles to make every mine etc. accessible from the road, and then put guards adjacent to the building/treasure cache.

User avatar
jeff
Moderator
Moderator
Posts: 3726
Joined: 06 Jan 2006

Postby jeff » May 4 2015, 20:47

I think the biggest challenge would be the scripts for creating and developing of the AI heroes which was not as big an issue with H3, but in H-IV the heroes are crucial.
Mala Ipsa Nova :bugsquash:

User avatar
Karmakeld
CH Staff
CH Staff
Posts: 1121
Joined: 12 Nov 2011

Postby Karmakeld » May 4 2015, 20:57

Well I have a few ideas, I've been using in my campaign.
Att/def. bonuses adjusted to difficulty. Also fake att/def boost seems to increase they're aggressiveness similar to the AI attack tool using a fake 1000 BD's.
Also I shouldn't be hard to make a script that could give them add. xp boosts either over time or upon victory, to ensure a steady increase in levels.
I guess the hard part would to include the script on any AI heroes that is placed on the map, but I guess that was partly your point.
I'm silent in seven languages - and I got all my familys fear.
Everytime you throw dirt, you loose a little ground

User avatar
Duzeom_
Conscript
Conscript
Posts: 235
Joined: 07 Mar 2011

Postby Duzeom_ » May 11 2015, 11:23

Of course when I first written about RMG I had in mind single and multiplayer game. Using RMG to sligtly change maps and add them to self-made campaign is just lazyness (sorry Karmakeld :P). I have H3 RMG in mind especially.

User avatar
Karmakeld
CH Staff
CH Staff
Posts: 1121
Joined: 12 Nov 2011

Postby Karmakeld » May 11 2015, 11:29

Yeah well, when facing the fact the campaign making is a year (many years) long process, I can't deny that fact that I tried to take some shortcuts. :tired:
But only for the first half, the later one will be from scratch. But still I don't see a problem in using a RMG for campaign making.
I'm silent in seven languages - and I got all my familys fear.
Everytime you throw dirt, you loose a little ground

User avatar
jeff
Moderator
Moderator
Posts: 3726
Joined: 06 Jan 2006

Postby jeff » May 11 2015, 20:15

Yeah well, when facing the fact the campaign making is a year (many years) long process, I can't deny that fact that I tried to take some shortcuts. :tired:
But only for the first half, the later one will be from scratch. But still I don't see a problem in using a RMG for campaign making.
I agree that good campaigns can take a long time and a rmg that could do nice landscaping given certain parameters would help shorten the process. H4util attempts this but it doesn't give consistent results when dividing between snow, desert, etc.
Mala Ipsa Nova :bugsquash:


Return to “Heroes I-IV”

Who is online

Users browsing this forum: No registered users and 1 guest