Add Manually Repacking a PSARC

Downforce Agent 2024-06-30 16:15:15 -04:00
parent a49e1e537f
commit 2ca5979039

@ -0,0 +1,28 @@
This page details the process that Firestar uses internally to bundle mods together into the final package that can be read by the game. It is heavily based off of a [similar guide on the PS3 Dev Wiki](https://www.psdevwiki.com/ps3/PlayStation_archive_(PSARC)#Rebuilding_PSARC_files), which also describes the appropriate compression settings for various PS3 games, including WipEout HD Fury. Since WipEout 2048 is a fork from the HD Fury codebase, these same instructions apply to the PSVita. We owe a special thanks to the PS3 homebrew community for documenting these instructions.
The directions below are written for a Windows system, but they can be effortlessly adapted to any Unix-like machine with WINE installed.
Without further ado:
## Part 1: Generating a File Whitelist
We need to create a list of files that psp2psarc will import when we rebuild the PSARC later.
1. Generate a list of contents inside the original PSARC and save it to a text file
```
psp2psarc.exe list data.psarc > filelist.txt
```
2. Open the file in a text editor with support for Find & Replace w/ RegEx
- Some editors such as Trinity KWrite parse RegEx incorrectly and won't work with some of the commands shown.
3. Find and replace by nothing: `Listing.*\n` to delete the first line.
4. Find and replace by nothing: `[^\b]\(.*\)` to remove size information.
5. Find and replace by nothing: `\r\n$` to delete the trailing whitespace at the end of the file.
- This could potentially be `\n$` if you are on a non-Windows system.
## Part 2 Using the Whitelist to Regenerate the PSARC
1. Add your modded files to the extracted data/ folder
2. Within the list, manually append paths to any additional files you have added to the data/ folder.
3. Repack the assets:
```
psp2psarc.exe create --skip-missing-files -j12 -a -i --input-file=filelist.txt -o dlc2.psarc
```
- Ensure you are in the correct working directory or else this will fail and/or the assets may be placed in the wrong location within the PSARC.
- _skip-missing-files is essential if you don't want to pull your hair out._ :)