Heroes 4 Advanced Options Map Editor

The old Heroes games developed by New World Computing. Please specify which game you are referring to in your post.
User avatar
Karmakeld
CH Staff
CH Staff
Posts: 1123
Joined: 12 Nov 2011

Re: Heroes 4 Map Generator / Utility

Unread postby Karmakeld » 10 Nov 2016, 19:59

well I tried the Tree of Knowledge quest hut (fair enough if that can't be viewed yet, if the code is different, but I also tried with the Igloo, just displaying a text. I'll give it another try, but it didn't seem to register the script in the Igloo quest hut.
Nope. I can't see neither triggered or completion scripts. I'll just send you the test 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
iLiVeInAbOx05
Equilibris Team
Equilibris Team
Posts: 715
Joined: 21 Jul 2014

Re: Heroes 4 Map Generator / Utility

Unread postby iLiVeInAbOx05 » 13 Nov 2016, 22:46

So what I just found is a little different than what you are describing. It looks like I made a change a little while ago with the way I was loading up the "objects with events" on the events tab. The change didn't include quest huts, since they don't have a group of events, just groups of scripts, and so they were missed in my update. This caused quest objects to no longer be displayed on the events tab.

When I try to view the quest huts (after fixing the issue) in the map that you sent me, I do indeed see the scripts that you put on them.

I'll update here and the news post when I have the updated H4MG in place.

User avatar
iLiVeInAbOx05
Equilibris Team
Equilibris Team
Posts: 715
Joined: 21 Jul 2014

Re: Heroes 4 Map Generator / Utility

Unread postby iLiVeInAbOx05 » 15 Nov 2016, 20:03

Well, in the meantime, here's a link to the latest version of the H4MG. It has the fix for quest huts not being displayed on the events tab.

User avatar
iLiVeInAbOx05
Equilibris Team
Equilibris Team
Posts: 715
Joined: 21 Jul 2014

Re: Heroes 4 Map Generator / Utility

Unread postby iLiVeInAbOx05 » 17 Nov 2016, 19:27

H4MG was updated again.

I fixed a bug in the last version which caused quest huts to not show up in the quest objects table under the events tab. There are also some debug options to help with creating new objects from old ones.

Go here for instructions on getting it downloaded and setup.

If you have already set everything up, here's the updated zip file.

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

Re: Reading Heroes4 (.h4c) map files

Unread postby Karmakeld » 07 Jul 2017, 17:21

iLiVeInAbOx05 wrote:Ah, yeah, that was the one I was looking at screenshots for and was excited about all the new objects. I think that's not a stable version though, correct? It's a beta that never got finished. I sent several emails to the Equilibris team and Dalai to offer my help with the project, but I haven't heard back yet. I would definitely love to see and use more landscape / adventure objects.
About the new objects they added in Equi 3.55/3.6, NimoStar extracted and added those to his Greatest Mod. I can extract the objects from the mod, and send them to you as single objects. Placing them in the Data folder will allow you to use them in game. Still it would be more useful to have them in a single bundled file, but not sure how that's done, without adding a Mod file.
I'm silent in seven languages - and I got all my familys fear.
Everytime you throw dirt, you loose a little ground

User avatar
iLiVeInAbOx05
Equilibris Team
Equilibris Team
Posts: 715
Joined: 21 Jul 2014

Re: Heroes 4 Advanced Options Map Editor

Unread postby iLiVeInAbOx05 » 25 Dec 2021, 17:33

I've been working on a new feature for the Advanced Editor: Convert HoMM 3 maps to HoMM 4 maps.

This feature is getting to the point where the only thing needed to do after the conversion is to add landscaping objects.

User avatar
Arctic_Slicer
Leprechaun
Leprechaun
Posts: 19
Joined: 13 Feb 2010
Location: Salt Lake City, Utah

Re: Heroes 4 Advanced Options Map Editor

Unread postby Arctic_Slicer » 15 Apr 2022, 04:56

So I just re-installed Heroes 4 for the first time in many years, and coming back to this forum in the first time in many years, you re-arranged stuff, this thread seems kind of old but most recent post was only a few months ago, so I hope it's okay that I'm replying to it since it's on the first page of this forum.

So I was reading what this map editor did and it said it uses scripts to improve the AI, and it links to a 12 page thread where there is a lot of discussion about possible changes, but is there a clear list on which changes were actually implemented with this? I remember using some scripts on my own maps, or modifying existing maps, to kind of give the AI some help, the main issues I remember the AI having were that it had difficulty fighting neutral stacks by just generally being inefficient and losing too many creatures in battles, this was much more obvious in higher difficulty settings, the other issue is that the AI needed to explore the map, not a problem on small but maps, but starts to become a lot more noticeable on medium maps, with the AI struggling really bad on large and XL maps.

I wasn't that great at scripting myself but to help compensate, things I remember doing were to give the AI free creatures in their cities every week to try and replace some of the ones they were losing in efficient combats. I also tried to give their heroes free experience and skills to help develop more quickly and effectively since the AI doesn't seem to use schools very often, if ever.

I've tried giving the AI all of the different skills Giving their heroes resurrection seemed to help quite a bit in reducing their losses, few skills seemed to help the AI more than the resurrection skill as it significantly helped reduce the AI losses from inefficient fighting. Scouting, especially pathfinding, seemed to help them explore more efficiently and move faster. Summoning and Necromancy could be really good on Nature and Death heroes respectively but pretty meh or sometimes counter productive on other heroes. On the other hand, the tactics skill sets for the AI didn't seem as good as I would have expected. AI didn't seem to get Luck and Morale bonuses from the leadership skill unless fighting a player, Offense and defense might help some, but mostly only against the player, for fighting AI, resurrection seemed to do a lot more, those skills are great for one the AI actually fights the player, but lackluster up to that point. Nobility can help the AI build larger armies, so long as they have the resources to actually purchase those creatures, and seemed to work best when giving the AI extra free gold every week to actually recruit those creatures as the AI can often be really slow at flagging mines.

Some of the things mentioned in the linked thread do seem interesting and I was definitely interested in what actually got implemented about and how effective it was at solving the problems. Many of the scripts mentioned are pretty complex and definitely a lot more involved than something I would have come up with, I was very much trying to keep it simple as it's easy to both program and less likely to fail that way, but again I'm not the best at scripting myself.
People are products of their own ingenuity; they are who they choose to be.

User avatar
iLiVeInAbOx05
Equilibris Team
Equilibris Team
Posts: 715
Joined: 21 Jul 2014

Re: Heroes 4 Advanced Options Map Editor

Unread postby iLiVeInAbOx05 » 15 Apr 2022, 19:53

Arctic_Slicer wrote: 15 Apr 2022, 04:56 So I just re-installed Heroes 4 for the first time in many years, and coming back to this forum in the first time in many years, you re-arranged stuff, this thread seems kind of old but most recent post was only a few months ago, so I hope it's okay that I'm replying to it since it's on the first page of this forum.

Hello there! I'm definitely still around and do work on this tool when I have the time, so it's perfectly fine to post in here.

The AI scripting stuff has definitely been implemented (at least most of it). Here's what you have available to choose from:

- Show the map to the AI
- Set a starting level for AI heroes (those physically present on the map, not hired)
- Set AI hero starting level (same as above)
- Increase AI hero experience (there is a placed event placed around town entrances which also affects hired AI heroes). Non-hired heroes get a timed event that increases their experience, while hired will have to move on the placed events (they do so frequently). The placed events also give the AI heroes a small morale boost.
- Increase AI hero movement
- Increase AI starting Gold
- Increase AI starting resources
- Recurring Gold for AI
- Recurring Resources for AI
- Reduce neutral armies when encountered by AI*
- There might be a couple more, but those are the ones I remember off the top of my head and the ones I always use

I've been using these scripts for a little while now in the H4 Chronicles campaigns. If it's not 1 town vs 1 town, giving the AI all of these bonuses will absolutely result in you getting destroyed as I've been finding out recently. It wasn't as noticeable in Warlords of the Wasteland since it's mostly 1 town vs 1 town, or free for all type maps, but in The World Tree the AI has more than 1 town vs your 1 town in many maps, and they've been stomping me into the ground (and I'm not a bad player).

So, as you already seem to have found out yourself, the option for reducing neutrals encountered by AI armies is a great place to start, and I need to actually try testing the balance out doing this and not also giving the AI an abundance of resources. One thing I noticed is that the AI LOVES to flag dwellings, and when they have unlimited resources, they hire EVERYTHING. So they can get very powerful very fast.

If you need help with anything or have other ideas to help the AI, definitely let me know. I was also going to work on scripting increasing dwelling populations for AI owned towns (using exp values), but after getting trounced by the AI without adding any additional creatures, I think that might not be necessary.

In Masters of the Elements we were giving the AI additional creatures (to simulate Conflux towns), and I had to pull the amount of creatures way back from what I started out giving the AI because they quickly became unbeatable.

User avatar
Arctic_Slicer
Leprechaun
Leprechaun
Posts: 19
Joined: 13 Feb 2010
Location: Salt Lake City, Utah

Re: Heroes 4 Advanced Options Map Editor

Unread postby Arctic_Slicer » 17 Apr 2022, 05:33

iLiVeInAbOx05 wrote: 15 Apr 2022, 19:53
Hello there! I'm definitely still around and do work on this tool when I have the time, so it's perfectly fine to post in here.

The AI scripting stuff has definitely been implemented (at least most of it). Here's what you have available to choose from:

- Show the map to the AI
- Set a starting level for AI heroes (those physically present on the map, not hired)
- Set AI hero starting level (same as above)
- Increase AI hero experience (there is a placed event placed around town entrances which also affects hired AI heroes). Non-hired heroes get a timed event that increases their experience, while hired will have to move on the placed events (they do so frequently). The placed events also give the AI heroes a small morale boost.
- Increase AI hero movement
- Increase AI starting Gold
- Increase AI starting resources
- Recurring Gold for AI
- Recurring Resources for AI
- Reduce neutral armies when encountered by AI*
- There might be a couple more, but those are the ones I remember off the top of my head and the ones I always use
Cool, that's a good list, should be sufficient to take care of most of the issues. Revealing the whole map is a good idea, something that is honestly kind of difficult to script by myself, so having a tool that does should be a great help. Definitely want to try some of those out, will download the tool now.
iLiVeInAbOx05 wrote: 15 Apr 2022, 19:53
So, as you already seem to have found out yourself, the option for reducing neutrals encountered by AI armies is a great place to start, and I need to actually try testing the balance out doing this and not also giving the AI an abundance of resources. One thing I noticed is that the AI LOVES to flag dwellings, and when they have unlimited resources, they hire EVERYTHING. So they can get very powerful very fast.

If you need help with anything or have other ideas to help the AI, definitely let me know. I was also going to work on scripting increasing dwelling populations for AI owned towns (using exp values), but after getting trounced by the AI without adding any additional creatures, I think that might not be necessary.
The AI definitely liked neutral dwellings, I liked to include a lot of those on maps I created because it seemed to result in a better AI, especially when they were dwellings that matched their city. Yeah, it's very possible to overpower the AI with extra creatures. With the full map being revealed to the AI, I imagine it makes the AI a lot more efficient and aggressive as well since they shouldn't be spending much/any time exploring, allowing them to be more efficient in other areas.

I don't really have too many other ideas for improving AI, at least not with a tool like that. Unless you can figure out a way to get the AI to move their large armies with heroes, or better yet, use multiple heroes in their armies, but outside of putting extra starting heroes on the map, I don't see much more that can really be done in that regard.
People are products of their own ingenuity; they are who they choose to be.

User avatar
iLiVeInAbOx05
Equilibris Team
Equilibris Team
Posts: 715
Joined: 21 Jul 2014

Re: Heroes 4 Advanced Options Map Editor

Unread postby iLiVeInAbOx05 » 17 Apr 2022, 19:59

Arctic_Slicer wrote: 17 Apr 2022, 05:33 Cool, that's a good list, should be sufficient to take care of most of the issues. Revealing the whole map is a good idea, something that is honestly kind of difficult to script by myself, so having a tool that does should be a great help. Definitely want to try some of those out, will download the tool now.

Yeah it's definitely time consuming to script this yourself, even if you already have the scripts themselves done in another map. We used neutral heroes with the scripting on them, max scouting, etc. and change them to each of the AI colors at the start of the game and then kill them off. It definitely takes away the need to scout for the AI, and they also don't have fog of war so they see if you have undefended towns and will send heroes to try to take them.

Arctic_Slicer wrote: 17 Apr 2022, 05:33 I don't really have too many other ideas for improving AI, at least not with a tool like that. Unless you can figure out a way to get the AI to move their large armies with heroes, or better yet, use multiple heroes in their armies, but outside of putting extra starting heroes on the map, I don't see much more that can really be done in that regard.

So with the testing I've been doing the AI has always been using more than the single hero that they started the maps with, and I have also encountered AI armies with 2 heroes in them. I haven't come across one with 3 heroes yet, but definitely 2.

User avatar
Arctic_Slicer
Leprechaun
Leprechaun
Posts: 19
Joined: 13 Feb 2010
Location: Salt Lake City, Utah

Re: Heroes 4 Advanced Options Map Editor

Unread postby Arctic_Slicer » 18 Apr 2022, 05:53

iLiVeInAbOx05 wrote: 17 Apr 2022, 19:59

So with the testing I've been doing the AI has always been using more than the single hero that they started the maps with, and I have also encountered AI armies with 2 heroes in them. I haven't come across one with 3 heroes yet, but definitely 2.
That's good. I just remember the silliness of the AI constantly moving large armies of creatures that had no heroes, which were easy pickings for my own armies, and that's been fixed, that's a great accomplishment.
People are products of their own ingenuity; they are who they choose to be.

User avatar
iLiVeInAbOx05
Equilibris Team
Equilibris Team
Posts: 715
Joined: 21 Jul 2014

Re: Heroes 4 Advanced Options Map Editor

Unread postby iLiVeInAbOx05 » 22 Jan 2023, 03:31

Update

Since I heard there was some interest in the h3->h4 conversion in some remote corners of the heroes fandom, I've gone ahead and updated the advanced editor.

1) H3 map -> H4 map conversion. Just like it sounds: convert HoMM3 maps to HoMM4. Almost all interactive buildings, towns, creatures, etc. are being transferred. Trees are also being transferred, but as of right now that is all that is being transferred for landscape objects.

The driving force for this particular feature is porting Heroes Chronicles into H4 (and after that, the other H3 campaigns!) It could also be useful to convert random maps generated in H3, but there will be quite a bit that would need to be implemented to preserve things like passability.

2) Repair Map. If you've ever done any modding of adventure objects, you will probably have run into accidentally making a map unreadable by the editor / game. Hopefully you made a back up of the map first, but if not, you generally can't get it fixed.

Now when this happens, simply use Tools->Repair Map, and the advanced editor will go through all of the map objects to search for those not in the usual h4r data files.

Once they have been found, you have a few options:
- Remove from the map
- Do nothing (in case you want to do something else with it)
- Replace the object. You will be given a list of choices from the usual h4r data files that match the type of the object being replaced.
- Replace the object with a sign. This will replace the selected object with a sign on the map containing the name of the object.

The h4r files to search through is also configurable from the file config.bundle in the config directory.

This feature can also be used if you just want to make an Equilibris map, or map using modded objects, compatible with WoW.


Return to “Heroes I-IV”

Who is online

Users browsing this forum: No registered users and 15 guests