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 ]
HOMM1: info forum | HOMM2: info forum | HOMM3: info mods forum | HOMM4: info CTG forum | HOMM5: info mods forum | MMH6: wiki forum | MMH7: wiki forum
Heroes Community > Heroes 4 - Lands of Axeoth > Thread: H4ResourceEditor
Thread: H4ResourceEditor This thread is 14 pages long: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 · «PREV / NEXT»
radmutant69
radmutant69


Promising
Known Hero
posted May 07, 2019 11:40 PM bonus applied by Galaad on 09 Jun 2019.

Of course.

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


Promising
Known Hero
posted May 08, 2019 04:04 AM
Edited by iliveinabox05 at 04:23, 08 May 2019.

Thanks, the log helped me figure it out right away. Just didn't test that some major types don't have minor types, so I needed to check for null to determine that case. It broke the "update" button. I'll get another update out shortly.

Edit. Updated the H4 Resource Editor to fix that issue. Also made it so you can open a .obj file with either the obj or all files filters, rather than only being able to open adventure objects with the .h4d extension.

Link in the OP is updated.

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


Promising
Known Hero
posted May 08, 2019 10:56 AM

Yay thank you! Now it works as well.

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


Promising
Known Hero
posted May 08, 2019 05:36 PM

Great! Let me know if you find anything else.

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


Adventuring Hero
posted May 08, 2019 08:49 PM
Edited by Roman2211 at 20:58, 08 May 2019.

H4 Resource Editor it still don't working for me, serioisly, even the h4d file does not open. Maybe problem in my Win7 x86?

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


Promising
Known Hero
posted May 08, 2019 09:25 PM

Roman, can you upload the log file somewhere so I can take a look and see what's going on? H4ResourceEditorLog.txt should be the name and it will be in the same folder as the H4 Resource Editor.

I'm using Windows 8 on my laptop where I develop, but the operating system shouldn't matter much since it's Java.

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


Responsible
Famous Hero
posted May 08, 2019 11:28 PM

radmutant69 said:
In my opinion you should keep the passability and the entrances either to let us see what we are going to changing.


I support this, makes good sense to work from the original settings.
____________

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


Promising
Known Hero
posted May 09, 2019 04:27 AM
Edited by iliveinabox05 at 00:52, 11 May 2019.

Okay for passability I will keep what was there before, and anything added if the footprint is increased will be passable as the default. If the footprint is smaller then I will keep what is left of the previous passability.

Same for interactivity, except the default will be not interactive.

Edit. I may have found a solution to Roman's, and others', problem when trying to open heroes4.h4r.

It turns out that the method I'm using to read a file isn't intended for large files, which heroes4.h4r definitely is. I noticed this when reading the documentation for the method. I did a little research, so now I just need to try it out this weekend.

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


Promising
Known Hero
posted May 13, 2019 06:48 AM

I fixed the issue with memory for opening larger files and updated the OP with the link to the latest H4 Resource Editor.

For those of you already able to open heroes4.h4r, the changes should be transparent.

Roman, give this new version a try and let me know how it goes!

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


Adventuring Hero
posted May 13, 2019 07:59 AM

It works, but the files do not want to be extracted. And nothing displayed in the right side of the "viewer"

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


Promising
Known Hero
posted May 13, 2019 07:50 PM
Edited by iliveinabox05 at 22:13, 28 May 2019.

That is currently the correct behavior. Right now you can only open adventure objects, so you have to scroll way down to them. Some adventure objects seem to have a different format that I haven't gotten to yet, and so won't open. Just double click on the ones you want to open up and if it can, a new window will pop up with the adventure object.

Edit. Oh and it will save campaign maps as .h4c files.

Edit 2. Added to the OP a feature to extract any file from a .h4r container that you have opened with the H4 Resource Editor. Should be pretty simple to give you a right click ability on the list of objects with an option to "extract." Then you can save the object wherever you want with whatever name you want.

Edit 3. Before I work on what I mentioned in Edit 2, I'm going to switch the list into a tree view so that the list of objects is easier to sift through. Then I will be able to add a right click popup menu with options such as "extract."

Edit 4. I have the list displayed as a tree and a right click menu with the option to "extract." I'll add the option "edit", but double clicking the item will still work to open it.

I'm going to get a preview going for the currently empty panel on the right, and then I think the next version will be ready for y'all to take a look at.

Edit5. Sorry for the delay here. I've gotten the extract set up for any item in the h4r file, but I still need to finish getting the preview set up. Currently it works after you do something to force a refresh, like minimizing and restoring the window, so I just need to figure out why it won't just repaint and I'll be able to send out the next release.

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


Promising
Known Hero
posted May 29, 2019 04:52 AM
Edited by iliveinabox05 at 05:42, 30 May 2019.

I've updated the original post with the link to the latest H4 Resource Editor version.

