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: Researching how to add new objects
Thread: Researching how to add new objects This thread is 11 pages long: 1 2 3 4 5 6 7 8 9 10 11 · «PREV / NEXT»
NimoStar
NimoStar


Responsible
Legendary Hero
Modding the Unmoddable
posted September 14, 2017 10:23 AM
Edited by Galaad at 23:07, 14 Jun 2022.

I have never seen H3 objects for H4 :v but most would not fit... probably only the most "computer-made" such as the Conflux.

Remember there is these as potential sources to make new objects:

heroescommunity.com/viewthread.php3?TID=43020
____________

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


Promising
Known Hero
posted September 14, 2017 11:05 AM
Edited by radmutant69 at 11:09, 14 Sep 2017.

Well, it looks like this :




They are not really good. We surely need new stuff instead.

Edit: your link doesn't works. Error 404.

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


Responsible
Legendary Hero
Modding the Unmoddable
posted September 14, 2017 11:11 AM

Small. But other than the egyptian one (too dark shadows, pixel art instead of render) they don't really look out of place either. Good for liliput's island


Also look at here.
I think I may have solved the best way available to add new objects. For good.
____________

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


Responsible
Supreme Hero
posted September 17, 2017 04:20 PM
Edited by Karmakeld at 17:58, 17 Sep 2017.

radmutant69 said:

Edit: here starts the image of an object:



