Advertisement
Suzukaze

Custom Soundtrack in PES

Feb 16th, 2023 (edited)
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.32 KB | History | 0 0
  1. @h@ preparing files:
  2.  
  3. 1. Open "CRIPakGUI" in "CRIPakGUI" folder and select dt40_all.cpk (This is where all PES audio system stored in) in your PES "Data/" folder.
  4. 2. Decompress "BGM_P2P.acb" (Header/CUE Data for AWB file), "BGM_P2P.awb" (HCA Pack) and "Playlist.xml" (Where PES read all metadata) in "TempAudioDirectory" (it can be anywhere, really. i just organize it for easier viewing)
  5. 3. Open "eternity_audio_tool" in "Eternity1.0b1" folder and go to the top menu in "File -> Open"
  6. 4. Select "BGM_P2P.acb" (because if you load AWB, it will lose all names and header data) in your "TempAudioDirectory"
  7. 5. Go to the top menu again, this time "Tools -> Dump tables" (This is for getting all technical data for ACB file like length and many things!)
  8. 6. Save it in "TempAudioDirectory" with any name you wanted (For me, I named "AudioTables.txt"). And after that, close the program.
  9. 7. Open "AudioTables.txt" (for checking length) and "Playlist.xml" (for editing song name and artist) with your favorite text editor. (Ex. Notepad, Sublime Text, Notepad++)
  10.  
  11. @h@ calculating audio length:
  12.  
  13. 1. Open "foobar2000" in "foobar2000" folder, drag your song into the program.
  14. 2. Right click at your song, press "Convert -> Quick convert"
  15. 3. Select it as "WAV" with "16-bit" in "Output bit depth" and then press "Convert".
  16. 4. Save your file anywhere you like, right click the music and press "Remove" (just to avoid confusion) and then drag the newly converted WAV file to foobar2000 again (to see a real data).
  17. 5. Check your "WAV" properties by right clicking the music and to go "Details" tab
  18. 6. Open Calculator and use the formula in "PESAudioMillisecondsFormula.txt".
  19.  
  20. ((1000 / (Sample Rate)) * Sample Data) * 1.0715
  21. Ex. ((1000/(44100)*9042264)*1.0715 = 219700.36
  22. 219700.36 multiply by 1.0715 and then use that new value without the point decimal, you can either bump up by 1 or just ignore it. it's just 1 millisecond!
  23.  
  24. 7. Edit "FindHEXValue.bat" with your favorite text editor and change your "DecValue" with your value and then save the file. (You can use a website for it too, https://www.rapidtables.com/convert/number/decimal-to-hex.html)
  25.  
  26. set DecValue=219700
  27.  
  28. 8. Run the batch file and remember the value.
  29.  
  30. HexValue = 35a34
  31. Press any key to continue . . .
  32.  
  33. 9. Check "AudioTables.txt" again and scroll down until you see "***Column 6: Length (flags 0x54)". The first song always start at Row 1.
  34. 10. Add zeros infront of your hex value until it matches the one that is in "AudioTables.txt" file
  35.  
  36. 00035A34 <-- My value
  37. 000XXXXX <-- AudioTables.txt value
  38.  
  39. 11. Open another File Explorer and open "HCAEncoder" folder.
  40. 12. Drag your newly converted WAV file to "hcaenc"
  41. 13. After that command line window closed, you should have youraudio.hca with your youraudio.wav
  42.  
  43. @h@ hex editing ACB:
  44.  
  45. 1. Open "HxD64" in "HxD" folder and drag/open "BGM_P2P.ACB" in your HxD.
  46. 2. Copy AudioTables.txt song length (but don't copy the 0x) and find it by going to the top menu and select "Search -> Find..." after that go to "Hex values" tab, paste value in the search box and then click "Search all".
  47. 3. Copy your value (in this example, it's 00035A34) and then right click the marked text and then press "Paste write". (to make it not ruining the ACB file.)
  48. 4. Save the ACB file and close HxD.
  49. replacing HCA in AWB
  50.  
  51. @h@ replacing HCA in AWB
  52.  
  53. 1. Change your metadata in your "Playlist.xml". Make sure the Artist name (and i think music name too??) not more than 64 characters. And also set Offset to 0. Otherwise PES will just crash. After you're done with your thing, save "Playlist.xml" and then close it.
  54. 2. In your "HCAEncoder" File Explorer, go back to the main root folder and go to "SonicAudioTools" folder.
  55. 3. In your main File Explorer, go to "TempAudioDirectory" folder
  56. 4. Drag "BGM_P2P.acb" in your "TempAudioDirectory" folder to "AcbEditor" in "SonicAudioTools" folder. **(NOT MOVING THERE.)**
  57. 5. It should generate "BGM_P2P" folder, inside there should be a lot of "000XX_streaming.hca"
  58. 6. Replace the song you wanted to replace (song 1 starts with 00000_streaming.hca - song 24 starts with 00023_streaming.hca or whatever your PES is) with youraudio.hca. Make sure you rename it to "000XX_streaming.hca" because you need to make sure that all files are there. Otherwise "AcbEditor" won't be able to generate AWB file.
  59. 7. After you replace the song(s), go back to main "TempAudioDirectory" folder, and then drag "BGM_P2P" folder to "AcbEditor"
  60. 8. After that you should have a brand new "BGM_P2P.ACB" and "BGM_P2P.AWB" made! Wow!
  61.  
  62. @h@ repacking CPK:
  63.  
  64. 1. Open "CRIFileSystem" folder and open "CpkFileBuilder"
  65. 2. Go to the top menu and select "File -> Open Project FIle"
  66. 3. Select "PESAudioStructure" in your AudioTools folder
  67. 4. Right click at "acb" and press "Add Files ..."
  68. 5. Click "Select Local Files ..." button and select "BGM_P2P.acb" in your "TempAudioDirectory".
  69. 6. Press "Add Files"
  70. 7. Repeat those steps for awb and playlist folders
  71. 8. Go to the top menu and press "Build CPK"
  72. 9. Press on "..." to select the place to save your new CPK file
  73. 10. Press on "Clean Build"
  74. 11. (Optional) Press on "View CPK File Info." and ensure all 3 files are there.
  75. 12. Close CPK File Builder, don't save the project. (or save it, if you want to make something for the future!)
  76. 13. Replace/Add your CPK to DpFileList
  77. 14. Run the game and hope for the best
  78. 15. ???
  79. 16. Enjoy your new music!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement