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

Optimize characters data in savegame #2845

Merged
merged 1 commit into from
May 15, 2020
Merged

Conversation

akortunov
Copy link
Collaborator

@akortunov akortunov commented May 14, 2020

Warning: this PR changes a saved game format!

Implements some fixes from task #5194 and task #5234.

Summary of changes:

  1. Store all flags from the CreatureStats as a single subrecord.
  2. Fix a bug in the time of death saving (the "DTIM" record).
  3. Store skill / speciality increases for levelup only when needed.
  4. Do not store the IOBJ and EQUI headers for every item in every inventory and every occupied slot.

Allows to reduce saved game size about 3.5-4% (near 1MB for end-game saves). No noticable difference in the saving/loading speed.

@akortunov akortunov added the Saved game format The labelled pull request changes the saved game format and should be handled with care. label May 14, 2020
@akortunov akortunov force-pushed the save_cleanup branch 2 times, most recently from 21bf41c to 1f41206 Compare May 14, 2020 16:53
@akortunov akortunov changed the title Optimize characters data in savegame [WIP] Optimize characters data in savegame May 14, 2020
@akortunov akortunov changed the title [WIP] Optimize characters data in savegame Optimize characters data in savegame May 14, 2020
@psi29a psi29a merged commit 7da5558 into OpenMW:master May 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Saved game format The labelled pull request changes the saved game format and should be handled with care.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants