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 16 pages long: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 · «PREV
iliveinabox05
iliveinabox05


Responsible
Famous Hero
posted July 16, 2021 06:40 PM

Assryn said:
That sounds very exciting !! I haven't tried to use it yet, I struggle with wether to install java or not (with the whole security weakness thing with Java), but still I find all the work that goes into the tool creation and the mods it allows t omake insane <3 !


Totally understand your concerns! Maybe if you have a spare PC or laptop, you could use it there if you needed to?

I'll just say this though: I've had Java 1.8 installed on my laptop for many years at this point, and haven't had any issues. As long as you don't use internet explorer or microsoft edge, you're generally in good shape (also don't click on random links).

Of course, that doesn't mean everyone won't have any issues with Java, but then again, going on the internet at all will run the risk of a virus, lol

I have also had thoughts of trying to package up a JVM in an exe, which I've heard can be done, but it's sort of on the "nice to have" list. I've never done that before, so I would have to do some research and it could be a bit of work.

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


Responsible
Famous Hero
posted August 04, 2021 11:55 PM
Edited by iliveinabox05 at 00:00, 05 Aug 2021.

iliveinabox05 said:
- Implemented mass exporting of .ora files at the object type level. So you can export .ora files for actor_sequence and adv_obj. I plan to extend this feature to any object type that contains a sprite.


This feature is now extended to the various object types with a sprite. This was working for mass png extraction, but I had forgotten about two object types: battlefield preset map and combat object, so these are now included as well.

Bug fixes:
- Fixed a bug with using the correct table in h4r files. As a shortcut, I had been assuming the table always directly followed the header (that the table offset was always 8 bytes into h4r files). This was not the case.

Now all of the files in the h4r files can be viewed and extracted, where some h4r files would only show a subset. Also updates.h4r can now be opened by the Resource Editor.

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


Honorable
Supreme Hero
Modding the Unmoddable
posted August 05, 2021 08:10 AM

Good news.

Some doubt, were you ever able to see why edited spell animations crashed and fix that?
____________
https://www.moddb.com/mods/greatest-mod

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


Responsible
Famous Hero
posted August 05, 2021 04:57 PM

NimoStar said:
Good news.

Some doubt, were you ever able to see why edited spell animations crashed and fix that?


Yes that should have been fixed a little while ago. I thought I would have mentioned that in my bug fix section for updates, but must have forgotten.

Are you still seeing instances of spell animations causing the game to crash after importing new animations? If so, please send me the ora for the animation and tell me which h4d you're trying to import into.

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


Responsible
Famous Hero
posted August 24, 2021 08:04 AM bonus applied by Galaad on 01 Sep 2021.
Edited by iliveinabox05 at 03:19, 28 Aug 2021.

Bug Fixes:
- You can now save over an h4r file you have opened. A side effect of this fix is that opening a large h4r file like heroes4.h4r will take a second or two, and also the entire file will be held in memory.

This isn't really an issue for any of the h4r files other than heroes4.h4r

If anyone has issues with this update, just let me know so I can take a look.

**************************************************

Another update.

Features:
- Mass exporting png files to a single directory has been implemented. The filenames are in the following format: objectName#frameName.png

When mass exporting, you will be shown a dialogue to select either "Keep Directory Structure," or "Single Directory". The single directory option will use the objectName#frameName.png naming format.

- Mass importing png files from a single directory into their corresponding h4d files.

There will be an additional prompt to select the input format of the png files: either the object name is the parent directory where png files are found, or the png files are of the objectName#frameName.png naming format.

This method will still look in sub folders as well as the selected folder for png files, but it assumes the names are in the objectName#frameName.png naming format

Note. objectName does not contain ".h4d" though it probably doesn't matter since it's the resource editor that exports in this naming format.

The purpose of this feature is for anyone wanting to do png batch editing (editing all of the files in the same way at once). Apparently things programs Photoshop are unable to look in sub folders.

**************************************************

Next update.

Features:
- Create adventure objects from scratch! From the main H4 Resource Editor window, select File->New, and then select Adventure Object.

