From a07ee3a55c425abc108c24b0c1c2f76976a04c66 Mon Sep 17 00:00:00 2001 From: LongerWarrior Date: Thu, 4 Jun 2026 23:02:51 +0300 Subject: [PATCH] Roco Kingdom: World audio config Co-authored-by: Masusder <59669685+Masusder@users.noreply.github.com> --- FModel/ViewModels/CUE4ParseViewModel.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/FModel/ViewModels/CUE4ParseViewModel.cs b/FModel/ViewModels/CUE4ParseViewModel.cs index b30322cf..840afb83 100644 --- a/FModel/ViewModels/CUE4ParseViewModel.cs +++ b/FModel/ViewModels/CUE4ParseViewModel.cs @@ -1036,6 +1036,22 @@ public class CUE4ParseViewModel : ViewModel var locPathKey = entry.Path.Replace("/BinData/", "/BinLocalize/zh_Hans/").Replace("/BinDataCompressed/", "/BinLocalize/zh_Hans/"); var locFileFound = Provider.Files.TryGetValue(locPathKey, out var locEntry); + if (entry.Path is "NRC/Content/ScriptC/Data/Audio/dataconfig_audio.bytes") + { + var descFound = Provider.Files.TryGetValue("NRC/Content/ScriptC/Data/Audio/dataconfig_audiodesc.bytes", out var descEntry); + var typeDescFound = Provider.Files.TryGetValue("NRC/Content/ScriptC/Data/Audio/typeDesc.bytes", out var typeDescEntry); + + if (!descFound || !typeDescFound) + { + Log.Warning("Could not find associated dataconfig_audiodesc.bytes or typeDesc.bytes, cannot parse audio config"); + return; + } + + var data = new FRocoAudioConfig(entry.CreateReader(), descEntry.CreateReader(), typeDescEntry.CreateReader()); + TabControl.SelectedTab.SetDocumentText(JsonConvert.SerializeObject(data, Formatting.Indented), saveProperties, updateUi); + return; + } + if (!string.IsNullOrEmpty(nonPath) && Provider.Files.TryGetValue(nonPath, out var nonEntry)) { string json = Encoding.UTF8.GetString(nonEntry.Read());