[Engage] Basic save editing notes

Some doc on Engage savedata and how to change the player name.

First opening the save file in HxD you should see something like the below:
image
Yellow: Game clock. Make sure to find and replace all if you’re editing this.
Blue: Length of player name in bytes
Green: Player name in UTF-16 encoding (terminated by 02 01) [EDIT: this appears to be Alear’s class?]
Pink: Pointer table to data within the save file
Red: CRC32 checksum of all bytes up to that point i.e. 00 - 42. Copy and paste into a calculator such https://crccalc.com/ and then reverse the bytes i.e. 0x12345678 becomes 78 56 34 12

To change the player name especially to make it longer impacts a number of things.

First you can see that the length byte has changed from 0A to 0E, and the position of the data immediately following has shifted to fit. However note that the pointer table at 80 must remain at the same place. This is why there is additional 00 padding between these sections.

The name also appears in multiple other places throughout the save. Use CTRL-R to find and replace them all.
image

However by doing this you change the file size and also the pointers in the pointer table will be wrong. I’ve tried fixing the pointers but this has caused the game to freeze upon loading for unknown reasons.

So instead the goal is to find a safe place to remove 00s used for padding, so that the file size ends up the same and the pointers don’t move.

Since the new name is 2 characters longer and 2 bytes per character = 4 bytes, we need to find a string of 00 00 00 00 to remove (using backspace). I just picked the first one immediately following the name string and repeated this each time (3 total for the save I’m looking at, not counting the one in the header.)
image

This is obviously not safe! In my case it removed the equipped ring from the player but it could be re-equipped with no real impact.

Finally go to the very bottom of the file, the last 4 bytes are another CRC32 checksum for the entire file. You can also copy paste the whole thing into a calculator, or HxD has built in checksum analysis under Analysis > Checksums:
image

You can delete the last 4 bytes and generate checksums to get the new one (remember to reverse the bytes as before).

TL;DR:

  1. Change the name in the header, recalculating the header checksum
  2. Replace the name throughout the save file
  3. Delete 00 00 padding to keep save file/pointers the same size/location (WARNING: may corrupt something like removing the equipped ring)
  4. Recalculate the footer checksum.
11 Likes

TODO: expand this

setting up for code editing with engage:

  • get ghidra and the switch loader plugin - use it to load exefs/main
  • get il2cpp and extract data from exefs/main using romfs/managed/metadata/global-metadata.dat
  • open script manager and create a new python script, paste in the contents of il2cpp/ghidra-with-structs.py and run, selecting script.json from the il2cpp output when prompted
  • make edits, create patch, i guess

Additional notes:

byte 0x17 is difficulty (00 Normal, 01 Hard, 02 Maddening)
byte 0x19 is mode (00 Casual, 01 Classic)

Someone has made a save editor: Engage Editor

1 Like

Thank you for guide! I wanted to change casual to classic so I edited byte 0x19 from 00 to 01. In my case it changed only save status in load menu. I found that byte 0x131 changes game mode (00 Casual, 01 Classic) and 0x132 changes difficulty

2 Likes

Just wanted to say thanks for the byte 0x132 hint. It works on version 2.0.0.

Have you had any luck finding what changes whether a character is alive or not? The current save editor doesn’t have the option, and I didn’t see any info about it anywhere else