[Tool] GD save file editor

Cool. I’ll give it a whirl and see how I go

I tried mod pick and selected GrimUI-X mod from menu. It then bails with the following errors

Caught exception: C:\Program Files (x86)\GOG Galaxy\Games\Grim Dawn\mods\Grim UI X-Mod\resources\Text_EN.arc (The system cannot find the file specified)
java.io.FileNotFoundException: C:\Program Files (x86)\GOG Galaxy\Games\Grim Dawn\mods\Grim UI X-Mod\resources\Text_EN.arc (The system cannot find the file specified)

This file isn’t needed, I guess because either the default language is EN for GrimUI-X or it is only available in EN.

Okay! Well!

Lots of things need fixin’ then! =)

it isn’t needed because the mod does not contain any new texts

New Version!

The editor is now ever so slightly less dumb about how it goes about locating the transfer stash files. Whenever a character is loaded now, the editor should load the corresponding SC or HC transfer stash. It will also respect your mod settings when trying to find these stash files. The exact path of the stash file will also be printed for clarity.

There is also a new “batch” command now. Run it like so:

> batch "path-to-my-batch-file.txt"

This should make it possible to run batch files while manually driving the editor. Since the editor live reloads the stash file (and takes a long time to start), this makes it easy to insert a bunch of predetermined items into the stash more quickly. There is no need to exit the game or the editor.

Lemme know if anything goes terribly wrong! =)

1 Like

Nothing at all. It all works beautifully Odie :+1::clap:

No errors when trying to fire up a mod character. The correct transfer stashes are linked to characters and writing to stashes with game worked with no issues. The only tricky bit was remembering to use ws instead of w to save changes.

Only one other thing :raised_hands: I can greedily think of, if you aren’t already considering it, is a copy and/move function so you could copy items between stashes (from sc to mod and vice versa) at some stage in the future.

Thank you for being so accommodating and adding all the new functionality requests !

Glad things are working for ya. It’s also really cool to see the game reflect the edits right away. There is a sort of immediacy that wasn’t there before. All in all, it was a fun feature to add.

I mean… the editor is able to read write stash files. So, it is technically able to move data between files. It’s just the matter of finding a sane way to expose this functionality via the command line.

Also, mod items may not be valid at all when moved from stash to stash. A mod may add new item to the game. Those items will only be meaningful/valid when the mod (and its database file) is active/loaded. Moving such items from the mod stash to the vanilla stash may or may not crash the game. But what is sure is that such an item won’t work the way you expect.

Anyway… did you already have some sort of workflow in mind?

I’m still testing but have come across an odd quirk. You can’t create quest items and successfully write them to any stashes (player, smuggler or shared) while the game is open - at least I can’t. If you close the game, then execute a w or ws the items will appear when you fire the game back up only. Not a big deal given there’s a workaround. I assume this is a game thing. Haven’t see it happen for anything else yet.

Your absolutely right. The item would need to be in both the vanilla game and the mod. A move or copy shouldn’t be allowed if that is not true for either case.

I’m using the tool for theory crafting and auto-creating character builds, via batch mainly. I like to generate as many of an item as possible, review and pick the preferred item(s) with most desirable stats.

With the vanilla shared transfer stash there are 180 squares, so I can generate a lot of one item, or create whole sets. If I use GrimUI-X Mod I have even more space (around 380 squares) and generate even more items (singular or plural) :grinning:

If I generate items in the mod shared stash and find a keeper, I can’t get it to the vanilla stash via gd-edit atm afaik (and vice versa though that would probably be rare). I use GDS to transfer atm. It works, but is quite a process. I’d like to be able to do so via command line. A simplistic flow would look like this (mtra is mod stash, vtra is vanilla stash):

show mtra/5/items <-- generates mod shared transfer stash item list
cp mtra/5/items/13 vtra/5/items/13 (user checks if slot empty, or program can check and fail)

show vtra/5/items <-- vanilla stash
mv vtra/5/items/26 mtra/5/items/26

and vice versa. Make sense or madness ?

Given I can already create items in the vanilla shared stash with no need to copy or move an item if I use that stash, the ability to move between the mod and vanilla stashes is just a totally nice to have only. But hey more space and functions/features to use is always good right :+1:

it won’t crash the game, the item will be deleted from the stash

Gotcha. Good to know. =)

Slight correction - I get 600 squares with the mod - that’s over 3 times the storage of the vanilla storage :camel: :camel::camel::camel: instead of :dromedary_camel:

That looks alright, but it doesn’t seem like it would be very pleasant to use. Before you can issue a mv or a cp, you’d first have to locate the item you want to operate on. I suppose you can issue a “find” first. Wouldn’t it be more straightforward to create the item directly?

Hmm! I just tried this. I added a “Slith Necklace” the transfer stash without issue. Is there a particular item you’re having trouble with? BTW, the only file that the game seems to constantly read/reload is the transfer stash. Writing to the character file or the stash attached to the character will not be reflected in the game until the game decides to reload the character file. Your character writes should work after exiting to the main menu in game.

Also, when you’re sitting at the main menu, you’ll want to reload the character in the editor to sync up the changes. The editor does not watch and reload the character file as it does with the transfer stash.

I can create an item directly into the character stash, that’s true. However because of RNG, creating a single item doesn’t always result in the stats I’m looking for. Hence I create multiple copies and then select one (after removing the others in GDStash). I can of course use the vanilla shared stash to do the task. The snag with that is the vanilla stash is full. I have to do major shuffling (and I’m not even much of a pack rat) or dump something. I can “only” generate so many of an item to get improve the odds of getting decent stats. Using the mod’s larger stash I can create more items (and not worry about space juggling). The create works beautifully. The workflow with gd-edit after that needs two things to work best:

  1. Delete items no longer want. I tried set with stack-count 0 without success. Is there some way to delete/remove items ?
  2. I can’t copy the item on command line. Copy probably better than move. Less dangerous.

