# Readying the game for modding

So you've got the game installed! You could play it like that but you'd be missing out on all the cool mods people are making! Stuff like [P5EX](https://gamebanana.com/wips/57221) or [TRP](https://gamebanana.com/wips/59270)!\
\
So we'll need to do some initial things to get the game ready for modding.\
First off, you need to find the **PPU EXECUTABLE HASH** for the game.

To do so, boot up the game and let it run for a few seconds.\
After that close the emulator entirely.\
Navigate to where you have your emulator installed and you should see a file named\
**rpcs3.log**. Open it in any text editor, the default Notepad should do plenty.\
Now hit Control+F (Ctrl+F) to bring up the search tab and type "ppu exe" and click **Find**. You should see a string that goes something along the lines of:

```
PPU Executable Hash: PPU-somethingsomething
```

That "PPU-somethingsomething" is your PPU Hash, take note of it.\
Now you have to make an important decision.\
If you are going to use [P5EX](https://gamebanana.com/wips/57221) or not.\
[P5EX](https://gamebanana.com/wips/57221) is a very advanced mod that is also a sort of framework for other mods so it is recommended to install it. If you want to do so, go ahead and use [Loaf's Guide on how to install P5EX](https://loafgatr.gitbook.io/how-to-install-p5ex/). If you installed [P5EX](https://gamebanana.com/wips/57221) you can skip to the next step.\
If you instead opted for the more "classic" way of modding the game, keep reading here.

The way we load up mods for Persona 5 is through patching the game executable to load a file conviently named **mod.cpk**. This is an Archive of files that is going to get loaded before the actual game files to allow mods to "overwrite" the normal game files. (You can learn more about the CPK format on the [Amicitia Wiki](https://amicitia.miraheze.org/wiki/CPK))\
Fortunately, you don't have to do any of the hard work because other people figured it out and made it easy and simple! Simply go to [ShrineFox's Patch Creator](https://shrinefox.com/apps/patchcreator), provide it with your PPU Hash and select the patches you want to use!

{% hint style="warning" %}
**Do not use the P5EX and Mod SPRX patches if you are NOT using P5EX**
{% endhint %}

After you've selected all the patches that interest you, scroll down to "Download patch.yml" and select "New Format" when prompted to select wich to use.\
It should download a patch.yml file.\
Put the patch.yml file inside of \<RPCS3InstallDir>/patches\
Then boot up RPCS3 and go into Manage > Game Patches.

{% hint style="warning" %}
If a message pops up saying that the formatting is wrong, try redoing the last step.\
If you are prompted to update your patches by the emulator, **do not** as it will overwrite all the patches you selected.
{% endhint %}

{% hint style="info" %}
You can enable the Checkbox "Only show installed games" so that you don't get confused by all the different dropdown menus
{% endhint %}

Open the Persona 5 dropdown and select all of the patches you want to enable.\
You don't need to enable all of them at once but make sure to always have:\
"**Enable Mod Support**" enabled so that the game will load the mod.cpk\
And you're done with this step! Onto the next one to figure out how to install mods!


---

# 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://shujynx.gitbook.io/p5-modding-guides/the-basics/readying-the-game-for-modding.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.
