Closed chenijih2017 closed 2 years ago
@chenijih2017 When you save a file, that file may not always be written to the original bundle, and the new location will be recorded in .index.bin As you said, in addition to replacing its bundle, replacing .index.bin is also necessary But the general mode of VisualGGPK2 will take care of everything for you. So unless you know what you are doing, don’t use BundleMode, but use the recovery function in the general mode
Step to reproduce:
The problem exist when you use Replace function with _Tiny_1.bundle.bin, too.
Update: Here is what I found, if I edit any file inside a bundle using the program (let's say monster.oc in tiny1 bundle), and export the bundle. if I edit the file again (monster.oc), then replacing the tiny1 bundle with previous exported bundle will cause the monster.oc has invalid offset, I think maybe the offset info is not restore though?
Update again(with workaround): It might be my issue. When you edit the file's in a bundle, the program append or relocate the edited files to suitable positions of the ggpk, and the original position of these file's will be mark as Free, then the program update the index.bin file to match the current offset of each file. As the result, only replacing current bundle with exported bundle backup is not enough, you need to replace the "_.index.bin" to the index file that match your exported bundle to make the "bundle restoration" work. Please kindly correct me if there is any misunderstanding or danger operation, thanks. Great work by the way.