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


Responsible
Supreme Hero
posted October 28, 2019 07:15 PM
Edited by Karmakeld at 00:12, 29 Oct 2019.

NimoStar said:
Replacing a single building isn't the same, the building is an animation, but the layout if different. I replaced many individual buildings in my mod for animations - but the building overview was corrupted every time I saved it, even importing the same overview I had exported without any changes. If you have an edited Town Layout file (aka all the buildings) done with namerutan's tool, please do show it, but it just doesn't work for me. It can't be my edits if it happens with the very same exported file


I will try this out and let you know...

NimoStar said:

Quote:
Creature Graphics, I do believe Mirage used Namerutan's tool to import the animations. Simply it's the same procedure as changing the other stuff.. Tutorial found here


Too confusing for me with all the "snowing" :V
What I don't get is why people don't select in the hex editor the parts to change, it's why I did in my toturial. I don't understand their way of "explaining it with words".


Too confusing..? We have/had images up for guiding..
If you'd rather go with hex-editing, just do that. We've already posted descriptions of where images starts and what parts to add, if you're doing it manually.. just read the treads.. But in my optic using the tools is much faster and easier than having to manually scroll through hundred lines of hex code looking for a certain (perhaps unknown) part of a code..

NimoStar said:

Quote:
Now indeed Namerutan's tool CAN export Combat obstacles using the Extract function. I've just tested it. Also H4unpacker and possibly also MH4 can do that as well.
If you can locate where the image begins and ends, I'm certain you can either replace the image part, in a similar manner as we initially did when making new objects, or simply import/replace an image, import it with Namerutan's tool and then add in the header and footprint.
I don't see why this should be any different than making new objects, as long as you stick to existing object types as listed in the combat_obstacles table.


As I said... export and save isn't the same. I can export them, I just can't *make* them.

Existing combat objects also have headers and footers with positional data etc. (even special data as in the case of doors, lookouts, etc. for forts), so it's not so easy for me.


And as I said Export and Extract ISN'T the same, so if you Extract an object, wheter it's a landscape or combat object, you will get a h4d file containing ALL header and footprint info, which is what you seek. Anyway, I'll have a try with some objects..
EDIT: Nimo, take a look here

NimoStar said:

Anyways, thanks for the passability counsel, I didn't know that was possible before. This makes things easier for my proposed garrisons and outposts.

Tho, the question remain, does changing object type within the tool corrupt the file?


I just tested a few objects, and they turned out fine = readable both in the ResourceEditor and in the game editor, so try away.
____________

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


Responsible
Supreme Hero
posted October 28, 2019 08:15 PM

to iLiVe..

just an input/request for when you have the time to add these ..
Could you add
- A drop down bar for Animation speed, to select among the possible ones (I recall it being 1-7).
____________

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


Honorable
Famous Hero
posted October 29, 2019 03:48 PM
Edited by iliveinabox05 at 15:49, 29 Oct 2019.

Changing an objects type in the H4 Resource Editor should work, at least for some types. I didn't have time to test them all, so I'm sure there are other fields that need to be updated for the various adventure objects.

If you find that this feature is not working, please let me know.

It's been a while, so I've forgotten exactly where I left off.

Edit. Michael, added your suggested feature to the OP.

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


Responsible
Legendary Hero
Modding the Unmoddable
posted October 31, 2019 07:17 PM
Edited by NimoStar at 19:19, 31 Oct 2019.

I have realized that just making unpassable tiles unpassable may work "as intended", but is still no replacement for changing the actual footprint / deleting tiles entirely.

For example, these objects are still considered as 3x1 or whatever when creating brushes (or ostensibly random maps), so would-be impassable walls are generated with holes, etc. and this is specially a problem for the aforementioned garrisons and toll gates.


***

In other news, for whatever reason, the editor doesn't open at all any of the equilibris 3.55 objects I tried on it (needed for the aforementioned different passabilities with correct image sizes for 2x1 walls, since the original game ones are just 1x1, and 2x1 objects are small rocks where wall images can't fit)
____________
Never changing = never improving

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


Responsible
Supreme Hero
posted October 31, 2019 11:19 PM

Either just edit the tile info (in the header) to what you need or replace it with the code from an existing object of the wanted size. The latter is sure to work, can't recall with 100% certainty if the first method always works..

The ResourceEditor you mean? I have all the equi 3.55 objects in a h4r file I've packed myself and I can view and open all of the equi 3.55 objects just fine with all data viewable..
____________

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


Responsible
Legendary Hero
Modding the Unmoddable
posted November 01, 2019 07:11 PM

You can open the h4r. But you can't open the objects after exporting from the .h4r - That also means you can't export the .ora, or import to those objects.

I am also having another problem: You can't add flags to objects, even if you make them the appropiate type and give them "flaggable" tick.

The position continues to be greyed out. And the saved object has no flag, and if you re-open it, doesn't have "flaggable" ticked.

here where I tick it, notice flag positions aren't enabled:

image uploader site

This has prevented me from making a 1-tile outpost that looks right in the editor/game since without flag you don't even know who is looking.
____________
Never changing = never improving

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


