public void SpecialHelper(ICLIFlags toolFlags) { var guids = ExtractDebugNewEntities.GetGUIDs(@"D:\ow\resources\verdata\52926.guids"); const Enum_BABC4175 lootboxType = Enum_BABC4175.Winter; HashSet <ulong> addedUnlocks = new HashSet <ulong>(); foreach (var progressionGuid in TrackedFiles[0x58]) { STUProgressionUnlocks progressionUnlocks = GetInstance <STUProgressionUnlocks>(progressionGuid); if (progressionUnlocks?.m_lootBoxesUnlocks == null) { continue; } foreach (STULootBoxUnlocks lootBoxUnlocks in progressionUnlocks.m_lootBoxesUnlocks) { ProcessLootBoxUnlocks(lootBoxUnlocks, guids, lootboxType, addedUnlocks); } } foreach (ulong genericSettingsGuid in TrackedFiles[0x54]) { STUGenericSettings_PlayerProgression playerProgression = GetInstance <STUGenericSettings_PlayerProgression>(genericSettingsGuid); if (playerProgression == null) { continue; } foreach (STULootBoxUnlocks lootBoxUnlocks in playerProgression.m_lootBoxesUnlocks) { ProcessLootBoxUnlocks(lootBoxUnlocks, guids, lootboxType, addedUnlocks); } break; } Console.Out.WriteLine("new ulong[] {"); foreach (ulong addedUnlock in addedUnlocks) { Console.Out.WriteLine($" 0x{addedUnlock:X16},"); } Console.Out.WriteLine("};"); }
public void SpecialHelper(ICLIFlags toolFlags) { ExtractDebugNewEntities.VersionInfo versionInfo = ExtractDebugNewEntities.GetGUIDVersionInfo(@"D:\ow\resources\verdata\49154.guids"); const Enum_BABC4175 lootboxType = Enum_BABC4175.SummerGames; HashSet <ulong> addedUnlocks = new HashSet <ulong>(); foreach (var progressionGuid in TrackedFiles[0x58]) { STUProgressionUnlocks progressionUnlocks = GetInstance <STUProgressionUnlocks>(progressionGuid); if (progressionUnlocks?.m_lootBoxesUnlocks == null) { continue; } foreach (STULootBoxUnlocks lootBoxUnlocks in progressionUnlocks.m_lootBoxesUnlocks) { ProcessLootBoxUnlocks(lootBoxUnlocks, versionInfo, lootboxType, addedUnlocks); } } foreach (ulong genericSettingsGuid in TrackedFiles[0x54]) { STUGenericSettings_PlayerProgression playerProgression = GetInstance <STUGenericSettings_PlayerProgression>(genericSettingsGuid); if (playerProgression == null) { continue; } foreach (STULootBoxUnlocks lootBoxUnlocks in playerProgression.m_lootBoxesUnlocks) { ProcessLootBoxUnlocks(lootBoxUnlocks, versionInfo, lootboxType, addedUnlocks); } break; } Console.Out.WriteLine("public static readonly ulong[] SummerGames2018 = new ulong[] {"); foreach (ulong addedUnlock in addedUnlocks) { Console.Out.WriteLine($" 0x{addedUnlock:X8},"); } Console.Out.WriteLine("};"); }
public void ExtractOWL(ICLIFlags toolFlags) { string basePath; if (toolFlags is ExtractFlags flags) { basePath = flags.OutputPath; } else { throw new Exception("no output path"); } const string container = "DebugOWL2"; string path = Path.Combine(basePath, container); // foreach (ulong key in TrackedFiles[0xB3]) { // string p = Path.Combine(path, "MatDatas"); // if (GUID.Index(key) != 0x8EE9) continue; // ImageDefinition def = new ImageDefinition(OpenFile(key)); // SaveTextureDef(flags, p, key, def); // // if (def.Layers != null) { // // foreach (ImageLayer layer in def.Layers) { // // if (GUID.Index(layer.Key) == 0x120E2) { // sf shock normal // // // Debugger.Break(); // // SaveTextureDef(flags, p, key, def); // // // found 346777171307564171 // // } // // // // if (GUID.Index(layer.Key) == 0x11C3F) { // sym normal // // // Debugger.Break(); // // SaveTextureDef(flags, p, key, def); // // // found 346777171307564777 // // // found 346777171307565869 // // } // // // // if (GUID.Index(layer.Key) == 0x11D56) { // widow sss // // // Debugger.Break(); // // SaveTextureDef(flags, p, key, def); // // //346777171307565850 / 00000000931A.0B3 // // } // // } // // } // } List <string> added = ExtractDebugNewEntities.GetAddedFiles("D:\\ow\\OverwatchDataManager\\versions\\1.20.0.2.43435\\data.json"); Combo.ComboInfo imgInfo = new Combo.ComboInfo(); // Combo.Find(imgInfo, 864691265894168957ul); //foreach (ulong key in TrackedFiles[0xA5]) { // string name = GetFileName(key); // if (!added.Contains(name)) continue; // Skin skin = GetInstance<Skin>(key); // if (skin == null) continue; //} foreach (ulong key in TrackedFiles[0x4]) { string name = GetFileName(key); if (name[3] == 'F') { continue; // :thonk: } if (!added.Contains(name)) { continue; } Combo.Find(imgInfo, key); } Console.Out.WriteLine("ok i do save"); SaveLogic.Combo.SaveLooseTextures(flags, Path.Combine(path, "Tex"), imgInfo); return; foreach (ulong key in TrackedFiles[0xA6]) { STUSkinOverride @override = GetInstance <STUSkinOverride>(key); string name = GetFileName(key); if (!added.Contains(name)) { continue; } Combo.ComboInfo info = new Combo.ComboInfo(); Combo.ComboInfo info2 = new Combo.ComboInfo(); foreach (KeyValuePair <ulong, ulong> overrideReplacement in @override.ProperReplacements) { Combo.Find(info, overrideReplacement.Key); Combo.Find(info2, overrideReplacement.Value); } string p = Path.Combine(path, "SkinOverrides", GetFileName(key)); SaveLogic.Combo.Save(flags, Path.Combine(p, "Before"), info); // SaveLogic.Combo.SaveAllMaterials(flags, Path.Combine(p, "Before"), info); SaveLogic.Combo.SaveAllModelLooks(flags, Path.Combine(p, "Before"), info); SaveLogic.Combo.Save(flags, Path.Combine(p, "After"), info2); // SaveLogic.Combo.SaveAllMaterials(flags, Path.Combine(p, "After"), info2); SaveLogic.Combo.SaveAllModelLooks(flags, Path.Combine(p, "After"), info2); } // foreach (ulong key in TrackedFiles[0x8]) { // Material material = new Material(OpenFile(key), 0); // if (GUID.Index(material.Header.ImageDefinition) == 0x931A) { // Debugger.Break(); // } // } }