|
Thread: Researching how to add new objects | This thread is pages long: 1 2 3 4 5 6 7 8 9 10 11 · «PREV |
|
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.
____________
|
|
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
|
|
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.
____________
|
|
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?
____________
|
|
Karmakeld
Responsible
Supreme Hero
|
posted October 29, 2019 04:31 PM |
|
|
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.
____________
|
|
|
|