[Tool] GD save file editor

That was quick !! Thanks, but there’s still a problem.
When you craft a badge of mastery you have a suffix and a prefix (+X to a skill) but when I use your tool it doesn’t.
I actually use the file editor cause it’s really too annoying to craft this item hoping for the good roll. I already crafted more than 50 of those without any good result.

Thanks.

Howdy!

The grim tools item database says there are “unique” affixes for this item. I don’t think the editor has a simple way of showing you all these unique affixes for you to choose from. But, if you know the name of the affix, you should be able to get the editor to create the item for you just with the “set” command.

For example,


set inv/2/items “<prefix name> badge of mastery of <suffix name>”

If the editor can find an affix with a similar name, it will set them on the item. The editor tries to respect item creation rules if it can, but it will break those rules and put whatever affix you want on the item if that’s the only way to create the item.

If you’re looking for a specific affix, but doesn’t know the name, you’ll have to resort to using the “q(uery)” and “db” command to sift through the game db.

These two posts might be helpful in illustrating how to use those commands.
http://www.grimdawn.com/forums/showthread.php?p=466452&highlight=Recordname+affix#post466452
http://www.grimdawn.com/forums/showthread.php?p=477393&highlight=Recordname+affix#post477393

I’ll try to figure out if the editor can make this a bit easier.

Thanks for the answer.
So I just changed the prefix-name and the suffix-name of my item.
The prefixes are there : records/items/lootaffixes/prefixunique/d001_badgeofmastery*
The suffixes : records/items/lootaffixes/suffixunique/d001_badgeofmastery*

Cheers

Cool, glad you found what you were looking for. It’s a bit unfortunate that those affixes do not seem to have a name. That means the “set” command can’t help you construct the correct item for you. =\

Honestly, your tool is really great. so if we have to work a bit by ourselves to make it works, don’t worry pal, you did such a great work, we can’t complain about it. Thanks again. Cheers.

Hi,

A little bug report.

First (minor) : the .bin can’t update correctly. The binary is downloaded, the old binary is moved to .bak, but there’s a error “error moving file” and there is no new file. Updating manually work.

Second : At launch, there’s some error :

gd-edit 0.1.7-SNAPSHOT [build 6900d1d]

save directories:
    /media/Data/Jeux/Grim Dawn/drive_c/Mes documents _ Grim Dawn/save/main

game directory:
    /media/Data/Jeux/Grim Dawn/drive_c/Jeux/steamapps/common/Grim Dawn

Need help? Check the docs!
	https://odie.github.io/gd-edit-docs/faq/

Please choose a character to load:
1) __Weigelia (local save)
2) _Julia (local save)
3) _kapoue (local save)
4) _trazoom (local save)
5) _Mubatsiri (local save)
6) _Breandan (local save)
7) __Mubatsiri (local save)
8) __Julia (local save)
9) _Weigelia (local save)
10) _Gilford (local save)

[ERROR] Failed to construct terminal; falling back to unsupported
java.lang.NumberFormatException: For input string: "0x100"
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
	at java.lang.Integer.parseInt(Integer.java:580)
	at java.lang.Integer.valueOf(Integer.java:766)
	at jline.internal.InfoCmp.parseInfoCmp(InfoCmp.java:59)
	at jline.UnixTerminal.parseInfoCmp(UnixTerminal.java:242)
	at jline.UnixTerminal.<init>(UnixTerminal.java:65)
	at jline.UnixTerminal.<init>(UnixTerminal.java:50)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at java.lang.Class.newInstance(Class.java:442)
	at jline.TerminalFactory.getFlavor(TerminalFactory.java:211)
	at jline.TerminalFactory.create(TerminalFactory.java:102)
	at jline.TerminalFactory.get(TerminalFactory.java:186)
	at jline.TerminalFactory.get(TerminalFactory.java:192)
	at jline.console.ConsoleReader.<init>(ConsoleReader.java:243)
	at jline.console.ConsoleReader.<init>(ConsoleReader.java:235)
	at jline.console.ConsoleReader.<init>(ConsoleReader.java:223)
	at gd_edit.jline$initialize.invokeStatic(jline.clj:7)
	at gd_edit.jline$initialize.invoke(jline.clj:7)
	at gd_edit.jline$readline.invokeStatic(jline.clj:26)
	at gd_edit.jline$readline.invoke(jline.clj:12)
	at gd_edit.core$repl_read.invokeStatic(core.clj:47)
	at gd_edit.core$repl_read.invoke(core.clj:43)
	at gd_edit.core$repl_iter.invokeStatic(core.clj:207)
	at gd_edit.core$repl_iter.invoke(core.clj:201)
	at gd_edit.core$repl$fn__17714.invoke(core.clj:215)
	at gd_edit.core$repl.invokeStatic(core.clj:214)
	at gd_edit.core$repl.invoke(core.clj:210)
	at gd_edit.core$start_editor.invokeStatic(core.clj:512)
	at gd_edit.core$start_editor.invoke(core.clj:504)
	at gd_edit.core$_main.invokeStatic(core.clj:539)
	at gd_edit.core$_main.doInvoke(core.clj:521)
	at clojure.lang.RestFn.invoke(RestFn.java:397)
	at clojure.lang.AFn.applyToHelper(AFn.java:152)
	at clojure.lang.RestFn.applyTo(RestFn.java:132)
	at gd_edit.core.main(Unknown Source)

>


Thanks for this great tool :slight_smile:

So! The new version comes with minor fixes, mostly for those who are running the editor on unix-like OSes.

This is fixed in the new version and tested both on osx and ubuntu artful64. You’ll need to manually download the editor one more time though. The older version still has the bug and will not be able to move the binary correctly.

This error originates from the “jline2” library that the editor uses to deal with command history and cross-platform console colors. It looks like in the older version of the library, it had trouble with parsing the output of “infocmp” to determine terminal capabilities. It fails when it encounters and attempts to parse hexadecimal values. The new version of the editor has an updated version of the library that should deal with this properly. Note that I did not verify if the fix actually stops the exception from being thrown.

Do let me know if this fixes things!

As title stated, is the item generated afflix able to be set? or it will always be randomized?

Howdy,

The exact effects of the affix is determined by a piece of static data in the game’s database. This means there is no way to tweak the effects of a prefix to some exact specification, short of changing the game database itself.

The subtle differences in loot is just randomized within predefined limits based on a single random number attached to the item. It’s possible to re-roll the item by putting in a random number in the “seed” field you can find attached to each item. There is a short explanation here on why it is probably unfruitful to keep to re-roll an item. https://odie.github.io/gd-edit-docs/faq/#can-the-editor-help-find-the-best-version-of-an-item-by-trying-different-random-seeds

It work’s.

Thanks :slight_smile:

Another minor bug : under linux, there is a “classic” shortcut for all console like tools : ctrl+d => same as typing exit or quit. With the editor, a java error appear :

> Caught exception: nil
java.lang.NullPointerException: null
 at java.util.regex.Matcher.getTextLength (Matcher.java:1283)
    java.util.regex.Matcher.reset (Matcher.java:309)
    java.util.regex.Matcher.<init> (Matcher.java:229)
    java.util.regex.Pattern.matcher (Pattern.java:1093)
    clojure.core$re_matcher.invokeStatic (core.clj:4782)
    clojure.core$re_seq.invokeStatic (core.clj:4800)
    clojure.core$re_seq.invoke (core.clj:4800)
    gd_edit.core$tokenize_input.invokeStatic (core.clj:39)
    gd_edit.core$tokenize_input.invoke (core.clj:35)
    gd_edit.core$repl_read.invokeStatic (core.clj:47)
    gd_edit.core$repl_read.invoke (core.clj:43)
    gd_edit.core$repl_iter.invokeStatic (core.clj:207)
    gd_edit.core$repl_iter.invoke (core.clj:201)
    gd_edit.core$repl$fn__17714.invoke (core.clj:215)
    gd_edit.core$repl.invokeStatic (core.clj:214)
    gd_edit.core$repl.invoke (core.clj:210)
    gd_edit.core$start_editor.invokeStatic (core.clj:512)
    gd_edit.core$start_editor.invoke (core.clj:504)
    gd_edit.core$_main.invokeStatic (core.clj:539)
    gd_edit.core$_main.doInvoke (core.clj:521)
    clojure.lang.RestFn.invoke (RestFn.java:397)
    clojure.lang.AFn.applyToHelper (AFn.java:152)
    clojure.lang.RestFn.applyTo (RestFn.java:132)
    gd_edit.core.main (:-1)

Character:  Trazoom
r) reload
w) write

>

Howdy!

The editor now quits when it receives ctrl+d. =)

Your are the man ! :slight_smile:

Can you not add Ugdenbog Flamestrife/Chillstrife/Stormstrife?

set inv/1/items “Ugdenbog Flamestrife” 94

