nikethebike Wrote:{ Mar 23 2012, 03:31:05 AM } - nikethebike Wrote:{ Mar 22 2012, 05:08:48 PM } - I think this is the easiest and best solution if it works:
1. Cut the header row for what model you want to change and put it at the end of the header as if it was the last file in the CH file.
2. Completely delete the model.pac file that we want to remove from the data of the CH-file.
3. Paste the new model.pac file at the end after the last pac in the CH-file.
4. Update the header row moved in 1 with the new size of the new model.pac.
I must have been tired when writing that.
Doing edits to this game, since it has no offsets should be simpler than the new games.
The simplest solution should be this:
1. Find the model.pac file that we want to remove from inside the data of the CH-file.
2. Replace it with your new model.pac file, make sure it overwrites all old data and if the new file is larger the offset for the next file will be "pushed forward" by your insert, if it is smaller it will be "pushed back".
3. Simply update the header with your new size.
Pretty straight forward really.
Forgive my ignorance if this is common knowledge, but I haven't been able to figure out the equation the game uses to calculate the size in the header.
i.e. Rock's in-ring model has a header of
01 00 E1 04
I'm assuming the size is reversed like it is in the wrestler pac files, so
E1 04 = 04E1
Now, the actual size of the wrestler pac (ch.pac.1.PAC) is 0x0004E800
So how does it calculate from 04E1 to 0x0004E800?
Second example, Rock's hires entrance model has a header of
02 00 BC 06
Assuming its reversed, size is 06BC
How does it calculate 06BC into the actual size of 0x0006C000?
The pacs are obviously padded with 0's so that starting addys for the pacs start with addys ending in "000" or "800" so there must be an equation involved?
Up to this point I have just been using character header size values from other characters that are large enough to contain uncompressed files of the wrestler I am working on. So steal that value, apply it to my character header, then pad my character's wrestler pac file so it equals the size of the wrestler's pac I stole the character header value from. Sounds confusing but it really isn't that hard... I'd like to know the equation though.