[Engine/Windows Interaction] Folder names regarding .gst/.dst file behavior

DESCRIPTION

Throughout Grim Dawn’s lifespan, regarding mods specifically, there have been the occasional reports of people’s shared stashes and transmog collections suddenly blanking. This gets tracked down to the transfer.gst and transmutes.gst files suddenly being ignored, replaced in functionality by blank transfer.dst and transmutes.dst files.

I believe I may have figured out why. It’s an interaction between Windows/NTFS file naming behavior and the game engine’s expectations.

  • Windows/NTFS doesn’t care about capitalization in the file explorer, so it ignores when capitalization gets changed directly. This is noticeable when you try to change capitalization of a single character and nothing appears to happen.
    • To properly rewrite the folder or file name, you need to change that character to another one entirely, then change it back to the former letter in the new capitalization you desire, for it to have a functional effect.
  • The game engine not only prepares the /save/ folder for the mod by copying the mod’s folder name, but it also appears to bake the same folder name into the transfer and transmutes save files. This is an exact recreation, capitalization and all.
  • The game engine DOES respect capitalization, so when one of the three locations doesn’t EXACTLY match (/mods/ folder name, /save/ folder name, or the name baked into the files), it considers the files invalid and creates new files with a backup extension, .dst

This was determined by a long series of tests after a reinstall of a mod caused my shared stash and trasmogs to suddenly disappear. I tried renaming the .gst files as .dst with no success, which is what determined the game thought they were invalid. Then when noting these files are saved in a folder with the mod’s name, I compared the folder names and found the discrepency. More experimentation revealed that just matching the folder names isn’t a solution, as they had to not just match in spelling but also in capitalization, and the capitalization had to be exact to what the aforementioned files expected.

In my issue case:

  • /mods/ReignOfTerror
  • /save/ReignofTerror

Still broken as:

  • /mods/ReignOfTerror
  • /save/ReignOfTerror

Issue solved as:

  • /mods/ReignofTerror
  • /save/ReignofTerror

IN SUMMARY

Both the mod’s install folder and the mod’s save folder need to be identical, down to the capitalization, AND this needs to match the exact name baked into the transfer and transmute files in the mod’s /save/ folder. The capitalization of the mod’s /save/ folder appears to be the “correct” one, and what’s been baked into the files.

SOLUTIONS

Crate Devs:
File/folder parsing functions could be changed to use a case insensitive method. I have zero insight into your end obviously, and I’m extremely inexperienced in C++, but it doesn’t appear that C++ has a baseline function for case-insensitive string comparison. However, a regex icase compare may be an option?

Mod Authors:
Ensure that your root mod folder keeps a consistent folder name structure across all releases. This should prevent the issue of mod updates causing existing users to potentially lose their shared stashes and transmog collections when loading characters made prior to that update.

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.