ZenHAX

Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Wed Oct 21, 2020 4:35 am

All times are UTC




Post new topic  Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Mon Sep 21, 2020 2:39 pm 

Joined: Wed Aug 13, 2014 6:43 pm
Posts: 27
I had this for a long time and never put it out there, but with the recent re-release of Rune Factory 4 for the Switch, maybe someone else could find it useful. In any case, it's here for posterity.
This should work for both normal and special version of the game, and works on both the save slot files as well as the "save selection" file a.k.a the system save, which governs unlocks across saves and character names.

The save has a simple CRC32 error check that prevents modification, so a simple script is enough to fix it.

https://pastebin.com/fRvqRduA


Top
   
PostPosted: Mon Sep 21, 2020 2:39 pm 

Joined: Wed Aug 13, 2014 6:43 pm
Posts: 27
Script in full:

Code:
# Rune Factory 4 (Special)
# Script to fix save checksum after modification
#
# Works on save files and "system saves" / save select file
#
# Written by HenryEx
#
# script for QuickBMS http://quickbms.aluigi.org
# See also: http://aluigi.altervista.org/bms/quickbms_crc_engine.txt

get NAME filename
get FILESIZE asize
get MAGIC long
set PAD long 0xE0

if MAGIC == 1144276562  # string 'RF4D'
  get FILECRC long
  set PAD long 0
else
  set FILECRC long MAGIC
  set PAD long 0xE0
endif

SavePos OFFSET
xmath SIZE "FILESIZE - OFFSET - PAD"

# print "File CRC: %FILECRC|x%, data pos: %OFFSET%, pad by %PAD%, data size: %SIZE%"

encryption CRC 0xEDB88320 "32 -1 -1 0 0 1"
log MEMORY_FILE OFFSET SIZE
set NEWCRC long QUICKBMS_CRC

if FILECRC == NEWCRC
  print "Save CRC seems to be intact! No modification necessary."
  CleanExit
endif

encryption "" ""
log MEMORY_FILE 0 FILESIZE

math OFFSET - 4
goto OFFSET MEMORY_FILE
put NEWCRC long MEMORY_FILE
print "Checksum fixed! New CRC: %NEWCRC|x%"

log NAME 0 FILESIZE MEMORY_FILE
CleanExit


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 2 posts ] 

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Limited