SUBSIM Radio Room Forums

SUBSIM Radio Room Forums (https://www.subsim.com/radioroom/index.php)
-   COLD WATERS (https://www.subsim.com/radioroom/forumdisplay.php?f=268)
-   -   How can I save the game? (https://www.subsim.com/radioroom/showthread.php?t=238650)

EM1(SS) 09-19-18 10:54 AM

How can I save the game?
 
I have been plying this for a while now but I am having trouble saving games and when they are saved there is no time stamp that shows which one is the latest version. I have another life besides this game and when I need to attend to it I would like to be able to save the game.

CDR DPH 09-20-18 07:45 AM

You cannot save while playing a mission but you can save your campaign progress when viewing the campaign map between missions or you can use the auto save file that updates before the start of each mission.

Delgard 09-20-18 10:46 AM

I don't save because it saves just prior to a mission. IF I really screw up the mission, I just immediately do a CNTL-ALT-DEL and close the program. When I enter back in, it takes me to the beginning of the same mission.

Not so much anymore, but it makes me complete that mission to continue the campaign.

Another thing is that I have been using the Quick Mission Editor to set up scenarios. It is not a very developed editor in relation to mission requirements. I would love to be able to place a certain target at a spot (port) and have defenses that I have to get through. Maybe in the future.

CDR DPH 09-22-18 08:47 AM

The mission editor could definitely be improved - Being able to save and load missions for one.

Also, the AI for the various groups needs work. Whenever I create multiple sub groups, those subs stay clustered tightly together until I fire my first torpedo into that group. Groups selected to be aggressive need to be aggressive and immediately begin to search and engage. Those selected to be defensive need to act defensively by not staying clustered together like fish in a barrel.

I would like to see the next generation editor add support to string individually created missions together as campaigns. With the ability to save these, we can share them and we are golden for new content for as long as we'd like.

Aktungbby 09-22-18 10:34 AM

welcome aboard!
 
EM1(SS)!:Kaleun_Salute:

OBarbas 08-01-21 11:38 PM

Saving your Progress through a Campaign
 
The method I employ to save my progress during the course of a Cold Waters campaign is cumbersome, but it does the trick:

1) Launch a campaign and as soon as you get to the strategic map, hit ESC and then SAVE and then QUIT. This should take you to the Main Menu.

2) Create a desktop shortcut to the location of the CW save files: [Drive]\Users\[User Name]\AppData\LocalLow\Killerfish Games\Cold Waters\savegame\campaign001.
You should see a saved file already in the campaign001 folder - the save you just created. It's called Autosave. If you're running a mod like More Playable there may be a second save file in there, but you really only need to focus on the Autosave file.

3) Create a new desktop folder and name it 'CW Saves' or whatever. Within that folder, create a new folder named, for instance, '1 Mission 1' - your strategic map save. Then copy the Autosave file from the campaign001 file into your new folder '1 Mission 1' (you may get a warning notice but it's okay).

4) Relaunch your campaign, click LOAD, Autosave should be highlighted, select it with LOAD. You should return to your position on the strategic map.

5) Play until you reach an engagement and you arrive in battle mode. EXIT twice to pause the game.

6) Now create a new folder in 'CW Saves' named '1 Mission 2' - your combat save. Then look at the campaign001 folder, and you'll see a new Autosave - check the time created, you'll see it's newer than the last one. So then copy the new Autosave into your new folder '1 Mission 2'.

IN THIS MANNER, you can preserve 2 saves per mission - an initial strategic map location of your choice, and the commencement of the engagement. Wash and repeat and you will end up with a collection of Autosaves that will enable you to replay at any stage of your campaign. Want to restart at a certain point? Just open the savegame/campaign00# folder, delete the contents, and then copy the Autosave of your choice into it and launch the game.

https://media.discordapp.net/attachm...5/CW_Save1.png

OBarbas 08-01-21 11:43 PM

https://media.discordapp.net/attachm...720&height=126

MarkShot 10-06-22 12:45 AM

Now, if you want something that pretty much can automatically create date/time checkpointed saves. Well, you could do this. This is WinBatch.




The program below that remaps the keyboard for easy use that you can always keep one hand on the mouse; it is AutoHotKey.



IntControl(72, 0, 0, 0, 0); Normal handler (exit)
WhoAmI="CW Mgr"
If WinExist(WhoAmI)Then Exit
WinTitle(WinName(), WhoAmI)
WinHide(WhoAmI)

