Skip to content

Commit

Permalink
update dependencies, add save game files build number logging
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewSav committed Dec 3, 2024
1 parent 5e7a71e commit 1b5b703
Show file tree
Hide file tree
Showing 4 changed files with 126 additions and 109 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Changelog


## v0.0.29 (3 December 2024)
- Update dependencies
- Add warning if the save files game build is less than expected
- Suppress bogus naked armor warning

## v0.0.28 (15 Nov 2024)
- Suppress warning about unknow relic charge item
- Fix engram names displayed instead of archetype names
Expand Down
202 changes: 101 additions & 101 deletions Remnant2SaveAnalyzer/Remnant2SaveAnalyzer-dev.csproj
Original file line number Diff line number Diff line change
@@ -1,103 +1,103 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net8.0-windows7.0</TargetFramework>
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF>
<UseWindowsForms>true</UseWindowsForms>
<SatelliteResourceLanguages>en;ru;de;es;fr;it;ja;ko;pt-BR;zh-Hans;zh-Hant</SatelliteResourceLanguages>
<ApplicationManifest>app.manifest</ApplicationManifest>
<ApplicationIcon>Assets\256.ico</ApplicationIcon>
<AssemblyVersion>999.0.0.0</AssemblyVersion>
<RootNamespace>Remnant2SaveAnalyzer</RootNamespace>
<AssemblyName>Remnant2SaveAnalyzer</AssemblyName>
</PropertyGroup>

<ItemGroup>
<Content Include="Assets\256.ico" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.122" />
<PackageReference Include="Serilog" Version="4.0.1" />
<PackageReference Include="Serilog.Expressions" Version="5.0.0" />
<PackageReference Include="Serilog.Sinks.File" Version="6.0.0" />
<PackageReference Include="System.IO.Hashing" Version="8.0.0" />
<PackageReference Include="WPF-UI" Version="2.0.3" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.2.2" />
<PackageReference Include="WPFLocalizeExtension" Version="3.10.0" />
<PackageReference Include="Autoupdater.NET.Official" Version="1.9.2" />
</ItemGroup>

<ItemGroup>
<None Remove="Assets\applicationIcon-1024.png" />
<None Remove="Assets\applicationIcon-256.png" />
</ItemGroup>

<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net8.0-windows7.0</TargetFramework>
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF>
<UseWindowsForms>true</UseWindowsForms>
<SatelliteResourceLanguages>en;ru;de;es;fr;it;ja;ko;pt-BR;zh-Hans;zh-Hant</SatelliteResourceLanguages>
<ApplicationManifest>app.manifest</ApplicationManifest>
<ApplicationIcon>Assets\256.ico</ApplicationIcon>
<AssemblyVersion>999.0.0.0</AssemblyVersion>
<RootNamespace>Remnant2SaveAnalyzer</RootNamespace>
<AssemblyName>Remnant2SaveAnalyzer</AssemblyName>
</PropertyGroup>

<ItemGroup>
<Content Include="Assets\256.ico" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.135" />
<PackageReference Include="Serilog" Version="4.1.0" />
<PackageReference Include="Serilog.Expressions" Version="5.0.0" />
<PackageReference Include="Serilog.Sinks.File" Version="6.0.0" />
<PackageReference Include="System.IO.Hashing" Version="9.0.0" />
<PackageReference Include="WPF-UI" Version="2.0.3" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="9.0.0" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.3.2" />
<PackageReference Include="WPFLocalizeExtension" Version="3.10.0" />
<PackageReference Include="Autoupdater.NET.Official" Version="1.9.2" />
</ItemGroup>

<ItemGroup>
<None Remove="Assets\applicationIcon-1024.png" />
<None Remove="Assets\applicationIcon-256.png" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\lib.remnant2.analyzer\lib.remnant2.analyzer-dev.csproj" />
</ItemGroup>

<ItemGroup>
<Resource Include="Assets\applicationIcon-1024.png" />
<Resource Include="Assets\applicationIcon-256.png" />
</ItemGroup>


<ItemGroup>
<Compile Update="locales\GameStrings.Designer.cs">
<DependentUpon>GameStrings.resx</DependentUpon>
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
</Compile>
<Compile Update="locales\Strings.Designer.cs">
<DependentUpon>Strings.resx</DependentUpon>
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
</Compile>
<Compile Update="Properties\Resources.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Update="Properties\Settings.Designer.cs">
<DesignTimeSharedInput>True</DesignTimeSharedInput>
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
</Compile>
</ItemGroup>

<ItemGroup>
<EmbeddedResource Update="locales\GameStrings.resx">
<LastGenOutput>GameStrings.Designer.cs</LastGenOutput>
<Generator>PublicResXFileCodeGenerator</Generator>
</EmbeddedResource>
<EmbeddedResource Update="locales\GameStrings.ko.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
</EmbeddedResource>
<EmbeddedResource Update="locales\Strings.resx">
<LastGenOutput>Strings.Designer.cs</LastGenOutput>
<Generator>PublicResXFileCodeGenerator</Generator>
</EmbeddedResource>
<EmbeddedResource Update="locales\Strings.ko.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
</EmbeddedResource>
<EmbeddedResource Update="locales\Strings.ru.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
</EmbeddedResource>
<EmbeddedResource Update="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>

<ItemGroup>
<None Update="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
</ItemGroup>

</Project>
</ItemGroup>

<ItemGroup>
<Resource Include="Assets\applicationIcon-1024.png" />
<Resource Include="Assets\applicationIcon-256.png" />
</ItemGroup>


<ItemGroup>
<Compile Update="locales\GameStrings.Designer.cs">
<DependentUpon>GameStrings.resx</DependentUpon>
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
</Compile>
<Compile Update="locales\Strings.Designer.cs">
<DependentUpon>Strings.resx</DependentUpon>
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
</Compile>
<Compile Update="Properties\Resources.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Update="Properties\Settings.Designer.cs">
<DesignTimeSharedInput>True</DesignTimeSharedInput>
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
</Compile>
</ItemGroup>

<ItemGroup>
<EmbeddedResource Update="locales\GameStrings.resx">
<LastGenOutput>GameStrings.Designer.cs</LastGenOutput>
<Generator>PublicResXFileCodeGenerator</Generator>
</EmbeddedResource>
<EmbeddedResource Update="locales\GameStrings.ko.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
</EmbeddedResource>
<EmbeddedResource Update="locales\Strings.resx">
<LastGenOutput>Strings.Designer.cs</LastGenOutput>
<Generator>PublicResXFileCodeGenerator</Generator>
</EmbeddedResource>
<EmbeddedResource Update="locales\Strings.ko.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
</EmbeddedResource>
<EmbeddedResource Update="locales\Strings.ru.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
</EmbeddedResource>
<EmbeddedResource Update="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>

<ItemGroup>
<None Update="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
</ItemGroup>

</Project>
12 changes: 6 additions & 6 deletions Remnant2SaveAnalyzer/Remnant2SaveAnalyzer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="lib.remnant2.analyzer" Version="0.0.29" />
<PackageReference Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.122" />
<PackageReference Include="Serilog" Version="4.0.1" />
<PackageReference Include="lib.remnant2.analyzer" Version="0.0.30" />
<PackageReference Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.135" />
<PackageReference Include="Serilog" Version="4.1.0" />
<PackageReference Include="Serilog.Expressions" Version="5.0.0" />
<PackageReference Include="Serilog.Sinks.File" Version="6.0.0" />
<PackageReference Include="System.IO.Hashing" Version="8.0.0" />
<PackageReference Include="System.IO.Hashing" Version="9.0.0" />
<PackageReference Include="WPF-UI" Version="2.0.3" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.2.2" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="9.0.0" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.3.2" />
<PackageReference Include="WPFLocalizeExtension" Version="3.10.0" />
<PackageReference Include="Autoupdater.NET.Official" Version="1.9.2" />
</ItemGroup>
Expand Down
16 changes: 14 additions & 2 deletions Remnant2SaveAnalyzer/RemnantSave.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using lib.remnant2.analyzer.Model;
using lib.remnant2.analyzer;
using lib.remnant2.analyzer.Enums;
using lib.remnant2.saves.Model.Memory;
using Newtonsoft.Json;
using Remnant2SaveAnalyzer.Properties;
using Remnant2SaveAnalyzer.Logging;
Expand All @@ -30,12 +31,14 @@ public class RemnantSave
private static readonly object LoadLock = new();

public static readonly Guid FolderIdSavedGames = new(0x4C5C32FF, 0xBB9D, 0x43B0, 0xB5, 0xB4, 0x2D, 0x72, 0xE5, 0x4E, 0xAA, 0xA4);
[DllImport("shell32.dll", CharSet = CharSet.Unicode, ExactSpelling = true, PreserveSig = false)]
#pragma warning disable IDE0079 // Remove unnecessary suppression
#pragma warning disable SYSLIB1054 // Use 'LibraryImportAttribute' instead of 'DllImportAttribute' to generate P/Invoke marshalling code at compile time
[DllImport("shell32.dll", CharSet = CharSet.Unicode, ExactSpelling = true, PreserveSig = false)]
static extern string SHGetKnownFolderPath([MarshalAs(UnmanagedType.LPStruct)] Guid rfid, uint dwFlags, IntPtr hToken = default);
#pragma warning restore SYSLIB1054 // Use 'LibraryImportAttribute' instead of 'DllImportAttribute' to generate P/Invoke marshalling code at compile time

public RemnantSave(string path, bool skipUpdate = false)
#pragma warning restore IDE0079 // Remove unnecessary suppression
{
if (!Directory.Exists(path))
{
Expand Down Expand Up @@ -103,6 +106,7 @@ public void UpdateCharacters()

try
{
Analyzer.CheckBuildNumber(_savePath);
_remnantDataset = Analyzer.Analyze(_savePath, _remnantDataset);
}
catch (Exception ex)
Expand Down Expand Up @@ -161,6 +165,9 @@ private void ReportPlayerInfo()

logger.Information($"Active character save: save_{_remnantDataset.ActiveCharacterIndex}.sav");

FileHeader fhp = _remnantDataset.ProfileSaveFile!.FileHeader;
logger.Information($"Profile save file version: {fhp.Version}, game build: {fhp.BuildNumber}");

// Account Awards ------------------------------------------------------------
logger.Information("BEGIN Account Awards");
foreach (string award in _remnantDataset.AccountAwards)
Expand All @@ -184,11 +191,16 @@ private void ReportPlayerInfo()
for (int index = 0; index < _remnantDataset.Characters.Count; index++)
{
// Character ------------------------------------------------------------
var character = _remnantDataset.Characters[index];
Character character = _remnantDataset.Characters[index];
int acquired = character.Profile.AcquiredItems;
int missing = character.Profile.MissingItems.Count;
int total = acquired + missing;



logger.Information($"Character {index+1} (save_{character.Index}), Acquired Items: {acquired}, Missing Items: {missing}, Total: {total}");
FileHeader fh = character.WorldSaveFile!.FileHeader;
logger.Information($"World save file version: {fh.Version}, game build: {fh.BuildNumber}");
logger.Information($"Is Hardcore: {character.Profile.IsHardcore}");
logger.Information($"Trait Rank: {character.Profile.TraitRank}");
logger.Information($"Last Saved Trait Points: {character.Profile.LastSavedTraitPoints}");
Expand Down

0 comments on commit 1b5b703

Please sign in to comment.