Am i missing something?

Howdy!

Looks like, when trying to figure out valid affixes for a type of item, the editor sometimes encounter db record references that do not exist. Well, the important thing is, this is now fixed! Yay!

Please grab the latest version. Do let me know it still isn’t working!

Hey, thanks for the quick update and awesome tool! Appreciate it much

Could somebody tell me how to reset one of my mastery choices (Arcanist) and refund fully the skillpoints so I can select a new mastery in game and spend those points?
EDIT: I figured it out: I had to set my “Arcanist” skill (the main bar) to zero, then add that point to my available skillpoints as I previously unlearned all points from my Arcanist, only one point remaind in the mastery bar which you cannot unlearn via the in game skill retrainer.

Is the Editor supposed to understand this command? If yes, I found a bug:


set inv/0/items "Officer's Dermapteran Slicer of the Slayer"

Caught exception: Map failed
java.io.IOException: Map failed
 at sun.nio.ch.FileChannelImpl.map (:-1)
    gd_edit.utils$mmap.invokeStatic (utils.clj:34)
    gd_edit.utils$mmap.invoke (utils.clj:27)
    gd_edit.arc_reader$make_load_tex_fn.invokeStatic (arc_reader.clj:291)
    gd_edit.arc_reader$make_load_tex_fn.invoke (arc_reader.clj:288)
    gd_edit.inventory$make_dims_lookup_fn.invokeStatic (inventory.clj:55)
    gd_edit.inventory$make_dims_lookup_fn.invoke (inventory.clj:48)
    clojure.core$map$fn__6881.invoke (core.clj:2726)
    clojure.lang.LazySeq.sval (LazySeq.java:40)
    clojure.lang.LazySeq.seq (LazySeq.java:49)
    clojure.lang.RT.seq (RT.java:525)
    clojure.core$seq__6422.invokeStatic (core.clj:137)
    clojure.core$some.invokeStatic (core.clj:2673)
    clojure.core$some.invoke (core.clj:2665)
    gd_edit.inventory$texture_slot_dims.invokeStatic (inventory.clj:90)
    gd_edit.inventory$texture_slot_dims.invoke (inventory.clj:87)
    gd_edit.inventory$item__GT_dims.invokeStatic (inventory.clj:158)
    gd_edit.inventory$item__GT_dims.invoke (inventory.clj:148)
    gd_edit.inventory$fit_new_item.invokeStatic (inventory.clj:202)
    gd_edit.inventory$fit_new_item.invoke (inventory.clj:197)
    gd_edit.commands.item$place_item_in_inventory_BANG_.invokeStatic (item.clj:483)
    gd_edit.commands.item$place_item_in_inventory_BANG_.invoke (item.clj:469)
    gd_edit.commands.item$set_item_handler.invokeStatic (item.clj:541)
    gd_edit.commands.item$set_item_handler.invoke (item.clj:517)
    gd_edit.command_handlers$set_handler.invokeStatic (command_handlers.clj:676)
    gd_edit.command_handlers$set_handler.invoke (command_handlers.clj:630)
    gd_edit.core$fn__17628.invokeStatic (core.clj:65)
    gd_edit.core/fn (core.clj:65)
    gd_edit.core$repl_eval.invokeStatic (core.clj:194)
    gd_edit.core$repl_eval.invoke (core.clj:152)
    gd_edit.core$repl_iter.invokeStatic (core.clj:214)
    gd_edit.core$repl_iter.invoke (core.clj:208)
    gd_edit.core$repl$fn__17714.invoke (core.clj:222)
    gd_edit.core$repl.invokeStatic (core.clj:221)
    gd_edit.core$repl.invoke (core.clj:217)
    gd_edit.core$start_editor.invokeStatic (core.clj:519)
    gd_edit.core$start_editor.invoke (core.clj:511)
    gd_edit.core$_main.invokeStatic (core.clj:546)
    gd_edit.core$_main.doInvoke (core.clj:528)
    clojure.lang.RestFn.invoke (RestFn.java:397)
    clojure.lang.AFn.applyToHelper (AFn.java:152)
    clojure.lang.RestFn.applyTo (RestFn.java:132)
    gd_edit.core.main (:-1)

Character:  Juvilie
r) reload
w) write

>

EDIT: Never mind, the item was created successfully, as you can see, the “of the Slayer” contained a typo, it worked with “Of the Slayer”. Notice the upper case of the first letter “O”.