From there, import your animation, set the footprint size to match, and move the footprint to match the animation base location.

Set the object type to the desired one, and add a flag if the object should be flaggable.

You'll need to figure out the number off height offsets by adding / removing them until you find the correct number.

Bug Fixes:
- Fixed a bug with adding rows to table objects.

- Fixed a bug with adding / removing a flag from an adventure object.

**************************************************

Latest update!

Features:
- Terrain files are now viewable and can be exported as an ora file or a folder of png files. I plan to add import options as well.

- Ability to easily add or remove height offsets for adventure objects. This is actually pretty huge as it enables you to quickly and easily figure out the correct number of height offsets for any particular image you've imported. Simply add one and save, or remove one and save, and then test adding the object to the editor's palette until it works.

This little addition means I should actually be able to just start creating adventure objects from scratch, though figuring out the correct number of height offsets will still be on the user. Hopefully sometime soon I'll be able to run a few more tests to see if I can figure out how the correct number of height offsets is calculated.


Bug Fixes:
- Fixed an issue handling adventure object codes that mapped to more than one adventure object type

- Fixed a threading issue when importing ora files.

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


Honorable
Supreme Hero
Modding the Unmoddable
posted August 31, 2021 01:28 AM

Seems steadily improving, congratulations
____________
https://www.moddb.com/mods/greatest-mod

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


Responsible
Famous Hero
posted September 01, 2021 10:25 AM

NimoStar said:
Seems steadily improving, congratulations


No need to exagerate the excitement now, lol..
____________

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


Honorable
Supreme Hero
Modding the Unmoddable
posted September 05, 2021 05:13 PM

Well, I believe the improvements are pretty good.

If that's sarcasm, I don't even know how many emojis I should use.

Also, I am the only one to congratulate :'v
____________
https://www.moddb.com/mods/greatest-mod

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


Hired Hero
posted September 17, 2021 08:52 AM

Hi IliveInaBox!

I just wanted to mod h4 on my laptop with your tool and i cant open heroes4.h4r

maybe the file is to big? the laptop i use is not the newest. in the log it said something like "out of memory" ...

thank you in advance

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


Responsible
Famous Hero
posted September 17, 2021 04:20 PM
Edited by iliveinabox05 at 23:25, 28 Sep 2021.

leadcrow said:
Hi IliveInaBox!

I just wanted to mod h4 on my laptop with your tool and i cant open heroes4.h4r

maybe the file is to big? the laptop i use is not the newest. in the log it said something like "out of memory" ...

thank you in advance


Lame! Okay yeah that's my fault. I thought that allocating the memory upfront for the ByteBuffer wouldn't have that issue, but looks like I need to go back to the drawing board.

For now I'll just revert back to using the MappedByteBuffer, which has the issue that once you open an h4r file, you can't save over it if you make changes to it until program termination (have to save as a different name).

I do have an idea of how to get around this, which is to first make a copy of the h4r file in /tmp, and then use a MappedByteBuffer to open that.

Still a few edge cases to consider there, but it should work.

Edit. Change reverted and the delivery is updated, so grab a new copy and let me know how it goes!

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


Hired Hero
posted September 17, 2021 04:49 PM

@iLiveInAboX: Thank you, works now I was aware of the issue that you have to save into a new folder each time

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


Responsible
Famous Hero
posted September 17, 2021 05:13 PM

leadcrow said:
@iLiveInAboX: Thank you, works now I was aware of the issue that you have to save into a new folder each time


Great! Glad it's working. Let me know if you have any other issues.

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


Honorable
Supreme Hero
Modding the Unmoddable
posted September 20, 2021 09:39 PM
Edited by NimoStar at 21:39, 20 Sep 2021.

Well, speaking of issues, the mass import of files to h4r is limited. Which Is why I had to split the mod into 4+ folders to individually import.

Once you have say, 4000+ files to import (in reality, less), the program starts skipping some of them/not being able to process and save it correctly, resulting in incomplete .h4r packs.
____________
https://www.moddb.com/mods/greatest-mod

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


