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 · NEXT»
Karmakeld
Karmakeld


Responsible
Supreme Hero
posted March 29, 2017 10:25 PM bonus applied by Galaad on 09 Jun 2019.
Edited by Karmakeld at 13:07, 15 Oct 2017.

Researching how to add new objects

I'm gonna dedicate this tread to the research and discussion about how we can add new objects to H4. NimoStar have already shown a lot of possibilities with his modding, and Namerutan posted a teaser object of a new object, a new column with the Viewing Crystal on top. Also we know Equilibris team managed to add new objects, we just don't know how. I'm hoping others will join me in the search to finding ways to do so.

One of my first steps is to compare the hex codes of the Column Crystal Sphere object with the exported Ora picture of it.

Equilibris also managed to extract some of the combat objects and turn them into adventure objects.
In their version 3.55 they also managed to make Quest Huts based on Creatures.
I hope to find some similarities between the added objects and the original objects, and hopefully find the out how they edited them into new objects.


UPDATE:
As Radmutant found a way to add new objects and other modding projects are in progress, I've created this folder at my Google Drive. I will upload all  new/modded objects here and encourage other modders to use it as well, so that ppl. can easily access new mod files. The folder will be available to all, but only invited people can edit it. If you're a modder, feel free to pm me, to get invited.

I would like modders to use or create relevant folder -> subfolders, for easy overview. E.g. new Quest Hut with Tree of Knowledge image, will appear in Objects with Switched (existing H4) Images, while Radmutants mirrored Columns, should be placed in Mirrored Objects -> (subfolder) Landscape Objects.

I will try to update this post, as new stuff are added. Modders could do the same, by posting or pm when stuff has been added.


UPDATE ON 15/10-2017.
The folder mentioned above now contain a number of folders and files:
Folder Equilibris 3.55 objects contains new objects added in that version of Equilibris.
Layer Files now contain 6 fully build town screens by Trashid and the extended HD versions of the original town screens. As well as some new/modified Hero Portraits.
Mirrored Objects contains 14 mirrored Creature Dwellings and 7 mirrored landscape objects (several of these by Radmutant69).
Objects with new image contains 8 objects with new/modified images.
Objects with Switched Image contains several modified objects, like 'Evil' Sanctuary, Quest Huts with the appearance of existing Adventure Objects, like dwellings, Power Ups etc as well as Portals looking like Crack holes and more.

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


Responsible
Supreme Hero
posted July 07, 2017 07:29 PM

A while ago Baronus found and posted this guide on CH, explaining how layers work. Hopefully this could be a small step in understanding how new objects can be added to H4.

I found very good description defs in Heroes IV:
http://www.heroesofmightandmagic.es/for ... 2&start=15

File format h4l (layers) * block of images from the game heroes4 * * abenhor (abenhor@tabernaberserker.es) description * * there may be many small images cornered inside a large block. * the game uses the full block to reference the position of an image on a template. * * to calculate the width and height of each image within a block, note that: *-margenizquierdo is actually the first pixel painting, starting from zero. * therefore, if margenizquierdo = 23, it means that the 23 first pixel on the left (from zero to the twenty-second) are left transparent. *-margenderecho is actually the last pixel painting, starting from zero. * therefore, if margenderecho = 54, means that they are painted only the pixels from 23 to 54 (32 in total), leaving the rest transparent. *-the same applies to the top and bottom margins. * * in every image there is an area of image and, optionally, a description of the transparency. 02 bytes - nnnn - numeroimagenes (number of images in the file) {image1: 02 bytes - nnnn - longitudpaleta (number of colors in the palette) 02 bytes - nnnn - coloralfa (color for shadows mix) longitudpaleta * 3 bytes {palette: array [1.. longitudpaleta] of array [1.. 3] of bytes;}} (palette rgb)} 02 bytes - nnnn - longitudnombre (the image name length) nn byte - string - name (name of the image) 01 byte - nn - shadows (to soften (antialiasing) the image on the background overlay) / 0 - without transparent areas (usually, dialog boxes) / 1 - with transparent areas, but without alpha channel / 4 - with transparent areas, and alpha channel (these are those that i have gone mad) 04 bytes - ùùùùùùùù - margenizquierdo (horizontal displacement of the image inside the block) 04 bytes - ùùùùùùùù - margensuperior (vertical displacement of the image inside the block) 04 - ùùùùùùùù - margenderecho bytes (width in pixels = margenderecho - margenizquierdo + 1) 04 - ùùùùùùùù - bottommargin byte (height in pixels = bottommargin - margensuperior + 1) {descripcionlineas: array [1.. high] of record} {{02 - nnnn - inix byte (first pixel of the line, filled with pixels transparent at the beginning of the line) 02 - nnnn - finx bytes (pixel of the line, filled with transparent pixels on the right) 04 bytes - ùùùùùùùù - direccionlinea (data direction of the line, in the matrix datoslineas)}} {datoslineas: array [1.. high] of record {pixels: array [descripcionlineas.finx - descripcionlineas.inix] of bytes;}} (colour indices of each pixel, from left to right and from top to bottom.) (apply the index to matrix palette to have color components.) {}} [optional {box shadows and transparencies}] / * end of the image1} {image2...} { ..... } {pickkkk...} * box of shadows and transparencies * consists of zero, one or two parties, * depending on "sombras" (0, 1 or 4) " The exact formula of the length of the top = (longituddatos + 1) divided 2; the exact formula for the length of the second part = (longituddatos + 131) split 128; and that affects the acceleration. each byte of the second part corresponds to 128 bytes of longituddatos. each byte is divided into 4 parts, each part (2 bits), is responsible for 32 pixels. these two pixel values are: 00 - all pixels are transparent and can be omitted. 01 - all pixels are fully opaque (alpha = 255) and it is not necessary that they get mixed up with the base. 10 - all pixels are more opaque (alpha = 255) as the transparent color and no need to mix with the base. 11 - there are pixel with an alpha value variable, different from zero (or 255); the alpha channel should be mixed with the base. with the first three modes is very fast, but the room involves a slow process, so it is only used for the edges of the images. the byte following the size of palette, coloralfa, is the transparent color. all pixels with a color below this number not shown in modes 10 and 11. in cases in which the mask has no acceleration (if the image type is not 4) is for all pixels in 10 mode. It has this. spend 3 or 4 files cmp and a screenshot of the game or something similar where these images are vein. and if there is something that you have clear, starting from a partial description always speeds up the theme. ...