Respec command is buggy. Devotion points should always be equal to the amount of shrines unlocked:

Character:  Harbinger
r) reload
w) write

> show

                          alt-weapon-set : false
                  alt-weapon-set-enabled : false
                        always-show-loot : 3
                        attribute-points : 0
                              boss-kills : collection of 3 items
                         camera-distance : 48.0
                          champion-kills : 188
                         character-level : 45
                          character-name : Harbinger
                         crits-inflicted : 252
                          crits-received : 0
                                 cunning : 50.0
                         current-respawn : collection of 3 items
                             death-count : 1
                         devotion-points : 0
               devotion-points-reclaimed : 6
               devotion-shrines-unlocked : 24
                                  energy : 890.0
                     energy-potions-used : 10
                               equipment : collection of 12 items
                     equipment-selection : false
                    expansion-character? : 1
                              experience : 1872485
                   experience-from-kills : 1215969
                          faction-values : collection of 22 items
                            focused-sack : 1
                    greatest-damage-done : 5766.1523
                greatest-damage-received : 1644.3179
           greatest-difficulty-completed : 1
                 greatest-monster-killed : collection of 3 items
  greatest-survival-difficulty-completed : 0
                           hardcore-mode : false
                        has-been-in-game : true
                                has-data : true
                                  health : 350.0
                     health-potions-used : 50
                              hero-kills : 133
                            hit-received : 3288
                          hits-inflicted : 71766
                                hotslots : collection of 46 items
                           in-main-quest : true
                         inventory-sacks : collection of 5 items
                                    iron : 176787
                             item-skills : collection of 0 items
                           items-crafted : 5
                              kill-count : 13173
                         last-difficulty : 16
                     last-monster-hit-DA : 928.25
                     last-monster-hit-OA : 1004.3
                            level-in-bio : 45
                         lore-item-names : collection of 57 items
                    lore-notes-collected : 57
                                    male : false
                                 markers : collection of 3 items
                       masteries-allowed : 2
                               max-level : 45
                              my-faction : 0
                one-shot-chests-unlocked : 11
                                physique : 90.0
                       player-class-name : tagSkillClassName08
                          player-texture : ""
                        playtime-seconds : 35350
                                   quest : collection of 1 items
                  randomized-items-found : 0
                          relics-crafted : 1
                              sack-count : 5
                           selected-sack : 1
                         show-skill-help : false
                                 shrines : collection of 6 items
                            skill-points : 0
                  skill-points-reclaimed : 22
                              skill-sets : collection of 5 items
                     skill-setting-valid : false
                  skill-window-selection : 0
                                  skills : collection of 40 items
                            spawn-points : collection of 3 items
                                  spirit : 370.0
                                 stashes : collection of 2 items
                  survival-defense-built : 0
                 survival-greatest-score : 0
                  survival-greatest-wave : 0
             survival-powerups-activated : 0
                       teleporter-points : collection of 3 items
                    tier2-relics-crafted : 0
                    tier3-relics-crafted : 0
                   tokens-per-difficulty : collection of 3 items
          total-devotion-points-unlocked : 24
                                tributes : 0
                      tutorials-unlocked : collection of 36 items
                        ui-compass-state : 3
                      unique-items-found : 0
                       use-alt-weaponset : false
                             weapon-sets : collection of 2 items

                                      93 fields

Character:  Harbinger
r) reload
w) write

> respec

Updating the following fields:
  attribute-points : 0 => 45
   devotion-points : 0 => 27
          physique : 90.0 => 50.0
      skill-points : 0 => 133
            skills : collection with 35 items changed
            spirit : 370.0 => 50.0

                 5 fields changed

Character:  Harbinger
r) reload
w) write

>

Another character example:

Character:  Zuko
r) reload
w) write

