Jump to content
The Dark Mod Forums

The Dark Mod Quick Save Bug Destroyer . . .


dominoid

Recommended Posts

So I was reading the forums yesterday and hearing about people encountering the dreaded "Quick Save Bug" and I was grateful that I had never encountered it before. Sure enough last night while playing the FM Betrayal, I crashed to desktop and my save was corrupt. I'm the quick save only kind of player and I was devastated. I vowed to never be at this bug's mercy again. So today I made a little program to help alleviate the situation.

 

I present to you my Dark Mod Front End. I was originally going to call it The Dark Mod Quick Save Bug Destroyer or something similar, but I figured if the community embraces it in the least I would expand upon it and turn it into a more robust "Front End" type application with additional functions and features.

 

There really isn't a whole lot to it. Here is a screenshot:

 

DMFE.jpg

 

 

What the program does is scan your active Dark Mod FM save game folder periodically and when it detects a new quick save present, it creates a backup copy of the file automatically that can even be loaded in game. You get to set the number of backups you wish from 2-10. GEEK NOTE: You need at least 2 backups because if your most recent quick save is corrupt that corrupt quick save will most likely become one of your backups! You also get to choose how often the quick save is checked.

 

Simply open the program, ensure that the Doom 3 location loaded from the registry correctly and launch The Dark Mod.

 

This program has another side benefit as well. Have you ever accidentally quick saved milliseconds before a guard was about to notice you? Or how about hitting the quick save button instead of the quick load button right before you were about to die? This program will help alleviate those situations as well as a few others.

 

 

 

Dark Mod Front End - http://www.bostonpie.../Files/DMFE.zip

 

 

I'm very much a lurker in the community and don't post a whole lot. So in this program's infancy I am providing my source code for community inspection. I am fully aware the dangers of downloading and executing a program from a completely unknown user and wish to lessen those fears. I am a self-taught programmer so be gentle with critiques of my code. :-)

 

Dark Mod Front End Source Code - http://www.bostonpie.../DMFESource.zip

 

 

Hope you like - Dominoid

Edited by dominoid
Link to comment
Share on other sites

I've downloaded it. I'll see what the reaction to it is and then upload it to the contributions website. I've not decided if I want to use myself yet. Thanks.

 

So this is a front end to launch the tdm launcher? :laugh: I'm just wondering how it knows how to call the Dark Mod save function.

Link to comment
Share on other sites

It is simply a program that monitors the save games folder of the active Dark Mod FM. When it detects a new Quick Save, by file date time stamp, it create a duplicate copy of the save file and the screenshot file on a rotating name basis.

 

SaveGames.jpg

*Those are some HUGE files BTW.

 

The manner in which it does it makes the save games loadable directly from inside the Dark Mod. There is no direct interaction with the Dark Mod itself.

 

Dominoid

Edited by dominoid
Link to comment
Share on other sites

This seems to be a good idea and the MS Win. users can benefit from it. Unfortunately the source is for VB, so Linux users can't make any use of it. Though it might be possible to run the executable in Wine and point it to the ~/.doom3 directory (or at least a symbolic link to ~/.doom3).

I think I'll try it in Wine and report back.

 

Edit:

[john@mjollnir Desktop]$ wine DMFE.exe

DbgPrint says: Oreans x32 driver loaded in memory (v1.45)

wine: Install the Windows version of Mono to run .NET executables

[john@mjollnir Desktop]$

 

Hmmm.... I'll have to look into installing Mono now....

 

Edit02:

[john@mjollnir Desktop]$ wine DMFE.exe

System.ArgumentException: Argument 'Length' must be greater or equal to zero.

at Microsoft.VisualBasic.Strings.Left (System.String str, Int32 Length) [0x00000] in <filename unknown>:0

at DMFE.Form1.Form1_Load (System.Object sender, System.EventArgs e) [0x00000] in <filename unknown>:0

at System.Windows.Forms.Form.onload (System.EventArgs e) [0x00000] in <filename unknown>:0

at System.Windows.Forms.Form.onloadInternal (System.EventArgs e) [0x00000] in <filename unknown>:0

 

 

Looks like it's time to come up with a script for Linux to achieve the same thing. Does anyone know of a program to monitor changes to a directory? That would be the main factor and the rest can be easily scripted.

Edited by PranQster

System: Mageia Linux Cauldron, aka Mageia 8

Link to comment
Share on other sites

Looks like we might be good. Your second error is part of my script that looks to the system registry to retrieve the location of the Doom3 install. Of course that doesn't exist in Linux so the error is occurring. I will add some error trapping to that section of code on Thursday and you can retry it if you'd like

 

Thanks - Dominoid

Link to comment
Share on other sites

Cool. Will check it out later. I may have found a native solution for Linux users.... almost. Testing it now. I need to work out dealing with wildcards for subdirectories so that it will scan '~/.doom3/*/savegames/QuickSave.save' for changes and then write into the very same directory... and no other.

 

Edit: This is proving to be a bit difficult. I can have incron act upon changes to an existing file in a specific directory (not in a subdirectory using a wildcard). I can also make it act upon any newly created file in a specific directory.

What I cannot get it to do is to act upon a file which has yet to be created.

I mean... if a new FM is loaded and has no quicksave file yet, I cannot make incron do anything with it after it is created (the quicksave file needs to exist first when the incrontab table is created). The only way to make it so it can act upon the file when it is created is to react to any new file in the directory. So if a regular named save file is created apart from the quicksave file, the copy of the quicksave file will happen because there is a new file in the directory. :(

I can not yet get it to work with wildcards for subdirectories... so any new FM installed would have to have its directory path manually added to the users' incron table, then the table refreshed for use (with the QuickSave.save file already in existence) :(

Edited by PranQster

System: Mageia Linux Cauldron, aka Mageia 8

Link to comment
Share on other sites

Heh..

Nice to see that the community has clever ideas for workarounds, but...

Wouldn't it be easier, while waiting for the proper fix, simply cut down save&load cycles and deal with the mistakes you make during a mission?

 

It is a matter of taste of course, but saveloading removes a lot of tension and excitement.

 

Try cutting saveloading. It really boosts gameplay.

 

I wonder if there was an *option* for Iron Man (Iron Thief?) difficulty setting, which prohibits saving.. It would truly mean something if someone ghosted The Glenham Tower, for example, in Iron Man mode..

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

Yeah. That's true.

I am also getting in the habit of doing more manual saves with two or three named save files instead of hitting quicksave. I always make a '01' save file at the very beginning of my mission, along with a '02' save file. I never touch the first one after that, in case I want to replay the mission but skip the intro and weapon shopping.

LOL, I've destroyed more brain cells than I had hoped to trying to get incrond to work in multiple subdirs. Manual save just takes a couple of seconds.

System: Mageia Linux Cauldron, aka Mageia 8

Link to comment
Share on other sites

This was causing a headache... easier to just manually save the game on occasion:

(ugly jpeg squished image at 66% scale)

newsnap46.jpeg

 

 

 

WTF? Upon closer inspection... How did one of my Danzig albums get dropped into my home directory? I must have fallen asleep with my hand on the mouse and sleep-dragged it, LOL.

Edited by PranQster

System: Mageia Linux Cauldron, aka Mageia 8

Link to comment
Share on other sites

I do like the idea of having a quicksave series, though.

 

It would be nice to have the system itself push, say, 5, maybe 4, at least 3 quicksaves into a rotation. Say using the quicksave key to save and shift the others removing the oldest. Then maybe assigning keys to load the various backsaves. I rarely "name" saves so the manual save system, IMO, isn't really useful but is certainly more immersion breaking than quicksaving...

 

(what a muddled mess of a what-I'm-trying-to-say the above is, but hopefully the gist is there

 

 

...

 

ETA:

Sleep Draggin'... :laugh:

 

Space Truckin'!

Edited by aidakeeley

"A Rhapsody Of Feigned And Ill-Invented Nonsense" - Thomas Aikenhead, On Theology, ca. 1696

Link to comment
Share on other sites

I do like the idea of having a quicksave series, though.

 

It would be nice to have the system itself push, say, 5, maybe 4, at least 3 quicksaves into a rotation. Say using the quicksave key to save and shift the others removing the oldest. Then maybe assigning keys to load the various backsaves. I rarely "name" saves so the manual save system, IMO, isn't really useful but is certainly more immersion breaking than quicksaving...

 

Hmm... How about something a bit more simple? Right now I have F4 for quicksave and F9 for quickload. How about F4, F5 & F6 for quicksaves 1, 2 & 3. Then F9, F10 & F11 for quickloads 1, 2 & 3.

That way three different quicksave/quickload can be easily done... if the newest one crashes, load the previous. Or simply if you screw up you can quickload one of two previous saves.

System: Mageia Linux Cauldron, aka Mageia 8

Link to comment
Share on other sites

Dats a beautiful ting, Rich.

 

Dominoid's idea here coinciding with Komag's vertical mission... quite timely, btw. I mean I didn't use it or the marco, because I'm too used to my ways (and I've finished Komag's mission) but it is really good timing.

"A Rhapsody Of Feigned And Ill-Invented Nonsense" - Thomas Aikenhead, On Theology, ca. 1696

Link to comment
Share on other sites

Hey, thanks. Good to have a backup quick-save. So, if I have the backup-setting '5', does that mean that I will have five different quicksaves? (if I hit 'quickSave' five times)

 

@RichIsBored:

Thanks, man! That´s a feature I always wanted to ask for, but always forgot to do it. Should be implemented in the Mod I think, at least the more save-files.

 

Hmm, what/how to edit this if I want only the last made quicksave to be quickloaded or quickloaded at first? (f.e. if only 2, but not 3 quicksaves were made so far, I mean simply editing the load-order would be not the solution to this...)

 

Ok, I played around and got it working. With the following, the normal quicksave is made at the same time resulting in a second 'Game Saved'-message and there is no cycle-quickload, so the last quicksave is loaded always. If sth went wrong, go to the menu and select an older quicksave. This is what I like to do. :) Sure this is not perfect, just my silly attempt:

 

// f4 cycles between saving to 3 files
set save1 "savegame QuickSave1; set savebind vstr save2"
set save2 "savegame QuickSave2; set savebind vstr save3"
set save3 "savegame QuickSave3; set savebind vstr save1"
set savebind vstr save1
bind f4 "vstr savebind;savegame quick"

// f9 cycles between loading from 3 files
//set load1 "loadgame QuickSave1; set loadbind vstr load2"
//set load2 "loadgame QuickSave2; set loadbind vstr load3"
//set load3 "loadgame QuickSave3; set loadbind vstr load1"
//set loadbind vstr load1
//bind f9 "vstr loadbind"

 

As you see, I´ve taken out the whole cycle-quickload-code, so F9 should be binded to QuickLoad again in the menu. I didn´t tested what happens if you bind F9 to both load-methods...

Edited by LEGION

-> Crisis of Capitalism

-> 9/11 Truth

->

(hard stuff), more
Link to comment
Share on other sites

Hey, thanks. Good to have a backup quick-save. So, if I have the backup-setting '5', does that mean that I will have five different quicksaves? (if I hit 'quickSave' five times)

 

@RichIsBored:

Thanks, man! That´s a feature I always wanted to ask for, but always forgot to do it. Should be implemented in the Mod I think, at least the more save-files.

 

Hmm, what/how to edit this if I want only the last made quicksave to be quickloaded or quickloaded at first? (f.e. if only 2, but not 3 quicksaves were made so far, I mean simply editing the load-order would be not the solution to this...)

 

Ok, I played around and got it working. With the following, the normal quicksave is made at the same time resulting in a second 'Game Saved'-message and there is no cycle-quickload, so the last quicksave is loaded always. If sth went wrong, go to the menu and select an older quicksave. This is what I like to do. :) Sure this is not perfect, just my silly attempt:

 