; ----- Definitions ------

Interval=1
FrapsEXE="C:\Program Files (x86)\Fraps\fraps.exe"
FrapsPath="C:\Program Files (x86)\Fraps"
HotKeyScript="D:\User\MK\Software\Games\Cold Waters\Utility\ColdWatersKeys.exe"
SystemTrayRestart="C:\Program Files\SystemTrayRefresh\SystemTrayRefresh.exe"
SaveDirLeft = "E:\Games\Steam Cold Waters Data\Cold Waters\savegame"
GameEXE="D:\User\MK\Software\Games\Cold Waters\Utility\CW URL launch.exe"
GamePath="E:\Games\Steam Cold Waters"
GameName="Cold Waters~"
UtilDir=DirGet()

CoveredList=""
CoveredList=StrCat(CoveredList, "E:\Games\Steam Cold Waters Data\Cold Waters\savegame\campaign001", @TAB)
CoveredList=StrCat(CoveredList, "E:\Games\Steam Cold Waters Data\Cold Waters\savegame\campaign002", @TAB)
CoveredList=StrCat(CoveredList, "E:\Games\Steam Cold Waters Data\Cold Waters\savegame\campaign003", @TAB)
CoveredList=StrCat(CoveredList, "E:\Games\Steam Cold Waters Data\Cold Waters\savegame\campaign004", @TAB)
CoveredList=StrCat(CoveredList, "E:\Games\Steam Cold Waters Data\Cold Waters\savegame\campaign005", @TAB)
CoveredList=StrCat(CoveredList, "E:\Games\Steam Cold Waters Data\Cold Waters\savegame\campaign006", @TAB)
CoveredList=StrCat(CoveredList, "E:\Games\Steam Cold Waters Data\Cold Waters\savegame\campaign007", @TAB)
CoveredList=StrCat(CoveredList, "E:\Games\Steam Cold Waters Data\Cold Waters\savegame\campaign008", @TAB)
CoveredList=StrCat(CoveredList, "E:\Games\Steam Cold Waters Data\Cold Waters\savegame\campaign009", @TAB)
CoveredList=StrCat(CoveredList, "E:\Games\Steam Cold Waters Data\Cold Waters\savegame\campaign010", @TAB)
CoveredList=StrCat(CoveredList, "E:\Games\Steam Cold Waters Data\Cold Waters\savegame\campaign011", @TAB)
CoveredList=StrCat(CoveredList, "E:\Games\Steam Cold Waters Data\Cold Waters\savegame\campaign012", @TAB)
CoveredList=StrCat(CoveredList, "E:\Games\Steam Cold Waters Data\Cold Waters\savegame\campaign013", @TAB)
CoveredList=StrCat(CoveredList, "E:\Games\Steam Cold Waters Data\Cold Waters\savegame\campaign014")
DirCount=ItemCount(CoveredList, @TAB)

; ----- See If Saves Should be Purged -----

Notice=""
Notice=Strcat(Notice, "Keep the various save directories directory? ", @CR, @CR)
Notice=Strcat(Notice, "YES = Keep all game history.", @CR)
Notice=Strcat(Notice, "No = Purge all game history.", @CR)
Notice=Strcat(Notice, "Cancel = Exit out.", @CR)
Beep
UserResponse=AskYesNo('CW Mgr', Notice)

If UserResponse==@No Then

For DirIndex = 1 to DirCount

DirName=ItemExtract(DirIndex, CoveredList, @Tab)

SourceDir=StrCat(DirName)

If DirExist(SourceDir) Then
Mask=StrCat(SourceDir, "\*.sav")
FileDelete(Mask)
Mask=StrCat(SourceDir, "\*.bat")
FileDelete(Mask)
End If

Next

EndIf

; ----- Start game ----

Run(FrapsEXE,"")
RunShell(GameEXE, "", ".", @NORMAL, @NOWAIT); must RunShell
WinWaitExist(GameName, -1)
WinActivate(GameName)
Run(HotKeyScript,"")
Delay(2)
WinActivate(GameName)
WinShow(GameName)

Delay(10)

While WinExist(GameName)

; ------- Capture Screens -----

ErrorMode(@OFF)
FileMove ("E:\FRAPS\ScreenFrap\*.jpg", "E:\FRAPS\ScreenFrap\CWFraps", @TRUE)
ErrorMode(@CANCEL)

