diff --git a/ShinRyuModManager-CE/ModLoadOrder/Mods/Mod.cs b/ShinRyuModManager-CE/ModLoadOrder/Mods/Mod.cs index 5982bf7..3938f48 100644 --- a/ShinRyuModManager-CE/ModLoadOrder/Mods/Mod.cs +++ b/ShinRyuModManager-CE/ModLoadOrder/Mods/Mod.cs @@ -204,14 +204,18 @@ public void AddFiles(string path, string check) { break; var baseParlessPath = Path.Combine(GamePath.ParlessDir, "motion", "gmt"); - - foreach (var p in Directory.GetFiles(gmtFolderPath).Where(f => !f.EndsWith(Constants.VORTEX_MANAGED_FILE)).Select(GamePath.GetDataPathFrom)) { + + foreach (var p in Directory.EnumerateFiles(gmtFolderPath).Where(f => !f.EndsWith(Constants.VORTEX_MANAGED_FILE)).Select(GamePath.GetDataPathFrom)) { // Copy any gmts to the appropriate hash folder in Parless if (!p.EndsWith(".gmt", StringComparison.InvariantCultureIgnoreCase)) continue; - var gmtPath = Path.Combine(gmtFolderPath, Path.GetFileName(p)); - var checksum = ((Func)(s => (Encoding.UTF8.GetBytes(s).Sum(b => b) % 256).ToString("x2").PadLeft(4, '0')))(Path.GetFileNameWithoutExtension(p).ToLowerInvariant()); + var fileName = Path.GetFileName(p); + var fileNameNoExt = Path.GetFileNameWithoutExtension(p); + var gmtHashName = fileNameNoExt.Length <= 30 ? fileNameNoExt : fileNameNoExt[..30]; + var gmtPath = Path.Combine(gmtFolderPath, fileName); + + var checksum = ComputePirateYakuzaChecksum(gmtHashName); var destinationDirectory = Path.Combine(baseParlessPath, checksum); if (!Directory.Exists(destinationDirectory)) @@ -264,4 +268,10 @@ protected static string CheckFolder(string name) { return folder ?? string.Empty; } + + private static string ComputePirateYakuzaChecksum(string input) { + var sum = Encoding.UTF8.GetBytes(input).Sum(b => b) % 256; + + return sum.ToString("x4"); + } } diff --git a/ShinRyuModManager-CE/ModLoadOrder/Mods/Serialization/ModListSerializer.V2.cs b/ShinRyuModManager-CE/ModLoadOrder/Mods/Serialization/ModListSerializer.V2.cs index 7e7e397..ca86126 100644 --- a/ShinRyuModManager-CE/ModLoadOrder/Mods/Serialization/ModListSerializer.V2.cs +++ b/ShinRyuModManager-CE/ModLoadOrder/Mods/Serialization/ModListSerializer.V2.cs @@ -1,4 +1,5 @@ using System.Text; +using Utils; namespace ShinRyuModManager.ModLoadOrder.Mods.Serialization; @@ -18,6 +19,9 @@ private static List ReadV2(BinaryReader reader, Profile? profile = null for (var i = 0; i < entryCount; i++) { var entry = ReadEntryV2(reader); + if (!Directory.Exists(GamePath.GetModDirectory(entry.Name))) + continue; + mods.Add(entry); } diff --git a/ShinRyuModManager-CE/Program.cs b/ShinRyuModManager-CE/Program.cs index c0b07ad..f8cc363 100644 --- a/ShinRyuModManager-CE/Program.cs +++ b/ShinRyuModManager-CE/Program.cs @@ -388,7 +388,7 @@ internal static async Task RunGeneration(List mods) { break; case Game.YakuzaKiwami3: - GameModel.DoDEHActProcedure(result, "lexus3"); + GameModel.DoDEHActProcedure(result, "bis"); break; } diff --git a/ShinRyuModManager-CE/ShinRyuModManager-CE.csproj b/ShinRyuModManager-CE/ShinRyuModManager-CE.csproj index d08e41d..e1d5e26 100644 --- a/ShinRyuModManager-CE/ShinRyuModManager-CE.csproj +++ b/ShinRyuModManager-CE/ShinRyuModManager-CE.csproj @@ -14,7 +14,7 @@ true - 1.4.0 + 1.4.1 $(AssemblyVersion) ShinRyuModManager-CE SRMM Studio diff --git a/ShinRyuModManager-CE/UserInterface/Assets/changelog.md b/ShinRyuModManager-CE/UserInterface/Assets/changelog.md index 54d8af1..4292b06 100644 --- a/ShinRyuModManager-CE/UserInterface/Assets/changelog.md +++ b/ShinRyuModManager-CE/UserInterface/Assets/changelog.md @@ -1,4 +1,11 @@ -> ### **%{color:gold} Version 1.4.0 %** ### +> ### **%{color:gold} Version 1.4.1 %** ### +* Yakuza Kiwami 3 Support +* Fixed PYIH gmt hash lookup +* Fixed bug when removing an installed mod + +--- + +> ### **%{color:orange} Version 1.4.0 %** ### * Added multiple profiles * Updated mod list save file to version 2 * New file name is `ModList.ml`