I can do mass generation, deletes and copy from one stash to another using GDStash. It’s taking care of all the messy commands via GUI, but I’ve no idea how it does it and I like to know a little of what is happening (hence I like the command line interface). It’s more efficient (once the script is done) to generate a large number with gd-edit.

If I can remove all the ones I don’t want then I’m left with only one, which I could then run a “simple” one line copy command on (since the item number is the only one left). I understand there are practical limitations of the command line editor where it makes more sense to perhaps use another tool to do some of the heavy lifting. I’m totally cool if you feel functionality like this is not a good fit for the editor and just continue using the two programs in unison, but hey if it’s still possible without tying you up in knots I’d be happy to use more functionality within the editor :+1:

this feels like a fallacy to me… you do not really know what either tool does in the background to accomplish the task, the only difference is how you initiate the task.

In GD Stash you click on an item to select it and then press the ‘Delete’ button, in gd-edit you somehow figure out how to identify the item and then type ‘del’. Both then do something based on your input, but you do not really know what that is.

For automation a command line is better, no argument there, but if you think you know more about what goes on ‘behind the scenes’ because you use commands rather than a GUI, you are mistaken.

Perhaps I should clarify. GD-edit shows me fields within the player.gdc file. The data in these provides me with information that I use to understand what and how the developers have built the game (or if these fields are gd-edit specific than how Odie has converted game files fields to english equivalent for plebs like me to understand). I don’t get those fields, or an insight from a GUI. And I did say

Not that it will tell me all. I’m also not saying, or intimating that one tool is better than another. I use them in unison and they compliment each other very well.

Not sure what fields you are talking about here specifically. E.g. the char Physique you get in both, in GDS as a label and text box, in gd-e as a field name I assume.

The save file does not contain any field names, only fields in a specific sequence, so field 5 or whatever is what stores the Physique value and if we wanted to we could call that field Strength instead, whether we use a GUI or a command line. That it is called Physique is only because that is what GD calls it in its GUI.

inv/0/, inv/1/ etc. does not tell you more than seeing the char inventory and the 5 bags on a screen does, and so forth. Because that too is not actually data of the save file.

I stand by what I said, the command line simply is a different abstraction of the same data and does not inherently give you more information about the underlying format.

A specific GUI or command line can be closer to the underlying data than the other, that is only a matter of the respective implementation, it is not decided by the fact that one is a command line while the other is a GUI.

I am not that familiar with gd-e but from what I have seen in this thread I’d say the abstraction level is pretty similar to that of the GDS GUI.

I believe what you consider ‘more detail about the save format’ is just you mistaking the gd-e UI / command line abstraction for the save format. Something that does not happen with a GUI.

For what it is worth, I did not see your comment as a criticism of GDS, I just wanted to correct what I consider a misunderstanding on your part.
Neither tool actually tells you almost anything about the actual save format (other than some of the data it contains) and both have a very similar level of abstraction as far as I can tell from what I see posted here (am not actually using gd-e)

There isn’t a command to delete things yet. It made little sense previously, since it wasn’t clear what the exact stats of an item is until you’re in the game. Once in-game, you can always just discard the item if you choose to.


I guess with the workflow you had in mind, it probably makes sense to:

  1. Generate a bunch of items into mod transfer stash
  2. Review exact stats in game
  3. Pick and move the items you want into a separate stash bag/tab.
  4. Batch delete the rest of the items
  5. Batch copy move items from mod stash to vanilla stash

A similar workflow should work fine with vanilla stash also.

  1. Generate a bunch of items into vanilla stash
  2. Review
  3. Pick
  4. Batch delete junk

If you stick to the vanilla stash (though it is smaller), then all you’d need is a batch delete command. I can also throw in a batch create command so you can keep batch file editing to a minimum (if needed at all).

If you really really want to use the UI-X mod’s larger stash to do this, it’s also possible to:

  1. Batch generate items
  2. Review
  3. Pick and record the “seed” field of the item
  4. Switch character (and thus the transfer stash)
  5. Generate item by name
  6. Manually set the “seed” field recorded at step 3

It’s a bit clumsy. You’d have to copy the “seed” field per item you want to keep. I’m not sure if it’s much worse than the two workflows above though.


Regarding moving items between stash files… I can imagine having a command to link in whatever stash file you want into some top level location in the loaded character (like linux’s mount command). I can imagine having some generic copy/move commands operating on them. I can imagine extending the “ws” command to work with multiple stash files. Another command will be needed to unlink/unmount stashes. Maybe someone might want to see which files are already linked or mounted? Maybe the links will need to be relinked in whenever a character is reloaded as is done with the transfer stash currently?

None of this is insurmountable. I’m not quite sure if I’m ready to tackle this at the moment. x) But I can deal with adding deletes though! =)

A delete function would be awesome :+1:

No problem. A future enhancement perhaps.

There is NOW!


You can use the remove command to remove a single item.

remove tra/0/items/0

Or to remove all items in a collection all at once.

remove tra/0/items/*

The command should work on other things in the character file as well, as long as they are “things” that are sitting in a collection/array.

Be careful with this command! I’ve tried restricting things so that it won’t try to remove things that will obviously break the save file. But… I highly doubt I’ve found every last case. You should be okay if you stick with deleting inventory items, stash items, and skills.

(For the truly lazy, the command also has an alias “rm”.)


“Batch item” command
Use it the same way you would with “set” to crate items.

batch item tra/0/items "crystallum"

That will create as many of that item as will fit into the specified destination.


As usual, there is very little amount of testing done. It appeared to work so I’m shipping it. Be careful with your files. =)