|
Thread: Researching how to add new objects | This thread is pages long: 1 2 3 4 5 6 7 8 9 10 11 · «PREV / NEXT» |
|
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
____________
|
|
radmutant69
Promising
Known Hero
|
posted September 14, 2017 11:05 AM |
|
|
Well, it looks like this :
They are not really good. We surely need new stuff instead.
Edit: your link doesn't works. Error 404.
|
|
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.
____________
|
|
Karmakeld
Responsible
Supreme Hero
|
posted September 17, 2017 04:20 PM |
|
|
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)
|
|
radmutant69
Promising
Known Hero
|
posted September 17, 2017 05:56 PM |
|
|
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
|
|
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..
|
|
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.
|
|
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)..
|
|
radmutant69
Promising
Known Hero
|
posted September 17, 2017 09:39 PM |
|
|
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.
|
|
Karmakeld
Responsible
Supreme Hero
|
posted September 17, 2017 10:09 PM |
|
|
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.
|
|
radmutant69
Promising
Known Hero
|
posted September 17, 2017 10:16 PM |
|
|
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.
|
|
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?
____________
|
|
radmutant69
Promising
Known Hero
|
posted September 20, 2017 05:23 PM |
|
|
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.
|
|
Karmakeld
Responsible
Supreme Hero
|
posted September 20, 2017 09:24 PM |
|
|
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.
|
|
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?
____________
|
|
radmutant69
Promising
Known Hero
|
posted September 21, 2017 10:31 AM |
|
|
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.
|
|
Karmakeld
Responsible
Supreme Hero
|
posted September 22, 2017 09:48 AM |
|
|
Interesting. I import layer and simply save as h4d.
When you export as animation, you still have to hexedit the same things afterwards, right?
|
|
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.
|
|
Karmakeld
Responsible
Supreme Hero
|
posted October 11, 2017 06:13 PM |
bonus applied by Galaad on 09 Jun 2019. |
|
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.
____________
|
|
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.
|
|
|