public PlayerProgression GetUnlocks() { foreach (ulong key in TrackedFiles[0x54]) { STUGenericSettings_PlayerProgression playerProgression = GetInstance <STUGenericSettings_PlayerProgression>(key); if (playerProgression == null) { continue; } return(new PlayerProgression(playerProgression)); } return(null); }
public void GetGeneralUnlocks(ICLIFlags toolFlags) { string basePath; if (toolFlags is ExtractFlags flags) { basePath = flags.OutputPath; } else { throw new Exception("no output path"); } string path = Path.Combine(basePath, "General"); foreach (var key in TrackedFiles[0x54]) { STUGenericSettings_PlayerProgression progression = GetInstance <STUGenericSettings_PlayerProgression>(key); if (progression == null) { continue; } PlayerProgression playerProgression = new PlayerProgression(progression); if (playerProgression.LootBoxesUnlocks != null) { foreach (LootBoxUnlocks lootBoxUnlocks in playerProgression.LootBoxesUnlocks) { string boxName = LootBox.GetName(lootBoxUnlocks.LootBoxType); ExtractHeroUnlocks.SaveUnlocks(flags, lootBoxUnlocks.Unlocks, path, boxName, null, null, null, null); } } if (playerProgression.AdditionalUnlocks != null) { foreach (AdditionalUnlocks additionalUnlocks in playerProgression.AdditionalUnlocks) { ExtractHeroUnlocks.SaveUnlocks(flags, additionalUnlocks.Unlocks, path, "Standard", null, null, null, null); } } if (playerProgression.OtherUnlocks != null) { ExtractHeroUnlocks.SaveUnlocks(flags, playerProgression.OtherUnlocks, path, "Achievement", null, null, null, null); } SaveScratchDatabase(); } }
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 PlayerProgression(STUGenericSettings_PlayerProgression progression) { if (progression.m_lootBoxesUnlocks != null) { LootBoxesUnlocks = new LootBoxUnlocks[progression.m_lootBoxesUnlocks.Length]; for (int i = 0; i < progression.m_lootBoxesUnlocks.Length; i++) { STULootBoxUnlocks lootBoxUnlocks = progression.m_lootBoxesUnlocks[i]; LootBoxesUnlocks[i] = new LootBoxUnlocks(lootBoxUnlocks); } } if (progression.m_additionalUnlocks != null) { AdditionalUnlocks = new AdditionalUnlocks[progression.m_additionalUnlocks.Length]; for (int i = 0; i < progression.m_additionalUnlocks.Length; i++) { AdditionalUnlocks[i] = new AdditionalUnlocks(progression.m_additionalUnlocks[i]); } } OtherUnlocks = Unlock.GetArray(progression.m_otherUnlocks); }