CurrentDir=DirGet()
DirChange("E:\FRAPS\ScreenFrap\CWFraps")
ShotFileName=FileItemize("ColdWaters*.jpg")
If ShotFileName<>"" Then
CancelFlag=@False
IntControl(72, 1, 0, 0, 0); 01/26/22 fix to use error handler
Prompt=StrCat("Enter The Suffix Text")
WinShow(WhoAmI)
SaveSuffix=AskLine("SaveSuffix", Prompt, "", 0)
WinHide(WhoAmI)
Goto SKIP
:CANCEL
WinHide(WhoAmI)
CancelFlag=@True
:SKIP
If CancelFlag Then
FileDelete(ShotFileName)
Else
Base=StrSub(ShotFileName, 12, 19)
If SaveSuffix<>"" Then
NewFileName=StrCat(Base, " ", SaveSuffix, ".jpg")
Else
NewFileName=StrCat(Base, ".jpg")
End If
FileRename(ShotFileName, NewFileName)
Beep()
End If
WinActivate(GameName)
End IF
DirChange(CurrentDir)

; ------- Checkpoint Saves -----

FoundIt=@false
CurrentDir=DirGet()
For DirIndex = 1 to DirCount

DirName=ItemExtract(DirIndex, CoveredList, @Tab)

SourceDir=StrCat(DirName)

If DirExist(SourceDir) Then
DirChange(SourceDir)
Mask=StrCat(SourceDir, "\*.sav")
SaveList=FileItemize(Mask)
SaveCount=ItemCount(SaveList, @TAB)

For SaveIndex = 1 to SaveCount

SaveName=ItemExtract(SaveIndex, SaveList, @Tab)
attr=FileAttrGet(SaveName)
If StrSub(attr, 2, 1) == "A" Then
BaseName=FileTimeGetEx(SaveName, 2)
ReplaceName=StrClean(BaseName, ":", "", @False, 1)
ReplaceName=StrSub(ReplaceName, 1, 14)
ReplaceName=StrCat(StrSub(ReplaceName, 3, 6), " ", StrSub(ReplaceName, 9, 6), ".sav")
TargetName=ReplaceName
;Message("Debug1", SaveName)
;Message("Debug2", TargetName)
FileRename(SaveName, TargetName)
FileAttrSet(TargetName, "a") ; clear the flag
FoundIt=@True
SetFile="cwsetenv.bat"
If FileExist(SetFile) then ; Get rid of old output
FileDelete(SetFile)
End If
HandleOut=FileOpen(SetFile, "APPEND")
LineOut=StrCat("setx CWSAVEDIR ", '"', SourceDir, '"')
FileWrite(HandleOut, LineOut)
FileClose(HandleOut)
RunShell("cwsetenv.bat", "", "", @HIDDEN, @WAIT)
If FileExist(SetFile) then ; Get rid of old output
FileDelete(SetFile)
End If
End If

If FoundIt Then Break
Next

End If

If FoundIt Then Break
Next
DirChange(CurrentDir)

TimeDelay(Interval)
End While

; ----- Kill AutoHotKey -----

Addextender("wwprc44i.dll")

Goto SkipKill

ProgramEXE="AutoHotKey|"

Processlist=tListProc() ; get list
ptr1=StrIndexNC(processlist,ProgramEXE,0,@fwdscan)
;Message("Debug list",Processlist)

While ptr1<>0 ; terminate while processes left
ptr2=StrIndex(processlist,"|",ptr1,@fwdscan)
ptr3=StrIndex(processlist,@tab,ptr2,@fwdscan)
if ptr3==0;if last item in list
pid=Strsub(processlist,ptr2+1,-1)
ptr1=0 ; last one killed
else
pid=Strsub(processlist,ptr2+1,ptr3-ptr2-1)
ptr1=ptr3 ; set up for next process
ptr1=StrIndexNC(processlist,ProgramEXE,ptr1,@fwdsc an)
endif
;Message("Debug pid",pid)
hProcess=tOpenProc(pid,3) ; mark able to terminate
TKillProc(hProcess) ; terminate
TCloseProc(hProcess) ; terminate
End While

:SkipKill

ProgramEXE="fraps|"

Processlist=tListProc() ; get list
ptr1=StrIndexNC(processlist,ProgramEXE,0,@fwdscan)
;Message("Debug list",Processlist)

