Strip battletech registry data.
BattleTech is currently storing multiple megabyte keys in the registry. This has to go. It's related to analytics, so may be best to just nuke the analytics entirely.
Additionally, the registry data is a common reason people can't play vanilla battletech, due to corrupt data. Moving this to a file will provide users with a simpler cache cleaning method.
nice, but we need this feature in ModTek itself, alongside save game data storage location manipulation. see https://github.com/BattletechModders/ModTek/issues/36
Just wanted to track it somewhere before I forgot.
You're right about the save stuff needing to be in ModTek (I can't even hook the game early enough in bfix).
Stripping analytics probably falls under bfix though.
C:\Users[USERNAME]\AppData\LocalLow\Harebrained Schemes\
steam\userdata[USERID]\637090\
^ These two seem to be either or, depending on cloud state.
HKEY_CURRENT_USER\Software\Harebrained Schemes\BATTLETECH
^ This is unity, playerprefs goes here on windows.
C:\Users[USERNAME]\AppData\Local\HarebrainedSchemes
C:\Users[USERNAME]\AppData\Local\Temp\Harebrained Schemes
steam\steamapps\shadercache\637090
^ Unsure.
Critical path is Application.persistentDataPath & PlayerPrefs callees. Looks like potentially 20-ish patches.
It may be possible to do a WriteLocation patch to redirect the core of the saves.
Two things are required: usePlatform = false, and modifying the root path to point where we want it.
Note: The code which uses this information is pretty crazy, and seems to store information about how to load things in the file string itself, so best to stay as minimal as possible here.
Seems that just handling the WriteLocation & CachedSettings is sufficient.
Yea cachesettings contains the skirmish mechdef / lance data
see https://github.com/BattletechModders/NewSaveFolder for save game folder redirection (was an ME feature that was extracted since it doesnt work for ModLoader)