|
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» |
|
Karmakeld
Responsible
Supreme Hero
|
posted July 21, 2017 11:07 PM |
|
|
Baronus said: I can announcing new succes. Ive added layer as adventure object!
Layer is rectangle and its simply indexed raw. You can do it with gimp and irfan and copy paste!
Extract using resedit2 bigger layer as bmp paste your picture, convert to raw and copy raw to layer in the same place.
picture begins after 00 ends the same 02 0011... etc size is alwas height x width eg 80 x 200 = 16000. You must calculate it ad do it correctly.
Next paste layer as you done with portrait!
Yes bigger can be added you must use bigger rectangle layer.
Just out of curiosity, which layer did you use and what did you add - just image or object, artifact..? Did you resize the layer? With the H4 resource helper, you can replace a layer (e.g. Splash screen) in Gimp (as .ora), then import it to the H4 resource helper and it can save it as h4d file that easy.
But I've only succeed with the splash screens, not objects.
|
|
Baronus
Legendary Hero
|
posted July 21, 2017 11:49 PM |
|
|
All rectangle layer can be used. Size as you want. But only one picture from layer. There are more than 1. Ive used skill picture.
|
|
radmutant69
Promising
Known Hero
|
posted July 21, 2017 11:52 PM |
|
|
What is H4 resource helper? Or is that Namerutan's tool?
|
|
Karmakeld
Responsible
Supreme Hero
|
posted July 22, 2017 09:31 AM |
|
|
Yes, Namerutan's tool is the Heroes 4 Resource Helper.
If his link still works, I could point you to it. Although not finished, it's quite useful, as you can view most of the images/animations packed in the h4r files and it can pack h4d files with just a few clicks.
|
|
radmutant69
Promising
Known Hero
|
posted July 22, 2017 10:15 AM |
|
|
Well, if it can converting at least the campaign splash screens properly, that could be really useful. It looks we can import images like those into any objects as Baronus said.
|
|
Baronus
Legendary Hero
|
posted July 22, 2017 11:56 AM |
|
|
All single rectangle layer can be usefull! Not only screen :-) You can find optimal size because is no sense to 52px objects give 400 px picture. It makes to big objects 133 kb and more if 10 kb is enough...
|
|
radmutant69
Promising
Known Hero
|
posted July 22, 2017 12:18 PM |
|
|
Yes, you're right. But for example the mummy dwelling's image size is about 125x100 pixel. I found some layers whats are bigger than this, like 180x180 spell icons but not the size is my real problem. It's just hard to build correctly these files from raw image, palette and header and other pieces.
|
|
Baronus
Legendary Hero
|
posted July 22, 2017 12:28 PM |
|
|
Palette is usually 256 colors its codded on the begin 02 00 0101
0101 means 255 +1 = 256 colors.
768 bytes
Picture width x heigth.
Maybe I will find some raw tool. Maybe helpfull...
|
|
radmutant69
Promising
Known Hero
|
posted July 22, 2017 12:33 PM |
|
|
I could add palette corretly to that black stuff yesterday with your help. Now it has nice colors but still not transparent. Now Im1m working on that. I'm progressing slowly but it could be much easier with a working converter. I think.
|
|
Baronus
Legendary Hero
|
posted July 22, 2017 01:31 PM |
|
Edited by Baronus at 13:33, 22 Jul 2017.
|
Second color in palette 000000 and after frame001 write 01 and its transparency. I think that if I will find raw tool still will be copy paste because h4def is another than simply raw. Only use it.
|
|
Karmakeld
Responsible
Supreme Hero
|
posted July 22, 2017 02:33 PM |
|
|
radmutant69 said: Well, if it can converting at least the campaign splash screens properly, that could be really useful. It looks we can import images like those into any objects as Baronus said.
That it can. You simply extract a splash screen from the Resource Helper (extracted as .ora). Open it in e.g Gimp and replace it with your image. Save it. Import the layer into the Resource Helper and save it as h4d file. I've done it with both the big and the small splash screen. It's similar method, they're just named layer.splash_screen.campaign_life01.h4d or something like that, placed in the Data folder it overwrites. Still have to try using it with editing objects. I attempted a few times and failed, but I simply copied the header of objects and inserted it, which fails. I'm gonna try the method you posted, using the snake skeleton and just replacing the image. I'll pm you the link when I find it. Baronus should have the tool available.
|
|
Baronus
Legendary Hero
|
posted July 22, 2017 05:05 PM |
|
|
It works only with screens size and transparency you must correct. But maybe will be faster. For other sizes you must extract picture from layer.
|
|
radmutant69
Promising
Known Hero
|
posted July 25, 2017 08:30 AM |
|
|
Just a little useful info: you can import images with alpha channel directly into the Resource Helper. No need to extract the original images. Add alpha to your image, save it as .tga (for example), convert it to .ora and you can import it as well.
Edit: yes, it can be used as a converter:
Edit2: Karmakeld, if you import a single image, you have to cut the last 12(?) bytes of it when you paste it into an object file. Also I've imported it as an 'animation' when I made this stuff above.
|
|
Baronus
Legendary Hero
|
posted July 25, 2017 10:47 AM |
|
|
How to fit picture to this red area? Where is data?
|
|
radmutant69
Promising
Known Hero
|
posted July 25, 2017 11:24 AM |
|
|
I used a too big image (as big as the original embalmers lab) and the snake skeleton object (as usually) to test it, so it don't fits anyway. Strangely I could not add the picture into the embalmers lab object, I had to add it first into the skeleton then change it's object type.
I think I should use a much smaller image to do it better but now I'm working so I cannot do more experiments...
|
|
Baronus
Legendary Hero
|
posted July 25, 2017 01:52 PM |
|
|
It must be codded but where?
|
|
radmutant69
Promising
Known Hero
|
posted July 25, 2017 02:36 PM |
|
|
I don't know that. I've tried to figure out what are doing those code parts after the flag data, but I didn't find any visible effect when I changed them. Except some crashes of course
|
|
Baronus
Legendary Hero
|
posted July 25, 2017 04:45 PM |
|
|
Maybe its codded with shadow? I must experiment with it...
|
|
Karmakeld
Responsible
Supreme Hero
|
posted July 25, 2017 06:07 PM |
|
|
radmutant69 said: Just a little useful info: you can import images with alpha channel directly into the Resource Helper. No need to extract the original images. Add alpha to your image, save it as .tga (for example), convert it to .ora and you can import it as well.
Edit: yes, it can be used as a converter:
Edit2: Karmakeld, if you import a single image, you have to cut the last 12(?) bytes of it when you paste it into an object file. Also I've imported it as an 'animation' when I made this stuff above.
What do you mean by 'add alpha' to my image?
So you successfully mirrored the Embalmers Lab with animation? Awsome, I hope you'll share your method or the object, so we can see what you did. Adding mirrored objects would be quite useful.
Thanks, I'll try cutting the last part next time, although I didn't exactly try to paste it into an object, rather I tried to add the object info (header) to the image - that would most likely also require some cutting.
For now I'll play around with the smaller images (82x82) that I've had succes with - there's a lot of combat obstacles the Equi team didn't add to v.3.55.
I also hope to learn how to turn animations like the Skeleton Transformer or the Grail structures into objects. Or add more Creatures as Quests - but those looks to have been edited somehow by the Equi team.
But both your efforts are greatly appreciated.
About the object size, I've already mentioned the H4 resource tool can display the image size, shadow size and total size. Perhaps you could find matches with hex code?
When I extracted some images, they always have a larger size than the actual image - similar to Radmutants screenshot, but the image has a small marking in the lower right corner, hope this info can be useful somehow...
|
|
radmutant69
Promising
Known Hero
|
posted July 25, 2017 07:45 PM |
|
|
The alpha channel is some kind of transparency of an image. You can do it with Photoshop, paint shop or maybe with gimp. You just select the part of the image what you want to keep visible and save it to an alpha channel. The other parts of this image will be transparent.
The resource helper can import this kind of ora images.
About town animations: that's easy. You have to cut the first few bytes of the file (keep from 020000010100) and add an object header. But it will looking bad because these anims are not in that isometric view as the map objects.
|
|
|