I accidentally told Abram that there were dogs in the Junkyard Embassy compound, but realized too late that this would cut me off from the questline. I didn't want to redo all of my progress because of that one mistake, so I cheated by editing one of my saves. It appears to work, so I thought I'd document what I did here in case anyone else finds it useful. Be sure to save a copy of your game before attempting anything like this.
I'm not sure I actually recommend doing this, but it's here if you're desperate. I'll note that I'm writing this immediately after noticing Abram pick up the change, but I haven't gone through the entire questline yet to see if there are any issues.
1. Quests often have a simple 'yes/no' trigger that tracks your dialogue options, whether you've killed people, where you've been, who you've talked to, etc. These are stored in your 'global.dat' file. This files consists of a 16-byte GUID that identifies the file as being Underrail-related, an 8-byte version marker, and then the gzip'ed output of serializing some internal game data structures. So you should remove the first 24 bytes and unzip the remainder(let's call this remainder the 'Unpacked File'). You can use the 'unpack' option on my program below[1] to do this step.
2. Notice some interesting strings in the resulting file with names like "npc_abram_saidHeWantsEmbassyInfo" or "npc_abram_toldHimEmbassyHasDogs" that all look relevant, next to some binary gibberish. I believe that these are set when the dialog files("Data/Dialogs/Characters/abram.udlg") are interpreted by the Underrail engine. You should only have flags in your save that the game has actually set, since it lazily creates them as needed. Your action here should be to review the Unpacked File for Abram-related flags using any text editor.
3. Underrail treats a missing flag as equivalent to being false. Observe that the byte immediately following all quest flag names has a value of 1. It will be significantly easier to change this value to a 0 than to attempt to remove the flag entirely. Using your hex editor of choice[2], locate and change all of these bytes to 0.
4. The Unpacked File needs to be packed again in order for Underrail to read it. Gzip it, and then prepend the 24 bytes that you removed in step 1. You can use the 'pack' option on my program below[1] to do this step. Then name it 'global.dat' and replace your original 'global.dat' with it.
[1]
Binary: https://github.com/MichaelBurge/underrail-unpacker/releases
Usage:
Main.exe unpack < original_global.dat > unpacked.dat
Main.exe pack < unpacked.dat > new_global.dat
Here's an example of me building this, unpacking one of my example saves, repacking it, and then confirming that the files match. You'll want to have 'make', 'csc'(the C# compiler), and 'md5sum' in your PATH to follow along.
C:\Users\mike2_000\Desktop\repos\underrail-unpacker>make
csc.exe Main.cs
Microsoft (R) Visual C# Compiler version 12.0.21005.1
for C# 5
Copyright (C) Microsoft Corporation. All rights reserved.
>Main.exe unpack < "C:\Users\mike2_000\Documents\My Games\Underrail\Saves\a\global.dat" > unpacked.dat
>Main.exe pack < unpacked.dat > packed.dat
>md5sum "C:\Users\mike2_000\Documents\My Games\Underrail\Saves\a\global.dat" packed.dat
\e12ab7cfcdde5281b93ab502bb197dc0 *C:\\Users\\mike2_000\\Documents\\My Games\\Underrail\\Saves\\a\\global.dat
e12ab7cfcdde5281b93ab502bb197dc0 *packed.dat
[2] If you're on Windows, I used HxD to edit my Unpacked File:
http://mh-nexus.de/en/hxd/
Could someone better explain how to get this save editor to work for a noob like me? I've got mainfile, main.cs and the exe in the same folder as my save but the exe crashes when I try to run it.
The instructions and program are a little thin - I stopped working on it as soon as I got the questline to continue, so that post is something of a quick braindump before I forgot everything. Thanks for giving it a try.
It's a command line program, so you'll need to use a command prompt to run it. It does currently crash if you leave off its command line argument. Try these instructions:
1. Open your Windows command prompt
2. Navigate to the directory holding your Underrail save using the 'cd' command. Use 'dir' to confirm that you're in the right place: You should see a file called 'global.dat' is there.
3. Copy the Main.exe into this directory with the 'global.dat' file
4. Run this on your command prompt:
Main.exe unpack < global.dat > unpacked.dat
5. Search for Abram-related strings like 'npc_abram_saidHeWantsEmbassyInfo' in the 'unpacked.dat' file. They should be grouped somewhat close together.
6. Using the hex editor on the 'unpacked.dat' file, change the 01 byte immediately to the right of each Abram-related string to a 00. Save the file.
7. Repack the file by running the following on your command prompt:
Main.exe pack < unpacked.dat > global.dat
8. Reload your save, and then talk to Abram.
If you still have trouble getting it to work, let me know which step is giving you problems. I could try moving some of these steps into the program.
Could someone better explain how to get this save editor to work for a noob like me? I've got mainfile, main.cs and the exe in the same folder as my save but the exe crashes when I try to run it.
The instructions and program are a little thin - I stopped working on it as soon as I got the questline to continue, so that post is something of a quick braindump before I forgot everything. Thanks for giving it a try.
It's a command line program, so you'll need to use a command prompt to run it. It does currently crash if you leave off its command line argument. Try these instructions:
1. Open your Windows command prompt
2. Navigate to the directory holding your Underrail save using the 'cd' command. Use 'dir' to confirm that you're in the right place: You should see a file called 'global.dat' is there.
3. Copy the Main.exe into this directory with the 'global.dat' file
4. Run this on your command prompt:
Main.exe unpack < global.dat > unpacked.dat
5. Search for Abram-related strings like 'npc_abram_saidHeWantsEmbassyInfo' in the 'unpacked.dat' file. They should be grouped somewhat close together.
6. Using the hex editor on the 'unpacked.dat' file, change the 01 byte immediately to the right of each Abram-related string to a 00. Save the file.
7. Repack the file by running the following on your command prompt:
Main.exe pack < unpacked.dat > global.dat
8. Reload your save, and then talk to Abram.
If you still have trouble getting it to work, let me know which step is giving you problems. I could try moving some of these steps into the program.
Could you elaborate on the hex editing part? I'm changing several 01s to 00s but not sure if I've done it correctly. I'm successfully unpacking - repacking, but my edits are corrupting the save file.