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 7 pages long: 1 2 3 4 5 6 7 · «PREV
radmutant69
radmutant69


Known Hero
posted August 23, 2018 03:06 PM

iliveinabox05 said:
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.


That type of 'h4d' file is actually the same as the H4 layer (.lay) file like portraits, town backgrounds etc.

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


Known Hero
posted August 23, 2018 05:50 PM

radmutant69 said:
That type of 'h4d' file is actually the same as the H4 layer (.lay) file like portraits, town backgrounds etc.


So is the extension .h4d or .lay if I were to read / write these to file? Did Michael just mistype when he wrote h4d?

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


Known Hero
posted August 23, 2018 06:06 PM

The ResHelper saves both .lay and .ani files with .h4d extension. Probably because one can just put the new files into the Data folder in that way, and the game instantly reads them. But if one wants to pack the files into a h4r file, he have to change the extensions because they are two different types and not just 'h4ds'.

It's the same thing as the 'h4d' files readed or created by your tool are in fact .obj files in the game. Or at least have to be renamed to .obj to pack them. I think you should make the Resource Editor be able to open the files with all of those extensions later to avoid such kind of misleading. I mean we can't call all the H4 file types as 'h4d'.

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


Known Hero
posted August 23, 2018 06:09 PM
Edited by iliveinabox05 at 18:10, 23 Aug 2018.

radmutant69 said:
It's the same thing as the 'h4d' files readed or created by your tool are in fact .obj files in the game. Or at least have to be renamed to .obj to pack them. I think you should make the Resource Editor be able to open the files with all of those extensions later to avoid such kind of misleading. I mean we can't call all the H4 file types as 'h4d'.


I agree, with everything having the same extension, there's not really a way to know what actual file type is being opened.

I would have to check for exceptions and then try to open it as a different type.. Using the correct extensions would make things much easier.

I mean I guess scanning the filename for known strings like "adv_obj" works, haha, but still.

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


Famous Hero
posted August 23, 2018 11:31 PM

iliveinabox05 said:
radmutant69 said:
It's the same thing as the 'h4d' files readed or created by your tool are in fact .obj files in the game. Or at least have to be renamed to .obj to pack them. I think you should make the Resource Editor be able to open the files with all of those extensions later to avoid such kind of misleading. I mean we can't call all the H4 file types as 'h4d'.


I agree, with everything having the same extension, there's not really a way to know what actual file type is being opened.

I would have to check for exceptions and then try to open it as a different type.. Using the correct extensions would make things much easier.

I mean I guess scanning the filename for known strings like "adv_obj" works, haha, but still.


Radmutant explained nicely what I was rambling about with saved/exported h4d - suggesting it was a mistype, ha! tsk tsk...

If you look at the files first name, it's rather easy to determine their extension:
actor_sequence - spr
adv_actor - spr
adv_object -obj
animation - ani
bitmap_raw - raw
combat_object -obj
game_maps - h4c
layers - lay
____________

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


Known Hero
posted August 24, 2018 12:33 AM
Edited by iliveinabox05 at 21:30, 24 Aug 2018.

Haha right, had a "duh" moment and forgot we know from the name.

Edit. Okay guys, help me get my head on straight. What would you like me to proceed working on?

I've finally started work on making the elevations data editable so y'all can play around with those values and see what happens. I just need to make one of the combo boxes editable so you can try some different values, but other than that, I should have the correct behavior for switching the different elevation data values.

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


Known Hero
posted August 27, 2018 05:37 AM

I got the elevations format and data fields editable, but it seems like we're going to need to figure out what those offsets at the end of the file mean, or at least get some default values to try out based on what they are for various objects with different footprints. Might be easiest to start out looking at the values for objects where the entire footprint is impassable.

After disabling the info at the end of the file, I tried various combinations of the header info, but nothing was different, the object was always behind any other object. So that info at the end of the file very likely has something to do with which portions of the image are displayed above / below another object (in addition to somehow asserting a size constraint on the image).

Also, what would y'all like me to work on next? I'm guessing we want .ora support since that would at least alleviate the immediate need to figure out what that data at the end of the file represents.

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


Famous Hero
posted August 27, 2018 07:43 PM

iliveinabox05 said:

Also, what would y'all like me to work on next? I'm guessing we want .ora support since that would at least alleviate the immediate need to figure out what that data at the end of the file represents.


For me ora support would be top priority as it will allow us to import/make animated objects. As long as we import it into existing objects we can still have objects appear in front, where as a focus on the end data would still leave us with only still images.

As for the end data, I can post what I have noted so far in patterns either here or in the research tread. I have only written down the similar pattern between adv. objects, but not decoratives (or passable vs blocked). Also I haven't yet tried to edit the 'non pattern' data or compared those with other data found within the object/images (except I vaguely recall the image's frame size is among the end data).

I hope others (Baronus, NimoStar etc) will help us figure out how the end data is read/determined.
____________

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


Known Hero
posted August 28, 2018 05:41 PM

Alrighty, .ora support it is! It probably is the best way to hold animations since gif doesn't support partial transparency, and a folder of png files is, as others have said, pretty much the same thing except it's not zipped.

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


Known Hero
posted September 06, 2018 11:56 PM
Edited by iliveinabox05 at 05:23, 07 Sep 2018.

Just a quick update. I have been able to create a .ora file and open it with gimp, but I believe I need to "crop" each of the layers so that the .png file for each layer is the size of the layer, and not the size of the canvas with the layer in its proper place.

After that, I need to figure out the issue I've been having with parsing the alpha data because this will affect what is exported.

Importing should work fine, since I can correctly use the alpha data there when packing it into H4 format.

Edit. Got it working after using the layer size for the png file of each layer, so next is either working on importing a .ora file or finally figuring out what is going wrong with parsing the alpha data!

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

Page compiled in 0.0430 seconds