You can now extract (save) items as h4d files. I'll add filters for the other types so that you can save them directly as the extension you want without having to change it yourself after.

I'll get back to working on being able to change the footprint info.

Edit. OP updated again with another small update.
- Removed the "Update" and "Close" buttons, so there is no more ambiguity with how to actually save your changes. Simply File->Save and any changes you made will be saved with the object.
- Finished moving over to the new mask parsing classes, which will make it easier to do the foot print stuff.

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

Hero of Order
Li mort as morz, li vif as vis
posted June 09, 2019 11:37 AM

Topic pinned and a few overdue +QPs awarded.
____________

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


Promising
Known Hero
posted June 09, 2019 11:03 PM

Thanks Galaad!

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


Responsible
Famous Hero
posted June 10, 2019 09:14 AM

Galaad said:
Topic pinned and a few overdue +QPs awarded.


Better late than never
____________

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


Responsible
Supreme Hero
Modding the Unmoddable
posted October 18, 2019 07:44 AM
Edited by NimoStar at 09:16, 18 Oct 2019.

I have found an error on the editor.

Even if the PNG format and the H4 game engine accepts partial transparency, this value isn't being read

So, even 1% or less of Alpha will appear as 100%,
as shown here



with source image being this:



While i *have* remade this by deleting everything and starting over,

this, besides errors, makes impossible to achieve certain effects which rely on partial transparency. Actually, I have lost part of the quality of the image due to "100% solidifying" the edges of the figures.

Consider these types of sparkles as an example of the importance of partial transparency:





Plus, I don't think shadows are working properly... the program takes a dark color (which isn't even 0,0,0 only) and converts it into transparent (moves it to shadow layer?)... which makes my buildings hve more holes than gruyere cheese, even after I eliminated all 0,0,0 (pure black) color

RGB 0,1,1 and etc. are still read as "pure black" (brightness less than 1 in 255), which is an error.


This is after two edits to eliminate "dots" problem already.

Sometimes due to some unknown bug, most of the image is turned into shadow/nothing:


On top of it all... the shadow doesn't even work. It just disappears. And I made it of solid 0,0,0 black just as in the originals and covering the same space.

Not a mere display problem, also an ingame problem. Default buildings do display their shadows in the visor, and they are exported - but re-import just doesn't work.



Even if the very same image is imported, without making any changes, the same ORA that you export, the shadow is deleted from both the original and new image:




Don't get me wrong, this isn't a "complaint", as if I was a paying customer; just help to keep developing and fixing the program. As of now it's 5% making the image, 95% making sure it isn't misread. And even then, you just can't use partial transparency or shadows in any way. Considering all default map objects have shadows (and many partial transparency), this is very unfortunate and nearly nothing can be made from the tool that fits the game's art style as of now, since all objects will be shadowless.

____________
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
iliveinabox05
iliveinabox05


Promising
Known Hero
posted October 18, 2019 07:30 PM

Yeah, unfortunately there is a bug with partial transparency that I have yet to figure out. I have checked and rechecked against Namerutan's code to make sure I'm doing exactly the same thing, and to me it looks like I am, but there is still an issue. Likely something to do with Java and byte operations.

As far as the shadow thing, I have noticed them not being displayed in the resource editor, but saving the object and then loading it into the map editor was showing the shadow for me.

You mentioned in the other thread about something being wrong with the footprint. Can you elaborate? I haven't had any issues with altering the footprint.

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


Responsible
Supreme Hero
Modding the Unmoddable
posted October 19, 2019 12:30 AM

Well, that was merely a display bug it seems. Upon importing an image, the offsets of the squares are wrongly displayed. But if you resize the image, they go back to their intended place. A bug, but not a serious one.

I do hope the shadow works then at least. I wasn't confident of testing ingame since you need to package the objects for them to be read (at least in my version) and I don't have any available free packages to test.
____________
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
iliveinabox05
iliveinabox05


Promising
Known Hero
posted October 19, 2019 12:42 AM
Edited by iliveinabox05 at 00:43, 19 Oct 2019.

You actually don't need to package them up in a .h4r file. All you need to do is save the .h4d file (the adventure object with .h4d extension) in the data folder and the game will read it in. It will be available for you to add to your palette in the game's editor and then you can drop it onto the map to have a look.

You should be able to save the adventure object from the window where you are editing it (just File->Save as I believe).

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


Responsible
Supreme Hero
Modding the Unmoddable
posted October 19, 2019 03:51 AM

I already tried that but for whatever reason the editor (at least my eq3.55-based version) doesn't read the .h4d objects if they aren't packed, as such they can't be added to the palette or viewed.
____________
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
Jump To: « Prev Thread . . . Next Thread » This thread is 14 pages long: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 · «PREV / NEXT»
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.0497 seconds