Honorable
Famous Hero
posted November 01, 2019 08:22 PM

NimoStar said:
I am also having another problem: You can't add flags to objects, even if you make them the appropiate type and give them "flaggable" tick.

The position continues to be greyed out. And the saved object has no flag, and if you re-open it, doesn't have "flaggable" ticked.

here where I tick it, notice flag positions aren't enabled:

This has prevented me from making a 1-tile outpost that looks right in the editor/game since without flag you don't even know who is looking.


Hmm, what happens if you open an object that already has a flag and uncheck the box to attempt removing the flag? I don't recall if checking or unchecking the box is saved in the object. Something I'll have to take a look at when I get home.

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


Responsible
Legendary Hero
Modding the Unmoddable
posted November 01, 2019 08:56 PM

If you uncheck it, the white dot doesn't disappear as it should, and the flag coordinates remain and aren't greyed out.

But the map object indeed won't display any flag even when owned by a player.

Thusly, the problem is mainly with adding flags in practice, because there nothing works. Although the removal could be improved by greying the coordinates and removing the dot while "flaggable" is disabled.






____________
Never changing = never improving

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


Honorable
Famous Hero
posted November 01, 2019 09:28 PM

NimoStar said:
If you uncheck it, the white dot doesn't disappear as it should, and the flag coordinates remain and aren't greyed out.

But the map object indeed won't display any flag even when owned by a player.



I see. This should be small enough that I can hopefully take a look at it and make a quick update when I get home. At the very least I'll be able to come up with an explanation for why that would be.

NimoStar said:
Thusly, the problem is mainly with adding flags in practice, because there nothing works. Although the removal could be improved by greying the coordinates and removing the dot while "flaggable" is disabled.



Agreed.

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


Honorable
Famous Hero
posted November 02, 2019 06:48 AM
Edited by iliveinabox05 at 07:09, 03 Nov 2019.

Hmm, so I checked the code, and checking the flaggable check box does get included in the object, and the x / y coordinates of the flag will be saved as well.

Maybe something else in the adventure object needs to be updated as well?

Edit. I have successfully removed and re-added the flag from the gold mine object. When removing the flag, the owner field is still visible, so I'll have to look into what adds or removes that field from the editing window.

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


Responsible
Legendary Hero
Modding the Unmoddable
posted November 04, 2019 03:00 AM

You mean, after you remove the flag, the "owner" still appears in the editor?

Perhaps you could re-add it, since the original image kept the data for it. But if you try with an image that didn't, like me importing a single tile garrison into a quest hut and changing it to "outpost", the flag will likely not appear.

Speaking of which. Do any of you know of a single-tile default flaggable object in H4? Heroes and creatures don't count :V
____________
Never changing = never improving

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


Promising
Known Hero
posted November 04, 2019 09:58 AM

NimoStar said:
Speaking of which. Do any of you know of a single-tile default flaggable object in H4? Heroes and creatures don't count :V


Customized default objects count?



Garrisons1x1.zip

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


Responsible
Supreme Hero
posted November 06, 2019 11:34 PM

