# Persona 4 Golden (PSVita) Mod Support

## Background

{% hint style="info" %}
**Persona 4 Golden** on PC is largely the same as on its original release platform, the PSVita. Due to this, many mods are cross-compatible with a little tweaking. However, with the upcoming release of **Persona 4 Golden** on PC & Switch, you may notice a community effort to shift focus to that version.
{% endhint %}

Persona 4 Golden is a 2012 re-release of the 2008 turn-based JRPG released by Atlus on PS2. The game features dungeon crawling and life-sim elements. Combat is mainly based on summoning and fusing a party of Personas with different elemental affinities.

This re-release features many quality of life improvements and a longer campaign.  It has recently been ported to PC and a Switch port will release in January 2023.

## Custom Firmware PSVita Console

You can run mods natively on the PSVita using a custom firmware known as h-encore. It is perfectly safe to do so and there's little to no risk of a ban or any irreversible damage to your console.

### Setting up the console for mods

To install custom firmware on your PSVita console, please follow the comprehensive step-by-step guide at [vita.hacks.guide](https://vita.hacks.guide/get-started.html). It will walk you through the entire process.

Once you have Vitashell installed on your PSVita, open it and press Select to start a FTP connection. As long as the Vita and your PC are connected to the same network, you can transfer files using a [program such as Filezilla](https://filezilla-project.org/download.php?type=client). Simply enter the IP and port shown onscreen in your client and connect.

1. Download [AutoPlugin2.vpk](https://github.com/ONElua/AutoPlugin2/releases) and transfer it to your Vita.
2. Install the `.VPK` with Vitashell and launch the newly created bubble on your home screen.
3. Use AutoPlugin2 to install the plugins [0syscall6](https://github.com/SKGleba/0syscall6/releases), [nonpdrm](https://sites.google.com/site/theleecherman/) (v1.4 by lman), and [rePatch](https://github.com/dots-tb/rePatch-reDux0/releases) (v3.0). Remove ref00d if you already have it installed.

### Patching the Game

In order to load modded files, you need to patch the executable of the game to look for them in a custom mod.cpk archive.

1. Go to ShrineFox.com's [Getting Started Page](https://shrinefox.com/getstarted?platform=PSV\&game=P4G\&region=USA).
2. Enable any optional patches you'd like.
3. Download the eboot.bin.
4. Use Vitashell to transfer it to `ux0:/rePatch/PCSE00120` (substitute the title ID for your game's region, create the folders if they don't already exist) on your Vita. Create the path if it doesn't already exist.
5. Run the game to check if patches work!

{% hint style="success" %}
An easy way to check if patches are working is to see if the intro logos get skipped when you start the game. With patches, you should immediately be greeted by the title screen.
{% endhint %}

## Vita3K Emulator

You can run this version of the game on PC using the **Vita3K emulator**.

### Setting Up RPCS3

1. Download the [latest release](https://vita3k.org/#download) for your platform.
2. Extract the .zip anywhere on your PC.
3. Download any [PSVita Firmware](https://www.playstation.com/en-us/support/hardware/psvita/system-software/) file and install in Vita3K.
4. Obtain a .VPK, .PKG, or decrypted archive of the game to run with Vita3K\
   OR\
   Dump your own from your CFW PSVita console.
5. Launch the game to make sure it works!

For detailed instructions on dumping your own game, see [Vita3K's Quickstart Guide](https://vita3k.org/quickstart.html).

### Patching the Game

In order to load modded files, you need to patch the executable of the game to look for them in a custom mod.cpk archive.

1. Go to ShrineFox.com's [Getting Started Page](https://shrinefox.com/getstarted?platform=PSV\&game=P4G\&region=USA).
2. Enable any optional patches you'd like.
3. Download the eboot.bin.
4. During Vita3K setup, it should have let you pick a folder to install the PSVita filesystem to.\
   By default, it's `%appdata%`. Navigate to the `ux0\app\PCSE00120` folder and replace the `eboot.bin` with the patched one you downloaded.
5. Run the game to check if patches work!

{% hint style="success" %}
An easy way to check if patches are working is to see if the intro logos get skipped when you start the game. With patches, you should immediately be greeted by the title screen.
{% endhint %}

## Installing Mods

To use community-made mods, or to eventually create your own, you'll need a mod manager.

1. Download the [latest release](https://github.com/tge-was-taken/Mod-Compendium/releases) of the Mod Compendium.
2. Extract it somewhere on your PC [using 7-zip](https://www.7-zip.org/).
3. Choose **Persona 4 Golden** in the games dropdown, and click the **Settings** button.
4. The **output path** should be where your mod.cpk file to be generated.

{% hint style="danger" %}
**Important**

Most of the mods available for P4G are made specifically for the PC version and are only compatible with Aemulus. As such, they must be **manually ported to the PSVita version** if they aren't already available in Mod Compendium format.
{% endhint %}

You can explore community-submitted mods and download them from [ShrineFox.com/Browse](https://shrinefox.com/browse?game=P4\&type=Mod). Extract the .zip to the Mod Compendium's Mods folder and refresh to enable/disable them. Change their order as needed with the up and down arrows on the side.

Click **Build** and test it out in-game! \
Transfer the **mod.cpk** to the game's **rePatch folder** on PSVita using FTP if you aren't using Vita3K.

## Extracting Files

If you are looking to create your own mods for this game, you will want a full dump of all the game's original, unedited files.

{% hint style="info" %}
Persona 5 utilizes CriWare's .CPK archive format to store its individual files. You can think of it somewhat like a .zip file that contains the directory structure, but offers compression.
{% endhint %}

On RPCS3, once the game is installed, you can right click it and choose "Open Install Folder" to view the files. In the "USRDIR" folder, there are several large files such as data.cpk and ps3.cpk.

On PS3, you can use FTP to navigate to dev\_hdd0\game\NPEB02436\USRDIR to view the same files. It may be more convenient to download a copy of the .PKG file ([USA](https://zeus.dl.playstation.net/cdn/UP2611/NPUB31848_00/UP2611-NPUB31848_00-HDDBOOTPERSONA05_bg_1_c122979e59ce5776a3ce4418c242e51a5e7a81bc.pkg)/[EUR](https://zeus.dl.playstation.net/cdn/EP4062/NPEB02436_00/EP4062-NPEB02436_00-GPERSONA5X000001_bg_1_8b007b705f5c8aec892213cfa95629ee53453926.pkg)) and extract using PKGView\.exe than to dump and transfer these files to PC.

Use [CriPakGUI](https://shrinefox.com/browse?post=cripakgui) to open and extract the contents of each .CPK file to a folder.

{% hint style="success" %}
For simplicity, you can extract them all to the same folder (or merge folders later) if you'd like. It's not important which .CPK the files came from, because they all share the same directory structure when loaded by the game.
{% endhint %}

## Creating Mods

To begin exploring the files and learning how to edit them, see the [Persona 4 Golden](https://amicitia.miraheze.org/wiki/Persona_4_Golden) page on the [Amicitia Wiki](https://shrinefox.com/wiki). Once you have an idea for a mod, open the **Mod Compendium** and click on the **New** button. Fill out the form and it will create a mod folder for you.

Inside the mod folder, **match the structure** of the extracted .CPK contents. For instance, if you're editing a file in the /init/ folder, copy the unedited one from your .CPK dump to your mod folder and place it in a /init/ folder.

## Porting Mods

{% hint style="danger" %}
Missing info:

* Recreating .PACs that contain changed files between PC/Vita
* Accounting for the different texture resolution
* Accounting for the different sound format
* Porting Aemulus mods to the Mod Compendium
  {% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.shrinefox.com/getting-started/persona-4-golden-psvita-mod-support.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
