Updated my java yesterday and now when I start gd-edit I get the following error message
Exception in thread “async-thread-macro-1” java.lang.Error: java.io.FileNotFoundException: C:\GDEditor\settings.edn (Access is denied)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.FileNotFoundException: C:\GDEditor\settings.edn (Access is denied)
I’ve not made any changes to file or folder locations. Also when I tried to save a change just now it threw an exception and hung. When I ctrl+c to break it the character disappeared from the character list (it is still present in save folder but no longer visible in gd-edit)
Java info as follows
java version “1.8.0_261”
Java™ SE Runtime Environment (build 1.8.0_261-b12)
Java HotSpot™ 64-Bit Server VM (build 25.261-b12, mixed mode)
gd-edit version
gd-edit 0.2.0-SNAPSHOT [build bc3494e]
The exception you posted earlier seems to say that the editor is unable to read the “settings.edn” file. I really don’t know what would cause this. Internally, it should have either read it or returned nothing. Is this a file permission problem, maybe?
I also don’t know what would cause the character to hang on save. Was there an exception thrown? If the character has now disappeared, you should still be able to manually restore from one of the previous backups the editor made.
I don’t get the original java exception now, however there is still a couple of issues
The character that “disappeared” had no player.gdc file - which is why the editor could not see it. I renamed a previous backup and could see the character again.
I tried the same action as before - trying to change the sack-count parameters with set command. The editor threw the following exception and hung. Since it hung it did not right a character backup file.
After I broke the session I no longer have a player.gdc file (not in a backup folder or trash just gone)
Character: Dumbledore
r) reload
w) write
set sack-count 5
Character: Dumbledore
r) reload
w) write
w
Save file backed up to:
C:\Users\PJ\Documents\My Games\Grim Dawn\save\main_Dumbledore\player.gdc.bak7
Saving file:
C:\Users\PJ\Documents\My Games\Grim Dawn\save\main_Dumbledore\player.gdc
Exception in thread “main” java.lang.AssertionError: Assert failed: (= (:sack-count block) (count (:inventory-sacks block)))
at gd_edit.io.gdc$write_block3.invokeStatic(gdc.clj:210)
at gd_edit.io.gdc$write_block3.invoke(gdc.clj:199)
at gd_edit.structure$write_struct.invokeStatic(structure.clj:438)
at gd_edit.structure$write_struct.invoke(structure.clj:424)
at gd_edit.io.gdc$write_block.invokeStatic(gdc.clj:1064)
at gd_edit.io.gdc$write_block.invoke(gdc.clj:1039)
at gd_edit.io.gdc$write_character_file.invokeStatic(gdc.clj:1224)
at gd_edit.io.gdc$write_character_file.invoke(gdc.clj:1188)
at gd_edit.commands.write$write_character_file_after_backup.invokeStatic(write.clj:132)
at gd_edit.commands.write$write_character_file_after_backup.invoke(write.clj:108)
at gd_edit.commands.write$write_character_file.invokeStatic(write.clj:170)
at gd_edit.commands.write$write_character_file.invoke(write.clj:134)
at gd_edit.commands.write$write_loaded_character_file_BANG_.invokeStatic(write.clj:178)
at gd_edit.commands.write$write_loaded_character_file_BANG_.invoke(write.clj:173)
at gd_edit.commands.write$write_handler.invokeStatic(write.clj:230)
at gd_edit.commands.write$write_handler.invoke(write.clj:212)
at gd_edit.commands.choose_character$character_manipulation_screen$fn__16778.invoke(choose_character.clj:21)
at gd_edit.core$repl_eval.invokeStatic(core.clj:219)
at gd_edit.core$repl_eval.invoke(core.clj:189)
at gd_edit.core$repl_iter.invokeStatic(core.clj:251)
at gd_edit.core$repl_iter.invoke(core.clj:245)
at gd_edit.core$repl$fn__21110.invoke(core.clj:283)
at gd_edit.core$repl.invokeStatic(core.clj:280)
at gd_edit.core$repl.invoke(core.clj:276)
at gd_edit.core$start_editor.invokeStatic(core.clj:603)
at gd_edit.core$start_editor.invoke(core.clj:593)
at gd_edit.core$_main.invokeStatic(core.clj:643)
at gd_edit.core$_main.doInvoke(core.clj:616)
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)
I’m afraid you can’t just have the editor add more sacks for you this way at the moment. The reason is part technical and part laziness on my part. When you change the sack-count, this means for the editor to behave “correctly”, it needs to know that it needs to create a new sack entry with 0 items. It also needs to know how to initiate all associated fields appropriately. The editor really wasn’t made to handle save file data this way. It simply exposes data fields for you to alter.
In this case, the editor at least found that something isn’t right and refused/failed to write out the save file. I should probably have it somehow abort the save and show an error msg instead of leaving you with a directory without a player.gdc.
Anyway, if you want to give your character more inventory sacks, it’d be better to just create a “sack” item. When you use it in-game, it would correctly add a sack to your character.
Thanks Odie. I don’t actually need any sacks. I was testing a suggestion I had made for someone who asked in reddit if it were possible to create additional inventory sacks without doing any quests in game.
I thought maybe it was possible given there was a stat listed but I guess the answer is you can’t use gd-edit (and probably can’t use any other tool either) to do this.
It’s very simple to give yourself all the inventory bags in the game, just use GDStash. Go to the GDStash crafting window, choose to search for quest items and it’ll be the first thing that comes up. Grab however many you want/need and put them in the transfer stash. Back in the game take them from the transfer stash and drop them on the ground, then pick them up again. Voila you have all your inventory bags.
This is machine translation. If it is difficult to understand, I will explain in detail that you can tell me.
I am always grateful for your help.
The question is, is it possible to give a random modifier to the gear generated by set?
???~Item name~???
I am telling the editor to randomly generate this ??? part.
The tool can write prefixes and suffixes. It’s a two steps process as far as I know. Here is one example using pestilence of dreeg. It should work the same way with other items.
set inv/0/items/0 “mythical pestilence of dreeg”
set inv/0/items/0/prefix “plague of corruption”
Have not tried it with a suffix but expect the command will be
set inv/0/items/0/suffix “suffix item”
I think for most of the items in the game, you can just give the full name of the item, including the prefix and suffix.
For example, you can do something like set inv/0/items "vampiric legion warhammer of valor"
The editor will try to break apart the item name you gave into prefix, item-name, and suffix and create the right item for you.
The example @RedPriest gave is a special case. For some reason, the prefixes that are usually attached to that item do not have any names. The editor obviously can’t guess what prefix you might want when you can’t even tell it about the prefix at item creation time.
You’ll need to have taken that devotion in the game first. It should then appear in the “skills” list in the editor. You can then use a combination of “find” and “set” to change the devotion level.
Can you use the editor to set or reset quests (not gates and shrines, those I know you can do) ? Someone on reddit posted they lost all their quests and I thought perhaps they could use gd-edit commands to set them again
Unfortunately, the editor can’t do that. The quest progress is stored in a separate file “quests.gdd” that’s stored alongside the character file, in the “levels_world001.map” directory. His best bet would be to see if he can find and restore a copy of the file he lost.
As for editing quest progress, I did try to do something along those lines some time ago. The editor actually is technically able to read & write quests.gdd. But after messing around with the quest data, I came to the conclusion that it might be a little too difficult to manually edit. If you’re curious , you might want to try show quest to inspect the quest data associated with your loaded character.