Heroes of Might and Magic Community
visiting hero! Register | Today's Posts | Games | Search! | FAQ/Rules | AvatarList | MemberList | Profile


Age of Heroes Headlines:  
5 Oct 2016: Heroes VII development comes to an end.. - read more
6 Aug 2016: Troubled Heroes VII Expansion Release - read more
26 Apr 2016: Heroes VII XPack - Trial by Fire - Coming out in June! - read more
17 Apr 2016: Global Alternative Creatures MOD for H7 after 1.8 Patch! - read more
7 Mar 2016: Romero launches a Piano Sonata Album Kickstarter! - read more
19 Feb 2016: Heroes 5.5 RC6, Heroes VII patch 1.7 are out! - read more
13 Jan 2016: Horn of the Abyss 1.4 Available for Download! - read more
17 Dec 2015: Heroes 5.5 update, 1.6 out for H7 - read more
23 Nov 2015: H7 1.4 & 1.5 patches Released - read more
31 Oct 2015: First H7 patches are out, End of DoC development - read more
5 Oct 2016: Heroes VII development comes to an end.. - read more
[X] Remove Ads
LOGIN:     Username:     Password:         [ Register ]
New Server | HOMM1: info forum | HOMM2: info forum | HOMM3: info forum | HOMM4: info forum | HOMM5: info forum | MMH6: wiki forum | MMH7: wiki forum
Heroes Community > Heroes 4 - Lands of Axeoth > Thread: H4ResourceEditor
Thread: H4ResourceEditor This thread is 9 pages long: 1 2 3 4 5 6 7 8 9 · «PREV / NEXT»
iliveinabox05
iliveinabox05


Known Hero
posted July 31, 2018 07:30 PM

I'm sure you could pack new ones into a .h4r file, but you would likely need to edit the .exe file for the game to actually use them. I'll let others that know more than I do about this comment further.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
NimoStar
NimoStar


Promising
Supreme Hero
Modding the Unmoddable
posted August 01, 2018 07:13 AM
Edited by NimoStar at 07:13, 01 Aug 2018.

I think that question doesn't go in this thread but well...

____________

You can easily convert those files.

As for "without replacing existing"... it depends.

The game only shows one loadscreen at the time. Actually each .exe only loads one.

But you can change the name of the resource file it loads so it will be a different one while the old one will still appear with the previous .exe

Same happens with music. Make a new music compilation file. You need to copy and hex edit the .exe so it points to your new music instead of the old one-

People can still use the old one with the old .exe
____________
Discover H4 Greatest Mod!
https://www.moddb.com/mods/greatest-mod/downloads
(Also biggest of only two 2 mods for HOMM IV)

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Karmakeld
Karmakeld


Famous Hero
posted August 01, 2018 10:17 AM

iliveinabox05 said:
Well, well, well. Radmutant was correct. Simply updating the field to indicate there is no additional info at the end of the file has yielded the desired results. In the image below I have unset that field on the mirrored labyrinth and adjusted the footprint to where it should be.



Then I open the editor (which already had this object in my test map) and voila!



I also just retested importing an image into an object that I couldn't get to work before (cliff nest). I just turned off the end of file offsets and it was good to go!


That's great that object/issue has been bugging us for quite some time (we did though manage to get a decently centered version of it). I'll give it a try with the mirrored sanctuary and other troublesome objects..
In general this will simplify centering mirrored objects alot.. great u 2..

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
radmutant69
radmutant69


Known Hero
posted August 01, 2018 05:57 PM

Wow, this is awesome. I never could do this by hex editing without changing the neighbouring byte too (and making the object appearing always in back of others).

I wonder what had I doing wrong, but I love to see it finally solved

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
iliveinabox05
iliveinabox05


Known Hero
posted August 01, 2018 06:16 PM

radmutant69 said:
Wow, this is awesome. I never could do this by hex editing without changing the neighbouring byte too (and making the object appearing always in back of others).

I wonder what had I doing wrong, but I love to see it finally solved


Which objects had this issue? Was the mirrored labyrinth one of them? If not, let me know so I can take a look at others since all I do is update the single byte and not the next one.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
radmutant69
radmutant69


Known Hero
posted August 01, 2018 06:30 PM

Well, I had this issue with every objects I just tried to modify like this.

This is why I didn't think it will work just like that, otherwise I could tell you the solution long ago

I thought we'll have to edit the end code somehow instead of just switch it off...

But I don't really care anymore since the Editor now can do this for me.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
iliveinabox05
iliveinabox05


Known Hero
posted August 01, 2018 07:18 PM

I see! Well in that case just let me know if you run into any issues with importing images into existing objects by switching off the info at the end of the file

Also, I think I need some more input with the resizing options now that this seems to be working. Should we have separate options for importing into existing or new objects? Or should we just not bother with that and just switch off the end of file offsets?

At some point I'm sure we'll figure out what that data is for, maybe something to do with how the object looks when set on elevated ground?

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Karmakeld
Karmakeld


Famous Hero
posted August 03, 2018 08:17 AM

iliveinabox05 said:

