PAC Files

tofuman

Administrator
Staff member
Gender
Male
As modders will know. To add samples to PSO requires adding them to the PAC file located in the subfolder data\sound. The issue with these files is that the offsets for where each sample is located in the PAC is hardcoded into the game's EXE. Along with ID's, loop information and so on. So adding a sample isn't so simple. Modders would have to ensure that the replacement sample is smaller or the same size as the sample they were replacing.

So I've added code to the Ephinea client so that it can process these PAC files and dynamically construct the hardcoded offsets. You may have noticed that a new file appeared in the game data named pacdescriptor.prs this file contains the hardcoded data that was in the exe that can't be dynamically generated (such as ID's and loop offsets) This is a file format I've come up with so isn't standard to PSO. If you are a modder and just want to replace samples in the pac files you wont need to worry about this file. This file would be mainly for server admins that wanted to add a new sample and ID to the game without needing to alter the client data.

There is already a editor of PAC files called "PAC Manager" Unfortunately I didn't know of this when I named mine which I also named "PAC Manager". The original editor to work didn't alter the sample offsets. The issue with this is that this file is technically malformed. And as my code expected a correctly formed PAC file it failed detecting the offsets and would result in no samples working if you had a PAC file edited using this util on Ephinea. I've now added code to handle these files also so that samples will work regardless. However if you want to edit PAC files you should use my "PAC Manager" moving forward.

Replacing a sample:
Audacity Instructions:
Your sample will need to be in WAV format, Mono and 22050hz. I use Audicity to create the files. You just need to ensure your Project Rate is set to 22050hz before exporting.

  1. Load the file into audacity
  2. Convert tracks from stereo to mono
    PAC_1.png

  3. Resample track to 22050
    PAC_2.png
    PAC_3.png

  4. Amplify the sample. Audacity will automatically suggest the amount
    PAC_4.png
    PAC_5.png
  5. Ensure Project Rate is 22050hz
    PAC_6.png
  6. Export the sample as WAV and ensure all meta data is cleared.
    PAC_7.png
After you have your sample you are ready to import into a PAC.

Open up PAC Manager and load the required PAC (attacks and other common samples are found in common.pac)

You can preview a sample by pressing the play button, double clicking a sample, pressing space/enter on the keyboard once a sample is highlighted. Pressing the stop button or Pressing Esc will stop the sample.

PacManager.png


PAC_button1.png
- Add Sample (increasing the number of samples in a PAC would require an additional Entry ID added to the PAC Descriptor. You can use the PAC Descriptor for this but the client would still need to call it so this is likely to only be useful for server admins)
PAC_button2.png
- Moves the selected sample up (be sure to update the descriptor)
PAC_button3.png
- Moves the selected sample down (be sure to update the descriptor)
PAC_button4.png
- Remove Sample (Same considerations as adding a sample)
PAC_button5.png
- Replace selected sample

Find the sample you wish to replace and click the Replace button. Select the WAV file. The sample will be replaced and you can preview it as before. You may find the sample is fine in the PAC manager but quiet in game. The game has a volume adjust table which reduces the volume on some samples. Just apply more amplification to the sample using Audacity or similar. Finally save the PAC file.

You should now have a custom sample added to the game.

You'll notice on Ephinea a new PAC called ephinea.pac. This contains the rare drop sounds and achivement samples so not to interfere with any other custom PACs. Note that sample 0 and 1 in ephinea are rare sounds that are the same. However Sample 0 is used for 9 star. and Sample 1 is used for the rarer items. Sample 2 is 12 star items.

Update:
PAC Manager v1.1: Added code that will detect and fix broken PAC files (usually when PAC files have been made using older utils). Once the broken file is loaded you just need to save to save the fixed file.

My editors can be downloaded below
PAC Manager Download
PAC Descriptor Manager Download
 
Last edited by a moderator:
Glad to see this forum is still relevant to this day. I've been wanting to mod PSO. I used the PAC Manager to replace one sound in the common.pac file but now most of the sounds related to that file are completely silent. Not sure what went wrong.
 
I've added the code that will fix broken PAC files edited using older utilities which may have issues working with Ephinea.
 
This seems outdated, but I'm not sure if I'm doing something wrong here. Let me show you all what happens when I try to open up the PAC Manager EXE file, even after checking different compatibility settings like as if it's in Windows 7 or XP:SP2. I did have to lower my security settings on Windows 10 in the App & Browser Control window, which comes from the other window called Windows Security - which comes from et cetera, from Block to Off to even get this unpublished program to open. Windows Defender didn't give this program the benefit of the doubt at all.

Anyways, I'm working on a fix for this issue at the moment, and I'm wondering if I'm even going in the right direction by posting here in the first place. Maybe there will be more to come next time fans of PSO Episode 3 Sound Effects Pack fans!
Capture.JPG

Later Edit (May 2, 2020): If there's still issue using the PAC Manager posted in this thread, I used this one from psodev.free.fr by Kra I link to version 0.5 for regular windows users that don't have XP or Vista for their operating system. Thanks @Thomas for the hookup!

Another way to get the PAC Manager tool is from here where there are links to get more mods that's hosted by @Kamui.
 
Last edited:
Back
Top