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

[New Feature] Auto-save in singleplayer #517

Open
Rampastring opened this issue Aug 18, 2021 · 0 comments · May be fixed by #1122
Open

[New Feature] Auto-save in singleplayer #517

Rampastring opened this issue Aug 18, 2021 · 0 comments · May be fixed by #1122
Labels
new-feature New feature or request.
Milestone

Comments

@Rampastring
Copy link
Member

Description:

Related to #25 . ts-patches can also auto-save singleplayer missions with a user-configurable delay between auto saves and a specific number of auto-save slots (currently 3 in ts-patches). Once all slots are filled, new auto-saves will overwrite saves from previous slots, starting from the oldest save.

Possible Implementation:

Unlike with the multiplayer implementation, we don't need to perform the actual SAVEGAME event in singleplayer. Simply saving directly will do.

Additional Files:

CnCNet ts-patches implementation: https://github.com/CnCNet/ts-patches/blob/master/src/Hook_Main_Loop.c#L79

The CnCNet spawner also reads the values of AutoSaveGame and NextSPAutoSaveId from spawn.ini, allowing the client to set the delay between auto-saves and the initial auto-save ID. Setting of the initial ID is necessary for the logic to function properly with saved games. For example, if the user loads the save in auto-save slot 2, the next auto-save should be written to slot 3, not to slot 1.

DTA show-case:
https://www.moddb.com/mods/the-dawn-of-the-tiberium-age/images/single-player-auto-save#imagebox

@Rampastring Rampastring added the new-feature New feature or request. label Aug 18, 2021
@Rampastring Rampastring added this to the TS-Patches milestone Aug 18, 2021
@ZivDero ZivDero linked a pull request Oct 28, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-feature New feature or request.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant