{"id":67,"date":"2023-01-30T22:11:29","date_gmt":"2023-01-30T21:11:29","guid":{"rendered":"http:\/\/localhost\/wordpress\/?p=67"},"modified":"2023-02-01T01:58:21","modified_gmt":"2023-02-01T00:58:21","slug":"modding-the-silver-case-part-3-replacing-distributing-the-mod","status":"publish","type":"post","link":"http:\/\/localhost\/wordpress\/2023\/01\/30\/modding-the-silver-case-part-3-replacing-distributing-the-mod\/","title":{"rendered":"Modding The Silver Case (Part 3): Replacing & Distributing the mod"},"content":{"rendered":"\n

Welcome to the final part of my series of post focused on the modding of a PS4 <\/em>game!<\/p>\n\n\n\n

Since we’re approaching the end, allow me to rant a bit about a detail that would’ve saved me a fair amount of time if I knew about it beforehand.<\/p>\n\n\n\n

As I already noticed in 2020<\/a>, PS4 <\/em>games are encrypted inside .PKG <\/em>files even once they are installed, and the only way to decrypt them is by booting the game up on the console. <\/p>\n\n\n\n

\"\"
The game’s folder on the PS4, as seen by connecting through FTP. The whole game is encrypted and gets decrypted only on runtime.<\/em><\/figcaption><\/figure>\n\n\n\n

As such, one would think that, in order to mod a PS4 <\/em>game, we would need to repack the whole Fake PKG <\/em>and reinstall it each time we modify a file. That’s what I did for my first dozen of tries, and the process was TEDIOUS<\/em><\/strong>! Imagine doing the whole process of Part 1<\/a> each time a mere file was modified, the waste of time was absolute between the PKG <\/em>repacking (about 30 minutes), the transfer to USB (5-10 minutes), the actual installation (10 minutes) and finally booting the game up: a whole hour of NOTHING<\/em><\/strong>, urgh. <\/p>\n\n\n\n

I thought I could finally seek salvation after finding out about PS4 Patch Builder<\/a> but nope, it was the same, perhaps even worse. In order to use the program I needed a backup <\/strong>of the whole game as a PKG<\/em> and an Image0<\/em> folder with all my modded files<\/strong>, and, for some reason, the program didn’t function if said folder didn’t also have all the other files, which means that I know had the equivalent of two backups occupying my space for nothing! After hitting that Build Package<\/em> button it would take around half an hour to generate the “Update” PKG<\/em> so really there wasn’t much benefit to using that method, if not to generate a slightly<\/em> tinier PKG <\/em>than before, at the expense of having 3 copies of the game lying on my Hard Drive with no benefits.<\/p>\n\n\n\n

\"\"
A screenshot of the program, provided by its creator, MODDED WARFARE.<\/strong><\/em><\/figcaption><\/figure>\n\n\n\n

<\/p>\n\n\n\n

Now that this is out of my way, allow me to introduce you to the actual way of modding a PS4<\/em> game, the Holy Grail of modding, a technique similar to the Switch’s LayeredFS<\/a><\/em> file replacement: AFR<\/a><\/strong><\/em> (Application File Redirector)<\/em>! I will speak exclusively about GoldHEN<\/strong><\/em>‘s implementation of it (as a plugin)<\/em>, but it was originally made by theorywrong<\/em><\/strong> for the Mira Project<\/a><\/em>.<\/p>\n\n\n\n

\"\"
GoldHEN’s plugins usage guide.<\/em><\/figcaption><\/figure>\n\n\n\n

<\/p>\n\n\n\n

As its name indicates, while the game is running, AFR <\/em>replaces the games files with the ones we’ve put in a custom folder, eliminating all needs from repacking the PKG<\/em> each time we want to edit a file. This method works with disc copies and legit PKGs<\/strong>!<\/p>\n\n\n\n

The first thing we need to do is to download the GoldHEN plugins<\/em> from the GitHub<\/a><\/em><\/strong> repository. Once downloaded, we need to edit the plugins.ini<\/em> <\/strong>file to enable the plugins <\/em>we are going to use, and to tell which games we are going to load the plugins<\/em> for. As I want to apply the plugins<\/em> to any game, the file would look like this: <\/p>\n\n\n\n

; Note: lines starting with semicolon are for comments.\n; Load plugins for any title.\n\n[default]\n; Load the AFR plugin \n\/data\/GoldHEN\/plugins\/afr.prx\n\n; Load plugins only for Playroom.\n\n[CUSA00001]\n\/data\/GoldHEN\/plugins\/afr.prx\n\/data\/GoldHEN\/plugins\/no_share_watermark.prx<\/code><\/pre><\/div>\n\n\n\n

<\/p>\n\n\n\n

With the .ini file modified, it’s time to put the plugins.ini<\/em> file and the plugins <\/em>folder in your PS4<\/em>, into the \/data\/GoldHEN\/plugins\/<\/strong><\/code> <\/em>folder (we can do that by USB or by FTP).<\/p>\n\n\n\n

Now, we can run GoldHEN<\/em> and enable the plugins in the Settings > Debug Settings > Plugins > Enable Plugins Loader <\/em> section.<\/p>\n\n\n

\n
\"\"
Enabling the Plugins Loader.<\/em><\/figcaption><\/figure><\/div>\n\n\n

<\/p>\n\n\n\n

For each game we want to modify, we simply need to create a folder bearing the game’s TitleID<\/strong><\/em> inside of \/data\/GoldHEN\/plugins\/AFR<\/strong><\/code><\/em>, and place all of our modified files here.<\/p>\n\n\n\n

If everything was done correctly, we will see the difference each time we boot up the games with AFR <\/em>enabled.<\/p>\n\n\n\n

<\/p>\n\n\n

\n
\"\"
The Silver Case’s intro, replaced with Andrea Bruno’s <\/em>Sumio Mondo THUG Pro Mod Trailer<\/a>.<\/figcaption><\/figure><\/div>\n\n\n

<\/p>\n\n\n\n

There are a few ways of distributing our modded data to the public, each with their pros and cons:<\/p>\n\n\n\n