> show

                          alt-weapon-set : false
                  alt-weapon-set-enabled : false
                        always-show-loot : 2
                        attribute-points : 0
                              boss-kills : collection of 3 items
                         camera-distance : 48.0
                          champion-kills : 30
                         character-level : 20
                          character-name : Zuko
                         crits-inflicted : 556
                          crits-received : 0
                                 cunning : 186.0
                         current-respawn : collection of 3 items
                             death-count : 0
                         devotion-points : 1
               devotion-points-reclaimed : 4
               devotion-shrines-unlocked : 7
                                  energy : 250.0
                     energy-potions-used : 3
                               equipment : collection of 12 items
                     equipment-selection : false
                    expansion-character? : 1
                              experience : 113090
                   experience-from-kills : 98581
                          faction-values : collection of 22 items
                            focused-sack : 1
                    greatest-damage-done : 1322.4215
                greatest-damage-received : 292.65436
           greatest-difficulty-completed : 0
                 greatest-monster-killed : collection of 3 items
  greatest-survival-difficulty-completed : 0
                           hardcore-mode : false
                        has-been-in-game : true
                                has-data : true
                                  health : 290.0
                     health-potions-used : 23
                              hero-kills : 23
                            hit-received : 1543
                          hits-inflicted : 7655
                                hotslots : collection of 46 items
                           in-main-quest : true
                         inventory-sacks : collection of 2 items
                                    iron : 361705
                             item-skills : collection of 0 items
                           items-crafted : 3
                              kill-count : 3448
                         last-difficulty : 16
                     last-monster-hit-DA : 615.725
                     last-monster-hit-OA : 664.775
                            level-in-bio : 20
                         lore-item-names : collection of 19 items
                    lore-notes-collected : 19
                                    male : true
                                 markers : collection of 3 items
                       masteries-allowed : 2
                               max-level : 20
                              my-faction : 0
                one-shot-chests-unlocked : 1
                                physique : 66.0
                       player-class-name : tagSkillClassName0207
                          player-texture : creatures/pc/hero02.tex
                        playtime-seconds : 17578
                                   quest : collection of 1 items
                  randomized-items-found : 0
                          relics-crafted : 0
                              sack-count : 2
                           selected-sack : 1
                         show-skill-help : false
                                 shrines : collection of 6 items
                            skill-points : 0
                  skill-points-reclaimed : 47
                              skill-sets : collection of 5 items
                     skill-setting-valid : false
                  skill-window-selection : 0
                                  skills : collection of 22 items
                            spawn-points : collection of 3 items
                                  spirit : 50.0
                                 stashes : collection of 5 items
                  survival-defense-built : 0
                 survival-greatest-score : 0
                  survival-greatest-wave : 0
             survival-powerups-activated : 0
                       teleporter-points : collection of 3 items
                    tier2-relics-crafted : 0
                    tier3-relics-crafted : 0
                   tokens-per-difficulty : collection of 3 items
          total-devotion-points-unlocked : 7
                                tributes : 0
                      tutorials-unlocked : collection of 33 items
                        ui-compass-state : 3
                      unique-items-found : 0
                       use-alt-weaponset : false
                             weapon-sets : collection of 2 items

                                      93 fields

Character:  Zuko
r) reload
w) write

> respec

Updating the following fields:
  attribute-points : 0 => 19
           cunning : 186.0 => 50.0
   devotion-points : 1 => 11
          physique : 66.0 => 50.0
      skill-points : 0 => 58
            skills : collection with 17 items changed

                 5 fields changed

Character:  Zuko
r) reload
w) write

>

Am I missing something, or have I finally found a bug?

Howdy!

The error message seem to indicate the editor encountered some kind of failure when it was trying find the bitmap to the item so it can figure out dimensions to fit the item in your inventory. I’m not quite sure why it isn’t able to find the bitmap here.

I’m doubly stumped that you eventually got it to work when you replaced “of” with “Of” in the name. The editor really doesn’t take the letter casing into consideration when looking at the item names. In fact, the editor is supposed to be able to ignore simple typos altogether.

When I attempted to generate the item, this is the output:


> set inv/1/items "Officer's Dermapteran Slicer of the Slayer"

Item placed in inventory-sacks/1/inventory-items/22

Officer's Dermapteran Slicer of the Slayer

            augment-name : ""
            augment-seed : 0
                basename : records/items/gearweapons/swords1h/b012f_sword.dbr
<... omitted ...>

In any case, you may want to run the “diag” command to make sure the editor is able to find all the files it requires to work properly. This includes:

  • database/database.arz
  • resources/Text_EN.arc
  • resources/Items.arc

Not sure how helpful this advice is though, since you already got it to work. x)

Yeah, it’s likely that you’ve found a bug. I reviewed the code that does this, it looks like it really doesn’t really look at the number of shrines you’ve unlocked. Instead, it looks at the number of skills on your character that references db records in the “records/skills/devotion” path. This should work, as the game gives you an invisible “skill” record per devotion taken.

Looking at this now, counting this way might be problematic when the game awards you with an actual usable skill when you take the entire constellation. The respec command would accidentally give you back too many devotion points.

Anyway! Thanks for finding this! I’ll try to fix this soon!