What's even weird is how in the file you have pages ("sectors") of 0x1000 bytes, but only 0x804 is used per page, which seems like a complete waste of space.
I first thought it's because it was using an ADPCM block of 4096+1 samples, of size 0x804, and had to be aligned to 0x1000.
So that's what I tried first, then I wondered why the speech always sounded like complete crap
adrientd
I realized later that it was 65 samples blocks, and now I still wonder why only 0x804 bytes are used per 0x1000 page, because now it feels like there is no valid excuse anymore.
hesopesomeso
Not exactly sure what you mean by sectors. The data section? There is padding indeed, but seems like it is aligned properly.
hesopesomeso
But yeah it's like this: https://xboxdevwiki.net/Xbox_ADPCM except the last sample is skipped.
adrientd
I pushed the speech export and there is now a build with that feature.
If you want to use: you have to create in the modded game folder a new folder named **Speech**, then there create folders **0**, **1**, **2**, etc. for each language (or only **1** if you just need English).
In these folders you will then put WAV files for the speech lines. Each WAV is named as a 4-digit number that corresponds to a text line in the game text.
adrientd
The WAV files can be obtained from the Romaster, by opening the file `\XXL1Resources\Audio\Bank\VOICE_*.bank` into foobar2000 (with the vgmstream plugin) and converting each track to WAV by selecting all and right click > Convert > ...
adrientd
then in the dialog box, choose WAV as Output format, and as Destination, set to **Convert each track to an individual file** with this Name format: `$substr(%title%, $add(1,$strchr(%title%,'(')), $add($strchr(%title%,'('), 4))`.
adrientd
and save them to the numbered folder you created at the beginning.
pegperegogaucho
Great news!
pegperegogaucho
You actually don't have to use that complicated pattern, you just need to type %STREAM_NAME% which will take it from the vgmstream property
pegperegogaucho
Moreover, for some reason I noticed that, despite updating the stream file, it would still play the original audio
I saved Rome to level 1 for testing and it would play the stream from level 6 (which was still unmodified), the issue was that the lvlNumber in CKLevel was still 6! So I guess the game queries the lvlNumber of CKLevel for this purpose of playing the correct stream file
pegperegogaucho
Adrien, if I add more Sekens lines the game will crash when playing the new ones. Is this not possible currently?
adrientd
Oh nice I didn't know that.
adrientd
Oh well that would mean I would have to update the streams from another level than the actual level, which is weird.
Note that there's another issue in that the level number is taken from the Level text box from Main window, so you could technically change the number without loading and it would probably mess things up
adrientd
I need to store the currently loaded number somewhere (or also take it from CKLevel )
adrientd
I haven't tested adding new sekens so that's to be expected xD
I think it does resize the corresponding array in the LLOC for the language specific info for the sekens, but new ones are probably not initialiazed properly.
pegperegogaucho
I noticed that!
pegperegogaucho
Taking from CKLevel is fine, but it's number needs to get updated when saving for example LVL002 as LVL004 etc.
pegperegogaucho
Ah damn that sucks, hopefully it can be added soon!