This is a first draft to convert a save file from Rune Factory 4
for the 3DS to a working save file for Rune Factory 4 Special
for the Nintendo Switch.
The save format seems to have stayed mostly the same, but the Special save files are 128 bytes larger. I've tried to identify where this additional space is and adjust the data.
It's a bit wonky, and i haven't dissected the thousands of bitflags in the save file (the RF4 devs LOOOVE their tightly packed bitfields, nothing like seeing an array of 1000+ unpadded 30-bit numbers), so i just kludge the memory a bit and hope that it works. The nature of constructing and comparing a 100kb+ save file for a 100 hour game across three different hardwares makes it a bit, uh...
Anyways, this script takes a 3DS RF4 save file (rf4a.sav, rf4b.sav, rf4c.sav) and converts it to an afaik mostly functional Switch RF4S save file (named rf4_sXX.sav, substitute your own slot number from 01-20).
I might expand the script to do the reverse eventually, but tbh, i highly doubt there's any practical demand for that. https://pastebin.com/uNNGqtpv