The main thing to be considered is that the reference offsets are only used in mod packages. They aren't required in the base cache for mod packages to load, they are only required in the mod package itself. When using a custom base cache that has all the offsets removed, then creating a mod package for said cache, also with the offsets removed, and that causes the game to crash. Using a mod package with the offsets will load fine.
Ideally, the only component that would need to be modified is the ModPackageTagSerializationContext, or the functions which call on it. We just check which serialization context is currently active, then set a flag which enables the serializing of the reference offsets.
The main thing to be considered is that the reference offsets are only used in mod packages. They aren't required in the base cache for mod packages to load, they are only required in the mod package itself. When using a custom base cache that has all the offsets removed, then creating a mod package for said cache, also with the offsets removed, and that causes the game to crash. Using a mod package with the offsets will load fine.
Ideally, the only component that would need to be modified is the
ModPackageTagSerializationContext, or the functions which call on it. We just check which serialization context is currently active, then set a flag which enables the serializing of the reference offsets.