EtiTheSpirit / BNKReplacer

A tool to replace existing sound files within Wwise BNK audio archives.
MIT License
14 stars 0 forks source link

Index out of bounds, source code completely messed up #8

Closed bluewave41 closed 2 years ago

bluewave41 commented 2 years ago
PS C:\Users\blue\Desktop\bnk> .\NMSBnkRepacker.exe
Enter the path to the source file (the file that you want to modify).
Do not put quotes around the path.
C:\Users\blue\Desktop\bnk\audio.bnk
Enter the path to the destination file (the file that will contain your edits).
Do not put quotes around the path.
C:\Users\blue\Desktop\bnk\file.bnk
REVIEW YOUR DATA: You want to make the following replacements...
File ID [20676623]   => [Implicit Conversion] File #1 in the folder (sorted by name).
(n.b. Implicit means that you didn't put anything after the ID and the program is guessing which file you want the ID to correspond to.)
Is this data correct? [y/N]
Sit back and chillax. The program's doing its thing...
Reading file...
>> Skimming Section BKHD... (This section is not necessary for BNK patching)
Populated 28 bytes.
>> Populating Section DIDX...
Populated 12 bytes.
>> Populating Section DATA...
Populated 2074946 bytes.
Populating marshaller...
WEM Marshaller has been set up.
Done populating BNK file.
Already converted file.wav to WEM. Referencing existing file...
Replacing WEM Index 0 (File: C:\Users\blue\Desktop\bnk\AUDIO_TEMP\file.wav.wem)...
Shit hit the fan! A critical exception was thrown. Here's the error: Index was outside the bounds of the array.
   at NMSBnkRepacker.Repacker.FakeMain(String[] args)
   at NMSBnkRepacker.Repacker.Main(String[] args)
Press enter to quit...

Your source doesn't compile either. The entire project structure is a mess, projects are referenced in non existent folders and it's of no help to me.

EtiTheSpirit commented 2 years ago

I updated the project to include everything, not sure why or how it was such a mess but that should be fixed now. As far as your issue and why it happens, I am not sure.

EDIT: There seems to be a lot of garbage in this project too, prototype code scattered about and whatnot. It also includes code from some of my other repos related to this project, like WEMConverter and BNKMerger

EtiTheSpirit commented 2 years ago

For the time being I am going to close this issue. The underlying problem has been resolved, and a number of bugs preventing the program from running have been patched as well.