Advertisement
Frinkeldoodle

Inserting Custom Files Into .int Files

Apr 21st, 2017
1,079
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.60 KB | None | 0 0
  1. ==================================================
  2. Inserting Custom Files Into .int Files - A Complicated (for now) Journey in Modding Parappa the Rapper 2
  3. A Tutorial by Frinkeldoodle
  4. --------------------------------------------------
  5.  
  6. *********************************************************************
  7. ARE YOU DOING A HAT TEXTURE EDIT?
  8. Follow this tutorial by Chibi instead, it's simpler and should work:
  9. https://pastebin.com/bhfVwyuA
  10. *********************************************************************
  11.  
  12.  
  13. *** NOTE: If you're getting stuck following the tutorial, feel free to message me on Discord. I'm Frinkeldoodle#9236 , and as long as I'm not busy or at work or anything, I should be able to give at least some guidance. Also note that I'll perpetually be on DND as I don't like Discord notifications, as they're Windows notifications and Windows notifications are literally the embodiment of cancer.
  14. Also, feel free to pose your question on the PTR Modding Discord as well!***
  15.  
  16. Files/Programs Required:
  17. - An .int file
  18. - quickbms.exe as well as three different scripts . . .
  19. - parappa2_extract.bms (my slightly edited version of parappa_rapper.bms (which was made from the creator of QuickBMS))
  20. Link: https://pastebin.com/WqSsPdBT
  21. - parappa2_compress.bms (Obtained from a post made by oddMLan in a Github thread (I hope you don't mind my usage of it! ^^"))
  22. Link: https://pastebin.com/qq7XHpMv
  23. - parappa2_decompress.bms (Basically parappa2_compress but in reverse. Kinda put together with dollar store duct tape, eheheh...)
  24. Link: https://pastebin.com/sUPW8Mdb
  25. - Hex editor (I myself use HxD Hex Editor)
  26.  
  27. Skills Required:
  28. - Must be comfortable doing things in a hex editor
  29. - Must be somewhat tech-savvy, and possibly willing to look stuff up on the net if you don't understand something
  30. - Must have a good deal of patience and some organizational skill (files can get messy pretty quickly)
  31.  
  32. ==================================================
  33. Extracting Files from .int
  34. --------------------------------------------------
  35. 1. Use parappa2_extract.bms with QuickBMS to extract the files from the .int. Pretty straightforward, right?
  36. ==================================================
  37.  
  38. At this point, you can start messing around with the files that were extracted. This tutorial won't cover how to edit those; I'll create tutorials in the future outlining that. I'll also list tutorials others have made doing so below:
  39.  
  40. .TIM1/.TIM2, From Tradarked on the PTR Modding Discord: https://pastebin.com/qTErdzAB
  41.  
  42. For every file you edit, keep a copy of the original file handy.
  43. *** From here on out, I'll refer to your modified file as "modifiedFile.ext" and the original file as "originalFile.ext". ***
  44.  
  45. ==================================================
  46. Before Inserting File Into .int (aka The Part Where I Start To Lose You)
  47. --------------------------------------------------
  48. There are a few things to know before doing this. I will use "folder.dat" to refer to the compressed file you create using parappa2_compress.bms, "folder.int" to refer to the original data you're replacing inside the .int file, and "the complete .int file" to refer to the entire file. Apologies in advance if this is confusing.
  49. 1. Before folder.int starts, the complete .int file will have the hex string "11 22 33 44", then a bunch of info about the data in hex format as well as a listing of all of the files, then a bunch of empty data, and then finally eight bytes representing the compressed and uncompressed sizes of the data in little-endian format. It seems to usually be 2056 bytes long, but expect it to be far, far longer if there are a lot of files within folder.int and/or folder.int is big. (If you need an example of what this pre-folder.int data looks like, please let me know.) I'll refer to this data as the "preamble".
  50. 2. There is some empty data after folder.int. This can be added to with more empty data if your folder.dat is smaller than folder.int to keep the complete .int file the same size. I'll refer to this empty data as the "postamble".
  51. 3. folder.dat MUST be smaller or equal to the size of folder.int. The game WILL crash if you try to exceed the size of the compressed data.
  52. ==================================================
  53.  
  54. ==================================================
  55. ACTUALLY Inserting File Into .int (aka The Part Where I /REALLY/ Lose You)
  56. --------------------------------------------------
  57. There are multiple ways to do this. This method is slightly more convoluted than other methods, however I've found that this method is more reliable.
  58.  
  59. PART 1) Preparing the original data
  60.  
  61. 1. Take note of the files inside the folder containing the file(s) you edited are in.
  62. 2. Find the preamble with that exact list of files inside the original complete .int file. Copy the data after the preamble and save it to a new file, not including the preamble or the postamble. (I'll call this new file originalFolder.int)
  63. 3. Decompress originalFolder.int using parappa2_decompress.bms. (I'll call the resulting file originalFolder.dat)
  64. 3a. If originalFolder.dat turns out funky for whatever reason, try replacing line 3 in parappa2_decompress.bms with the two
  65. commented lines. You'll need to give QuickBMS the size of the uncompressed folder, which you can do by right-clicking on it and
  66. selecting "Properties". Give the size in bytes, and I highly suggest adding a few extra hundred bytes for padding.
  67. 4. You should now have two files, originalFolder.int and originalFolder.dat.
  68.  
  69.  
  70. PART 2) Preparing the new data
  71.  
  72. 1. Open your hex editor, and in it, open originalFolder.dat, originalFile.ext, and modifiedFile.ext.
  73. 2. Within the hex edtior, find the contents of originalFile.ext in originalFolder.dat. Replace that data within originalFolder.dat with the contents of modifiedFile.ext. Save this as a new file (I'll call the file you're saving here "modifiedFolder.dat")
  74. 3. Use QuickBMS and parappa2_compress.bms on modifiedFolder.dat to create a compressed version of the folder. I'll call the resulting file "modifiedFolder.int".
  75. 4. Compare the size of originalFolder.int and modifiedFolder.int. If modifiedFolder.int is larger by even a single byte, STOP. This will not work if modifiedFolder.int is larger than originalFolder.int, go back into your modified files and see what you can do to reduce the filesize somewhere. Once you've finished this, go back to step 1 in this part (Preparing the new data)
  76. 5. Open your hex editor again, and in it, open the original complete .int file, originalFolder.int, and modifiedFolder.int.
  77. 6. If modifiedFolder.int is smaller than originalFolder.int, append modifiedFolder.int with empty data at the end until it matches the size of originalFolder.int.
  78. 7. Find the contents of originalFolder.int inside the original complete .int file. Replace that data within the original complete .int file with the contents of modifiedFolder.int. Save this as a new file (I'll call this modified.int, but you should name it the same thing as the original .int file, but put it in a different location (possibly a folder for modified .int files?))
  79. 8. Use your favorite .iso editor to replace the original .int file with your modified complete .int file.
  80. 9. Test!
  81. ==================================================
  82.  
  83. If it loads properly, congrats! You managed to decipher my confusing instructions and put your own files into an .int file!
  84. If it crashes, see where you might've gone wrong and try fixing it. Or even experiment a bit. Experimenting is how I figured out how to do this, after all :P
  85. Note that you can use in-game saves with modified .iso files, HOWEVER I would not suggest using save states made with unmodified .isos on modified .isos.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement