{"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 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 <\/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 <\/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 <\/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 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 <\/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 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 <\/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 <\/p>\n\n\n <\/p>\n\n\n\n And thus, our long guide finally comes to an end. Now, we are able to jailbreak a ps4 console, dump any game we want, modify its contents (we covered the case of a Unity game)<\/em> and run the patched contents on the console as easily as possible. Thank you for reading this blog, I will come back for more Sony<\/em>-oriented romhacking articles soon!<\/p>\n","protected":false},"excerpt":{"rendered":" The final step into modding the game: replace the files on the console!<\/p>\n","protected":false},"author":1,"featured_media":76,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[16,12],"tags":[19,20,22,7,21],"_links":{"self":[{"href":"http:\/\/localhost\/wordpress\/wp-json\/wp\/v2\/posts\/67"}],"collection":[{"href":"http:\/\/localhost\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/localhost\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/localhost\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/localhost\/wordpress\/wp-json\/wp\/v2\/comments?post=67"}],"version-history":[{"count":12,"href":"http:\/\/localhost\/wordpress\/wp-json\/wp\/v2\/posts\/67\/revisions"}],"predecessor-version":[{"id":115,"href":"http:\/\/localhost\/wordpress\/wp-json\/wp\/v2\/posts\/67\/revisions\/115"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/localhost\/wordpress\/wp-json\/wp\/v2\/media\/76"}],"wp:attachment":[{"href":"http:\/\/localhost\/wordpress\/wp-json\/wp\/v2\/media?parent=67"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/localhost\/wordpress\/wp-json\/wp\/v2\/categories?post=67"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/localhost\/wordpress\/wp-json\/wp\/v2\/tags?post=67"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}; 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
\/data\/GoldHEN\/plugins\/<\/strong><\/code> <\/em>folder (we can do that by USB or by FTP).<\/p>\n\n\n\n
\/data\/GoldHEN\/plugins\/AFR<\/strong><\/code><\/em>, and place all of our modified files here.<\/p>\n\n\n\n
\n
\n
\n
\/data\/GoldHEN\/plugins\/AFR\/CUSAXXXX<\/strong><\/code><\/em>folder. <\/li>\n<\/ul>\n\n\n\n
\n
\n