Guide for Extracting and Replacing the Battle Cut-ins .EPL files

Create detailed, step by step tutorials on how to create mods!
Post Reply
User avatar
Fortuna
Posts: 11
Joined: Mon Mar 01, 2021 12:16 am
Has liked: 5 posts
Been liked: 4 posts

Guide for Extracting and Replacing the Battle Cut-ins .EPL files
by Fortuna (No credit needed, edit this or repost this however you like)
(Works for P3P, Persona 4, and probably P3 and P4 Golden)

(Thanks to narcku giving a mini-tutorial for extracting .epl files here:
https://www.tapatalk.com/groups/amiciti ... 2-s40.html
Honestly it's the only thing that's ever worked for me, I can't seem to get the epl injectors to work :P)
About this guide: This is pretty much my first attempt at posting a guide. This is only happening since I had such a hard time trying to find out how to do this. This guide is basically what I pieced together for myself , and I thought it might be useful for other people. Please don’t think that this process is overly-long or complicated, the guide only seems long because I took special care to go into great detail on each step. I like to make guides for myself where I can come back 3 years later and just immediatly know how to do something using the process listed. I have a habit of getting lost or worrying I don’t have the settings right when guides are over-simplified.
ALSO, apparently since I’ve been gone for like 2 years, it seems people have a new way of modding Persona that doesn’t involve the whole unpacking the .cpk and repacking the iso with umdGen? This guide still uses the old way, so if someone wants to take this guide and alter it to make a version that involves that new method go for it. I guess it’s not as important since this guide only really talks about handling the .epl files that have already been extracted from the .cpk, but still.

Image
https://imgur.com/xhM6mVQ
----------------------------------------------------------------------------------------------------------------------------------------------
WHAT YOU NEED:
-1 HxD (or a similar hex editor, for extracting the images from the epl files)
-2 Game Graphic Studio (for replacing .tm2 texture files)
-3Some image editing program like GIMP
-(You’ll also need Cripack and UMD for unpacking and repacking the ISO, but this guide is assuming you’ve already done that even get near these .EPLs anyway.)
----------------------------------------------------------------------------------------------------------------------------------
File Locations:
data\battle\cutin
syoudaku = Bust for requesting All out Attack
syoukan = Persona summoning eyes

cutin2.bin = All-Out attack
cutin3.bin = All-Out attack
cutin4.bin = All-Out attack
cutin4f.bin = All-Out attack
^^^Regarding these cutin.bins, these images appear in the allout-attack, and are repeats for the purposes of appearing in different sides of the screen. So, for example, yukari will have an image in each of those below. Infact, she actually has TWO images in each .bin (except for cutin2.bin) -so keep you're eye out in the hex editor for two "2KOMA_B_2.tm2" files! You'll need to replace both, otherwise depending on the order of the all-out attack, there may still be an unreplaced yukri face in there!
----------------------------------------------------
Yukari-specifc files for the purpose of an example:
cutin\syoudaku
BOKO_SD_2.EPL (Yukari bust appears when requesting all out attack)

\cutin\syoukan
SYKN_2.EPL (yukari eyes during persona summon)

data\battle\cutin
cutin2.bin (inside hex editor) > 2KOMA_B_2.tm2 (yukari all out attack image-repeated in the other cutin.bins too)

**** Femc allout attack is
data\battle\cutin\cutin2.bin
2KOMA_A_99.tm2

***Persona 4 Adachi persona summon eyes image:
battle\cutin\syoukan
SYKN_E109.EPL
(so you see, the file structure and format is very similar between P3P and P4. )
----------------------------------------------------------------------------------------------------------------------------------
Step: 1 Extracting the images from the .EPL

-So, the main format for the eye-image cut-ins/all out attack images is .EPL
-these are hard to get at. I've tried all sorts of methods but the only thing that ever worked for me is hex editing. Which is a shame, because it sounds like some of those .epl injectors or whatever are a bit easier to use :/
-You’ll have to have unpacked the game image (iso) using UMDGen, and then unpacked the data files from the .cpk using CriPakGUI.exe (I’m not really going into this because there are already many excelent tutorials about how to do that on here, and also by ShrineFox on youtube.)
-start off by backing up all your files in data\battle\cutin (just in case).
-we're going to do the \cutin\syoukan\SYKN_2.EPL as an example for this guide. Should work the same no matter what epl it is though.
-Open your hex editor (I use HxD hex editor because its free and does what I need.)
-drag the .epl into your hex editor or otherwise open the epl in it.
-ctrl+F and make sure the settings are set to search in all directions
-type "tm2" and click "search all"
-There might be several lines that have "tm2", but specifically you're looking for the text that has the file name infront of it, for example: "SYKN_2.tm2".
-BUT you're going to look at the TIM2 AFTER this file name.
-So for example:
SYKN_2.tm2€LD@DTIM2
^we want to put the cursor right before the “TIM2” (the second tim2)
-Now, click so that your cursor is right before the "T" in "TIM2"
^^^This is important. Remember to put your cursor here -> xTIM2
-Now, look at the numbers and letters grouped in double (bytes, I think?) on the left side of the screen.
-You will notice, when you click the cursor in front of the "T" in "TIM2", it highlights a byte, specifically "54".
-look at the bytes to the immediate left of that number, and disregard the first number pair on the left.
-now, look at the next 3 pairs.
-Here's what that should look like:
40 44 00 00 54
-So, skipping the first pair of numbers to the left of the starting number (54), we want those 3 pairs of numbers. "40 44 00"
-re-arrange the pairs so that the 1st pair is now last, the middle pair stays in the middle, and the last pair is now first.

***NOTE: Do NOT make the numbers backwards, you MUST keep the numbers inside the pairs in the same order.
So, 40 44 00:
004440 <- GOOD
004404 <- BAD

-this number "004440" will tell us how much of the .epl is the image we're looking for.
-put your mouse cursor back to right before the "T" in "TIM2" again.
^^^This is important. Remember to put your cursor here -> xTIM2
-now, press "ctrl + e"
-a window will pop up. It should automatically be set to "hex", not dec or oct.
-don't touch anything, except for the last line, that reads "Length".
-Paste the number you got from rearranging: 004440
-click 'ok'
-the window will close and it will now highlight that portion, the portion that is the image you are lookign for.
-ctrl+ c to copy this portion.
-in the top left of the hex editor, click 'new file'
-In the new file, paste the portion.
-now save it as .tm2 file extension. (i recommend naming it similar to the .epl file, so you know which is which.)
- now you have an image file that is in .tm2 format.

-----------------------------------------------------------------------
Step 2: Editing the image

-Search engine the program called "Game Graphic Studio" and download it.
-Run the program.
-click and drag the .tm2 file you want to change into Game Graphic Studio -specifically into the top left side of the screen. Anywhere else, and it wont open.
-the image will appear in the bottom left corner. If it looks messed up then make sure that "Interlace:” is set to 'BGR+I".
-double click on the image in the bottom left. It should then also now appear on the top right.
-right click on the new image in the top right, and click 'save' -you can now save the image as a .png!
*********NOTE**********************************************************
After you export the image as png, if you attempt to edit it in a program like gimp, you will notice that there seems to be some restrictions on it, such as being 16-bit, and with a limited pallete?
-There's probably multiple ways to handle this, but what worked for me was making a new image with the same dimensions as the exported image.
-then I copy and pasted the new image I wanted to use to replace the original picture
-I had to shrink it and move it around slightly so that it fit the proportions of the original character and didn't look too out of place.
*********Important: When you start to export it, choose .png -a window will appear with some export options.
- (I use gimp, so if you can’t find this option on you program, switch to gimp and export it there because this step is important)
-It will probably be set to “Automatic Pixelformat” by default, but we need to change it to “8bpc RGBA” (if we don’t it could cause isues with not having a colorless background).
-then export it as a .png

(I wish there was better way but this is the extend of my knowledge. If someone has a better method please post it with step by step instructions :P)
*************************************************************************
-Go back to Game Graphic Studio.
-now, right click on the top right area of the screen and select 'open'
-Now, find and select your changed .png image you want to use as replacement.
-It will now appear in the top right part of the screen.
-Now, right click on the same image again
-Select "Change Color Depth" > Decrease to 8 bit (256 colors)
****Important: After you set the color depth, a new panel will pop up on the right side of the window.
-Now we need to make sure the background stays transparent.
-If you're not sure what color the background is, click on the eyedropper tool on the right panel, then click on the background to have the palette show which color it is.(for me it's usually the top left corner darkest black color)
-click on the eyedropper again to put it away.
-You must click and drag the slider for “RGB Opacity%” ALL THE WAY the left.
-click on "Apply" at the very bottom right corner.
***NOTE: If you feel that at the end of this, that there is too much of a thick dark outline around your image in-game (this is mainly a problem with the bust image that appears when asking for all-out attacks), you can also click on some of the other darkest colors and lower their opacity to 0 like the above step. Dont forget to apply!

