Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save file loading error - sakurajima update incompatibility #19

Closed
tylercamp opened this issue Jul 4, 2024 · 3 comments
Closed

Save file loading error - sakurajima update incompatibility #19

tylercamp opened this issue Jul 4, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@tylercamp
Copy link
Owner

Pal Calc appears to be incompatible with save files from the latest v0.3.x updates, which prevents those files from loading.

The error I've seen is from an invalid string parsing event within .worldSaveData.GroupSaveDataMap.Value. Some compatibility issues have been raised in palworld-save-tools, but those are EOF errors and not parsing errors like what I'm seeing: cheahjs/palworld-save-tools#178

The port of palworld-save-tools in Pal Calc is based on PST v22. The latest is v23 with a changelog here

@tylercamp tylercamp added the bug Something isn't working label Jul 4, 2024
@tylercamp tylercamp self-assigned this Jul 4, 2024
@tylercamp
Copy link
Owner Author

I can see some compatibility issues with my own save file but it would be good to have some other save files as well to make sure I'm not missing anything. Others can attach their save files here (namely Level.sav)

@tylercamp
Copy link
Owner Author

The bug was caused by incomplete handling of .worldSaveData.GroupSaveDataMap.Value. In more recent game versions this field has an extra property.

The Pal Calc save parser avoids keeping all parsed data in memory, and instead collects data as it goes through the file. Because of this, the parsing for group (guild) data had to manually perform some parsing of its section of the file, and this parsing was incomplete.

The fix was to replace the ARCHIVE_PRESERVE flag with a preserveValues field on FArchiveReader, where that value is force-enabled for the group data reader. This allows the reader to use the full FArchiveReader logic (which automatically handles arbitrary properties) rather than hard-coding and expecting a specific set of properties.

See def7119

@tylercamp
Copy link
Owner Author

I'll leave this issue open in case of any further bugs, and will close in about a week if there are no reported problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant