FileForums

FileForums (https://fileforums.com/index.php)
-   Conversion Tutorials (https://fileforums.com/forumdisplay.php?f=55)
-   -   Question about patching in files using SFK (https://fileforums.com/showthread.php?t=104598)

L33THAK0R 17-08-2021 19:49

Question about patching in files using SFK
 
Hi all,

Sorry to flood this board with questions but I'm honestly a bit stumped. I'm using this version of SFK to try and patch back in some files (Bink) that bloat the final output unless packed separate to their data archives. My current patching command (for use in a batch script) looks like:
Code:

sfk.exe partcopy INPUT_BINK 0 OUTPUT_ARCHIVE START_OFFSET -yes
However only a name less file, identical to the input bink video, with the start offset as its name, is produced. Although uneeded for my purposes, I tested extracting the file via SFK using:
Code:

sfk.exe partcopy INPUT_ARCHIVE -fromto START_OFFSET END_OFFSET OUTPUT_BINK -yes
I made sure to use the decimal rather than hexadecimal for calculating the offsets, and extraction was successful, however patching this file back in seems to be nigh impossible.

:( Sad8669 17-08-2021 21:58

1. Are you trying to extract binks to use bpk one them?


And also, the file won't patch back unless all the HEX was copied inside the MAIN file to a new FILE.

I will refer you to Masquerade's Explanation.

The only change is that, if you want to patch back a file, you must select its HEX using Select Blocks and copy it into a NEW file (create a new file using HxD) and then save it. This way you will have a CRC perfect file and it also patchable.

NOTE : All of the above process must be done within the MAIN file.

Which game are you trying to compress, you can use QUICKBMS, if a script exist since its re-import function is convenient.

Make sure that the file doesn't have any streams because the file size will expand upon this method and re-patching is out of question in such cases, unless you are using QUICKBMS.

L33THAK0R 17-08-2021 23:36

Quote:

Originally Posted by :( Sad8669 (Post 493695)
I will refer you to Masquerade's Explanation

Okay so first of all I'm a massive idiot! I've used the sfk method of patching data in & out a few times with RE2 & 3, and currently with the title I'm working on and Sekiro. Instead of copy pasting my script to a new batch file, I decided to write it out and forgot to include the
Code:

-allfrom
command, thankfully all seems to work, now I just have to run a few tests and all should be good! Thanks for linking me to "Masquerade"'s post, I wouldn't have noticed my error otherwise!


All times are GMT -7. The time now is 22:03.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
FileForums @ https://fileforums.com