NicknineTheEagle / Frostbite-Scripts

Python scripts for extracting Frostbite Engine assets
Other
87 stars 14 forks source link

[FIFA18] LocalizedWaveAsset is not supported #45

Open lafreak opened 2 months ago

lafreak commented 2 months ago

When running ebxtoasset.py on commentary audio files, I'm getting:

Loading GUID table...
WARNING: EBX GUID table is missing, it is required to properly parse links between different EBX files!
Loading RES table...
WARNING: RES table is missing, it is required to link to RES files!
Sound/Speech/Commentary/eng_us/SoundWaves/bADVANTAGE_CROSS
Falling back to simple NewWaveResource finding method, may not work properly.
Traceback (most recent call last):
  File "E:\Code\Frostbite-Scripts\frostbite3\ebxtoasset.py", line 44, in <module>
    dbx.extractAssets(chunkFolder,chunkFolder2,resFolder,targetDirectory)
  File "E:\Code\Frostbite-Scripts\frostbite3\ebx.py", line 552, in extractAssets
    elif self.prim.desc.name=="LocalizedWaveAsset" : self.extractNewWaveAsset() #inherited from NewWaveAsset
  File "E:\Code\Frostbite-Scripts\frostbite3\ebx.py", line 678, in extractNewWaveAsset
    for i in range(bank.get("Chunks").numElems):
AttributeError: 'NoneType' object has no attribute 'numElems'

All other types work OK. @NicknineTheEagle

Is the type not supported?

Tested on fresh install FIFA18, english commentary files - ebx\sound\speech\commentary

NicknineTheEagle commented 2 months ago

LocalizedWaveAsset should work, it was tested on NFS: Payback.

Loading GUID table...
WARNING: EBX GUID table is missing, it is required to properly parse links between different EBX files!
Loading RES table...
WARNING: RES table is missing, it is required to link to RES files!

You sure you ran the dumper properly? These two files should be present if you extracted the game with my dumper script, they're pretty important.

lafreak commented 2 months ago

You are right - I started to run ebxtoasset.py too early - before dumper has finished it work. However, on clean setup, after waiting for dumper to finish its work, I'm getting:

PS E:\Code\Frostbite-Scripts\frostbite3> python .\ebxtoasset.py
Loading GUID table...
Loading RES table...
Sound/Speech/Commentary/eng_us/SoundWaves/bADVANTAGE_CROSS
Caching NewWaveResource GUIDs...
Traceback (most recent call last):
  File "E:\Code\Frostbite-Scripts\frostbite3\ebxtoasset.py", line 44, in <module>
    dbx.extractAssets(chunkFolder,chunkFolder2,resFolder,targetDirectory)
  File "E:\Code\Frostbite-Scripts\frostbite3\ebx.py", line 552, in extractAssets
    elif self.prim.desc.name=="LocalizedWaveAsset" : self.extractNewWaveAsset() #inherited from NewWaveAsset
  File "E:\Code\Frostbite-Scripts\frostbite3\ebx.py", line 678, in extractNewWaveAsset
    for i in range(bank.get("Chunks").numElems):
AttributeError: 'NoneType' object has no attribute 'numElems'

When running against ebx\sound\speech\commentary directory of FIFA18. Tested also other languages in ebx\sound\speech\loccommentary, same problem.

Do you have any idea? Or which other details should I provide? @NicknineTheEagle

lafreak commented 2 months ago

Okay, I tried some more things. I have narrowed down the directory to polish language - even further: sound\speech\loccommentary\pol_pl\soundwaves\pol_pl_male.

Now, some files were converted correctly (about 57 .sps files), but large amount of audio files produce error in the logs:

...
Chunk does not exist: 069f5154-a508-3d49-7d75-c81fe3db0e52
Chunk does not exist: 069f5154-a508-3d49-7d75-c81fe3db0e52
Chunk does not exist: 069f5154-a508-3d49-7d75-c81fe3db0e52
Chunk does not exist: 069f5154-a508-3d49-7d75-c81fe3db0e52
Chunk does not exist: 069f5154-a508-3d49-7d75-c81fe3db0e52
Chunk does not exist: 069f5154-a508-3d49-7d75-c81fe3db0e52
Sound/Speech/LocCommentary/pol_pl/SoundWaves/POL_PL_MALE/tTTP_INTRO_DUAL_A
Chunk does not exist: f0d78202-68ae-2ead-1ec5-9d992053daa2
Chunk does not exist: f0d78202-68ae-2ead-1ec5-9d992053daa2
Chunk does not exist: f0d78202-68ae-2ead-1ec5-9d992053daa2
Chunk does not exist: f0d78202-68ae-2ead-1ec5-9d992053daa2
Chunk does not exist: f0d78202-68ae-2ead-1ec5-9d992053daa2
Chunk does not exist: f0d78202-68ae-2ead-1ec5-9d992053daa2
...

It feels like something is off, and LocalizedWaveAsset is in fact implemented, any hints? @NicknineTheEagle