From 236be85c1a1f8634645506ac43f0ad4c27efb84b Mon Sep 17 00:00:00 2001 From: tmpz23 <28760271+tmpz23@users.noreply.github.com> Date: Wed, 2 Feb 2022 17:44:36 +0100 Subject: [PATCH] Update README.md added afs_rebuild.conf & afs_rebuild.csv doku --- README.md | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 588d068..c867aea 100644 --- a/README.md +++ b/README.md @@ -65,8 +65,20 @@ root folder contains all files of the unpacked AFS sys folder contains AFS system files of the game and generated files needed for AFS operations: * tableofcontent.bin - TOC sys file: You can edit this file it will be handled by the --pack command. * filenamedirectory.bin - FD sys file: This file is created only if there is a FD in the AFS. -* filename_resolver.txt - Created when multiple files have the same name in the FD. -* rebuild.conf - Not implemented yet. +* filename_resolver.csv - Created when multiple files have the same name in the FD. New names use "filename (N).ext" format with N:Integer. +* afs_rebuild.conf - Edit this file for rebuilding the AFS. +* afs_rebuild.csv - Edit this file with correct values set in afs_rebuild.conf for rebuilding the AFS. + +### afs_rebuild.conf & afs_rebuild.csv + +files_rebuild_strategy is used to organise files (indexes, offsets) in AFS. The strategy use informations in afs_rebuild.csv autogenerated during unpack. 4 strategies are available: +* auto: Rebuild all files indexes and offsets with custom sort. afs_rebuild.csv indexes and offsets will be ignored. +* index: Keep the specified index for designated files. afs_rebuild.csv offsets will be ignored. +* offset: Keep the specified offset for designated files. afs_rebuild.csv indexes will be ignored. +* mixed: Keep the specified offset and index for designated files. +afs_rebuild.csv contains entries describing how to pack files in the AFS. All int values are stored in hexadecimal: 0xabcdef. Offsets have to be aligned to 0x800 (2048). Put one line per selected file that you wan't to constraint using this format: +* unpacked_filename/index/offset/packed_name +For instance: "dummy (5).bin/0x12/0x80000/dummy.bin". You can put "auto" to index or offset when you want set the packed filename: "dummy (5).bin/auto/auto/dummy.bin". For an empty block add only index/offset couple: "0x12/0x80000" (Not implemented yet). First remove all files without constraints from afs_rebuild.csv. Then put auto in indexes, offsets, and names that doesn't have constraints. ## pzztool.py Python3 script for unpack/repack unpzz/pzz and uncompress/compress of PZZ archive. MDT files are also handled by pzztool.py.