[Tool] GD save file editor

Hi Nanashi!

Thanks for the encouraging words! The source code of this editor is available on github. More, specifically, GDC file format is roughly documented here: https://github.com/Odie/gd-edit/blob/a9c1618d5fec313ca25169150f6ef2be467bf0bb/src/gd_edit/gdc_reader.clj#L56

It’s a small DSL that documents the structure of the various blocks in the file. Another piece of code consumes this data to deserialize the data into nested hashmaps to be navigated/examined/altered using the kludgy editor commands.

The code might look a bit strange. It’s written in a lispy language as a learning project, so it’s extra messy in there. However, the file format DSL should give you a pretty good idea of the various blocks in the GDC file.

If you have more question, feel free to post here or PM me. =)

Hi again! Explored your code and had a glance over (a LOT of glances lol) but I still cannot figure out how the decryption is happening. The structure is similar to something I am tracing, but decryption is still beyond me (maybe because I am not familiar with Clojure – more of a C# person).

Let me PM you instead so I can describe better – not too sure what the rules are on modding the game externally.

Hello! How to open all recipes?

Recipies are not stored in the char savefile, so I assume that is not possible with this tool.

Have you tried just spawning the item?

@Odie How does it look for a java?
JAVA_HOME is set, PATH variable also set. Still I got

F:\Distr\Games\GrimDawn>java -version
openjdk version "11.0.5" 2019-10-15
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.5+10)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.5+10, mixed mode)

F:\Distr\Games\GrimDawn>gd-edit.exe
This application requires a Java Runtime Environment 1.7.0

Hi, @rmsinj!

I’m using a utility called ‘launch4j’ to package the jar into an exe. It was supposed to make it more straight forward to get and run the program.

After taking a brief look at that launch4j’s source, it looks like it’s ignoring environmental variables (on windows) and looking in the registry instead.

From the looks of this issue:

AdoptOpenJDK’s installer started adding compatible regkeys as of April this year? You might want to re-run a recent installer just to make sure the right regkeys are added.

It was the latest freshly installed (afer I found out, that simply setting PATH and JAVA_HOME is not enough) :slight_smile:
Ok, at least now I know what to check & how to fix. Thanks!

Added the things to registry, it worked. Thanks.

Great, glad things worked. It’s still strange that the regkey wasn’t added by the installer. Some code was merged and several issues were closed against it.

Yeah, without your tool I literally run out of cash on retraining for 15k iron per skill point :slight_smile:

Can I set specific prefix and suffix for Conduit?

Are you talking about this item? https://www.grimtools.com/db/items/2577

The short answer is “I don’t think so”.

I don’t think the game takes into consideration of the prefix and suffix records when dealing with epic weapons. At least what I saw when I tried this briefly in the past.

They are not being displayed, but they are very much affecting the item.

I assume the tool can do this, but I have no idea how :wink:

Is that right? I’ll look into it again then. :slight_smile:

No, I mean Conduit of Whispers.

I just checked and Conduit of Whispers appear without any prefix/suffix at all. It can be fixed? At least make it random?

That is not really a bug as this is a save file editor. So if you want affixes, you will need to include them with the edit. No idea how this is done with this tool (or whether it can), but that is the only solution.

Looked into this for a bit.
You can put in the unique prefixes, but the editor doesn’t have any smarts about this yet. So… you’re going to have to do a bit of manual & detective work.

TLDR:

Just set the prefix or suffix of the item to one of these:

Prefix

  • records/items/lootaffixes/prefixunique/d101_conduiteldritchsecrets_03a.dbr
  • records/items/lootaffixes/prefixunique/d101_conduiteldritchsecrets_03b.dbr
  • records/items/lootaffixes/prefixunique/d101_conduiteldritchsecrets_03c.dbr
  • records/items/lootaffixes/prefixunique/d101_conduiteldritchsecrets_03d.dbr
  • records/items/lootaffixes/prefixunique/d101_conduiteldritchsecrets_03e.dbr
  • records/items/lootaffixes/prefixunique/d101_conduiteldritchsecrets_03f.dbr
  • records/items/lootaffixes/prefixunique/d101_conduiteldritchsecrets_03g.dbr
  • records/items/lootaffixes/prefixunique/d101_conduiteldritchsecrets_03h.dbr
  • records/items/lootaffixes/prefixunique/d101_conduiteldritchsecrets_03i.dbr

