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»
radmutant69
radmutant69


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

Of course I can't flag hills and grass but they are now creature dwellings and I still can't add them the flag. I dont know why, since before these stuff I could add flag to any changed objects.

Well, I extracted the skeletons image with resedit, it's cause I know it's size in pixel. The injected pyramid images are all 82x82.

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


Legendary Hero
posted July 15, 2017 02:55 PM

Maybe only artifacts dont works? I have always crash when I add portrait...
I told that GAME DONT REPLACE DWELLINGS! Are sure you really replaced mummy dwelling look? I thik you have terrain object which name is mummy pyramide etc :-) But its not a mummy generator :-)

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


Promising
Known Hero
posted July 15, 2017 03:07 PM

I tested it, and they are working dwellings. I just cannot properly change the code after it's name, cause it's very different from building codes. I can't figure out now, where should I insert the flag data.

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


Responsible
Supreme Hero
posted July 15, 2017 03:54 PM

Have you compared the modded dwelling with the original in hex editor?
I recall the first part defines the entrance, then you have object type and name. I don't know what part defines the 'flag able', but have you considered comparing a few dwellings and or other flag able objects like towns and mines? If they share the same flag able code, you should be able to find identical parts in all objects.

I've switched images on several objects, without encountering that issue, I would've assumed the dwelling code itself would be sufficient, but it appears not.

Another thing, I take it you've only been able to add single images so far, meaning animations still lies ahead.

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


Legendary Hero
posted July 15, 2017 04:02 PM
Edited by Baronus at 16:04, 15 Jul 2017.

Sorry I ask but how you check if you dont flag it? Only way to know it is flag it.
Maybe flag is, but far off. Serch 300 px left down maybe there is flag?
Dwelling type is in header. Rest is only picture. If you changed only picture all is the same.

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


Promising
Known Hero
posted July 15, 2017 04:08 PM
Edited by radmutant69 at 16:11, 15 Jul 2017.

This is the flag code in the file:



The blue marked values are the coordinates of the flag. I just can't properly insert it into such objects like skeletons, rocks or whatever.

Edit: I didn't copypaste it from the original file with the file header, because it caused crash when i did. So I think there should not be any flag without it.

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


Legendary Hero
posted July 15, 2017 04:42 PM

If f8 is flag it means 248... Your file has 82 :-) So flag never be visible :-):-):-) Try to change to 28 and 28. If it are coordinantes :-)

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


Promising
Known Hero
posted July 15, 2017 04:46 PM
Edited by radmutant69 at 16:49, 15 Jul 2017.

Well I don't know how it works exactly, but if you copy this code from eg. the efreeti dwelling into the mummy dwelling, the flag will floating in the air at that position where it is on the efreeti dwelling. So these are the 'coordinates', i guess...

Also you can see its effect on the last picture on the previous page. For example that sun temple was a medusa dwelling before the object change, but i copied the flag data from the mage tower to make it on the sun temples top.

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


Legendary Hero
posted July 15, 2017 05:05 PM

Its probably from right up corner of def. Ok so change it and look.

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


Promising
Known Hero
posted July 15, 2017 08:14 PM

Eh... It's really hard to find the correct position of the images by handmaking...


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


Promising
Known Hero
posted July 15, 2017 09:41 PM

Karmakeld said:
Another thing, I take it you've only been able to add single images so far, meaning animations still lies ahead.


I've tried to make an animated object, but i failed. I don't know, what was the problem, but it looks it's not that easy as the static little objects. Sorry.

I will do some more experimenting with it, but it's a lot of work by hand.

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


Responsible
Supreme Hero
posted July 15, 2017 10:09 PM
Edited by Karmakeld at 23:36, 15 Jul 2017.

I'm gonna try Baronus' method and then do some attempts with Namerutan's tool (it can be used to change e.g. Splashscreen in a less complicated way). The tool also allows you to view each frame of animation any object consist of and extract them.
I don't know how ResEdit extract the files/images in that regard, single or multiple/compiled pics.

Not sure if this is of any use, but according to Namerutan's tool, the Embalmers Lab contain the following info:
Pictures 2
Size 389x362 (=image position + size).

Footprint 2x2 - Horiz. 328. Vert. 300

Frame pos: 269x269 - size 120x93.

As Baronus also noted, the original flag is placed on 248x236.
Perhaps you can find this useful..??
------
ok, I simply suck at this. Could either of you, post a picture guide please?