Also, I think I need some more input with the resizing options now that this seems to be working. Should we have separate options for importing into existing or new objects? Or should we just not bother with that and just switch off the end of file offsets?

At point I'm sure we'll figure out what that data is for, maybe something to do with how the object looks when set on elevated ground?


I would still find the resizing options useful if the object is made from scratch, but how would it resize to grid size, if that is blank?
Btw. Is it possible to edit eg. Enlarge the grid and then resize it to match the changes? (Just curious if tested and confirmed).

Once we can edit object types, isn't the only difference the fact that we replace the image? I mean, one would have to set/edit all other infos anyway, so in my optic, I'm not sure what the benefit would be creating from scratch (unneccesary option)..

Well it might be a good idea to see how the new objects work on elevated ground...

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
radmutant69
radmutant69


Known Hero
posted August 03, 2018 09:28 AM

Karmakeld said:
Once we can edit object types, isn't the only difference the fact that we replace the image? I mean, one would have to set/edit all other infos anyway, so in my optic, I'm not sure what the benefit would be creating from scratch (unneccesary option)..


I completely agree with this opinion. We just don't need to make objects from scratch if we can freely edit any existing objects...

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
iliveinabox05
iliveinabox05


Known Hero
posted August 03, 2018 10:44 PM
Edited by iliveinabox05 at 00:43, 04 Aug 2018.

Karmakeld said:
I would still find the resizing options useful if the object is made from scratch, but how would it resize to grid size, if that is blank?


Well, there would be a default grid size of 1x1. I don't see any reason to start off with a grid of 0 size


Karmakeld said:
Btw. Is it possible to edit eg. Enlarge the grid and then resize it to match the changes? (Just curious if tested and confirmed).


Certainly possible and I was thinking about adding another button to the toolbar to bring up resizing options at any time. Then, if updating the grid for an existing object that maybe you just wanted to make bigger(2x2 -> 3x3), you could then click for resizing options and refit an image to the grid.


Karmakeld said:
Once we can edit object types, isn't the only difference the fact that we replace the image? I mean, one would have to set/edit all other infos anyway, so in my optic, I'm not sure what the benefit would be creating from scratch (unneccesary option)..

Well it might be a good idea to see how the new objects work on elevated ground...


Well, I do still see some utility in being able to select File->New->Adventure Object. Maybe you don't have any H4 stuff on your computer at the time but you have an image and would like to make a new object?

If there is no "new" for creating objects, then the H4 Resource Editor would be tied to someone having H4 and I would prefer to not have that dependency on the program.

So I guess what I was really asking before about resizing options is this: when importing an image into an object, new or existing, should I automatically turn off the end of file offsets? If not, what would you suggest?

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Karmakeld
Karmakeld


Famous Hero
posted August 04, 2018 10:43 AM
Edited by Karmakeld at 23:46, 04 Aug 2018.

iliveinabox05 said:
Karmakeld said:
I would still find the resizing options useful if the object is made from scratch, but how would it resize to grid size, if that is blank?


Well, there would be a default grid size of 1x1. I don't see any reason to start off with a grid of 0 size


Makes good sense

Karmakeld said:
Btw. Is it possible to edit eg. Enlarge the grid and then resize it to match the changes? (Just curious if tested and confirmed).


Certainly possible and I was thinking about adding another button to the toolbar to bring up resizing options at any time. Then, if updating the grid for an existing object that maybe you just wanted to make bigger(2x2 -> 3x3), you could then click for resizing options and refit an image to the grid.


That would be handy

Karmakeld said:
Once we can edit object types, isn't the only difference the fact that we replace the image? I mean, one would have to set/edit all other infos anyway, so in my optic, I'm not sure what the benefit would be creating from scratch (unneccesary option)..


Well, I do still see some utility in being able to select File->New->Adventure Object. Maybe you don't have any H4 stuff on your computer at the time but you have an image and would like to make a new object?

If there is no "new" for creating objects, then the H4 Resource Editor would be tied to someone having H4 and I would prefer to not have that dependency on the program.

So I guess what I was really asking before about resizing options is this: when importing an image into an object, new or existing, should I automatically turn off the end of file offsets? If not, what would you suggest?


I guess I've just gotten used to having the appropriate tools and extracted files already, I didn't think much further than that I guess

For a newbie I guess a info box could explain the the option of toggling on/off the end code, but I really see no reason why it shouldn't automatically be checked/turned off. As long as it doesn't cause crashes I don't why it shouldn't be turned off.

EDIT:
I've just centered the Labyrint by clearing the end code, but in the editor the Labyrint will now ALWAYS appear behind other objects. Derrick, could you test the version of it you made a few days ago??

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
iliveinabox05
iliveinabox05


Known Hero
posted August 07, 2018 12:37 AM
Edited by iliveinabox05 at 20:59, 20 Aug 2018.

I see the same issue. I now have a little time to do some coding so I'll work on making those other elevation fields editable so we can play around with things some more.

Edit. Sorry I've been a bit absent recently, got super busy. I have updated to display the elevations data in the header, but haven't yet updated to make them editable for testing.