Suffix

  • records/items/lootaffixes/suffixunique/d101_conduitofeldritchwhispers_01a.dbr
  • records/items/lootaffixes/suffixunique/d101_conduitofeldritchwhispers_01b.dbr
  • records/items/lootaffixes/suffixunique/d101_conduitofeldritchwhispers_01c.dbr
  • records/items/lootaffixes/suffixunique/d101_conduitofeldritchwhispers_01d.dbr
  • records/items/lootaffixes/suffixunique/d101_conduitofeldritchwhispers_01e.dbr

Setting a prefix or suffix

Find the location of the item you want to change with the “find” command, like so:

> find "Eldritch Whispers"

Conduit of Eldritch Whispers: inventory-sacks/0/inventory-items/80

Change the prefix like so:

set inv/0/items/80/prefix records/items/lootaffixes/prefixunique/d101_conduiteldritchsecrets_03a.dbr

How do I tell which prefix/suffix does what?

You can use the editor to explore the game database to find out what those affixes actually do.

> db records/items/lootaffixes/prefixunique/d101_conduiteldritchsecrets_03a.dbr

records/items/lootaffixes/prefixunique/d101_conduiteldritchsecrets_03a.dbr
<omitted>
	modifiedSkillName1: records/skills/playerclass03/sigilofdestruction1.dbr
	modifierSkillName1: records/skills/itemskillsgdx1/skillmodifiers/legendarygdx1/eldritchwhispers/set1_occultist1.dbr

Looks like this says it modifies a skill, “sigilofdestruction1.dbr”. It isn’t entirely clear what that is, so…

> db records/skills/playerclass03/sigilofdestruction1.dbr

<omitted>
	skillDisplayName: Sigil of Consumption
<omitted>

Great, so that prefix changes something about the Sigil of Consumption.

How the heck did you find those affixes in the first place?

First, examine the item…

> show inv/0/items/80

inventory-sacks/0/inventory-items/80
Conduit of Eldritch Whispers

<omitted>
            basename : records/items/gearaccessories/necklaces/d113c_necklace.dbr
<omitted>

So item is mostly defined by this db record with quite a long path. Does any other record refer to this item?

> q value~records/items/gearaccessories/necklaces/d113c_necklace.dbr

<omitted>
records/items/loottables/gearaccessories/tdyn_craft_necklace_d101c_conduiteldritchsecrets.dbr
	lootName1: records/items/gearaccessories/necklaces/d113c_necklace.dbr
	prefixTableName1: records/items/lootaffixes/prefix/prefixtables/prefixd02_conduiteldritchsecrets_occultist.dbr
	suffixTableName1: records/items/lootaffixes/suffix/suffixtables/suffixd02_conduiteldritchwhispers.dbr
<omitted>
0-3 / 3 matched records

So 3 records have some field containing that references our item of interest. One of them happens to be a loot table! Let’s take a look at the possible prefixes.

> db records/items/lootaffixes/prefix/prefixtables/prefixd02_conduiteldritchsecrets_occultist.dbr

<omitted>
	randomizerName1: records/items/lootaffixes/prefixunique/d101_conduiteldritchsecrets_03a.dbr
	randomizerName2: records/items/lootaffixes/prefixunique/d101_conduiteldritchsecrets_03b.dbr
	randomizerName3: records/items/lootaffixes/prefixunique/d101_conduiteldritchsecrets_03c.dbr
	randomizerName4: records/items/lootaffixes/prefixunique/d101_conduiteldritchsecrets_03d.dbr
	randomizerName5: records/items/lootaffixes/prefixunique/d101_conduiteldritchsecrets_03e.dbr
	randomizerName6: records/items/lootaffixes/prefixunique/d101_conduiteldritchsecrets_03f.dbr
	randomizerName7: records/items/lootaffixes/prefixunique/d101_conduiteldritchsecrets_03g.dbr
	randomizerName8: records/items/lootaffixes/prefixunique/d101_conduiteldritchsecrets_03h.dbr
	randomizerName9: records/items/lootaffixes/prefixunique/d101_conduiteldritchsecrets_03i.dbr
<omitted>

Not sure if that made any sense to you. If it all looks like a bunch of gibberish, you can always just manually set the affixes onto the item, then start the game to check how it changed the item.

Hope this helps!

2 Likes

Thanks a lot!