mirror of
https://github.com/4sval/FModel.git
synced 2026-03-21 17:24:26 -05:00
Code Vein 2, Infinity Nikki update
Some checks failed
FModel QA Builder / build (push) Has been cancelled
Some checks failed
FModel QA Builder / build (push) Has been cancelled
Ashes of Creation dbc extraction
This commit is contained in:
parent
14e05da2e0
commit
40996973eb
|
|
@ -1 +1 @@
|
|||
Subproject commit 6865562475cb0661843438c4a20bd8748ba9c5e2
|
||||
Subproject commit 4935ec79a1d2c801b0735d84cb42322475231359
|
||||
|
|
@ -20,6 +20,7 @@ using CUE4Parse.FileProvider;
|
|||
using CUE4Parse.FileProvider.Objects;
|
||||
using CUE4Parse.FileProvider.Vfs;
|
||||
using CUE4Parse.GameTypes.Aion2.Objects;
|
||||
using CUE4Parse.GameTypes.AoC.Objects;
|
||||
using CUE4Parse.GameTypes.AshEchoes.FileProvider;
|
||||
using CUE4Parse.GameTypes.SMG.UE4.Assets.Exports.Wwise;
|
||||
using CUE4Parse.GameTypes.KRD.Assets.Exports;
|
||||
|
|
@ -657,11 +658,16 @@ public class CUE4ParseViewModel : ViewModel
|
|||
|
||||
break;
|
||||
}
|
||||
case "dat" when Provider.ProjectName.Equals("Aion2", StringComparison.OrdinalIgnoreCase):
|
||||
{
|
||||
ProcessAion2DatFile(entry, updateUi, saveProperties);
|
||||
break;
|
||||
}
|
||||
case "dat" when Provider.Versions.Game is EGame.GAME_Aion2:
|
||||
{
|
||||
ProcessAion2DatFile(entry, updateUi, saveProperties);
|
||||
break;
|
||||
}
|
||||
case "dbc" when Provider.Versions.Game is EGame.GAME_AshesOfCreation:
|
||||
{
|
||||
ProcessCacheDBFile(entry, updateUi, saveProperties);
|
||||
break;
|
||||
}
|
||||
case "upluginmanifest":
|
||||
case "code-workspace":
|
||||
case "projectstore":
|
||||
|
|
@ -690,6 +696,7 @@ public class CUE4ParseViewModel : ViewModel
|
|||
case "usda":
|
||||
case "ocio":
|
||||
case "data" when Provider.ProjectName is "OakGame":
|
||||
case "scss":
|
||||
case "ini":
|
||||
case "txt":
|
||||
case "log":
|
||||
|
|
@ -705,6 +712,7 @@ public class CUE4ParseViewModel : ViewModel
|
|||
case "css":
|
||||
case "csv":
|
||||
case "pem":
|
||||
case "tsv":
|
||||
case "tps":
|
||||
case "tgc": // State of Decay 2
|
||||
case "cpp":
|
||||
|
|
@ -969,6 +977,30 @@ public class CUE4ParseViewModel : ViewModel
|
|||
TabControl.SelectedTab.SetDocumentText(JsonConvert.SerializeObject(datfile, Formatting.Indented), saveProperties, updateUi);
|
||||
}
|
||||
}
|
||||
|
||||
// Ashhes of Creation
|
||||
void ProcessCacheDBFile(GameFile entry, bool updateUi, bool saveProperties)
|
||||
{
|
||||
var data = entry.Read();
|
||||
var dbc = new FAoCDBCReader(data, Provider.MappingsForGame, Provider.Versions);
|
||||
for (var i = 0; i < dbc.Chunks.Length; i++)
|
||||
{
|
||||
if (!dbc.TryReadChunk(i, out var category, out var files))
|
||||
{
|
||||
Log.Warning("Couldn't read {i} chuck in AoC CacheDB", i);
|
||||
continue;
|
||||
}
|
||||
var fileName = Path.ChangeExtension(category, ".json");
|
||||
var directory = Path.Combine(UserSettings.Default.PropertiesDirectory,
|
||||
UserSettings.Default.KeepDirectoryStructure ? entry.Directory : "", entry.Name, fileName).Replace('\\', '/');
|
||||
|
||||
Directory.CreateDirectory(directory.SubstringBeforeLast('/'));
|
||||
|
||||
File.WriteAllText(directory, JsonConvert.SerializeObject(files, Formatting.Indented));
|
||||
}
|
||||
|
||||
TabControl.SelectedTab.SetDocumentText(JsonConvert.SerializeObject(dbc, Formatting.Indented), saveProperties, updateUi);
|
||||
}
|
||||
}
|
||||
|
||||
public void ExtractAndScroll(CancellationToken cancellationToken, string fullPath, string objectName, string parentExportType)
|
||||
|
|
@ -1076,7 +1108,7 @@ public class CUE4ParseViewModel : ViewModel
|
|||
TabControl.SelectedTab.AddImage(sourceFile.SubstringAfterLast('/'), false, bitmap, false, updateUi);
|
||||
return false;
|
||||
}
|
||||
// The Dark Pictures Anthology: House of Ashes
|
||||
// The Dark Pictures Anthology
|
||||
case UExternalSource when (isNone || saveAudio) && pointer.Object.Value is UExternalSource externalSource:
|
||||
{
|
||||
var audioName = Path.GetFileNameWithoutExtension(externalSource.ExternalSourcePath);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user