ResEdit2, apparently can't open my heroes4.h4r file, when I ask to view photo.
So I extracted the Column2 image with Gimp in bmp format. Converted it to Raw with Irfan.
Comared the two in HexEditor, and can see that the bmp has 7 lines of code, before just ff. Raw is simple ff.
and now I simply feel stuck..
any help please

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


Promising
Known Hero
posted July 16, 2017 12:24 AM
Edited by radmutant69 at 00:40, 16 Jul 2017.

So, let's see what i did:

1. Backup (at least) your new_mod.h4r file.

1. Save your image as a 82x82 sized bmp.

2. Paste it to the Facetool as (for example) Aislinn portrait and save it.

3. Open the new_mod.h4r file what you just made with mh4win or resedit2. Search for the layers.icons.hero.death.82.lay file and extract it.

4. Open this file with a hex editor and search for 'aislinn'.



5. Now scroll up until you find 00 01 01 00 nnnnnn... Mark it or something.



6. Search aislinn again and scroll down to find another 00 01 01 00. Mark the last byte before it and copy it and...



...save it to an empty file.


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


Promising
Known Hero
posted July 16, 2017 12:26 AM
Edited by radmutant69 at 00:42, 16 Jul 2017.

7. Search for aislinn in this new file and change her name...



...to this:



8. Extract the adv_object.Skeletons.Snake.obj file and open it with hex editor. Mark it from this point:



To this point:



9. Replace it with your frame and save the file with another name. And it's done. If you did it correctly, you have a 'new' object, what you can change whatever type you want.

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


Responsible
Supreme Hero
posted July 16, 2017 07:04 PM

Baronus said:
Maybe only artifacts dont works? I have always crash when I add portrait...


Baronus, is that the editor or the game that crashes?
Equlibris managed to add new artifacts/images to those artifacts.
I believe they tried to add even more in v3.55/3.6, but to my knowledge those artifacts crash, if you try to pick them up.
That might be because artifacts require both an adventure image and an inventory image - they're read seperately.
Of course I don't know if this has any connection to your crash, but Equilibris team proved it possible, so we know it can be done, just gotta figure out how.

I'm also quite interested in trying to add mirrored objects (others have requested this aswell years ago.) Dalai told me it's supposedly an easy task to do so, but not a priority. But that would require animations, rather than just single image.

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


Responsible
Supreme Hero
posted July 19, 2017 12:01 AM

I tried it, but first attempt failed, so I'll try again.
I'm just looking at step 6, where I saved it to a new file. When I compare your screen with mine, my hex code reads 00 01 01 00 ff 00 ff 02 02 02... That doesn't match with yours.. (?!)



In your step 9, where I should replace part of the skeleton.snake with my frame, I asume by frame you mean the entire code I saved, right?

If you could share the part you replace in the Embalmers Lab, it might be easier for me to compare the codes between the files.

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


Promising
Known Hero
posted July 19, 2017 08:21 AM
Edited by radmutant69 at 08:24, 19 Jul 2017.

Currently I have no access to those files but later I will share the codes.

For step 6: all pictures will have different codes after the 00 01 01 00, and some pics even don't start with that (as you can see in the snake skeleton object what starts with FD 00 01 00). Your different code shouldn't cause any problem.

Step 9: yes, I mean the entire saved code. You have to delete everything in the skeleton object from the FD to the 03 (see on pictures) and paste your saved code to that place.

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


Legendary Hero
posted July 19, 2017 08:34 AM

And try another def. The best is "Gnoll hut". In this def you have disabled shadow! Def without shadow. So you dont have problem with this. Add shadow to picture and paste to def.
Its not problem with artifact layer. But if you use obj def eg. "gnoll hut" you can replace artifacts too!

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


Promising
Known Hero
posted July 19, 2017 09:16 AM

Wow! Thanks for this info! The only objects what I found without shadow were the lights in Equilibris. But I could not use them, they always caused crashes. I'll try the gnoll hut now.

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


Responsible
Supreme Hero
posted July 19, 2017 09:27 AM
Edited by Karmakeld at 09:31, 19 Jul 2017.

Thanks for the info both of you, hopefully I'll learn where the images start/end for various images.
I tried with the Aislinn image, and assumed that was the image/code displayed on your pics - that would've made it easier for me to compare . But I'll keep trying.
When saving the new file does it matter if it's saved as .adv_object, .h4d or .layer?

And lastly when youn talk about adding shadows afterwards, have you tried making multiple framed images (animated), Baronus?

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