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 December 16, 2017 11:17 PM
Edited by Karmakeld at 23:19, 16 Dec 2017.

Certainly the hope is to have Namerutan or iLiVe figure out the pattern of the additional end code so that it could be automated, but for now we'll have to do it manually. Also you don't nessecarily have to do the long process each time you want to add an object. Once you have the header and additional code of an object, you can just re-use it. It might even be more simple to just change object type info, than to compare infos between different types of objects. As far as the image size, rather than calculating it, I look for patterns, that show where the images starts and ends.

But if you only want to delete the shadow part, just do so in gimp. The layer remains, but is empty. That would be the easiest option the way I see it, as it would mean less complex hex editing.

I will have a look at the gnoll hut tomorrow.

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


Legendary Hero
posted December 17, 2017 12:48 AM

I dont need this gnoll hut! It was only experiment where it is. Nothing to made for mod! So rest!

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


Promising
Known Hero
posted December 18, 2017 03:39 PM
Edited by radmutant69 at 16:27, 18 Dec 2017.

@Karmakeld: I sent you an email

@mirage and everyone else: I was stupid. Really. Now I think I know where starts the additional data at the end of the objects exactly. Here:





Near the end of the objects you will find a code part like xx 00 00 00 (xx is whatever number like 04 or 06 or something). It looks like the additional data starts exactly 8 bytes before this. It was confirmed in dwellings yet, but I think it is the case in any other objects too. I will take some more experiments today to confirm it.

If I am right then there is no need to compare the end of files anymore when you make a new object. I think...

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


Legendary Hero
posted December 18, 2017 04:01 PM
Edited by Baronus at 16:01, 18 Dec 2017.

Baronus

Sorry but to small size! Upper this end usually you have big part of bytes and its not a picture! Whats it? Its a lot of lines! And without it is crash.

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


Promising
Known Hero
posted December 18, 2017 04:31 PM

Hey Baronus!

Are you okay? I made the images bigger only for you

However you could easily see them in their original size if you ever clicked on them. Those were some kind of clickable miniatures like in my every other posts with pictures...

Also this additional data stuff worked with the Windmill and with the Dark Castle too. So I think we can say it's confirmed.

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


Legendary Hero
posted December 18, 2017 07:05 PM
Edited by Baronus at 19:06, 18 Dec 2017.

Baronus

HAHAHA :-):-):-):-) I wrote thats red code is too short for this additional data. Not that picture is too small! This unknown end is bigger. When I calculated picture size there is big additional end! And what is it?

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


Promising
Known Hero
posted December 18, 2017 07:24 PM



Yeah, you know I made 26 new objects today and I had to copy only the file headers and this short data part from the end of the files to do so. I'm very sure about that this is the only 'additional data' we need to make any new objects. Believe me, OK?

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


Responsible
Supreme Hero
posted December 18, 2017 07:47 PM
Edited by Karmakeld at 19:51, 18 Dec 2017.

radmutant69 said:
@Karmakeld: I sent you an email

@mirage and everyone else: I was stupid. Really. Now I think I know where starts the additional data at the end of the objects exactly. Here:





Near the end of the objects you will find a code part like xx 00 00 00 (xx is whatever number like 04 or 06 or something). It looks like the additional data starts exactly 8 bytes before this. It was confirmed in dwellings yet, but I think it is the case in any other objects too. I will take some more experiments today to confirm it.

If I am right then there is no need to compare the end of files anymore when you make a new object. I think...


Well it does match just fine with the exampleI posted which we then worked from. You can count back 8 byte as well.
But we should indeed look at the various types of objects, just to be sure. Still it would be great if we send some of the 'end of object' codes to iLiVe for pattern research. If they could be automatically added by the ResHelper that would save time hex editing. But still useful knowledge.
Also I'm looking at entrances, and there are some clear patterns. I'll post overview later when I've had time to play around with it as well.

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


Legendary Hero
posted December 18, 2017 08:24 PM

I dont know this tool. If only changing this short end is enough ok. Congratulations!
What about something like this? Would be beautifull:
Gigantic objects

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


Responsible
Supreme Hero
posted December 19, 2017 10:38 PM

ResHelper is Namerutan's tool.
I think it would be possible to create something similar to what you show there Baronus. I don't know how large images can be, just that they can indeed be large.
Do you have any specific images you want to add like this?

Also I can't help be inspired by the river of blood

(And sidenote, thx to Nimo for the synchronized anim. brush trick).

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


Honorable
Famous Hero
posted December 19, 2017 10:48 PM

Karmakeld said:
Well it does match just fine with the exampleI posted which we then worked from. You can count back 8 byte as well.
But we should indeed look at the various types of objects, just to be sure. Still it would be great if we send some of the 'end of object' codes to iLiVe for pattern research. If they could be automatically added by the ResHelper that would save time hex editing. But still useful knowledge.
Also I'm looking at entrances, and there are some clear patterns. I'll post overview later when I've had time to play around with it as well.


Yep, send them my way when you can. In addition to pattern searching I can do, I also have Namerutan's posts on the Equilibris forum I can search through.

I've created a quick test program to start working with h4r files (I like Java more than C# and Java has a ton of built in libraries). At the moment it can read the header and table of contents from .h4r files. With the table of contents I should be able to select specific files from the .h4r and go from there.

