SUBSIM Radio Room Forums



SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Current crop of subsims & naval games > COLD WATERS
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 09-19-18, 10:54 AM   #1
EM1(SS)
Bilge Rat
 
Join Date: Dec 2017
Posts: 1
Downloads: 32
Uploads: 0
Default 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.
EM1(SS) is offline   Reply With Quote
Old 09-20-18, 07:45 AM   #2
CDR DPH
Helmsman
 
Join Date: Jun 2018
Posts: 101
Downloads: 18
Uploads: 0


Default

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.
CDR DPH is offline   Reply With Quote
Old 09-20-18, 10:46 AM   #3
Delgard
Skipper
 
Delgard's Avatar
 
Join Date: Oct 2004
Location: AZ & DC
Posts: 487
Downloads: 48
Uploads: 0
Default

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.
Delgard is offline   Reply With Quote
Old 09-22-18, 08:47 AM   #4
CDR DPH
Helmsman
 
Join Date: Jun 2018
Posts: 101
Downloads: 18
Uploads: 0


Default

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.
CDR DPH is offline   Reply With Quote
Old 09-22-18, 10:34 AM   #5
Aktungbby
Gefallen Engel U-666
 
Aktungbby's Avatar
 
Join Date: Jul 2013
Location: On a tilted, overheated, overpopulated spinning mudball on Collision course with Andromeda Galaxy
Posts: 27,706
Downloads: 22
Uploads: 0


Default welcome aboard!

EM1(SS)!
__________________

"Only two things are infinite; The Universe and human squirrelyness; and I'm not too sure about the Universe"
Aktungbby is offline   Reply With Quote
Old 08-01-21, 11:38 PM   #6
OBarbas
Watch
 
Join Date: Jun 2007
Posts: 22
Downloads: 22
Uploads: 0
Default 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.

OBarbas is offline   Reply With Quote
Old 08-01-21, 11:43 PM   #7
OBarbas
Watch
 
Join Date: Jun 2007
Posts: 22
Downloads: 22
Uploads: 0
Default

OBarbas is offline   Reply With Quote
Old 10-06-22, 12:45 AM   #8
MarkShot
Ace of the Deep
 
Join Date: Jul 2002
Posts: 1,134
Downloads: 93
Uploads: 0
Default

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
__________________
War games, not wars! --- Only a small few profit from war (that should not stand)!
MarkShot is offline   Reply With Quote
Old 10-06-22, 12:52 AM   #9
MarkShot
Ace of the Deep
 
Join Date: Jul 2002
Posts: 1,134
Downloads: 93
Uploads: 0
Default

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











__________________
War games, not wars! --- Only a small few profit from war (that should not stand)!
MarkShot is offline   Reply With Quote
Old 10-06-22, 07:24 AM   #10
TORDO222
Machinist's Mate
 
Join Date: Jul 2012
Location: Argentina - Entre Rios
Posts: 129
Downloads: 166
Uploads: 23


Default

Quote:
Originally Posted by MarkShot View Post
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!
__________________
"Fire!!! that the People look at us! " - Admiral Guillermo Brown.
Order prior to the "Battle of Los Pozos" that took place on June 11,1826 in the Rio de La Plata,in front of the city of Buenos Aires, in an area of relative greater depth and to the view from the population. Was a combat between a flimsy Argentine Squadron and the powerfull Brazilian Empire Fleet.It was a victorious day for the Argentine navy.William Brown was the first Admiral of the newly formed Argentine Navy.Born in Ireland and argentine by adoption.A great patriot.
TORDO222 is offline   Reply With Quote
Old 10-06-22, 07:25 AM   #11
TORDO222
Machinist's Mate
 
Join Date: Jul 2012
Location: Argentina - Entre Rios
Posts: 129
Downloads: 166
Uploads: 23


Default

Quote:
Originally Posted by OBarbas View Post
Good Job!.Thanks!.Greetings!
__________________
"Fire!!! that the People look at us! " - Admiral Guillermo Brown.
Order prior to the "Battle of Los Pozos" that took place on June 11,1826 in the Rio de La Plata,in front of the city of Buenos Aires, in an area of relative greater depth and to the view from the population. Was a combat between a flimsy Argentine Squadron and the powerfull Brazilian Empire Fleet.It was a victorious day for the Argentine navy.William Brown was the first Admiral of the newly formed Argentine Navy.Born in Ireland and argentine by adoption.A great patriot.
TORDO222 is offline   Reply With Quote
Old 11-01-22, 07:11 PM   #12
JerseySeven
Random#
 
JerseySeven's Avatar
 
Join Date: Apr 2005
Location: TX
Posts: 73
Downloads: 142
Uploads: 0
Default

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!
JerseySeven is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 06:11 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.