@Derrick, it seem the Resource Editor is able to edit the Foot print height data (I've changed this, and the change appears when viewing in a hex editor), but the width doesn't change. Just FIY, as you recalled neither being programmed yet. However it does seem to corrupt the file, thus you can't open it with neither the ResourceEditor or game editor afterwards. (It can be changed manually without issues.)
Also for some reason it sometimes seems to change the major type code to  ffffffff (this is also seen on the screenshots Nimo posted), although this does not seem to corrupt the files in any way.
____________

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


Honorable
Famous Hero
posted November 06, 2019 11:45 PM

Yeah, I may have started capturing changes to the footprint, but there is work to be done, such as resizing and filling in the additional data that is based on the footprint size. That is what causes the files to be corrupt, but if you change the footprint back, it should be fine again.

Which object in particular is giving the ffffffff as the major type code so that I can take a look?

To respond to Nimostar: Yes, that is what I mean. Even when removing the flag, the "owner" field still shows up in the editor. There is just no visible flag when selecting an owner.

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


Responsible
Legendary Hero
Modding the Unmoddable
posted November 08, 2019 10:26 PM

Quote:
Customized default objects count?


Maybe? If their footprint is 1x1 without passable squares and I can open them with the tool... (unlike with eq 3.55 objects)

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


Responsible
Supreme Hero
posted November 17, 2019 07:17 PM

@Derrick, could you check that importing png's actually work?
I've just tried to import a bunch of single png images and non of them could be imported. Upon exporting one of the png's to ora I realized the image wasn't diveded into frame(s) and shadow(s) layers.
Renaming the png image to base_frame made no difference.
Also not sure how one should be able to import a bunch of png's at once, just recall it was requested and the option is listed..
____________

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


Responsible
Supreme Hero
posted November 17, 2019 10:26 PM bonus applied by Galaad on 17 Nov 2019.
Edited by Karmakeld at 15:44, 24 Nov 2019.

How to use the ResourceEditor - tutorial

A guide on how to use the ResourceEditor to create new objects.

You will need the ResourceEditor, Java to run this program and an image editor with the ability to display layers and read ora format (e.g. freeware Gimp). Having the ResourceHelper may also come in handy for extracting objects as ora images.


In this tutorial, I'll be adding a new garden object, so I've extracted the Gardens.01 object as ora format. Now open it (I use Gimp).



I've resized the image I want to import and exported it as ora format.
Next I delete the image in frame 001 (click on the frame 001 bar and press delete) and paste in the new image. Now the shadow was slight misplaced, so I moved it to match the new image.



Now launch the ResourceEditor.jar. Select File -> Open -> (you can select a varity of formats, not all of which are working atm. though). For this we'll be needing the heroes4.h4r, which is main game file, containg all animations and objects and more. You'll find it in the Data folder loacted within your H4 game folder.



The primary use of this program is to edit adventure_objects, so select the adv_object tab, locate Gardens and click the 01. Note if you use your keyboard arrow to scroll through, the program won't display the object, you'll need to click each line with your cursor.



Now double click to open the object in a pop-up window.



Select File -> Import



Locate the image/animation you want to import (this should be in ora format).



Now you should see your object being displayed. Note the footprint data might not update automatically, so just click 1 up/down on either the x or y bar and it should update.



Now edit the values to fit the footprint to the image.
The GREEN blocks indicate that the object is passable. Select the STOP button, to make tiles passable/inpassable and the YELLOW triangle button to select/remove entrance points. As this is a decorative object, I won't change this.
If you want to change the object type, you can select the Major Type bar and a drop down menu will appear displaying all available types. Same goes for Minor type.
You can also manually edit the animation speed value.
If the object is flagable, you can move the flag position to fit your new object or make an object flagable or not by checking the Flagable box.
The values in the Footprint height and width info, displays the size of the object. In this case it's a 2x2 tiled object. Currently only 1 of the values can be changed with the program, but these values can also be hex edited
All other values should NOT be changed



Now save your object. Saving as h4d format will allow you to quick test if it works. Saving as obj is used for packing files within a h4r file.
Objects should always be saved as "adv_object.(major group type).(object name).h4d



Either save it directly or move your h4d file to the games Data folder. This way the game can read your new object directly from the Data folder, without having to first pack it into a h4r file.



Now open up your campaign editor. Select the Tool menu -> Customize (Alt T, Alt C for quick acces).



Select the Objects Palettes tab. This determines where your new object will be placed in the editor palettes. Select your major and minor palette group. If you want, you can create a new tab.



Double click and you'll see the list of all object in the editor. Type any letter to do a quick search. Object name is the same as file name (adv_object.)Gardens.07(.h4d). Double click or drag the name to the palette. If the object is readable it will appear in the palette.



Let's look at the object as it appears in the editor.
As you can see, it fit's nicely within the grid tiles, it's completely passable and it's type is displayed as Garden.





I recommand that you always replace any new images with those from existing objects and import it into the same object, simply because this is the method that is most likely to be succesfull.
A few notes, to better understand why I suggest this method:
Importing images into existing objects, you should ALWAYS make sure that the size of the new images doesn't exceed those you import into. Trying to import an image that is larger than the one you're importing into, is likely to cause a failure. You can in some cases avoid this by unchecking the "Extra Offsets Present" box, but be aware that this will cause your aboject to ALWAYS be placed behind others if they overlapse.
Also, using the recommended method will also help you avoid any issues with wrong color settings or opacity and you can work your way from the exising shadow.


EDIT:
Mr. iLiVeInAbOxNaMeDdErRiCk..
suggestions for more work for you
here
____________

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


Honorable
Famous Hero
posted December 06, 2019 11:46 PM

Yep, I see it That's definitely on the list of things to implement. The structure of the images is the same as in adventure objects (and anything else that contains image data), so that part is done, however, there is still the alpha bug to contend with.

But, it does seem like there are other fields that we want to edit, similar to how we can edit some things with adventure objects, and then use Namerutan's tool to do the image import / export work, so that can help us get around the alpha bug until I can finally figure out what is going on.

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


Honorable
Famous Hero
posted March 24, 2020 08:48 PM
Edited by iliveinabox05 at 01:16, 15 Oct 2020.

Edit. I've updated the H4 Resource Editor to handle actor_sequence objects (contain the sprites for the various creatures).

------------------------------------------------------

FYI, I made a copy of my current H4 modding repository and created a new gitlab repository for it, which will be available for anyone to view.

If you feel that you can develop, you can be added as a developer, but I can't guarantee that I will accept a merge request. I will review what is being added first.

I will be keeping this open source repository separate from the private one, but if I do accept any merge requests, I will bring the changes into my private repository, where I build my deliveries.

https://gitlab.com/iLiVeInAbOx05/heroes-4-modding-open-source

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


Legendary Hero
posted October 16, 2020 11:25 AM

Great! Since we start here HIV Restoration years ago we have great progress as never before! This game needs reworking very much. Harm to lost these new concepts because was good. Fullfunctionally resource editor is last step to have HIV renowated.

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

Page compiled in 0.0821 seconds