Laupetin / OpenAssetTools

Open Source Modding Tools for old Call Of Duty games
https://openassettools.dev
GNU General Public License v3.0
85 stars 14 forks source link

Linking a weapon file with a non empty notetrackSoundMap field causes an error #217

Closed Sammy-0 closed 1 month ago

Sammy-0 commented 2 months ago

This seems to be a (somewhat) new bug as an older build from February of this year seems to work fine.

Laupetin commented 2 months ago

Can you maybe add the weapon file or the value you used for notetrackSoundMap to make it easier to replicate the bug? Also what is the error exactly? Can you add the log to the issue?

Sammy-0 commented 2 months ago

Can you maybe add the weapon file or the value you used for notetrackSoundMap to make it easier to replicate the bug? Also what is the error exactly? Can you add the log to the issue?

Yeah sorry for being so vague. Here's what I have: cmd_FwCrlXzIsd

githubwontletmeuploadffs.zip

This is intended for BO2 btw

Laupetin commented 2 months ago

The file you sent has an invalid notetracksoundmap property, that's most likely the issue. How did you generate it? The format (at least the one i implemented, i dont know if that is 100% identical to the one that official tools may use) is: One key, followed by the value then a newline (unless it is the last entry in which the newline can be omitted).

The notetrackSoundMap of your weapon file has the following content (it is lacking any newlines):

sndnt#fly_ak47_mag_out fly_ak47_custom_mag_out sndnt#fly_ak47_futz fly_ak47_custom_futz sndnt#fly_ak47_mag_in fly_ak47_custom_mag_in sndnt#fly_ak47_charge fly_ak47_custom_charge sndnt#fly_ak47_bolt_back fly_ak47_custom_bolt_back sndnt#fly_ak47_bolt_release fly_ak47_custom_bolt_release

So if you add newlines to it after every second entry:

sndnt#fly_ak47_mag_out fly_ak47_custom_mag_out 
sndnt#fly_ak47_futz fly_ak47_custom_futz 
sndnt#fly_ak47_mag_in fly_ak47_custom_mag_in 
sndnt#fly_ak47_charge fly_ak47_custom_charge 
sndnt#fly_ak47_bolt_back fly_ak47_custom_bolt_back
sndnt#fly_ak47_bolt_release fly_ak47_custom_bolt_release

it should work

Laupetin commented 1 month ago

Closing this since it looks like an invalid input file to me. If you see this differently or have an improvement idea, feel free to reopen 😅