Heroes 4 Advanced Options Map Editor
- iLiVeInAbOx05
- Equilibris Team
- Posts: 788
- Joined: 21 Jul 2014
Re: Heroes 4 Map Generator / Utility
Alright! So I have successfully copied objects and terrain (still work to be done for elevation) between maps of the same size! I still have some work to do with maps of different sizes (mostly converting rows and columns between the different sizes).
I'll try to get some screen shots or a demo video posted soon
I'll try to get some screen shots or a demo video posted soon
- iLiVeInAbOx05
- Equilibris Team
- Posts: 788
- Joined: 21 Jul 2014
Re: Heroes 4 Map Generator / Utility
Hello again! Here are some screen shots for the copy and paste of an area on a map. Eventually I'll get around to creating some demo videos for the important pieces.
First, I've opened up two maps of the same size (both XL).
Next, we select an area to copy, then right click on the map window and select "copy".
Now, we go to the second map, right click it, and select "paste".
Bam! Now the selected data has been copied to the new map. Don't forget to save your changes!
Lastly, we can open the map in the editor to have a look. Check out the mini map.
A couple notes: 1) The current way copying and pasting portions of a map is done is kind of hacked together, and is not exactly how it will be once I get some infrastructure in place. The main difference will probably be that you must be in area select mode in order to have access to those particular context menus. That or I might just have a main context menu with sub menus which contain the options.
2) Elevation is currently not copied since I still have work to do to get its grid system in place.
First, I've opened up two maps of the same size (both XL).
Next, we select an area to copy, then right click on the map window and select "copy".
Now, we go to the second map, right click it, and select "paste".
Bam! Now the selected data has been copied to the new map. Don't forget to save your changes!
Lastly, we can open the map in the editor to have a look. Check out the mini map.
A couple notes: 1) The current way copying and pasting portions of a map is done is kind of hacked together, and is not exactly how it will be once I get some infrastructure in place. The main difference will probably be that you must be in area select mode in order to have access to those particular context menus. That or I might just have a main context menu with sub menus which contain the options.
2) Elevation is currently not copied since I still have work to do to get its grid system in place.
Re: Heroes 4 Map Generator / Utility
While this is one of my anticipated features, I do have a wish, I hope you can make possible. I see that the area is copied to the exact same spot on the new map (rows and columns).
Is it possible to decide a different 'starting spot' or simply move the selected area to the desired point? (say you wanted something to be moved from lower left corner to upper right).
And how about copying between levels?
Is it possible to decide a different 'starting spot' or simply move the selected area to the desired point? (say you wanted something to be moved from lower left corner to upper right).
And how about copying between levels?
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
Being able to move a selected area is definitely on my list of options to implement here
My thoughts are these: When selecting an area, there will also be a "Move" option, which will move all objects, terrain, and elevation to your next mouse click (an outline of the selected area will follow your mouse cursor around until you click). When pasting to another map, the selected area outline should also be copied to the selection overlay for the new map. That way, you can simply right click again and select the "Move" option.
When moving a selected area, I'm thinking about setting the terrain in the selected area to the default "grass dry" terrain.
As far as copying between levels, I didn't test it, but it should already be working. The H4MG will copy to whatever map / level you are looking at (if they are the same size).
My thoughts are these: When selecting an area, there will also be a "Move" option, which will move all objects, terrain, and elevation to your next mouse click (an outline of the selected area will follow your mouse cursor around until you click). When pasting to another map, the selected area outline should also be copied to the selection overlay for the new map. That way, you can simply right click again and select the "Move" option.
When moving a selected area, I'm thinking about setting the terrain in the selected area to the default "grass dry" terrain.
As far as copying between levels, I didn't test it, but it should already be working. The H4MG will copy to whatever map / level you are looking at (if they are the same size).
Re: Heroes 4 Map Generator / Utility
What effect will this have 'When moving a selected area, I'm thinking about setting the terrain in the selected area to the default "grass dry" terrain', if the copied terrain is included in the 'move option'?
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
Not quite sure what you mean, but I also realize I didn't word things as well as I could have. Here's an example:
I select a particular area on the map, then select the move option. Now I can move the selected area anywhere I want. Once I mouse click to drop the selection in its new place, the terrain in old place would be set back to grass dry terrain.
If the old area and new area overlap, the old area terrain would first be set to grass dry, and then the new area would be set to whatever was moved to the new location. Does that make sense / answer your question?
I was also thinking about when pasting to another map (or the same map) to first draw the selected area (the white dashed line) as if you were doing a move, and only paste the copied portion of the map once the mouse is clicked.
I select a particular area on the map, then select the move option. Now I can move the selected area anywhere I want. Once I mouse click to drop the selection in its new place, the terrain in old place would be set back to grass dry terrain.
If the old area and new area overlap, the old area terrain would first be set to grass dry, and then the new area would be set to whatever was moved to the new location. Does that make sense / answer your question?
I was also thinking about when pasting to another map (or the same map) to first draw the selected area (the white dashed line) as if you were doing a move, and only paste the copied portion of the map once the mouse is clicked.
Re: Heroes 4 Map Generator / Utility
Ha, a recipe for confusion: Not being sure about what I wasn't sure about
But yes, you answered it - the old area.
The overlap seems to be a good idea.
But yes, you answered it - the old area.
The overlap seems to be a good idea.
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
It's been a little while since I've posted here! I just wanted to post a small update on my progress: I did a little work today on the copy / paste / move for the selected area on a map. I believe I have a good algorithm coded for going between maps of different sizes, as well as just moving objects and terrain in general.
I should have something more to show here relatively soon.
I should have something more to show here relatively soon.
- iLiVeInAbOx05
- Equilibris Team
- Posts: 788
- Joined: 21 Jul 2014
Re: Heroes 4 Map Generator / Utility
Alright, I believe I have the move / copy / paste selected areas on a map / between maps working. I think I only have one more task here to finish, which is making the selected area resize itself when switching between maps of different sizes, but the actual copying / moving of objects and terrain seems to be working properly.
I'll try to either get some screen shots or put together a video to showcase this once I get the last task finished.
I'll try to either get some screen shots or put together a video to showcase this once I get the last task finished.
Re: Heroes 4 Map Generator / Utility
That will be a very useful feature. Looking forward to see it in action
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
Just a minor update: I'm still working on resizing the selected area outline when copying / pasting between maps of different sizes, but I'm pretty close to having the code setup for this. I just have a little more work to do with the value I'm getting from the arctangent function (need to determine which quadrant each coordinate is in). I'm hopeful that's the main bug I need to fix for this for it to be finished
- iLiVeInAbOx05
- Equilibris Team
- Posts: 788
- Joined: 21 Jul 2014
Re: Heroes 4 Map Generator / Utility
Good news, it appears not adjusting the return value of the arctangent function for the quadrant the coordinate was in was indeed the main bug. I have the selected area resizing properly when copying from a small map to an XL map. I just need to get the correct scale factors in place for each of the possible size change combinations, then I think this feature is good to go.
Re: Heroes 4 Map Generator / Utility
So will it automatically scale up to match a XL map if copied from a small? Just thinking, what if I just want to incorporate the same area from small map to larger, but same scale?
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
So what I am referring to when I talk about scaling up or down is the white dashed outline of the selected area. The rows and columns for objects and terrain won't be scaled by default.
For example, say I draw an outline of a larger area on a small map and select copy. I then switch to an XL map and select paste. The white dashed outline will appear and follow your mouse cursor until you click, but it should be much smaller on the XL map than it was on the small map. So I scale the white dashed outline to be smaller and correctly display where the objects and terrain will be pasted.
I've got the scale factors figured out to go from a small map to the other sizes and from an XL map to the other sizes, so there are just medium and large map scale factors to get figured out
For example, say I draw an outline of a larger area on a small map and select copy. I then switch to an XL map and select paste. The white dashed outline will appear and follow your mouse cursor until you click, but it should be much smaller on the XL map than it was on the small map. So I scale the white dashed outline to be smaller and correctly display where the objects and terrain will be pasted.
I've got the scale factors figured out to go from a small map to the other sizes and from an XL map to the other sizes, so there are just medium and large map scale factors to get figured out
Last edited by Anonymous on 21 Sep 2016, 15:04, edited 1 time in total.
- iLiVeInAbOx05
- Equilibris Team
- Posts: 788
- Joined: 21 Jul 2014
Re: Heroes 4 Map Generator / Utility
I have completed the first implementation of copying and pasting / moving a selected area of the map. You can copy paste to the same map (or move the selected area in the same map), copy and paste between maps, copy and paste between map levels, or copy and paste between maps and levels.
Now that we've reached the weekend, I hope to get a demo video of this posted since it would require many screen captures to illustrate this feature
Now that we've reached the weekend, I hope to get a demo video of this posted since it would require many screen captures to illustrate this feature
Re: Heroes 4 Map Generator / Utility
Now that makes more sense
I couldn't quite figure out how or why the rows and columns should be scaled
Looking forward to see a demo.
I couldn't quite figure out how or why the rows and columns should be scaled
Looking forward to see a demo.
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
As promised, a video showing the area selection copy / paste / move feature can be found here.
Re: Heroes 4 Map Generator / Utility
My God, you're making to behave like photoshop!
"We made it!"
The Archives | Collection of H3&WoG files | Older albeit still useful | CH Downloads
PC Specs: A10-7850K, FM2A88X+K, 16GB-1600, SSD-MLC-G3, 1TB-HDD-G3, MAYA44, SP10 500W Be Quiet
The Archives | Collection of H3&WoG files | Older albeit still useful | CH Downloads
PC Specs: A10-7850K, FM2A88X+K, 16GB-1600, SSD-MLC-G3, 1TB-HDD-G3, MAYA44, SP10 500W Be Quiet
- iLiVeInAbOx05
- Equilibris Team
- Posts: 788
- Joined: 21 Jul 2014
Re: Heroes 4 Map Generator / Utility
Just a little pixel manipulationPol wrote:My God, you're making to behave like photoshop!
Re: Heroes 4 Map Generator / Utility
If only you had made that program/feature a few years back, I could've use it to copy parts of my maps, instead of having to manually try to replicate them. Basically I've been dreaming of a feature like this for years. Keep adding more, and we'll keep praising
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
Who is online
Users browsing this forum: Ahrefs [Bot] and 0 guests