I'll probably do the easy thing first, which is to pull out the campaign files and see about editing / reinserting them, and also seeing about replacing the underlying campaign with a different one. Would be fun to have our own campaigns accessible through the H4 Campaign menu

If these things prove successful, then it should be a simple thing to add additional .h4d files to the .h4r containers / create new .h4r containers.

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


Promising
Known Hero
posted December 20, 2017 01:40 PM

Baronus said:
I dont know this tool. If only changing this short end is enough ok. Congratulations!
What about something like this? Would be beautifull:
Gigantic objects


Wow! I love this one!



But can we download these from somewhere?

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


Legendary Hero
posted December 20, 2017 05:56 PM
Edited by Baronus at 18:03, 20 Dec 2017.

Baronus

Author still work on it. But we can add another ones.
Eg this fanmade picture for HIV:
city
Building can be extracted.

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


Responsible
Supreme Hero
posted December 20, 2017 07:43 PM
Edited by Karmakeld at 19:43, 20 Dec 2017.

iliveinabox05 said:
Karmakeld said:
Well it does match just fine with the exampleI posted which we then worked from. You can count back 8 byte as well.
But we should indeed look at the various types of objects, just to be sure. Still it would be great if we send some of the 'end of object' codes to iLiVe for pattern research. If they could be automatically added by the ResHelper that would save time hex editing. But still useful knowledge.
Also I'm looking at entrances, and there are some clear patterns. I'll post overview later when I've had time to play around with it as well.


Yep, send them my way when you can. In addition to pattern searching I can do, I also have Namerutan's posts on the Equilibris forum I can search through.

I've created a quick test program to start working with h4r files (I like Java more than C# and Java has a ton of built in libraries). At the moment it can read the header and table of contents from .h4r files. With the table of contents I should be able to select specific files from the .h4r and go from there.


Really looking forward to this
I'll send the file info your way hopefully within this week.

iliveinabox05 said:

I'll probably do the easy thing first, which is to pull out the campaign files and see about editing / reinserting them, and also seeing about replacing the underlying campaign with a different one. Would be fun to have our own campaigns accessible through the H4 Campaign menu

If these things prove successful, then it should be a simple thing to add additional .h4d files to the .h4r containers / create new .h4r containers.


I've had the same thought for a currently parked campaign. I know we can rename the campaign names, and most likely if you repack your campaign with the name of one of the original ones, that would replace it. What I'd really love to see/do is to add a new section of campaigns but that would also require a new campaign menu.

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


Legendary Hero
posted December 20, 2017 07:51 PM

New menu needs all game code rebuilding so to hard. But if you know the way, maybe tutorial can be used? Im affraid only one campaign :-)

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


Responsible
Supreme Hero
posted December 20, 2017 09:48 PM

Baronus said:
New menu needs all game code rebuilding so to hard. But if you know the way, maybe tutorial can be used? Im affraid only one campaign :-)


Not nessesarily. I don't see why you shouldn't be able to replace all 6 campaigns. You just need to make sure the name correspond in the proper table file. Iirc, you don't have to edit the exe, just the table file or simply save your campaign with the name of the campaign you wish to replace.
But I haven't actually tried it.. yet.. So it's theoretic..
____________

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


Responsible
Supreme Hero
posted December 21, 2017 12:00 AM

There is a thing I would ask all of those who add new objects to be aware of and preferably check. I've previously had issues with objects always appears behind other objects. Now I have the opposite problem, that an object always appears infront of other objects, even if placed behind them.
The things that puzzles me, is that I'm using codes from existing objects..
So if anyone has any theory to why objects act that way, please share..
I should note that these are 1x1 tiled objects..
____________

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


Honorable
Famous Hero
posted December 21, 2017 03:44 AM

Campaign extraction successful. There are 16 bytes before the actual campaign starts that I don't yet understand. Maybe some sort of type info.

I'll see about first writing the code to package up the extracted h4r bytes into a new h4r file and test if the game loads it, then I'll see about inserting a custom campaign in place of one of the game's campaigns.

Unfortunately Namerutan didn't upload everything to the repository, the main program is missing and only his libraries are available. There is some logic missing that would be helpful for me, but I'll do what I can!

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


Promising
Known Hero
posted December 22, 2017 05:19 PM

Karmakeld said:
There is a thing I would ask all of those who add new objects to be aware of and preferably check. I've previously had issues with objects always appears behind other objects. Now I have the opposite problem, that an object always appears infront of other objects, even if placed behind them.
The things that puzzles me, is that I'm using codes from existing objects..
So if anyone has any theory to why objects act that way, please share..
I should note that these are 1x1 tiled objects..


Well I don't know what causes your problem exactly but here is a solution:

1. Copy and paste the Snake Skeleton objects header into your wanted object like:



to



2. Now copy and paste this part of your object's header into the previous step's result (aka change object type):



3. Save it with a new name and it is done:




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


Responsible
Supreme Hero
posted December 24, 2017 12:58 AM

So does that work around allow you to place the objects BOTH in front of and behind other objects? I've used the snake skeleton in previous tests as a base object to insert/replace image, but they always ended up behind other objects.
I think there was some guessings that object type (tree, shrub, rock etc) has an impact, but the odd thing is, that I'm using the header and end code from Equilibris' v.3.55 Crate object(s) to make new crates, yet they don't act the same, as Equilibris' can be placed where you want - mine can't.
Never the less I will give it a try, thanks.

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