Add LE1 ISACT bank authoring workflow - #476
Conversation
There was a problem hiding this comment.
This file doesn't have any comments indicating what it does.
There was a problem hiding this comment.
Same as other files - no comments. Makes files extremely difficult to maintain when there is no context to why anything was implemented the way it was
There was a problem hiding this comment.
No comments on new code are present
| localizationSuffix ??= ""; | ||
| if (localizationSuffix.Length > 0 && !localizationSuffix.StartsWith('_')) | ||
| localizationSuffix = $"_{localizationSuffix}"; | ||
| if (localizationSuffix is not ("" or "_DE" or "_FR" or "_IT" or "_PLPC" or "_RA")) |
There was a problem hiding this comment.
Should use the MELocalization system and its support for looking up language suffixes rather than hardcoding values
| if (package.FindExport($"{pcPackage.InstancedFullPath}.{localizedBankName}") is not null) | ||
| throw new InvalidOperationException( | ||
| $"A streaming-data export named '{localizedBankName}' already exists. Select it for updating instead."); | ||
| ExportEntry streamingData = package.CreateExport( |
There was a problem hiding this comment.
Probably need to check flags match bioware's such as localized as audio will likely have something like it.
| ushort BlockAlign, | ||
| byte[] PCMData); | ||
|
|
||
| private static readonly IReadOnlyDictionary<string, string> SoundsetEventNames = |
There was a problem hiding this comment.
This should be documented what this is and where it is derived from.
| if (wavPaths.Count == 0) | ||
| throw new InvalidDataException($"No WAV files were found in: {wavFolderPath}"); | ||
| if (wavPaths.Count > ushort.MaxValue) | ||
| throw new InvalidDataException("An ISACT sample bank cannot contain more than 65,535 addressable samples."); |
There was a problem hiding this comment.
The final bank size also cannot be more than 2GiB. The game does not use 64bit pointers when reading file data offsets.
| AuthoringMode authoringMode = AuthoringMode.Conversation, | ||
| bool createLoopingMusicQueue = false) | ||
| { | ||
| if (!OperatingSystem.IsWindows()) |
There was a problem hiding this comment.
This is pointless, we aren't ever going to support this on other platforms - LEC is designed only for running on Windows, and this check would still return Windows on WINE.
| authoringMode).ConfigureAwait(false); | ||
|
|
||
| ISACTBankPair existing; | ||
| using (var icbStream = File.OpenRead(existingIcbPath)) |
There was a problem hiding this comment.
Could use some comments as this is method does a lot of stuff
| } | ||
|
|
||
| // Compiles and replaces one ISB sample. | ||
| public static async Task<SampleReplacementResult> ReplaceFinalBankSampleFromWave( |
There was a problem hiding this comment.
No comments at all for hundreds of lines
|
Bullied the unpaid intern some more to address the issues. Let me know if the comments are sufficient. Also addressed the MELocalization (including excluding ES/JA), the 2 GiB limit, OS check and the export flags. |
Add LE1 ISACT bank authoring and replacement tools to Soundplorer.
Features
Currently limitations are:
Documentation is linked in the new windows, will be working on writing it while this PR is reviewed.