While ptr1<>0 ; terminate while processes left
ptr2=StrIndex(processlist,"|",ptr1,@fwdscan)
ptr3=StrIndex(processlist,@tab,ptr2,@fwdscan)
if ptr3==0;if last item in list
pid=Strsub(processlist,ptr2+1,-1)
ptr1=0 ; last one killed
else
pid=Strsub(processlist,ptr2+1,ptr3-ptr2-1)
ptr1=ptr3 ; set up for next process
ptr1=StrIndexNC(processlist,ProgramEXE,ptr1,@fwdsc an)
endif
;Message("Debug pid",pid)
hProcess=tOpenProc(pid,3) ; mark able to terminate
TKillProc(hProcess) ; terminate
TCloseProc(hProcess) ; terminate
End While
Delay(1)
Run(SystemTrayRestart, "")

ProgramEXE="fraps64.dat|"

Processlist=tListProc() ; get list
ptr1=StrIndexNC(processlist,ProgramEXE,0,@fwdscan)
;Message("Debug list",Processlist)

While ptr1<>0 ; terminate while processes left
ptr2=StrIndex(processlist,"|",ptr1,@fwdscan)
ptr3=StrIndex(processlist,@tab,ptr2,@fwdscan)
if ptr3==0;if last item in list
pid=Strsub(processlist,ptr2+1,-1)
ptr1=0 ; last one killed
else
pid=Strsub(processlist,ptr2+1,ptr3-ptr2-1)
ptr1=ptr3 ; set up for next process
ptr1=StrIndexNC(processlist,ProgramEXE,ptr1,@fwdsc an)
endif
;Message("Debug pid",pid)
hProcess=tOpenProc(pid,3) ; mark able to terminate
TKillProc(hProcess) ; terminate
TCloseProc(hProcess) ; terminate
End While

Delay(1)
Run(SystemTrayRestart, "")



---------------------------------


#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#SingleInstance force
#Persistent
#NoTrayIcon
SetTitleMatchMode 3

Game01 = Cold Waters

TimerInterval = 1000

SetTitleMatchMode 1
CoordMode, Mouse, Screen

SetTimer, ScriptDone, %TimerInterval%
return

ScriptDone:

IfWinNotExist,%Game01%,
ExitApp

Return

#IfWinActive, Cold Waters,

F9:: ;View Static
{
Send {LShift Down}
Sleep 300
Send {F4 Down}
Sleep 300
Send {F4 Up}
Sleep 300
Send {LShift Up}
Return
}

F10:: ;View Event
{
Send {LShift Down}
Sleep 300
Send {e Down}
Sleep 300
Send {e Up}
Sleep 300
Send {LShift Up}
Return
}

F11:: ;View Bearing
{
Send {u Down}
Sleep 300
Send {u Up}
Return
}

`:: ;HUD
{
Send {F10 Down}
Sleep 300
Send {F10 Up}
Return
}

5:: ;Cut Wire
{
Send {LShift Down}
Sleep 300
Send {4 Down}
Sleep 300
Send {4 Up}
Sleep 300
Send {LShift Up}
Return
}

6:: ;SAM
{
Send {LShift Down}
Sleep 300
Send {Space Down}
Sleep 300
Send {Space Up}
Sleep 300
Send {LShift Up}
Return
}

7:: ;Peri up/dn
{
Send {0 Down}
Sleep 300
Send {0 Up}
Return
}

8:: ;Peri view
{
Send {p Down}
Sleep 300
Send {p Up}
Return
}

0:: ;Radar up/dn
{
Send {8 Down}
Sleep 300
Send {8 Up}
Return
}

-:: ;Active Sonar
{
Send {LShift Down}
Sleep 300
Send {a Down}
Sleep 300
Send {a Up}
Sleep 300
Send {LShift Up}
Return
}

=:: ;Towed Array
{
Send {Backspace Down}
Sleep 300
Send {Backspace Up}
Return
}
Backspace:: ; Mark Kratzer
{
Send `b
Sleep 200
Sleep 200
Send M
Sleep 200
Send a
Sleep 200
Send r
Sleep 200
Send k
Sleep 200
Send {space}
Sleep 200
Send K
Sleep 200
Send r
Sleep 200
Send a
Sleep 200
Send t
Sleep 200
Send z
Sleep 200
Send e
Sleep 200
Send r
Sleep 2000
Send {Enter}
Return
}

q:: ;Decrease depth
{
Send {PgUp Down}
Sleep 50
Send {PgUp Up}
Return
}

w:: ;Decrease depth less
{
Send {LShift Down}
Sleep 50
Send {PgUp Down}
Sleep 50
Send {PgUp Up}
Sleep 50
Send {LShift Up}
Return
}

