I would like some help in getting "saving" from scripting working

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
aJynks
Posts: 30
Joined: Fri Aug 30, 2024 6:19 pm

I would like some help in getting "saving" from scripting working

Post by aJynks »

HI there... I have been using a mod called auto-autoSave and it gave me an idea for a mod, but I can't actually work out how it works.

Basically I want to try and make a mod to bring the "rewind" feature from dsda-doom to gzDoom.

This is how I think the mod would work.
  • Save the game every "x" frames to the same file. ("x" can be user definable in a options menu)
  • Have a single hotkey that loads the save file (hotkey can be user definable in a options menu)
This will effectively feel like you are pressing a button to rewind time to the last save.

Things I think the mod needs to really work
  • Saving should repress any sound or message popup. So it is not noticeable by the player.
  • The script should pause so it dose not try and save before a game has started or if the game menu is open (esc)
  • It would be great to somehow make these saves unique so pressing "use" to respawn will not actually load the rewind save, but the last actual save or quicksave you did
This is what I am trying to do... but the issue I am having is that, so far, I can not even workout how auto-autosave is saving in the first place. The zWiki dose not seem to have anything when I search for save and stuff. So I was hopeing you guys could tell me how to save games via a script.

I've looked through the auto-autosave mod, and it is pretty advanced for me (I've only done some ui stuff), and I can not work out how it is actually saving the game.

: TL;DR :
  1. How do you "save the game" via zscript?
  2. Would anyone more experienced in zscript be interested in doing this mod for me?

Return to “Scripting”