tylercamp / palcalc

MIT License
33 stars 5 forks source link

Support "skip-loading" to bypass changes to irrelevant save file contents #20

Open tylercamp opened 4 months ago

tylercamp commented 4 months ago

Pal Calc currently parses the whole save file when reading, which makes the reader sensitive to any format changes in any part of the file.

Pal Calc is only interested in certain sub-structures. A change to an irrelevant part of the file shouldn't cause issues elsewhere in Pal Calc.

We should prefer to parse the whole save file for correctness, but if there's an error, we should fall back to a "skip-loading" process which searches for known markers of relevant sections (e.g. .worldSaveData.CharacterSaveParameterMap) and resumes parsing from that point.