Image
https://imgur.com/zKvlmaM

-NOW, you must click and drag the new image in the top right of the window down onto the old .tm2 image on the bottom left.
-it may ask if you're sure, just say yes.
-The .tm2 has now been overwritten.

------------------------------------------------------------------------------------------------------------
Step 3: Putting it back together

-Now, we're going to open that NEW .tm2 in the hex editor.
-Once open, ctrl + a to select everything
- ctrl + C to copy everything
-go back to your orignal .epl file in the hex editor (the one you ctrl + F'd to find the tm2 in)
make sure it still has the special 004440-length portion selected, because we're going to be replacing ONLY that.
***NOTE: if it isn't still selected or you had to close it or whatever, go to step 1 and follow the directions for selecting JUST the portion that has the .tm2 you need to replace.
-So, once it's selected, ctrl + v to paste the lines you copied from your new .tm2 file.
-now save this .epl file.
-this .epl now has your replaced image in it.
-copy and paste your new .epl to overwrite the SYKN_E109.EPL in "battle\cutin\syoukan"
-repack your .cpk with cripack.
-replace the old .cpk in the ISO using UMD and make a new .iso
-You're done! (you can follow this same method for the other .epls -but remember, they may not have the same bytes, so make sure to look at those 4 pairs of bytes on the left from where you put your cursor of the TM2 !)

Image
https://imgur.com/d4R3kX8

***Note: It's still kinda iffy-looking, to be honest, but I'm not sure if that's a problem with the process itself, or just a limitation of extracting and replacing epl files in general, which I had a hard time finding information on.
The eplInjector for Persona 5 doesn't seem to work on P3P or P4 .epls, and the other epl injector links around here are all dead. I tried the "Python 2.8 version" of an epl injector but was never able to get it to work either... :/
Seriously, if anyone has a better or easier method please correct me, or post a tutorial on it that even an idiot like me could understand, I'd love to get better/ faster results ;D
Still, hopefully this particular guide is helpful to somebody out there!
Last edited by Fortuna on Sun Mar 07, 2021 10:56 pm, edited 1 time in total.

Tags:
User avatar
ShrineFox
Site Admin
Posts: 290
Joined: Mon Oct 07, 2019 3:19 am
Has liked: 277 posts
Been liked: 115 posts

Thanks so much for this guide! Just wanted to point out, it looks like the image links are dead. If you still have them, might be worth reuploading to imgur
User avatar
FallenSun1773
Posts: 1
Joined: Tue Apr 27, 2021 3:38 pm

Would this method also be used to replace other textures? I would like to take the HD Texture Pack used for P3P using PPSSPP, and put it into the iso file to see if I can get it running on the PlayStation Vita with Henkaku either via psp iso to vpk or using adrenaline. I don't have any coding experience so I don't know if this is possible or if it could even run on the Vita.
User avatar
itzblitzog
Posts: 29
Joined: Fri Aug 28, 2020 9:09 pm
Has liked: 7 posts
Been liked: 13 posts

FallenSun1773 wrote: Tue Apr 27, 2021 3:43 pm Would this method also be used to replace other textures? I would like to take the HD Texture Pack used for P3P using PPSSPP, and put it into the iso file to see if I can get it running on the PlayStation Vita with Henkaku either via psp iso to vpk or using adrenaline. I don't have any coding experience so I don't know if this is possible or if it could even run on the Vita.
It won't work, it'll just resize the textures but not scale them down
User avatar
itzblitzog
Posts: 29
Joined: Fri Aug 28, 2020 9:09 pm
Has liked: 7 posts
Been liked: 13 posts

Game Graphic Studio has a lot of artifacts on most portraits. Tekka has recommended me to use Rainbow instead for .tm2 files: https://github.com/marco-calautti/Rainbow
It has no artifacts when exporting .tm2 files into a .png file, so those artifacts around the character portraits shouldn't be an issue anymore
Post Reply
cron

ShrineFox 2020 - 2023
Support | Progress | Labs | Privacy | Terms
This site is NOT affiliated, associated, authorized, endorsed by, or in any way officially connected with Atlus Co., Ltd, Atlus U.S.A., Inc. or Sega Games Co., Ltd, or any of its subsidiaries or its affiliates.