Jump to content

*Tutorial* - Removing a PAC from a PACH


Super_Luigi

Recommended Posts

I needed to remove a PAC (yobj) from a PACH in order to decrease the vertex count enough so that everything would load in-game. I don't recall seeing a tutorial on this previously, so I decided to write one up. I'm not sure if there is a more efficient way to do this. If nothing else this will serve as a guide for anyone who is interested in better understanding the PACH format.

**Backup your files before attempting this!**
**Now make a second backup of your files!**

  • The goal in this example is to remove the 001A PAC from a PACH.
  • The example PACH file looks like this in X-Packer.

Remove_PAC003_zpsbbljdis2.png

  • Open a copy of the PACH in a hex editor. I will be using HxD. 
  • For our example I've highlighted all of the hex values that are important so you can understand the PACH structure. Compare these with what is shown in X-Packer.

Remove_PAC002_zpsnqsotkj7.png

  • The hex values are rearranged in the PACH file from what they are in X-Packer.
    Using the 001A PAC as an example:

Remove_PAC004_zpskw9vtod9.png

  • In order to remove the 001A PAC from the PACH, we'll need to change the number of files from 10 (16 in decimal) to 0F (15 in decimal). We'll also need to remove the 001A data from the PACH header and from the PACH itself. Lastly we'll need to re-calculate the offsets for all of the PAC files that come after the PAC we are removing, in this example 001B - 9C4A.
  • Before modifying the PACH at all, create a table containing all of the PAC file names, offsets in the PACH, offsets in X-Packer, size in the PACH, and size in X-Packer. I used Wordpad and here is my example:

Remove_PAC005_zpsin0qoflw.png

 

  • Copy and paste the X-Packer information from X-Packer to save time.
  • Use the X-Packer offsets/sizes to populate the PACH offsets/sizes. I highly recommend checking your values against the data you see in the hex editor to make sure you didn't typo anything!
  • Once your (Before) table is completed, you need to calculate the new offsets for all of the PAC files that come after the PAC you are removing. In our example we will do this for 001B - 9C4A.

Remove_PAC006_zpsoqmensbf.png

  • Next create an (After) table that contains the updated offsets you calculated in the previous step.

Remove_PAC007_zps40djxvua.png

  • Now we are ready to start modifying the PACH. The first thing we'll do is change the number of files from 10 (16 in decimal) to 0F (15 in decimal).

Remove_PAC008_zpstxzwg8f9.png

  • Next we'll highlight and delete the 001A PAC data from the PACH header.

Remove_PAC009_zpswhyglmtq.png

  • Next we'll update the PAC offsets for 001B - 9C4A using our (After) table that we created earlier. In our example the end result looks like this:

Remove_PAC010_zpsiivcmh4f.png

  • The last step is to remove the actual 001A PAC data from the PACH. I highly recommend saving a copy of your PACH at this time in case you mess something up so you don't have to re-type all of the offsets again.
  • With the original PACH open in X-Packer, take note of the "ActualBeginOffset" for the PAC you are removing. In the example for 001A this is "4100784" which is the offset of the PAC in decimal.
  • Do the same for the PAC that follows the PAC you are removing. In the example this would be 001B and the "ActualBeginOffset" is "4135224".
  • These essentially outline the starting point and end point of what we need to delete. I personally wouldn't just highlight that block and delete it though. I would select it by hand to make sure you are deleting exactly what you need to.
  • In your hex editor, use the goto function, switch it to decimal, and type in the "ActualBeginOffset" for the start of the PAC you are deleting in this example "4100784".

Remove_PAC011_zpsgjv6wz9l.png

  • This should take you to something that says "JBOY" (or "ZLIB", etc. depending on what type of object it is)
  • Highlight and drag downwards until you get near to the "ActualBeginOffset" of the next PAC. In our example this would be 001B and the "ActualBeginOffset" is "4135221" which is the very end of the 001A PAC we are removing.

Beginning

Remove_PAC012_zps8vu5hwen.png


End
Remove_PAC013_zps9fz7vqrb.png

 

  • Once you have the correct range highlighted, press "delete".
  • Save your modified PACH as a copy in case something didn't go right.
  • At this point if you didn't make any typos, and did the offset calculations correctly, you should be able to open the modified PACH in X-Packer and you should no longer see the PAC you removed (in our example 001A). The offsets, sizes, etc. should all look correct.

Remove_PAC014_zpsniuorfpz.png

Again this was my first time doing this, but it did work out fine for me. I really just figured this out on my own by comparing two PACH files and looking at the data in X-Packer lol. Thanks to Tekken as always.

Edited by Super_Luigi
  • Like 3
Link to comment
Share on other sites

Yeah DDP PACH. I use it nearly all of the time depending on how many objects I need. The 001A and 001B PAC's can be used for pretty much anything i.e. hair, upper body stuff, lower body stuff, masks/hats, certain boots, etc. You just can't double up on specific things i.e. if your hair is 2710 you can't put another hair in 001A/001B. You also have to watch your vertex count. If you try and load too many vertexes at once the game will crash. If you are clever enough you can more often than not reduce the vertex count down to get things to load though.

Most recently I was able to get Chris Jericho's pants to inject into the CAW parts MNM pants so I can have pants on my Crush model to form his full body singlet. It was important to use non-CAW pants (i.e. retro Jericho's) so that I could align the textures in max. If you just use CAW pants then they don't  attach to the body properly in max making texture alignment a nightmare if you need to match the lower body to the upper body.

RainbowAlignment_zpsxs1smydf.png

Edited by Super_Luigi
Link to comment
Share on other sites

  • 4 weeks later...

This is quite interesting to read over--and is definitely something I don't believe has been covered before. Thanks for sharing, man. Wonder if the same could work the other way around with adding yet one more additional YOBJ slot.

Also, which DDP PACH are you guys referring to? I've looked through all of his from '13, 2K15 and 2K16, and neither of them have the 001A or 001B slots in them. In fact, the only PACHs I've ever known to include those are Rock's.

Link to comment
Share on other sites

The DDP PACH created by Bugsy & Tekken. Link below. Again I use it for nearly everything when I need extra .yobj slots, it rocks! Also now I have the same PACH without the 001A slot in case you end up with too many verts and your model doesn't load. 

DDP by BUGSYBOY & TEKKEN

Link to comment
Share on other sites

The DDP PACH created by Bugsy & Tekken. Link below. Again I use it for nearly everything when I need extra .yobj slots, it rocks! Also now I have the same PACH without the 001A slot in case you end up with too many verts and your model doesn't load. 

Hidden Content

Ah, so it wasn't one of his original PACHs after all--thought I might've been going crazy there haha. Thanks! I'll definitely have to check this out and try it sometime. Great to have an alternative from using the Rock's, since if you add a long hair model to any of his, the hair just stays rigid and the bones don't actually animate as they should when the head moves. I'm assuming it's because any Rock PACH that does have a hair model has a short one that wouldn't be required to animate past moving along with the head anyway. Maybe this could be the solution to that.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...