Closed Caedendi closed 1 month ago
When D2RMM reads any file, it also immediately writes it to the output directory. This is basically a small performance optimization to prevent D2RMM from having to read the same file from the CASC archive (which is slower than reading a normal file from disk) over and over again when one file is used by a number of mods, but not modified.
Is there an issue you are running into with this behavior? i.e. Does the presence of the original file mess something up?
So if I understand this correctly:
D2RMM.readJson()
on it, a duplicate of the original version will be savedD2RMM.readJson()
or in conjunction with D2RMM.writeJson()
, thus adding a duplicate) and I use D2RMM.readJson() (not using D2RMM.writeJson()
), nothing is changed?If this is indeed true, then the presence of the file will not mess anything up, but its presence is confusing. If I don't modify a file, it should not be included in the generated mod. Can this be easily fixed without severely impacting performance?
Thanks for the quick reply and the clarification by the way, very much appreciated:)
I'm unsure what you mean by duplicate, but I think you got the gist of it. :)
If you use D2RMM.readJson()
on a file:
Can this be easily fixed without severely impacting performance?
Yup! I have on my mental todo list (which hopefully I get to one day...) to rework file writing a little bit anyway, and one of the things that I'd like to do is keep a record of which mods read/wrote which files during the install (primarily to use for some automated conflict detection). This would then also allow D2RMM to simply delete any unmodified/vanilla files at the end.
Expected behaviour: only
act2hire.json
is created. Actual behaviour: both files are created.Expected behaviour: no files are created. Actual behaviour: both files are created.