Heroes 4 Advanced Options Map Editor
Re: Heroes 4 Map Generator / Utility
Well if you want a few people to test it and possibly also add a H4 skin as Baronues suggested, you'd should give a shout out, before the announcement is made. I would recommand a test of user-friendliness, before releasing it New ideas could spawn by people testing it..
I'm silent in seven languages - and I got all my familys fear.
Everytime you throw dirt, you loose a little ground
Everytime you throw dirt, you loose a little ground
- iLiVeInAbOx05
- Equilibris Team
- Posts: 788
- Joined: 21 Jul 2014
Re: Heroes 4 Map Generator / Utility
Yep, I definitely want some others to give it a test before we make an announcement And as you said, it will surely lead to some good feedback. Before I send it to others though, I'll want to test deploying it on my girlfriend's laptop first. Need to get all the setup stuff out of the way, which I haven't started working on yet
- iLiVeInAbOx05
- Equilibris Team
- Posts: 788
- Joined: 21 Jul 2014
Re: Heroes 4 Map Generator / Utility
I believe I got all the terrain properly read in last night. I'll still need to do some additional testing and debug checking to verify, but I'm pretty sure we're good to go there
Since the only thing after the terrain codes is the elevation, I also thinks that means I've finished with parsing .h4c files
I'll need to revisit the cursor readout, since the way I did it is off unless the panel is an exact square (as far as pixels are concerned). Then I can get some overlay classes in place so that we can display the terrain on the map. After that, we can start painting terrain I'm excited to try painting "void" terrain Hopefully the game and editor don't get upset with me!
Edit: Getting the cursor readout right means I figured out a correct algorithm for converting pixels on the panel to grid squares in the .h4c map. Once I have that down we'll be well on our way to having something to release for others to test
Since the only thing after the terrain codes is the elevation, I also thinks that means I've finished with parsing .h4c files
I'll need to revisit the cursor readout, since the way I did it is off unless the panel is an exact square (as far as pixels are concerned). Then I can get some overlay classes in place so that we can display the terrain on the map. After that, we can start painting terrain I'm excited to try painting "void" terrain Hopefully the game and editor don't get upset with me!
Edit: Getting the cursor readout right means I figured out a correct algorithm for converting pixels on the panel to grid squares in the .h4c map. Once I have that down we'll be well on our way to having something to release for others to test
Re: Heroes 4 Map Generator / Utility
Only good news:-)
- iLiVeInAbOx05
- Equilibris Team
- Posts: 788
- Joined: 21 Jul 2014
Re: Heroes 4 Map Generator / Utility
The grid overlay is coming along nicely. I've set it up so that it will determine if the rows / columns are too small, and not draw the grid for each row / column in that case. I still need to actually label each row / column, and then I think the grid will be good to go.
I'm also using the grid overlay to convert between pixels and rows / columns. I've gotten row conversions properly setup and the readout is now working as expected Once I get the column readout plugged in, which should be pretty simple since I have it working for rows, I'll be able to start work on displaying the terrain data from a map
I'm also using the grid overlay to convert between pixels and rows / columns. I've gotten row conversions properly setup and the readout is now working as expected Once I get the column readout plugged in, which should be pretty simple since I have it working for rows, I'll be able to start work on displaying the terrain data from a map
Re: Heroes 4 Map Generator / Utility
All good! Works go on! :-)
- iLiVeInAbOx05
- Equilibris Team
- Posts: 788
- Joined: 21 Jul 2014
Re: Heroes 4 Map Generator / Utility
I got some colors on the display Here are a couple screen shots of the first three maps of my campaign in the H4 Map Generator. I know the colors are not as nice as the actual editor, but they don't have to be in order to be useful
There are still some kinks to work out with the overlay mechanism, but then it's time to start painting our own terrain
There are still some kinks to work out with the overlay mechanism, but then it's time to start painting our own terrain
Re: Heroes 4 Map Generator / Utility
Good look. It means you go forward :-)
Re: Heroes 4 Map Generator / Utility
Uh, pretty colors
Dispite the 'paint' look, I'm impressed with the progress and the fact that it actually reads your maps quite detailed, is just great news.
I'm eager to try how painting with it will work out.
Also will there be some color explanation, regarding objects like trees and mountains? I guess you'll try to match terrain colors with those of the mini map to some degree. I see that most are already familiar colors, but the pink one, didn't ring a bell.
Dispite the 'paint' look, I'm impressed with the progress and the fact that it actually reads your maps quite detailed, is just great news.
I'm eager to try how painting with it will work out.
Also will there be some color explanation, regarding objects like trees and mountains? I guess you'll try to match terrain colors with those of the mini map to some degree. I see that most are already familiar colors, but the pink one, didn't ring a bell.
I'm silent in seven languages - and I got all my familys fear.
Everytime you throw dirt, you loose a little ground
Everytime you throw dirt, you loose a little ground
- iLiVeInAbOx05
- Equilibris Team
- Posts: 788
- Joined: 21 Jul 2014
Re: Heroes 4 Map Generator / Utility
The actual coloring of the pixels takes a couple seconds, so I'll need to do some optimizations and possibly revisit the actual algorithm, but at least we have colors now
Right now I'm converting each pixel to the row / column, getting the terrain code for that row / column, and then coloring the pixel, so it's definitely very detailed but that's also probably why it's a little slow, haha.
I don't yet have a plan for showing objects. I could do something simple, like put different color dots (would require a legend), which I could do relatively easily, but I haven't thought any further than that.
As far as the terrain colors, I selected them with an online color chooser without actually comparing them to what they look like on the mini-map / in the editor, so I actually plan to go back and pick colors that are closer, but yes, I'll probably put a legend somewhere
The pink one was what I decided on for "field of life" terrain. Maybe need more of a tan pink
Right now I'm converting each pixel to the row / column, getting the terrain code for that row / column, and then coloring the pixel, so it's definitely very detailed but that's also probably why it's a little slow, haha.
I don't yet have a plan for showing objects. I could do something simple, like put different color dots (would require a legend), which I could do relatively easily, but I haven't thought any further than that.
As far as the terrain colors, I selected them with an online color chooser without actually comparing them to what they look like on the mini-map / in the editor, so I actually plan to go back and pick colors that are closer, but yes, I'll probably put a legend somewhere
The pink one was what I decided on for "field of life" terrain. Maybe need more of a tan pink
- iLiVeInAbOx05
- Equilibris Team
- Posts: 788
- Joined: 21 Jul 2014
Re: Heroes 4 Map Generator / Utility
After about two days of fighting with and debugging threading optimizations to make loading times and terrain painting times a bit better, I was finally able to find and fix the problem keeping me from moving forward
Now, each map is parsed on its own thread. Painting terrain for multiple maps works the same way, each image is drawn on its own thread.
Oh, and before that, I went back to actually parse the campaign header, which I wasn't really doing before. I was just searching for the campaign name and description, but I have since gone through all of the options (hopefully) and documented them. One of the things I found out, which also helped me with some optimizations, was the fact that the end of the campaign header (if a campaign and not single scenario) had a short for the number of maps in the campaign, followed by an integer for each campaign which represented the gzipped size of the map in bytes. If I hadn't found that, I wouldn't be able to actually modify the map, since invalid size values will cause the editor (and probably the game) to crash.
Now that that's out of the way, I've also started working on painting terrain, and I have some screen shots. See the void terrain below (ignore that ugly mouse arrow on the button next to the terrain button, just started working on the toolbar)
And what it looks like in the editor:
I haven't set things up quite yet to be able to select the terrain type to paint, just hard-coded the type and passed that to the painting method, but that won't take too long. I'm thinking that if the terrain icon is pressed, I'll switch over to the drawing tab, similar to how the campaign editor brings up the terrain options. I'll probably give a few more options, such as brush shape, where the editor only has the square brushes of four sizes.
I seem to be able to paint any type of terrain on any elevation, which is pretty cool
Oh right, and as you can see, I got the grid up and running.
Now, each map is parsed on its own thread. Painting terrain for multiple maps works the same way, each image is drawn on its own thread.
Oh, and before that, I went back to actually parse the campaign header, which I wasn't really doing before. I was just searching for the campaign name and description, but I have since gone through all of the options (hopefully) and documented them. One of the things I found out, which also helped me with some optimizations, was the fact that the end of the campaign header (if a campaign and not single scenario) had a short for the number of maps in the campaign, followed by an integer for each campaign which represented the gzipped size of the map in bytes. If I hadn't found that, I wouldn't be able to actually modify the map, since invalid size values will cause the editor (and probably the game) to crash.
Now that that's out of the way, I've also started working on painting terrain, and I have some screen shots. See the void terrain below (ignore that ugly mouse arrow on the button next to the terrain button, just started working on the toolbar)
And what it looks like in the editor:
I haven't set things up quite yet to be able to select the terrain type to paint, just hard-coded the type and passed that to the painting method, but that won't take too long. I'm thinking that if the terrain icon is pressed, I'll switch over to the drawing tab, similar to how the campaign editor brings up the terrain options. I'll probably give a few more options, such as brush shape, where the editor only has the square brushes of four sizes.
I seem to be able to paint any type of terrain on any elevation, which is pretty cool
Oh right, and as you can see, I got the grid up and running.
Re: Heroes 4 Map Generator / Utility
That's pretty awsome. And so is the fact that you can just paint the void terrrain on the map, despite objects being placedI seem to be able to paint any type of terrain on any elevation, which is pretty cool
Now if you could add the cliff effect as well =
I'm silent in seven languages - and I got all my familys fear.
Everytime you throw dirt, you loose a little ground
Everytime you throw dirt, you loose a little ground
- iLiVeInAbOx05
- Equilibris Team
- Posts: 788
- Joined: 21 Jul 2014
Re: Heroes 4 Map Generator / Utility
Haha yep, also without the cave / stone walls
Before I move on to the elevation, I'd like to figure out the terrain boundary codes. I think I should be able to isolate the different boundaries so that I can view them one at a time in the hex editor.
I wish I could apply the boundaries to the void terrain, but I'm afraid we're stuck with its blockiness We'll just have to use some other dark terrain around it to hide it
Before I move on to the elevation, I'd like to figure out the terrain boundary codes. I think I should be able to isolate the different boundaries so that I can view them one at a time in the hex editor.
I wish I could apply the boundaries to the void terrain, but I'm afraid we're stuck with its blockiness We'll just have to use some other dark terrain around it to hide it
Re: Heroes 4 Map Generator / Utility
Indeed the blocks aren't the prettiest (funny how I didn't take notice of the fact that it' black without cave), but I can already find a use for this feature in one of my planned maps You just helped me to an easier solution than I had originally been trying out.
I'm silent in seven languages - and I got all my familys fear.
Everytime you throw dirt, you loose a little ground
Everytime you throw dirt, you loose a little ground
- iLiVeInAbOx05
- Equilibris Team
- Posts: 788
- Joined: 21 Jul 2014
Re: Heroes 4 Map Generator / Utility
I figured you might find void terrain useful It will also be useful for my map taking place on the Plane of Death and for the Unity Isle of Death map
Right now it's not quite useful yet, since you can only see the map at the top level. Once I get zooming working, it will be significantly more useful.
One thing to note, you should have all of your objects in place already and elevation done before painting void terrain. Otherwise, as you know, you have to do things the hard way with objects, and elevation doesn't work. As I write this, I realize I also need a way to remove void terrain. Making a note for myself now
Right now it's not quite useful yet, since you can only see the map at the top level. Once I get zooming working, it will be significantly more useful.
One thing to note, you should have all of your objects in place already and elevation done before painting void terrain. Otherwise, as you know, you have to do things the hard way with objects, and elevation doesn't work. As I write this, I realize I also need a way to remove void terrain. Making a note for myself now
Re: Heroes 4 Map Generator / Utility
How about showing underground? Just realized I didn't recall this being mentioned in any previous post. I asume you can read and switch between Levels?
Regarding elevation I'm curious if that'll be the same rule as the void terrain? You mentioned being able to paint all terrain types on elevated ground, unlike in the editor. Certain larger objects have a tendency to lower elevation, so it would be great if your program could somehow look past that. Of course placing a mountain will need leveled tiles on the occupying space, but I find it frustrating that even minor objects also drags the entire elevated area down
Regarding elevation I'm curious if that'll be the same rule as the void terrain? You mentioned being able to paint all terrain types on elevated ground, unlike in the editor. Certain larger objects have a tendency to lower elevation, so it would be great if your program could somehow look past that. Of course placing a mountain will need leveled tiles on the occupying space, but I find it frustrating that even minor objects also drags the entire elevated area down
I'm silent in seven languages - and I got all my familys fear.
Everytime you throw dirt, you loose a little ground
Everytime you throw dirt, you loose a little ground
- iLiVeInAbOx05
- Equilibris Team
- Posts: 788
- Joined: 21 Jul 2014
Re: Heroes 4 Map Generator / Utility
I've read in the underground terrain and the terrain image for it should be drawn, I just didn't have a mechanism yet for switching between levels (button). I've been copying the icons from the editor, including the underground button icon, I just need to get it plugged in and tested
I was also wondering what would happen to objects if we changed the elevations under them, but I haven't gotten to that point yet
I was also wondering what would happen to objects if we changed the elevations under them, but I haven't gotten to that point yet
- iLiVeInAbOx05
- Equilibris Team
- Posts: 788
- Joined: 21 Jul 2014
Re: Heroes 4 Map Generator / Utility
Finished implementing the ability to switch between above and below levels.
I also added the ability to toggle the grid on and off.
I'll post a couple screen caps in a little bit
I also added the ability to toggle the grid on and off.
I'll post a couple screen caps in a little bit
- iLiVeInAbOx05
- Equilibris Team
- Posts: 788
- Joined: 21 Jul 2014
Re: Heroes 4 Map Generator / Utility
Above ground, grid on:
Below ground, grid on (by pressing the underground button as in the actual editor):
Below ground, grid off (by pressing the grid button as in the actual editor):
Below ground, grid on (by pressing the underground button as in the actual editor):
Below ground, grid off (by pressing the grid button as in the actual editor):
Re: Heroes 4 Map Generator / Utility
Undergrounds has another look so special brush is needed... But I like underoceans of water ofcourse.
Oceans of lava too :-)
Oceans of lava too :-)
Who is online
Users browsing this forum: No registered users and 1 guest