This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PAK Explorer - Patching
#1
All you need: NST Explorer, Patch and game itself.
1) Open PAK Explorer
2) Select txt file of patch you desire
3) Select game folder's archive folder
If backup is not present, all patched PAK files will be backed up
Patcher sytaxis:
open <pak> - opens pak for editing
repak - saves edited pak. If not exists already, backups original file, adding .patch_bak at the end.
open_import <pak> - opens pak to import from
replace pak <pak> <ID1> <ID2> - replaces file in opened pak with ID1 id by file from <pak> with id ID2
replace assets <ID> <asset> - replaces file with ID id in opened pak by asset
import <ID> - imports file with ID id from opened for import pak 
Example:
open crash1.pak
replace pak crash2.pak 4233004189 2971768986

replace assets 4144137678 res/texture.igz

repack

So, patch structure will be:
patch_name.txt
res/texture.igz

Patcher will open crash1.pak, replace it's 4233004189 asset with 2971768986 asset from crash2.pak, then replaces it's 4144137678 asset with external asset texture.igz from res folder relatively from patch script, repacks and backups pak.

NOTE: importing is not done yet. It works only partially.
Example:
open crash1.pak
open_import crash2.pak
import 2971768986
repack

If you have some requests or questions, ask freely.
Flaflo likes this post
Reply
#2
Thanks for this, the patching is a great feature and now that I've managed to use it for my level mod I'm gonna stick with it for anything else I release in the future.

I do have a question about how patching/replacing files works though - when you say it's based on Aluigi's BMS script, are you actually using quickbms and a modified BMS script to extract and replace files, or are you using another method? If you are using a modified script then is there any chance you could share it? And if not, do you think it would be possible to adapt whatever method you are using into a BMS script that can replace any file? I haven't tried it recently but afaik it's only the music and sound files that can be reimported using the MUA2 script.
Reply
#3
(27-08-2018, 01:14 AM)ARD Wrote: Thanks for this, the patching is a great feature and now that I've managed to use it for my level mod I'm gonna stick with it for anything else I release in the future.

I do have a question about how patching/replacing files works though - when you say it's based on Aluigi's BMS script, are you actually using quickbms and a modified BMS script to extract and replace files, or are you using another method? If you are using a modified script then is there any chance you could share it? And if not, do you think it would be possible to adapt whatever method you are using into a BMS script that can replace any file? I haven't tried it recently but afaik it's only the music and sound files that can be reimported using the MUA2 script.

No, by that i've meant that i took BMS script to get knowledge about PAK format.
Don't know how to write this in BMS. And, basically, extraction is just the same, but repacking is extremely differs from extracting. It also needs original pak or list of IDs to repack, but BMS probably can open more that one file.

Why do you need BMS script? I can add bunch extraction into NST Explorer, or whatever you need.
Reply


Forum Jump: