Heroes 4 Advanced Options Map Editor
Re: Heroes 4 Map Generator / Utility
Leave it to us 'common' people to test and comment on the user-friendliness for non programmers of course this would require an actual setup and not just the theory of it. You start loosing me on those parts.
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
Fear not, there won't be any actual typing involved (there would be too much event handling and too many cases to check). You will still need to select the script type you want to add.
I'm leaning toward my description at the end of my last post. Putting the requirements in a java Tree might be slightly confusing due to the orientation, so I'll probably try to stick to something that's visually linear (left to right).
Oh, and H4MG just stands for Heroes 4 Map Generator. It was going to be H4RMG, but it's already more than just a random map generator. Probably still needs a better name
Some good things to think about from your post Duzeom.
I'm leaning toward my description at the end of my last post. Putting the requirements in a java Tree might be slightly confusing due to the orientation, so I'll probably try to stick to something that's visually linear (left to right).
Oh, and H4MG just stands for Heroes 4 Map Generator. It was going to be H4RMG, but it's already more than just a random map generator. Probably still needs a better name
Some good things to think about from your post Duzeom.
Re: Heroes 4 Map Generator / Utility
Just a quick note, from my short test of it, you should add the Rock Terrain Tool. Minor detail, but that seems to be lacking atm.
I successfully created a new map using the H4MG, and got no problems loading and saving new edits between the MG and the editor. The colums also fits nicely, although the small brush paints Tetris blocks instead of a single 1x1 tile, and as you mentioned, it completely square. So perhaps add an 'extra small' 1x1 brush? Creating a new map, it reads in the editable objects I've placed, as well as a quest hut name perfectly.
I successfully created a new map using the H4MG, and got no problems loading and saving new edits between the MG and the editor. The colums also fits nicely, although the small brush paints Tetris blocks instead of a single 1x1 tile, and as you mentioned, it completely square. So perhaps add an 'extra small' 1x1 brush? Creating a new map, it reads in the editable objects I've placed, as well as a quest hut name perfectly.
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 rock terrain tool might be a little tough (or might just take some time) because I have to also place the rock / cave objects on the boundaries. I can certainly come up with an algorithm to go around the rock / terrain boundary and place the rock / cave object, I'll just have to map the boundary faces to the correct object faces.
As far as the brushes and sizes of the brushes, I plan to add a square brush that is oriented the way the terrain brush in the editor is
Also, I fixed a couple more bugs causing me to be unable to load certain maps in the H4MG. I happened to have missed a couple scripts and had another bug where I was using an incorrect index.
As far as the brushes and sizes of the brushes, I plan to add a square brush that is oriented the way the terrain brush in the editor is
Also, I fixed a couple more bugs causing me to be unable to load certain maps in the H4MG. I happened to have missed a couple scripts and had another bug where I was using an incorrect index.
- iLiVeInAbOx05
- Equilibris Team
- Posts: 788
- Joined: 21 Jul 2014
Re: Heroes 4 Map Generator / Utility
Update: I believe I have viewers for all objects with events, as well as the ability to copy events between them. I also have support for editing some of the other major fields for the objects (such as name fields).
I do kind of want to redo the way I handled copying and pasting events, since I implemented my own way, rather than using the Clipboard (forgot to check for java support of the Clipboard, and they do have support for it). It would clean up quite a bit of code, but I may wait until later to switch it up.
As far as scripting features Something else I thought of that would be quite nice has to do with calling a custom triggered event from another event. It would be really convenient if we could open up that custom event to view / edit from the event we are currently looking at, rather than having to go back into the events to find it and open it. I'm thinking I'll probably add an edit button to the "Trigger Custom Event" panel which will open up an event edit frame for the custom triggered event which defaults to the script panel.
I do kind of want to redo the way I handled copying and pasting events, since I implemented my own way, rather than using the Clipboard (forgot to check for java support of the Clipboard, and they do have support for it). It would clean up quite a bit of code, but I may wait until later to switch it up.
As far as scripting features Something else I thought of that would be quite nice has to do with calling a custom triggered event from another event. It would be really convenient if we could open up that custom event to view / edit from the event we are currently looking at, rather than having to go back into the events to find it and open it. I'm thinking I'll probably add an edit button to the "Trigger Custom Event" panel which will open up an event edit frame for the custom triggered event which defaults to the script panel.
- iLiVeInAbOx05
- Equilibris Team
- Posts: 788
- Joined: 21 Jul 2014
Re: Heroes 4 Map Generator / Utility
Update: I have implemented the ability to view and edit most scripts. I have also implemented the ability to "step into" and view / edit custom events from a separate event. Here are some screen shots to illustrate what I'm talking about.
First, open up a map that has event scripting which calls a custom event via the "Trigger custom event" script. Then navigate to an event which has one of these scripts in it.
View the event (by double clicking it) and select the "Trigger custom event" script.
Open it (by double clicking) and you will see the following:
I've added a button "Edit Event". Clicking it will open up an Event Properties dialogue for the selected custom event and default to the "Script" tab.
No more hunting around to find a custom event when you're trying to trace your events to debug or see how another map maker did his/her scripting, simply open it from the event you are looking at
I'm likely going to add a context menu so that right clicking on a "Trigger custom event" script in the script viewer will give you the option to go to the custom event so that we don't have to open the script dialogue first (fewer clicks).
First, open up a map that has event scripting which calls a custom event via the "Trigger custom event" script. Then navigate to an event which has one of these scripts in it.
View the event (by double clicking it) and select the "Trigger custom event" script.
Open it (by double clicking) and you will see the following:
I've added a button "Edit Event". Clicking it will open up an Event Properties dialogue for the selected custom event and default to the "Script" tab.
No more hunting around to find a custom event when you're trying to trace your events to debug or see how another map maker did his/her scripting, simply open it from the event you are looking at
I'm likely going to add a context menu so that right clicking on a "Trigger custom event" script in the script viewer will give you the option to go to the custom event so that we don't have to open the script dialogue first (fewer clicks).
- iLiVeInAbOx05
- Equilibris Team
- Posts: 788
- Joined: 21 Jul 2014
Re: Heroes 4 Map Generator / Utility
Another update: I've begun copying and pasting scripts between events! We can also copy and paste scripts to the same event. I'll probably work on adding new scripts and changing the type of other scripts next. Then I'll look at moving scripts by dragging them (and allow scripts to be moved into or out of other scripts, such as a conditional).
Then the area selection tool, although I think before that I may update my old copy / paste implementation to use the system clipboard, which is significantly easier and better than what I initially implemented. In fact, I may do that first..
Then the area selection tool, although I think before that I may update my old copy / paste implementation to use the system clipboard, which is significantly easier and better than what I initially implemented. In fact, I may do that first..
- iLiVeInAbOx05
- Equilibris Team
- Posts: 788
- Joined: 21 Jul 2014
Re: Heroes 4 Map Generator / Utility
Okay, I fixed the copy / paste implementation to use the system clipboard, which cleaned up a LOT of code, besides being the correct way to do things. It will be a simple thing to implement copying / pasting of pretty much anything else useful now that I know how to use the clipboard
Re: Heroes 4 Map Generator / Utility
Maybe something like a pen to draw copied area borders?
- iLiVeInAbOx05
- Equilibris Team
- Posts: 788
- Joined: 21 Jul 2014
Re: Heroes 4 Map Generator / Utility
Baronus, I do plan to make it so you can draw on the map to create the area to copy, so you will be able to see the borders on the map you copy from I should also be able to put the same outline on any map you paste to.
Re: Heroes 4 Map Generator / Utility
Those are great news. Brilliant to come up with an easy solution, of tracking triggered scripts. Will be very useful. Also can't wait to try out the map copying part.
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
Hi CTPAHHuK, there isn't an exe file since I'm using Java to create this application. So unfortunately, when I release the H4MG, it will require anyone who wishes to use it to download and install Java. Once that's done, all you have to do is double click the java icon in the H4MG folder
I think I will ask Kalah to do an initial release once I finish with the scripting stuff I'm currently working on (adding new scripts, changing script type, and dragging / dropping).
Glad you like it Michael I just recalled how annoying it was to try to locate scripts when I haven't looked at them in a while!
Once I finish with the scripting stuff and get the initial release out, I'll focus on copying parts of one map to another (or copying to the same map in a different location / moving the selected area around).
I think I will ask Kalah to do an initial release once I finish with the scripting stuff I'm currently working on (adding new scripts, changing script type, and dragging / dropping).
Glad you like it Michael I just recalled how annoying it was to try to locate scripts when I haven't looked at them in a while!
Once I finish with the scripting stuff and get the initial release out, I'll focus on copying parts of one map to another (or copying to the same map in a different location / moving the selected area around).
- iLiVeInAbOx05
- Equilibris Team
- Posts: 788
- Joined: 21 Jul 2014
Re: Heroes 4 Map Generator / Utility
Alright, well yesterday I found a good example of how to add drag and drop to a JTree and so I have drag and drop currently working I thought that was going to be the difficult part, but it was actually pretty easy with an example. I'm just going to have to tweak some things so they fit a little better.
Then, the hard part, will be updating the list of scripts based on the JTree, since the JTree itself isn't backed by the list that I pass in, so I'll just have to play around with some debug to figure out the best way to get that linked in. Then, I'll test as much as possible and message Kalah to make an initial release of the H4MG available here
Then, the hard part, will be updating the list of scripts based on the JTree, since the JTree itself isn't backed by the list that I pass in, so I'll just have to play around with some debug to figure out the best way to get that linked in. Then, I'll test as much as possible and message Kalah to make an initial release of the H4MG available here
Re: Heroes 4 Map Generator / Utility
Problems are defeat...It will very good MG as I see :-)
- iLiVeInAbOx05
- Equilibris Team
- Posts: 788
- Joined: 21 Jul 2014
Re: Heroes 4 Map Generator / Utility
Well, I think I have all the cases for drag and drop in the script tree covered. Basically, you can drag a script to any other sequence script or change the order of scripts within a sequence script. You cannot drag a script if it is the first script under a "Then" / "Else", "Yes" / "No", or "Victorious" / "Defeated" block. I also added a case to prevent things like dragging an Ask script into its "Yes" or "No" sequence scripts.
I still have the difficult task of determining the best way to translate these tree node movements into an actual change in the script list, which is the next item on my list
I also realized that I didn't show a little example of copying and pasting scripts, so I'll take a couple screen caps for that later today. Admittedly it's pretty much the same as copying / pasting events, but I'll show it anyway
I still have the difficult task of determining the best way to translate these tree node movements into an actual change in the script list, which is the next item on my list
I also realized that I didn't show a little example of copying and pasting scripts, so I'll take a couple screen caps for that later today. Admittedly it's pretty much the same as copying / pasting events, but I'll show it anyway
- iLiVeInAbOx05
- Equilibris Team
- Posts: 788
- Joined: 21 Jul 2014
Re: Heroes 4 Map Generator / Utility
Here's a quick example of copying and pasting scripts.
First, open up two events, and go to their script tabs.
Next, select the scripts you would like to copy, then right click and select copy.
Finally, go to the other event, right click in the window, and select paste.
Make sure you click the "OK" button for your changes to take effect, and you've copied scripts between events Although I just found a bug if you highlight part of a script which contains more scripts >.<
Edit: Fixed the bug.
First, open up two events, and go to their script tabs.
Next, select the scripts you would like to copy, then right click and select copy.
Finally, go to the other event, right click in the window, and select paste.
Make sure you click the "OK" button for your changes to take effect, and you've copied scripts between events Although I just found a bug if you highlight part of a script which contains more scripts >.<
Edit: Fixed the bug.
Re: Heroes 4 Map Generator / Utility
You're truly a wiz
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
- Steven Aus
- War Dancer
- Posts: 350
- Joined: 08 Feb 2006
- Location: Perth, Australia
- Contact:
Re: Heroes 4 Map Generator / Utility
A WizInABox.
My Life Purpose Is To Teach The World To Fish For Life. I AM Steven Russell Lynch Abundance That I AM. Empowerment And Fostering Self-Responsibility Is My Game.
- iLiVeInAbOx05
- Equilibris Team
- Posts: 788
- Joined: 21 Jul 2014
Re: Heroes 4 Map Generator / Utility
~_~
Found and fixed a couple more bugs in the implementation of dragging and dropping scripts in the tree view.
Unfortunately I didn't have a lot of time to work on things this weekend, so I didn't get much done. I do, however, think that I have come up with the solution for updating the scripts when we drag / drop so I'll try to get that in place soon
Found and fixed a couple more bugs in the implementation of dragging and dropping scripts in the tree view.
Unfortunately I didn't have a lot of time to work on things this weekend, so I didn't get much done. I do, however, think that I have come up with the solution for updating the scripts when we drag / drop so I'll try to get that in place soon
Who is online
Users browsing this forum: No registered users and 2 guests