e:: ;Log
{
Send {LShift Down}
Sleep 300
Send {l Down}
Sleep 300
Send {l Up}
Sleep 300
Send {LShift Up}
Return
}

i:: ;LLTV
{
Send {o Down}
Sleep 300
Send {o Up}
Return
}

a:: ;Increase depth
{
Send {PgDn Down}
Sleep 50
Send {PgDn Up}
Return
}

s:: ;Increase depth less
{
Send {LShift Down}
Sleep 50
Send {PgDn Down}
Sleep 50
Send {PgDn Up}
Sleep 50
Send {LShift Up}
Return
}

d:: ;Previous contact
{
Send {y Down}
Sleep 300
Send {y Up}
Return
}

f:: ;Next contact
{
Send {t Down}
Sleep 300
Send {t Up}
Return
}

z:: ;Mark
Send {Control Down}
Sleep 300
Send {i Down}
Sleep 300
Send {i Up}
Sleep 300
Send {Control Up}
Return

x:: ;Manual
Send {Control Down}
Sleep 300
Send {m Down}
Sleep 300
Send {m Up}
Sleep 300
Send {Control Up}
Return

c:: ;Previous console
{
Send {; Down}
Sleep 300
Send {; Up}
Return
}

v:: ;Next console
{
Send {' Down}
Sleep 300
Send {' Up}
Return

MarkShot 10-06-22 12:52 AM

The in game help which happens by the MMB CLK brings up the following for reference.


http://www.kwlsystems.com/images/gameq/1.jpg


http://www.kwlsystems.com/images/gameq/2.jpg


http://www.kwlsystems.com/images/gameq/4.jpg


http://www.kwlsystems.com/images/gameq/5.jpg

TORDO222 10-06-22 07:24 AM

Quote:

Originally Posted by MarkShot (Post 2831142)
Now, if you want something that pretty much can automatically create date/time checkpointed saves. Well, you could do this. This is WinBatch.




The program below that remaps the keyboard for easy use that you can always keep one hand on the mouse; it is AutoHotKey.



IntControl(72, 0, 0, 0, 0); Normal handler (exit)
WhoAmI="CW Mgr"
If WinExist(WhoAmI)Then Exit
WinTitle(WinName(), WhoAmI)
WinHide(WhoAmI)

; ----- Definitions ------

Interval=1
FrapsEXE="C:\Program Files (x86)\Fraps\fraps.exe"
FrapsPath="C:\Program Files (x86)\Fraps"
HotKeyScript="D:\User\MK\Software\Games\Cold Waters\Utility\ColdWatersKeys.exe"
SystemTrayRestart="C:\Program Files\SystemTrayRefresh\SystemTrayRefresh.exe"
SaveDirLeft = "E:\Games\Steam Cold Waters Data\Cold Waters\savegame"
GameEXE="D:\User\MK\Software\Games\Cold Waters\Utility\CW URL launch.exe"
GamePath="E:\Games\Steam Cold Waters"
GameName="Cold Waters~"
UtilDir=DirGet()

CoveredList=""
CoveredList=StrCat(CoveredList, "E:\Games\Steam Cold Waters Data\Cold Waters\savegame\campaign001", @TAB)
CoveredList=StrCat(CoveredList, "E:\Games\Steam Cold Waters Data\Cold Waters\savegame\campaign002", @TAB)
CoveredList=StrCat(CoveredList, "E:\Games\Steam Cold Waters Data\Cold Waters\savegame\campaign003", @TAB)
CoveredList=StrCat(CoveredList, "E:\Games\Steam Cold Waters Data\Cold Waters\savegame\campaign004", @TAB)
CoveredList=StrCat(CoveredList, "E:\Games\Steam Cold Waters Data\Cold Waters\savegame\campaign005", @TAB)
CoveredList=StrCat(CoveredList, "E:\Games\Steam Cold Waters Data\Cold Waters\savegame\campaign006", @TAB)
CoveredList=StrCat(CoveredList, "E:\Games\Steam Cold Waters Data\Cold Waters\savegame\campaign007", @TAB)
CoveredList=StrCat(CoveredList, "E:\Games\Steam Cold Waters Data\Cold Waters\savegame\campaign008", @TAB)
CoveredList=StrCat(CoveredList, "E:\Games\Steam Cold Waters Data\Cold Waters\savegame\campaign009", @TAB)
CoveredList=StrCat(CoveredList, "E:\Games\Steam Cold Waters Data\Cold Waters\savegame\campaign010", @TAB)
CoveredList=StrCat(CoveredList, "E:\Games\Steam Cold Waters Data\Cold Waters\savegame\campaign011", @TAB)
CoveredList=StrCat(CoveredList, "E:\Games\Steam Cold Waters Data\Cold Waters\savegame\campaign012", @TAB)
CoveredList=StrCat(CoveredList, "E:\Games\Steam Cold Waters Data\Cold Waters\savegame\campaign013", @TAB)
CoveredList=StrCat(CoveredList, "E:\Games\Steam Cold Waters Data\Cold Waters\savegame\campaign014")
DirCount=ItemCount(CoveredList, @TAB)

; ----- See If Saves Should be Purged -----

Notice=""
Notice=Strcat(Notice, "Keep the various save directories directory? ", @CR, @CR)
Notice=Strcat(Notice, "YES = Keep all game history.", @CR)
Notice=Strcat(Notice, "No = Purge all game history.", @CR)
Notice=Strcat(Notice, "Cancel = Exit out.", @CR)
Beep
UserResponse=AskYesNo('CW Mgr', Notice)

If UserResponse==@No Then

For DirIndex = 1 to DirCount

DirName=ItemExtract(DirIndex, CoveredList, @Tab)

SourceDir=StrCat(DirName)

If DirExist(SourceDir) Then
Mask=StrCat(SourceDir, "\*.sav")
FileDelete(Mask)
Mask=StrCat(SourceDir, "\*.bat")
FileDelete(Mask)
End If

Next

EndIf

; ----- Start game ----

Run(FrapsEXE,"")
RunShell(GameEXE, "", ".", @NORMAL, @NOWAIT); must RunShell
WinWaitExist(GameName, -1)
WinActivate(GameName)
Run(HotKeyScript,"")
Delay(2)
WinActivate(GameName)
WinShow(GameName)

Delay(10)

While WinExist(GameName)

; ------- Capture Screens -----

ErrorMode(@OFF)
FileMove ("E:\FRAPS\ScreenFrap\*.jpg", "E:\FRAPS\ScreenFrap\CWFraps", @TRUE)
ErrorMode(@CANCEL)

CurrentDir=DirGet()
DirChange("E:\FRAPS\ScreenFrap\CWFraps")
ShotFileName=FileItemize("ColdWaters*.jpg")
If ShotFileName<>"" Then
CancelFlag=@False
IntControl(72, 1, 0, 0, 0); 01/26/22 fix to use error handler
Prompt=StrCat("Enter The Suffix Text")
WinShow(WhoAmI)
SaveSuffix=AskLine("SaveSuffix", Prompt, "", 0)
WinHide(WhoAmI)
Goto SKIP
:CANCEL
WinHide(WhoAmI)
CancelFlag=@True
:SKIP
If CancelFlag Then
FileDelete(ShotFileName)
Else
Base=StrSub(ShotFileName, 12, 19)
If SaveSuffix<>"" Then
NewFileName=StrCat(Base, " ", SaveSuffix, ".jpg")
Else
NewFileName=StrCat(Base, ".jpg")
End If
FileRename(ShotFileName, NewFileName)
Beep()
End If
WinActivate(GameName)
End IF
DirChange(CurrentDir)

; ------- Checkpoint Saves -----

FoundIt=@false
CurrentDir=DirGet()
For DirIndex = 1 to DirCount

DirName=ItemExtract(DirIndex, CoveredList, @Tab)

SourceDir=StrCat(DirName)

If DirExist(SourceDir) Then
DirChange(SourceDir)
Mask=StrCat(SourceDir, "\*.sav")
SaveList=FileItemize(Mask)
SaveCount=ItemCount(SaveList, @TAB)

For SaveIndex = 1 to SaveCount

SaveName=ItemExtract(SaveIndex, SaveList, @Tab)
attr=FileAttrGet(SaveName)
If StrSub(attr, 2, 1) == "A" Then
BaseName=FileTimeGetEx(SaveName, 2)
ReplaceName=StrClean(BaseName, ":", "", @False, 1)
ReplaceName=StrSub(ReplaceName, 1, 14)
ReplaceName=StrCat(StrSub(ReplaceName, 3, 6), " ", StrSub(ReplaceName, 9, 6), ".sav")
TargetName=ReplaceName
;Message("Debug1", SaveName)
;Message("Debug2", TargetName)
FileRename(SaveName, TargetName)
FileAttrSet(TargetName, "a") ; clear the flag
FoundIt=@True
SetFile="cwsetenv.bat"
If FileExist(SetFile) then ; Get rid of old output
FileDelete(SetFile)
End If
HandleOut=FileOpen(SetFile, "APPEND")
LineOut=StrCat("setx CWSAVEDIR ", '"', SourceDir, '"')
FileWrite(HandleOut, LineOut)
FileClose(HandleOut)
RunShell("cwsetenv.bat", "", "", @HIDDEN, @WAIT)
If FileExist(SetFile) then ; Get rid of old output
FileDelete(SetFile)
End If
End If

If FoundIt Then Break
Next

End If

If FoundIt Then Break
Next
DirChange(CurrentDir)

TimeDelay(Interval)
End While

; ----- Kill AutoHotKey -----

Addextender("wwprc44i.dll")

Goto SkipKill

ProgramEXE="AutoHotKey|"

Processlist=tListProc() ; get list
ptr1=StrIndexNC(processlist,ProgramEXE,0,@fwdscan)
;Message("Debug list",Processlist)

While ptr1<>0 ; terminate while processes left
ptr2=StrIndex(processlist,"|",ptr1,@fwdscan)
ptr3=StrIndex(processlist,@tab,ptr2,@fwdscan)
if ptr3==0;if last item in list
pid=Strsub(processlist,ptr2+1,-1)
ptr1=0 ; last one killed
else
pid=Strsub(processlist,ptr2+1,ptr3-ptr2-1)
ptr1=ptr3 ; set up for next process
ptr1=StrIndexNC(processlist,ProgramEXE,ptr1,@fwdsc an)
endif
;Message("Debug pid",pid)
hProcess=tOpenProc(pid,3) ; mark able to terminate
TKillProc(hProcess) ; terminate
TCloseProc(hProcess) ; terminate
End While

:SkipKill

ProgramEXE="fraps|"

Processlist=tListProc() ; get list
ptr1=StrIndexNC(processlist,ProgramEXE,0,@fwdscan)
;Message("Debug list",Processlist)

While ptr1<>0 ; terminate while processes left
ptr2=StrIndex(processlist,"|",ptr1,@fwdscan)
ptr3=StrIndex(processlist,@tab,ptr2,@fwdscan)
if ptr3==0;if last item in list
pid=Strsub(processlist,ptr2+1,-1)
ptr1=0 ; last one killed
else
pid=Strsub(processlist,ptr2+1,ptr3-ptr2-1)
ptr1=ptr3 ; set up for next process
ptr1=StrIndexNC(processlist,ProgramEXE,ptr1,@fwdsc an)
endif
;Message("Debug pid",pid)
hProcess=tOpenProc(pid,3) ; mark able to terminate
TKillProc(hProcess) ; terminate
TCloseProc(hProcess) ; terminate
End While
Delay(1)
Run(SystemTrayRestart, "")

ProgramEXE="fraps64.dat|"

Processlist=tListProc() ; get list
ptr1=StrIndexNC(processlist,ProgramEXE,0,@fwdscan)
;Message("Debug list",Processlist)

While ptr1<>0 ; terminate while processes left
ptr2=StrIndex(processlist,"|",ptr1,@fwdscan)
ptr3=StrIndex(processlist,@tab,ptr2,@fwdscan)
if ptr3==0;if last item in list
pid=Strsub(processlist,ptr2+1,-1)
ptr1=0 ; last one killed
else
pid=Strsub(processlist,ptr2+1,ptr3-ptr2-1)
ptr1=ptr3 ; set up for next process
ptr1=StrIndexNC(processlist,ProgramEXE,ptr1,@fwdsc an)
endif
;Message("Debug pid",pid)
hProcess=tOpenProc(pid,3) ; mark able to terminate
TKillProc(hProcess) ; terminate
TCloseProc(hProcess) ; terminate
End While

Delay(1)
Run(SystemTrayRestart, "")



---------------------------------


#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#SingleInstance force
#Persistent
#NoTrayIcon
SetTitleMatchMode 3

Game01 = Cold Waters

TimerInterval = 1000

SetTitleMatchMode 1
CoordMode, Mouse, Screen

SetTimer, ScriptDone, %TimerInterval%
return

ScriptDone:

IfWinNotExist,%Game01%,
ExitApp

Return

#IfWinActive, Cold Waters,

F9:: ;View Static
{
Send {LShift Down}
Sleep 300
Send {F4 Down}
Sleep 300
Send {F4 Up}
Sleep 300
Send {LShift Up}
Return
}

F10:: ;View Event
{
Send {LShift Down}
Sleep 300
Send {e Down}
Sleep 300
Send {e Up}
Sleep 300
Send {LShift Up}
Return
}

F11:: ;View Bearing
{
Send {u Down}
Sleep 300
Send {u Up}
Return
}

`:: ;HUD
{
Send {F10 Down}
Sleep 300
Send {F10 Up}
Return
}

5:: ;Cut Wire
{
Send {LShift Down}
Sleep 300
Send {4 Down}
Sleep 300
Send {4 Up}
Sleep 300
Send {LShift Up}
Return
}

6:: ;SAM
{
Send {LShift Down}
Sleep 300
Send {Space Down}
Sleep 300
Send {Space Up}
Sleep 300
Send {LShift Up}
Return
}

7:: ;Peri up/dn
{
Send {0 Down}
Sleep 300
Send {0 Up}
Return
}

8:: ;Peri view
{
Send {p Down}
Sleep 300
Send {p Up}
Return
}

0:: ;Radar up/dn
{
Send {8 Down}
Sleep 300
Send {8 Up}
Return
}

-:: ;Active Sonar
{
Send {LShift Down}
Sleep 300
Send {a Down}
Sleep 300
Send {a Up}
Sleep 300
Send {LShift Up}
Return
}

=:: ;Towed Array
{
Send {Backspace Down}
Sleep 300
Send {Backspace Up}
Return
}
Backspace:: ; Mark Kratzer
{
Send `b
Sleep 200
Sleep 200
Send M
Sleep 200
Send a
Sleep 200
Send r
Sleep 200
Send k
Sleep 200
Send {space}
Sleep 200
Send K
Sleep 200
Send r
Sleep 200
Send a
Sleep 200
Send t
Sleep 200
Send z
Sleep 200
Send e
Sleep 200
Send r
Sleep 2000
Send {Enter}
Return
}

q:: ;Decrease depth
{
Send {PgUp Down}
Sleep 50
Send {PgUp Up}
Return
}

w:: ;Decrease depth less
{
Send {LShift Down}
Sleep 50
Send {PgUp Down}
Sleep 50
Send {PgUp Up}
Sleep 50
Send {LShift Up}
Return
}

e:: ;Log
{
Send {LShift Down}
Sleep 300
Send {l Down}
Sleep 300
Send {l Up}
Sleep 300
Send {LShift Up}
Return
}

i:: ;LLTV
{
Send {o Down}
Sleep 300
Send {o Up}
Return
}

a:: ;Increase depth
{
Send {PgDn Down}
Sleep 50
Send {PgDn Up}
Return
}

s:: ;Increase depth less
{
Send {LShift Down}
Sleep 50
Send {PgDn Down}
Sleep 50
Send {PgDn Up}
Sleep 50
Send {LShift Up}
Return
}

d:: ;Previous contact
{
Send {y Down}
Sleep 300
Send {y Up}
Return
}

f:: ;Next contact
{
Send {t Down}
Sleep 300
Send {t Up}
Return
}

z:: ;Mark
Send {Control Down}
Sleep 300
Send {i Down}
Sleep 300
Send {i Up}
Sleep 300
Send {Control Up}
Return

x:: ;Manual
Send {Control Down}
Sleep 300
Send {m Down}
Sleep 300
Send {m Up}
Sleep 300
Send {Control Up}
Return

c:: ;Previous console
{
Send {; Down}
Sleep 300
Send {; Up}
Return
}

v:: ;Next console
{
Send {' Down}
Sleep 300
Send {' Up}
Return

Good Job!.we will test. Thanks!.Greetings!:up:

TORDO222 10-06-22 07:25 AM

Quote:

Originally Posted by OBarbas (Post 2760672)

Good Job!.Thanks!.Greetings!:up:

JerseySeven 11-01-22 07:11 PM

Just saw this... Fantastic! One of the things limiting my plays of Cold Waters has been the inability to save during the campaign. At this stage in life I have maybe 1.5 hours of uninterrupted gaming time in a single session. I can't finish an entire campaign mission in this time.
I'll be giving this a try. It may be just the thing I need!


All times are GMT -5. The time now is 03:46 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 1995- 2024 Subsim®
"Subsim" is a registered trademark, all rights reserved.