From 2ca5979039140b5bdf37dfc982132df900133cf1 Mon Sep 17 00:00:00 2001 From: Downforce Agent Date: Sun, 30 Jun 2024 16:15:15 -0400 Subject: [PATCH] Add Manually Repacking a PSARC --- Manually-Repacking-a-PSARC.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Manually-Repacking-a-PSARC.md diff --git a/Manually-Repacking-a-PSARC.md b/Manually-Repacking-a-PSARC.md new file mode 100644 index 0000000..16d5361 --- /dev/null +++ b/Manually-Repacking-a-PSARC.md @@ -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._ :) \ No newline at end of file