// f4 cycles between saving to 3 files
set save1 "savegame QuickSave1; set savebind vstr save2"
set save2 "savegame QuickSave2; set savebind vstr save3"
set save3 "savegame QuickSave3; set savebind vstr save1"
set savebind vstr save1
bind f4 "vstr savebind;savegame quick"

// f9 cycles between loading from 3 files
//set load1 "loadgame QuickSave1; set loadbind vstr load2"
//set load2 "loadgame QuickSave2; set loadbind vstr load3"
//set load3 "loadgame QuickSave3; set loadbind vstr load1"
//set loadbind vstr load1
//bind f9 "vstr loadbind"

 

As you see, I´ve taken out the whole cycle-quickload-code, so F9 should be binded to QuickLoad again in the menu. I didn´t tested what happens if you bind F9 to both load-methods...

 

Do those commands get entered in the console? Or where do they go? Can they be entered in a CFG file? Couldn't you leave the "savegame quick" off the bind and only get one saved game?

 

Dominoid

Edited by dominoid
Link to comment
Share on other sites

Yes, they are from the .cfg-file RichIsBored has posted. (then either type 'exec saveload.cfg' in the console or in autoexec.cfg) And the 'savegame quick'-cmd is the common quicksave that I just added to have this savegame loaded when I hit the common quickload-button. I don´t want to have more than one quicksave-key(I use Gamepad) so I started this...

-> Crisis of Capitalism

-> 9/11 Truth

->

(hard stuff), more
Link to comment
Share on other sites

I think you could do this and avoid the double save:

 

// f4 cycles between saving to 3 files

set save1 "savegame QuickSave1; set savebind vstr save2; set loadbind vstr load1"

set save2 "savegame QuickSave2; set savebind vstr save3; set loadbind vstr load2"

set save3 "savegame QuickSave3; set savebind vstr save1; set loadbind vstr load3"

set savebind vstr save1

bind f4 "vstr savebind"

 

// f9 cycles between loading from 3 files

set load1 "loadgame QuickSave1"

set load2 "loadgame QuickSave2"

set load3 "loadgame QuickSave3"

set loadbind vstr load1

bind f9 "vstr loadbind"

 

I think I will edit my program to create/append the AutoExec.CFG file automatically instead of what I am doing now.

 

 

Dominoid

Edited by dominoid
Link to comment
Share on other sites

Yeah, thanks dominoid! Now it´s working! :)

 

But I don´t understand how TDM knows what save to load? Or is the engine this intelligent to be able to detect the last saved file? Or is it related directly to the save-command?

Edited by LEGION

-> Crisis of Capitalism

-> 9/11 Truth

->

(hard stuff), more
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • Petike the Taffer  »  DeTeEff

      I've updated the articles for your FMs and your author category at the wiki. Your newer nickname (DeTeEff) now comes first, and the one in parentheses is your older nickname (Fieldmedic). Just to avoid confusing people who played your FMs years ago and remember your older nickname. I've added a wiki article for your latest FM, Who Watches the Watcher?, as part of my current updating efforts. Unless I overlooked something, you have five different FMs so far.
      · 0 replies
    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
×
×
  • Create New...