Responsible
Famous Hero
posted September 22, 2021 05:13 AM

NimoStar said:
Well, speaking of issues, the mass import of files to h4r is limited. Which Is why I had to split the mod into 4+ folders to individually import.

Once you have say, 4000+ files to import (in reality, less), the program starts skipping some of them/not being able to process and save it correctly, resulting in incomplete .h4r packs.


Number of files being added to an h4r file should be irrelevant. Do you have an example of which files are not making it into an "add all"?

You could also save me a log file when it happens so I can take a look and see what's going on.

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


Honorable
Supreme Hero
Modding the Unmoddable
posted September 24, 2021 07:21 PM
Edited by NimoStar at 19:24, 24 Sep 2021.

I can assure it's due to the number, because all are added when in different folders and using "add all" to each folder.

But well, I will se what I can do.


_____________________

Also, terrain files can be viewed and exported, but can they be imported? Or is it to export only?
____________
https://www.moddb.com/mods/greatest-mod

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


Responsible
Famous Hero
posted September 25, 2021 02:58 AM

NimoStar said:
I can assure it's due to the number, because all are added when in different folders and using "add all" to each folder.

But well, I will se what I can do.


_____________________

Also, terrain files can be viewed and exported, but can they be imported? Or is it to export only?


It is not the number of files:

for (File f : files)
{
   if (!f.isDirectory())
   {
       mH4rFile.addFile(f);
   }
}

It looks like I have coded it to only look in the selected directory, though I can't remember if there was a good reason to not look in sub-directories.

Unless you have hundreds of sub-directories, it shouldn't be that painful to just "add all" for each of them until I update it to look in sub-directories.

There is also a display bug where if you have items named like so:

seer's hut.farm.h4d
seer's hut.farm.se.h4d

that you will only be able to open the second one in the resource list. Both files are still contained in the h4r and are readable by the game / editor.

There is also another issue of trying to add a file that already exists in the h4r container. I just saw another bug that stems from that assumption as well.

As far as terrain, yes, at the moment you can only view/export terrains. I haven't gotten around to importing just yet. There may be more things to consider than just replacing the various terrain images that also needs to be done.

If you look at the various terrain types, each of them look to have the exact same used pixels, excluding the magic terrains. Probably a little more research in that department, but I do plan to get importing added sometime in the future.

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


Honorable
Supreme Hero
Modding the Unmoddable
posted September 25, 2021 06:01 AM

Quote:
It is not the number of files:

for (File f : files)
{
  if (!f.isDirectory())
  {
      mH4rFile.addFile(f);
  }
}


Doesn't matter, what I mean is that there could be some kind of buffer overflow or another type of cache problem, where not all files can be correctly packed.

But will require more experimenting to pinpoint the exact problem, I guess.

Quote:

There is also a display bug where if you have items named like so:

seer's hut.farm.h4d
seer's hut.farm.se.h4d

that you will only be able to open the second one in the resource list. Both files are still contained in the h4r and are readable by the game / editor.


What I mean is not a filelist viewing bug, but an ingame reading bug. The missing "packed"# files are not read by the game.

Quote:
As far as terrain, yes, at the moment you can only view/export terrains. I haven't gotten around to importing just yet. There may be more things to consider than just replacing the various terrain images that also needs to be done.

If you look at the various terrain types, each of them look to have the exact same used pixels, excluding the magic terrains. Probably a little more research in that department, but I do plan to get importing added sometime in the future.


"exact used pixels" seems to be a misnomer,. You mean number?

If so there is an easy explanation, possibly: Some terrains are "dual" (and come in two files) and other terrain types are "single". "Magic" terrains are single AFAIK (too bad, unlike Heroes 3 terrains, there is no effect. Something like +25% effect to Life Magic when in Field of Life would have been relatively easy to implement. Then again they didn't even implement those terrains in combat. Combat over Scorched Earth looks like grass instead of volcanic, even. Dammit NWC , you had two expansions
____________
https://www.moddb.com/mods/greatest-mod

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

Page compiled in 0.0582 seconds