Edit2. I should be good to get things started up again and hope to have an updated version soon allowing the editing of the "elevation data" fields.

Edit 3. After working through the previous issue, we can look to adding more than just single PNG files (animations and separate shadows), but what do you all think would be a nice way to do this with the program? Should I allow the user to choose a folder containing multiple PNG files which make up an animation and / or object shadows? Add support for GIFs (though GIF doesn't have support for partial transparency)?

If allowing the user to select a folder containing multiple PNG files, either the user will need to properly name the files, or the H4 Resource Editor will need to do something allowing the user to order the files, likely with some sort of preview. Maybe a check box to indicate if the image is a shadow.

Lots of possibilities. If you're interested, post some thoughts and feedback

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Karmakeld
Karmakeld


Famous Hero
posted August 22, 2018 09:30 AM

Is it more complicated to enable ora format rather than png? In ora you'd have all the images stored in 1 file, though I guess you'd still have to setup (program) the same reading order, only it would be automatic rather than user defined. This I would consider a plus.
Also I believe most of us are already acustomed to using ora format and Gimp is available for free download. Having to convert all my ora files to png would be a pain..
Further more I'm also thinking about the ResHelper. With it you can import/export ora's. If someone would want to extract an object, it's saved as ora, then you'd have to not only convert it to png, but also save each single layer.
I don't know if you plan for the Resource Editor to be able to extract images or objects, but in my optic it would only be beneficial if those two program worked with the same format.

I guess an alternative would be for the ResourceEditor to be able to read the h4d saved by the ResHelper, though I'd much fancy the option of being able to do all in 1 program rather than 2 - at least when it concerns the making of new objects.

Side note, you should update the first post as more features are now enabled
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
iliveinabox05
iliveinabox05


Known Hero
posted August 22, 2018 03:47 PM

Unfortunately there doesn't seem to be any built in ora support in Java. There might be a plugin that someone has written, but I haven't been able to find one. What that means: I would have to find documentation so that I can write my own ora support, which would take a significant amount of time.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
radmutant69
radmutant69


Known Hero
posted August 22, 2018 04:23 PM

Actually the ora images are just zip compressed png packs. They can be easily extracted or even built by zip/rar archiver programs.



I don't know if it helps or not, just saying

If it doesn't helps then I can agree with the 'folder with multiple pngs' idea. A gif support would also useful in some cases I think.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
iliveinabox05
iliveinabox05


Known Hero
posted August 22, 2018 05:50 PM

Correct, I did find all of that, but I would still have to write my own custom code to handle the different files within, to either read them or write them, which is a lot of work.

I'll look again to see if I can find any Java support that already exists, but last time all google wanted to return for me was Oracle stuff.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
radmutant69
radmutant69


Known Hero
posted August 22, 2018 06:26 PM

Hm. Try to searching for OpenRaster plugin maybe. I just did that but I don't understand a single word of what I found

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
iliveinabox05
iliveinabox05


Known Hero
posted August 22, 2018 06:27 PM
Edited by iliveinabox05 at 20:21, 22 Aug 2018.

Haha right that might be more helpful!

Michael, as far as reading h4d files, that's pretty much all I open up with the program. When you Select File->Open, make sure the filter is set to .h4d, which I thought was the default. Perhaps it is defaulting to .h4r

Edit. Some of the search results for OpenRaster I've already seen, but the code now makes a little more sense and I've found several examples I can probably use to setup importing and exporting .ora files.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Karmakeld
Karmakeld


Famous Hero
posted August 22, 2018 11:54 PM

iliveinabox05 said:
Haha right that might be more helpful!

Michael, as far as reading h4d files, that's pretty much all I open up with the program. When you Select File->Open, make sure the filter is set to .h4d, which I thought was the default. Perhaps it is defaulting to .h4r



What I meant more specifically regarding h4d, is the h4d file Namerutan's program saves - without any header and footprint info, just the image. Admitted I haven't checked if your program can open those files, I just asumed the lack of all header ect. info would mean it couldn't be read, but I should try it.

iliveinabox05 said:

Edit. Some of the search results for OpenRaster I've already seen, but the code now makes a little more sense and I've found several examples I can probably use to setup importing and exporting .ora files.


Hope it works out... *fingers crossed*
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
iliveinabox05
iliveinabox05


Known Hero
posted August 23, 2018 12:28 AM
Edited by iliveinabox05 at 14:55, 23 Aug 2018.

Karmakeld said:
What I meant more specifically regarding h4d, is the h4d file Namerutan's program saves - without any header and footprint info, just the image. Admitted I haven't checked if your program can open those files, I just asumed the lack of all header ect. info would mean it couldn't be read, but I should try it.


Hmm, if it's just the image info, then it's not really an h4d file, so my program will not read it.

At least not as an adventure object, since that is defined with all the rest of the info. Once I get further along though..

Edit. Just realized it would actually be very simple to make h4d files which contain only the image data viewable since I already have constructs in place which read this data.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Jump To: « Prev Thread . . . Next Thread » This thread is 9 pages long: 1 2 3 4 5 6 7 8 9 · «PREV / NEXT»
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.0586 seconds