Update available
Changes
- added IO functions (erase, replace)
- fixed external executable support bugs
Notes
Xtool has introduced IO functions, which should help you perform file and folder operations such as erase and replace (for now, more will be added). I actually wanted to add these functions a long time ago as they could be useful for repacking however I delayed them time after time because precompression needed more attention but as there have been no bug reports for the past 3 weeks I decided to start working on them.
To summarise, Erase is a feature that fills a given input with zeroes in case you wanted to repack certain data separately and Replace is a feature that replaces existing data within certain files with another.
Xtool will search for locations of the extracted streams and store these positions for when you use decode function to revert the changes (yes, the process is reversible)
Erase
Code:
xtool erase extracted_streams original_data [decode_data]
xtool decode decode_data extracted_streams original_data
Use cases for erase is the removal of language/videos files from archives in games after using another extraction tool, so rather than manually searching for positions and storing them, erase will make this process automated.
An example is after extracting video files from an archive and then wanting to remove credits video, the syntax would be
Code:
xtool erase credits.bk2 Gobi\Content\Paks\pakchunk33-WinGDK.pak credits.xtl
xtool decode credits.xtl credits.bk2 Gobi\Content\Paks\pakchunk33-WinGDK.pak
decode will fill the zeroes with the original data
Replace
Code:
xtool replace old_streams new_streams original_data [decode_data]
xtool decode decode_data extracted_streams original_data
The use cases for replace is possibly game file modification.
An example is having several modified files and the original files and you wanted to bulk replace these files, you'd have to prepare two folders with the same file structure and the syntax would be
Code:
xtool replace "textures\original\*" "textures\modified\*" "game\*" mod_tex.xtl
xtool decode mod_tex.xtl "textures\original\*" "game\*"
decode will fill the modified data sectors with the original to restore the file its original form.
PS
If you are using these features for a repack in which people would select languages or video credits for example, if the users did not select any of these to be installed then there would be missing files. Xtool's decode command would still work and will try to restore the original data using whatever data that was selected and available without problems.