With translator. Maybe it will be usefull?

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


Legendary Hero
posted July 08, 2017 08:06 AM

Since this time Ive found this guide as you know I discovered more and more and my knowledge is bigger a lot too. Thanks for remind. To build new defs eg. units we need about 1000! frames and its imposible by handmaking. It must be 3dstudio to project and automatic conversion to def file. No another way. Map objects are easiest but handmaking is hard too because it need precise cutting. Next it needs properties programming! Now we can change only look.

I think that now most important is campaign splashscreen making. For campaign makers. Now they can use own illustrations for own campaigns. Next they can project new look of objects using def renaming like in Nimostar guides.
Changing 2d events, layers, icons is realative easy and possible too by handmaking copy paste.

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


Promising
Known Hero
posted July 08, 2017 01:43 PM

Ok, but what image format can be inserted into the game objects?

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


Legendary Hero
posted July 10, 2017 09:36 AM

Game format is raw and tga. Heres guide:
HIV def guide

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


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

I think we can use the FaceKit to add new pictures to the game. The only problem is the proper placing of the image.



Edit: it works with Equi Facetool too.


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


Responsible
Supreme Hero
posted July 12, 2017 10:19 PM

radmutant69 said:
I think we can use the FaceKit to add new pictures to the game. The only problem is the proper placing of the image.



Edit: it works with Equi Facetool too.




Wow Radmutant, really great. Would you be so kind as to post a guide, at least for the Equi FaceTool? I would really love to know how to add or change objects.. Were you able to define the type of object as well?

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


Responsible
Supreme Hero
posted July 12, 2017 10:22 PM

Baronus said:
Next they can project new look of objects using def renaming like in Nimostar guides.
Changing 2d events, layers, icons is realative easy and possible too by handmaking copy paste.


Baronus, could you post a detailed guide, on how you add or change layers, icons etc.??

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


Promising
Known Hero
posted July 13, 2017 08:15 AM
Edited by radmutant69 at 10:18, 13 Jul 2017.

I used the same method what Baronus used to change the creature portraits. I just replaced the whole image in the mummy dwelling (Embalmers Lab) with the newly added portraits.

But I still can't figure out how could I take the image onto that red crap. Here are the new objects:

http://www.filedropper.com/newobjects

Compare them with the original mummy dwelling in a hex editor. You will clearly see the changes.

Edit: I think I should also replace/remove the shadow part of the file, but I don't know how to do that properly.

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


Legendary Hero
posted July 13, 2017 02:34 PM
Edited by Baronus at 14:36, 13 Jul 2017.

BEWARE! I try it last year and only result is editor desctruction! This day the same! I have backuped all files so I can restore but other people can have problems. You must backup aop files deafault carryover and other because new file is saved! And change editor. If its failed you have failed in save and its end of map editing. You cant use editor. The same with equilibris editor. It changed editor too and old editior can be broken. Cant recomend it because I have only problems with adv defs maked facetool and copy past... No succes with this metod...

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


Promising
Known Hero
posted July 13, 2017 04:54 PM
Edited by radmutant69 at 22:07, 13 Jul 2017.

****!



I'm advancing...

Yeah. It's risky. I just killed my editor. But I won't give up!

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


Legendary Hero
posted July 13, 2017 11:31 PM

Yes  I must restore aop all the time. Its not correctly and sometimes may work. Mine never... Dont see any changes still mummy dvelling... Its hard to do something in HIV. Maybe another way... Future days...

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


Promising
Known Hero
posted July 13, 2017 11:57 PM
Edited by radmutant69 at 00:06, 14 Jul 2017.

Of course it's a mummy dwelling. Now I'm trying to add new images, not really new objects. I'm sure I can't do that anyway.

But at least the image adding is working as well.


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


Legendary Hero
posted July 14, 2017 08:45 AM

Ive still old look. No changes. Editor and game ignoring new def. But I see you use Eqilibris editor. Maybe Eq is little another and read this new "format". I try standard editor and game:
1. Objects - zero changes.
2. Artfacts - editor destruction.
So at this moment I dont see way. But maybe future...

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


Responsible
Supreme Hero
posted July 14, 2017 05:57 PM

Thanks for the replies both of you.
Namerutan added a crystal column, and I'm pretty sure I could that in both the WoW and Equi editor, but your object might be slightly different..

My laptop just decided to make a complete reboot the other day and reinstall windows, erasing all my programs, but I'll take a look at it. Still haven't tried Baronus' method, as I've previously found other ways to add the splash screen. I might try that out as well with object images. I assume your new mummy dwelling is replacing existing dwelling or another existing image?
But still hopefully a step in the right direction.

About the red crap, what is your intention?

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


Promising
Known Hero
posted July 14, 2017 09:50 PM

That new dwelling don't replace any existing things, because it has a different filename, and you can duplicate any of the objects in that way.

About the 'red crap'... well, I tried to move the image into the middle of the passability stuff, but I can't. It's probably because the size of my imported image was only 82x82, and the Embalmers Lab's is much bigger.

Later I used one of the small bone objects as template instead of the Lab. The result was far better, as you can see above. But it's still not perfect.

I think we can only adding small landscape objects like those bones, flowers, mushroom etc. with this method correctly. In that case we don't need to worry about any passability data, and the image will be exactly where we wanna take it.

Now I'm trying to add a correct flag to the small pyramid, but somehow it don't wanna working so easy as other buildings.

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


Responsible
Supreme Hero
posted July 14, 2017 09:59 PM
Edited by Karmakeld at 23:27, 14 Jul 2017.

I'm aware of the duplication possibility, was just wondering if you had to replace the embalmers lab image.

If it's merely the pass ability info you need to edit that's rarther easy. All you need to do is find a matching object and copy the entrance info, but I'm not sure if that's your issue (it'll be easier to know when I can download your object and view it in the editor, instead of on my phone - hopefully I'll be up an running once again during the weekend).

EDIT: Now I see the issue. The entrance sure is far away from the actual object.. hmm..

Baronus, try changing the file name from .obj to .h4d when placed in the Data folder. They work for me. Also you need to extract the files manually to your objects palette -> Tools -> Customize -> Creature generators.aislinnportrait and creature generators.tombofcurses

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


Legendary Hero
posted July 15, 2017 08:59 AM

I know that must rename h4d :-) I do it here in past :-) But it dont works! Editor still read old picture! Thanks for pallete editing way. Dont try it. Ive done it by artifacts replacing. AND IT WORKS! I can confirm! WE DO IT! We can made new map objects THAT EASY WAY :-) But I discovered MORE! :-)
radmutant69 you have big luck :-)  Thanks for help! I delight that now Im not alone in HIV def making :-) I cant done it because I try inject big object in small object!
I dicovered that... BASE OBJECT MUST HAVE BIGGER SIZE THAN NEW INJECTED! In other case you have crash! And editor destruction. This is the reason of my problems. Fortunetly radmutant69 pasted small avatar picture to big mummy dvelling and it works :-) Not perfect but is!

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


Promising
Known Hero
posted July 15, 2017 10:42 AM
Edited by radmutant69 at 10:51, 15 Jul 2017.

Baronus said:
BASE OBJECT MUST HAVE BIGGER SIZE THAN NEW INJECTED! In other case you have crash!


That's not always causing crash. As I said, later I added the pictures into that small snake skeleton object, saved it, and after that I changed the object type to the mummy dwelling. It works for me despite the skeleton's image is only 51x28 pixel. Now the pyramids are almost at their correct place:



My only problem now is I cannot add the capture flags to them as to other stuff. Yet.

Edit: http://www.filedropper.com/newobjects2

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


Legendary Hero
posted July 15, 2017 10:56 AM
Edited by Baronus at 10:59, 15 Jul 2017.

Because its only environment! You cant flag hills or grass :-) You must add function to it! Flagged function! Because powerups have function but cant be flagged! Creature dwellings and resource dwellings can be flagged only! It must be it!
And new file is bigger than old with sceleton? More bytes non pixels :-) I try added portrait to chain mail and always is crash...

 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 · NEXT»
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.0589 seconds