Hey all,
I have glanced over the save file (global.dat) and noticed a few patterns that might be useful, in case someone has a good reason to modify some of the things in there. Although it is very unlikely, maybe a future me will want to come back to this post, to spend some time creating a save editor. In any case, I just wanted to share the bits of the spec that I have looked at (see what I did there?
).
If you're in a hurry, just skip the motivation section. That's just there to prove that I'm a real human being... *ahem*.
MOTIVATIONI don't have a lot of time these days, but I
really wanted to give a serious try to Underrail, being a long time fan of this kind of games. This is my very first post here, so I hope I'm not breaking any rules -- banned after the first post; now, wouldn't that be a grand entry to the community...
Anyhow, one of the things that kept me busy for a long while, trying stuff out with the online character build tool, is that there are no respecs in this game. So I just wanted to have a nice character that I'm happy role playing with, from beginning to end, without restarts. The other reason is that I very much enjoy building characters and imagining what they would be like, even for a game that I have barely played. But that's a story for another time.
(I might be a bit of min-maxer, too, but I'm not admitting to anything).
I think I got my nice character figured out. But in case I made a mistake, it would be nice to be able to tweak stats, skills, and so on. I'm not a fan of having memory hacks laying around my system, so I preferred to take a look at the actual file. As I understand, the save file is obfuscated, or that's what everybody says, but that doesn't mean there isn't a file spec that we can understand and deserialize.
Building on the work of others (
link), we know that the good stuff is in a gzipped payload. I took a look at that and figured out the basics of how to edit a few of the things that are stored in global.dat. I'm going to start with the stats, later on I'll post about the skills. But there's a lot of potentially modifiable stuff in there (stats, skills, feats, inventory, quest global state, etc.).
CHARACTER STATSCharacter stats seem to be distributed in blocks. I highlighted the
strength block using HxD in the image link below.
https://i.imgur.com/5YkLVUL.pngIn the next picture, I annotated a few interesting things.
- The first 32 bits (
blue) are the block index.
- Stats are stored as a pair of 32-bit values.
- The first value (
green) is the character unmodified stat.
- The second value (
orange) has an unknown effect on the stat, if any.
- The block ends with the stat name (
blue filled), preceded by its 8-bit length.
https://i.imgur.com/eXyDBD2.pngA few notes. I assumed a little-endian byte order, but the actual stat values could be perfectly ordered as big-endian, or just span a byte-length. Every block is populated with several key:value pairs, each preceded by its 8-bit length. I wonder what those are all about.
In the next post I'll describe skills. The skill names are not there, unlike stats, but their order is preserved and the block structure is the same.