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»
Karmakeld
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.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Baronus
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.

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


Promising
Known Hero
posted July 21, 2017 11:52 PM

What is H4 resource helper? Or is that Namerutan's tool?

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Karmakeld
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.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
radmutant69
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.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Baronus
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...

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
radmutant69
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.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Baronus
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...

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


Promising
Known Hero
posted July 22, 2017 12:33 PM
Edited by radmutant69 at 12:34, 22 Jul 2017.

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.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Baronus
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.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Karmakeld
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.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Baronus
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.

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


Promising
Known Hero
posted July 25, 2017 08:30 AM
Edited by radmutant69 at 09:56, 25 Jul 2017.

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.

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


Legendary Hero
posted July 25, 2017 10:47 AM

How to fit picture to this red area? Where is data?

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


Promising
Known Hero
posted July 25, 2017 11:24 AM
Edited by radmutant69 at 11:30, 25 Jul 2017.

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...

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


Legendary Hero
posted July 25, 2017 01:52 PM

It must be codded but where?

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
radmutant69
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

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


Legendary Hero
posted July 25, 2017 04:45 PM

Maybe its codded with shadow? I must experiment with it...

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


Responsible
Supreme Hero
posted July 25, 2017 06:07 PM
Edited by Karmakeld at 18:13, 25 Jul 2017.

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...

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


Promising
Known Hero
posted July 25, 2017 07:45 PM
Edited by radmutant69 at 19:47, 25 Jul 2017.

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.

 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.0375 seconds