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


Responsible
Supreme Hero
posted June 10, 2019 09:19 AM

Galaad said:
Really great resources in here! A shame all the describing pics from Radmutant's posts are broken.


Indeed. At some point I hope to finish some guide over at CH, where I can upload images to the CH server. I should ask if Rad still has those images coz indeed they help in the process of understanding the text.
____________

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


Promising
Known Hero
posted June 10, 2019 10:26 PM

Well some of those images must be on my dead PC's maybe dead hard drive. Some were on my previous phone. I don't know exactly. But actually we have a working tool to make objects so we don't really need these guides so much anymore I think.

Good to see we finally got a mod here though

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


Responsible
Supreme Hero
posted October 29, 2019 12:10 AM

just picking up on the discussion about making new combat objects. rather than putting the ResourceEditor tread off track, I'll move further research here.

So on NimoStar's request I've exported the Combat Obstacle Rope 02. Hoping this will be an object that is likely to appear in seacombat.
I've also extracted the file in h4d format.
Having altered the colors of the object I've now imported the new image and saved it as a h4d file, named Rope.06.
To do an easy comparrison, I've imported Rope.02 and saved that as a h4d file, which will now be missing the header and footprint.
Upon comparing the 2 files, I found that the original file has an 8 byte code in the end, missing in my imported file(s). Other than that, the endings are similar.
Comparing the header of the 2 Rope.02 I see a 02 00 00 01 01.. in both, but in Rope.06 it's a bit different: 02 00 fc 00 01 00..
So I've added the "missing" header and footer from the original file.

So far simply placing the file combat_object.Obstacles.Rope.06.h4d in the data folder don't seem to spawn the object.
So I tried packing it into a h4r file. The object can be read by Namerutan's tool, so I'm gonna see if this changes anything.
Nope. In 12 different sea battles = nothing. Could be that the names are coded in the exe (the table file doesn't contain file names, just the type of objects), so I'll retry by renaming it Rope.02. and see if it overwrites the original.
Indeed it did, in 1st attempt. So you can replace existing combat objects, which isn't that hard. But to add new I asume you'll need to edit/add dll extensions to the exe file.

____________

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


Responsible
Legendary Hero
Modding the Unmoddable
posted October 29, 2019 10:47 AM

Interesting. Indeed I had assumed adding new objects would not be that easy.

They are read from the lines on a table, not (just?) the .exe

The table is called table.combat_obstacles.txt
It regulates a few different things and from it I had gotten a "new" (unused) object to appear: Sparkles.
(would be nice to import those sparkles as map object)

so, according to your research, it is the last 8 and first 8 bytes?

Or are the modified bytes at the beggining not the first?

And are the last 8 bytes added, or overwritten?

____________
Never changing = never improving

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


Responsible
Supreme Hero
posted October 29, 2019 04:31 PM
Edited by Karmakeld at 16:32, 29 Oct 2019.

NimoStar said:
Interesting. Indeed I had assumed adding new objects would not be that easy.

They are read from the lines on a table, not (just?) the .exe

The table is called table.combat_obstacles.txt
It regulates a few different things and from it I had gotten a "new" (unused) object to appear: Sparkles.
(would be nice to import those sparkles as map object)



And I expected it was just that easy - although this is really a replacement.
Well that's just it.. as I wrote I looked into the table.combat_obstacled.txt file and it doesn't contain a list of object names like Rope.02, Rope.03 etc. like most of the other tables. Just the type 'Rope' is listed and the occurance rate for each terrain type, so I'm not sure you're right about that.

NimoStar said:
So, according to your research, it is the last 8 and first 8 bytes?

Or are the modified bytes at the beggining not the first?

And are the last 8 bytes added, or overwritten?



The footprint seems to be the last 8 bytes from the original file.
The header is longer. Look for a related 02 (in this case 2 images) xx xx xx 01.. It isn't far after the object type, so it shouldn't be hard to locate. I recall it comes pretty much after a block of 'ff ff ff ff'.
You need to add the bytes both places as they're missing, no overwriting.
I would go about using existing objects as canvas/for import, even if you attempt to add new ones, this way you just use the header/footprint of that object.
____________

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

Page compiled in 0.0538 seconds