Repository navigation
Issue #1628: atomsmasher, an offline tool that fixes a tactical save to be loadable - #1630
Draft
whakomatic wants to merge 2 commits into
Draft
whakomatic wants to merge 2 commits into
whakomatic wants to merge 2 commits into
Conversation
…ave archive tool
Contributor
Author
|
Two save files, one with the Skip Turn Bloat and the other that is simply big. |
|
Q: I know the script doesn't handle strategic saves, but my question is more related to knowing if these kinds of issues do happen at that stage (like leaving the game too long on avenger/globe without going into missions). |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a proposal for the third fix in #1628. It adds a standalone Python tool. I dont see this as an addition to CH but its here for people to review and understand everything together. The final tool would be a workshop upload.
What it does
atomsmasher.pyrewrites a tactical save offline, while the game is not running. It archives the history the way the game's nativeArchiveHistorydoes at a mission's start state:It checks its result before writing: it reports structure problems and compares every object's current state against the original by ObjectID.
Usage
It writes
<save file>_archivedbeside the original, which shows as "(archived)" in the Load Game list. It needs Python 3.10 or later and has no dependencies.Results
On an LWOTC save from the final mission (attached):
This file loads but the autosave for next will fail to load.
The archived save loaded and played two XCOM turns and two alien turns with no errors, the same as the original.
On the turn 5 save from the large LWOTC mission in #1628, which crashed on load:
SkipTurns wrote 82% of that save's history, and 99% of the unit states they wrote changed only visibility. Every object's current state in the archived save matches the original, apart from 95 effects created and removed during the mission and one renumbered history index.
The load copy is estimated at 6.6 KB per object. That figure was measured on saves that are mostly unit states, and it overstates saves like the first one, which loaded even though its estimate is past the limit.