Differentiate villager types

v1.5 increased the size of GSaveLightMemory by 0xC each; with 160 entries, everything stored after this field (at 0x2F84) increased its offset by 0x780.

  GSaveItemName                     ClothesPTops;                           // @0x14c size 0x8, align 4
  s16                               _58b5e808;                              // @0x154 size 0x2, align 2
  s8                                ClothesPTarget;                         // @0x156 size 0x1, align 1

Should be possible to convert the first revision of villager data to the current format and vice versa. Someone would need to document how they pre-fill these new fields (listed above).
This commit is contained in:
Kurt
2020-09-29 22:20:53 -07:00
parent e652d00d45
commit 8ca3877bfa
16 changed files with 241 additions and 56 deletions

View File

@@ -7,7 +7,7 @@ namespace NHSE.WinForms
{
public static class MiscDumpHelper
{
public static void DumpVillagerMemoryPlayer(Villager v, GSaveMemory memory)
public static void DumpVillagerMemoryPlayer(IVillager v, GSaveMemory memory)
{
using var sfd = new SaveFileDialog
{
@@ -21,7 +21,7 @@ public static void DumpVillagerMemoryPlayer(Villager v, GSaveMemory memory)
File.WriteAllBytes(sfd.FileName, data);
}
public static bool LoadVillagerMemoryPlayer(Villager v, GSaveMemory[] memories, int index)
public static bool LoadVillagerMemoryPlayer(IVillager v, GSaveMemory[] memories, int index)
{
using var ofd = new OpenFileDialog
{