Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions ShinRyuModManager-CE/ModLoadOrder/Mods/Mod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<string, string>)(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))
Expand Down Expand Up @@ -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");
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Text;
using Utils;

namespace ShinRyuModManager.ModLoadOrder.Mods.Serialization;

Expand All @@ -18,6 +19,9 @@ private static List<ModInfo> 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);
}

Expand Down
2 changes: 1 addition & 1 deletion ShinRyuModManager-CE/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ internal static async Task RunGeneration(List<ModInfo> mods) {
break;

case Game.YakuzaKiwami3:
GameModel.DoDEHActProcedure(result, "lexus3");
GameModel.DoDEHActProcedure(result, "bis");
break;
}

Expand Down
2 changes: 1 addition & 1 deletion ShinRyuModManager-CE/ShinRyuModManager-CE.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>

<!-- Versioning -->
<AssemblyVersion>1.4.0</AssemblyVersion>
<AssemblyVersion>1.4.1</AssemblyVersion>
<VersionPrefix>$(AssemblyVersion)</VersionPrefix>
<AssemblyTitle>ShinRyuModManager-CE</AssemblyTitle>
<Company>SRMM Studio</Company>
Expand Down
9 changes: 8 additions & 1 deletion ShinRyuModManager-CE/UserInterface/Assets/changelog.md
Original file line number Diff line number Diff line change
@@ -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`
Expand Down
Loading