diff --git a/main.lua b/main.lua index a3dd9eb..437c47b 100644 --- a/main.lua +++ b/main.lua @@ -122,22 +122,24 @@ function mod:newrun() end save = savegen:new() save:load(json, data) - local c = 0 - for _,v in ipairs(save.seen) do - if v then c = c+1 end - end - mod.print(modname.." loaded, "..c.." vanilla items seen") - if save.settings.showonmodded then - local c = 0 - for _,v in pairs(save.seenmodded) do - if v then - c = c + 1 - end - end - mod.print(", "..tostring(c).." modded") - end - mod.print(".\n") + else + save = savegen:new() end + local c = 0 + for _,v in ipairs(save.seen) do + if v then c = c+1 end + end + mod.print(modname.." loaded, "..c.." vanilla items seen") + if save.settings.showonmodded then + local c = 0 + for _,v in pairs(save.seenmodded) do + if v then + c = c + 1 + end + end + mod.print(", "..tostring(c).." modded") + end + mod.print(".\n") end function mod:save() diff --git a/metadata.xml b/metadata.xml index 5fab676..32d1436 100644 --- a/metadata.xml +++ b/metadata.xml @@ -17,13 +17,16 @@ It is also compatible with Mod Config Menu, if you want to toggle things (such a Since mods can't directly access the savefile, this mod takes it upon itself to track wich items are picked up. This means that the first time you install this mod, everything will be marked as unseen. Turns out EID already has a some support for this, using a save extractor. If you want to go down that route, here's the link to the extractor : https://github.com/wofsauge/External-Item-Descriptions/tree/master/scripts + However, EID's save extractor doesn't really work on Linux, so I made a port of it in python, in order to be more easily ran. This port is available here : https://forge.chapril.org/ayte/DeadGodHelper/src/branch/main/SaveExtractor +This port can also extract save file's info to be used for Dead God Helper. + This mod is still relevant in itself if you do not want to use external tools, or you want to track modded items ^^ Anyway, I hope that this mod will be useful to someone :) Source code is available at https://forge.chapril.org/ayte/DeadGodHelper - 1.10 + 1.11 Public