You have to paste the new image from the blue marked 00 01 01 00 because the first two bytes are the count of the images in the object in total (in this case it's a single frame and a shadow.)



Have you noticed exceptions to where the image start (how the code looks)??

In most files I can locate the 00 01 01 00, but when I look at the animated column in hexeditor, it looks like: (4 times) ff 0d 00 ff 00 01.. 0d is 13, right, so this is where it says there are 13 images.
When searching for 00 01 01 00 I can only locate 2, above frame 006 and near frame 008..


Nimostar said:
Nice. How did you make it appear in front of objects? Did you put it in another "base object"?



In the new object, he used the base object for Decorative, Column Good, so it would seem you're right that some objects are set to appears on top of others, although I don't recall ever encountering objects that would just immediately drop to the background like the former Flame Column did.


EDIT:
I'm just toying around with the guides you both made/updated. Initially I failed with an attempt to simply mirror Column 4 with shadow, using NimoStar's  (guide and pasting it into Column 4. I also tried simply adding the header to the new object, which also failed. So back to Radmutant Snake Skeleton guide. Now that appeared to work as I was finally able to draw the object into the editors palette, BUT.. And here's the odd part, I can't drag it into the map. I get a + and small squire like any other object, but it just isn't there, despite being visual in the palette..
Have a look at it here: Mirrored Column4 (ora file is included)

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


Promising
Known Hero
posted September 17, 2017 05:56 PM
Edited by radmutant69 at 18:24, 17 Sep 2017.

I think that strange behavior of the previous column and other objects I made was probably because of the different type of images and their simple transparency.

The old images had a 01 and a lot of 00s right after their frame names while in my new objects there is 04 and other stuff just as all of the original images in the game.

But it's no longer a problem so... nevermind I guess.

Karmakeld said:


EDIT:
I'm just toying around with the guides you both made/updated. Initially I failed with an attempt to simply mirror Column 4 with shadow, using NimoStar's  (guide and pasting it into Column 4. I also tried simply adding the header to the new object, which also failed. So back to Radmutant Snake Skeleton guide. Now that appeared to work as I was finally able to draw the object into the editors palette, BUT.. And here's the odd part, I can't drag it into the map. I get a + and small squire like any other object, but it just isn't there, despite being visual in the palette..
Have a look at it here: Mirrored Column4 (ora file is included)


Strange. I made it already by simply mirroring the frame in the extracted column, exported as .ora and imported into ResHelper then copypasteed it back into the column object. That's all.

Edit: you saved it as a Column type object but in the file its internal type is a bone. If you replace it with a column file header, it will working. Also: http://www.filedropper.com/mirroredcolumns

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


Responsible
Supreme Hero
posted September 17, 2017 08:51 PM

radmutant69 said:

Edit: you saved it as a Column type object but in the file its internal type is a bone. If you replace it with a column file header, it will working. Also: http://www.filedropper.com/mirroredcolumns


Ah that would make sense thanks. Yet I tried changing the header, but now the object won't read. I tried cutting it, as mine seems longer than your (between evil and the image, but that didn't work either. Sigh.. I'll have to keep practicing, but I guess I've forgotten the basics of how I changed object types..

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


Promising
Known Hero
posted September 17, 2017 09:11 PM

Well the column object has 2 subtypes (decorative -> column -> good) while the bone has only 1 (-> bones). So you should copy the column's header only to the "column" word and replace the bone's header with that.

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


Responsible
Supreme Hero
posted September 17, 2017 09:35 PM

Ok, might try that (although I just got your modifed ones).
Now I just managed to insert a reversed horse skeleton, but have the same initial problem you had (just realized I didn't check if that was the case with the Column), the image being like supersize with the objects placed in the lower corner. Did you solve this, simply by making the image size in Gimp smaller? I'm not a wiz with Gimp, so I haven't yet figured out how to make that small image marker inside the big block which all images appears within (I guess my horse skeleton ended up being 380x375 pixels)..

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


Promising
Known Hero
posted September 17, 2017 09:39 PM
Edited by radmutant69 at 22:01, 17 Sep 2017.

I just confirmed your image is correct. I could insert it into the object Column.3. It is the bigger Column. Maybe your issue is because you tried to insert it into the smaller one. So try it once again:



The other non-centered Column is your "bone" column with replaced header.

Edit: I simply resized the layer when it was needed. It won t cause any problem in the big image itself.  I didn t use Gimp to edit the inserted images btw, I m also not a great wizard in it so usually I used other programs to edit/resize the images.

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


Responsible
Supreme Hero
posted September 17, 2017 10:09 PM
Edited by Karmakeld at 22:11, 17 Sep 2017.

Well I found it did help resizing the image, but I'm still stuck with the slightly out of center issue. How did you fix that and makes sure your image is in the right place, first time? I try to place my image as close to the lower right corner, as the original ones are, but my horse(s) still end up non centered. The worst is infact the one I just resized. But at least I'm progressing, as these have worked in first attempt. The method/guide seems quite reliable so far, at least for single imaged objects.

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


Promising
Known Hero
posted September 17, 2017 10:16 PM
Edited by radmutant69 at 22:27, 17 Sep 2017.

I used exported .ora from the object. I just erased the original image from the layer (that small image marker in the lower corner) and pasted my image directly into it then exported the result. In that way the image will be in it's correct place or very close to it.

Edit: oh, and don't forget to 'Anchor the floating layer' or something like this (Right click on pasted stuff in the layers window then Anchor layer). I often forget it as now.

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


Responsible
Legendary Hero
Modding the Unmoddable
posted September 20, 2017 04:54 PM

What I am having trouble understanding is HOW you expert the image to the GIMP to edit. With namerutan's tool you can export layers and anims, but NOT objects...

Do you said you copy a single frame data to a new file and then open is as a .tga? or what?
____________

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


Promising
Known Hero
posted September 20, 2017 05:23 PM
Edited by radmutant69 at 17:26, 20 Sep 2017.

You can export object and other files too if you open a .h4r file with the tool:



In that case you should see something like this:



Than you can export any or all of the files in that .h4r as .ora images.

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


Responsible
Supreme Hero
posted September 20, 2017 09:24 PM
Edited by Karmakeld at 21:32, 20 Sep 2017.

It does has the ability to export the object/file as data file (eg. Objects) like H4Extractor or MH4 - just use the Extract function - but Namerutan's tool lets you view most of the files and their path (much better overview compared to the other two programs). To save as ora use the Export function.

Once you have edited your image in Gimp, save it as .ora.
Import it with Namerutan's tool, then save as h4d file. Then open the image with Hexeditor as well as the object you want to replace. Then you just copy paste the images. Use the guides posted, it's really simple and fast. I changed the splashscreen (layer file) using the import function and I recall that only required a renaming of the file extention to be read, no hex editing, but you already found out how to change town backgrounds, so you got that covered.

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


Responsible
Legendary Hero
Modding the Unmoddable
posted September 20, 2017 11:04 PM

Ah, i simply did not know you could open Object files with it. That was all, because the image for objects is grayed out.

So, you then saca later as layers ir as animation, after you re-imported the image?
____________

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


Promising
Known Hero
posted September 21, 2017 10:31 AM
Edited by radmutant69 at 10:32, 21 Sep 2017.

In short, yes.

I usually import and save as animation but I think both of layer and animation should work as well. You can also open and export actor sequences too with the tool. This is how I easily made some sequences for that Diablo II monster.

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


Responsible
Supreme Hero
posted September 22, 2017 09:48 AM
Edited by Karmakeld at 09:50, 22 Sep 2017.

Interesting. I import layer and simply save as h4d.
When you export as animation, you still have to hexedit the same things afterwards, right?

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


Promising
Known Hero
posted September 22, 2017 10:34 AM

Well I have no real reason to use animation instead of layer anymore. I'm doing that only because I had some issues with layers before Nimo's breakthrough with the tool. But these files contain the same 'image format' so it's just a habit, nothing more.

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


Responsible
Supreme Hero
posted October 11, 2017 06:13 PM bonus applied by Galaad on 09 Jun 2019.
Edited by Karmakeld at 18:14, 11 Oct 2017.

I found the difference between importing as layer and animation to be exactly as described: Layer will display still images, while animation will display all images as an animation That way you can import an ora file and see if all your layers are placed correctly.


As for adding/copying the shadow part, I've had succes with it. I did a few tests. I mirrored the object 'trees.dead.07' and saved it as h4d file using Namerutan's tool. I only mirrored the image, NOT the shadow at first. Then opened that and the original in HexEditor. The original file has an additional 20 byte in the end ,

which my modded image seems to lack

.

So I did the following:
Deleted the first 2 bytes of my new image (this could possibly be left out, as in most cases, as it seems to be the same code in the original, in which case you should just leave it out from the original).
I inserted the header of the original file in my modded.
.
And it worked.

Now I've tried this with a few objects, and it seems to work with all single imaged files (non-animated).
Just extract the original file and compared the missing part.

I've compared with a few different objects, and although I got no clue what the last part of the objects does or defines, there are some similarites, which I hope someone else can figure out, so that iLiVe../Namerutan might be able to add to the program .
The size of end bytes, may differ from eachother (some contains 16 bytes others 21), but some bytes seems to always be the same:
?? fe ff ff ?? fe ff ff 0? 00 00 00 (?x) ff.

? = a variable number from object to object.
?x = a variable number of ff's in the end.
____________

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


Honorable
Famous Hero
posted October 13, 2017 10:44 PM

A lot of times they have a number which indicates how many bytes follow, such as 04 00 00 00 00 (4, followed by 4 bytes of data), so some of the variable numbers may be following this pattern. Keep in mind these are hex bytes, so 10 == 16, 20 == 256, etc.

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

Page compiled in 0.0998 seconds