Presenting my latest GG series fix

A complete overhaul and re-development of Gary Grigsby's War in the East, with a focus on improvements to historical accuracy, realism, user interface and AI.

Moderator: Joel Billings

Post Reply
MarkShot
Posts: 7552
Joined: Sat Mar 29, 2003 6:04 am

Presenting my latest GG series fix

Post by MarkShot »

What does it do?

Well if you make one slight change for WITE-2; a simpler form of this supports multiple monitors running in window giving you the the same scrolling as full screen. No problem on the left and right with a second or third display.

And for the ultimate in "backward compatibility" you may have noticed WITW when you press SHIFT for deliberate or hasty attack, it only updates the icon, but not the CV as in WITE-2. Now, it behaves just like WITE-2.

You'll need to know AHK, or I offer this to Matrix as a beta since 2003 to include with the two games for better hardware compatibility and UI for the player community.

=====================================

Game01 = War in the West 1.

TimerInterval = 50

SetTitleMatchMode 1
CoordMode, Mouse, Screen

Pressed = 0
Sleep, 30000
;SysGet, MonCnt, MonitorCount
;If MonCnt==1
; ExitApp
SetTimer, ScriptDone, %TimerInterval%
SetTimer, WatchCursor, %TimerInterval%
return

ScriptDone:

IfWinNotExist,%Game01%,
ExitApp

Return

WatchCursor:

IfWinActive, %Game01%
{
SysGet, Screen, Monitor,
MouseGetPos, XPos, YPos
If (XPos > ScreenRight)
{
MouseMove, ScreenRight+5, %YPos%
}
If (XPos < ScreenLeft)
{
MouseMove, ScreenLeft-5, %YPos%
}
if GetKeyState("LShift")
{
If Pressed = 0
{
MouseMove, XPos+1, YPos+1
Pressed = 1
}
}
else
{
If Pressed = 1
{
MouseMove, XPos-1, YPos-1
Pressed = 0
}
}
}
return
2021 - Resigned in writing as a 20+ year Matrix Beta and never looked back ...
Teo41_ITA
Posts: 517
Joined: Thu Sep 02, 2021 12:45 pm

RE: Presenting my latest GG series fix

Post by Teo41_ITA »

Thank you!!!! It's so annoying all the time to deactivate my laptop's monitor to avoid struggling with the mouse left and right!
MarkShot
Posts: 7552
Joined: Sat Mar 29, 2003 6:04 am

RE: Presenting my latest GG series fix

Post by MarkShot »

Basically, I detect the pixel bounds of the display the game is running on. When you go off current device, it puts the mouse back to the 5 pixel guard zone that forces scrolling. Click on the task bar or some other window to free your mouse for the other displays.

As for WITW, you need jiggle the mouse to update the CV value. My code detects the change in the shift state of the left shift and moves the mouse one pixel which forces a refresh. You cannot tell that the difference between WITW and WITE-2.
2021 - Resigned in writing as a 20+ year Matrix Beta and never looked back ...
MarkShot
Posts: 7552
Joined: Sat Mar 29, 2003 6:04 am

RE: Presenting my latest GG series fix

Post by MarkShot »

How cool would this be? Every quick save gave a check point. Thus within a turn, you could with just single key you could make multiple saves.

This is not AHK, but WinBatch ...

CurrentDir=DirGet()
DirChange(GameSaveDir)
If FileItemize(SaveTemplate)<>"" Then
RunWait(Delay250, "")
FileHandle=FileOpen(SaveTemplate, "APPEND", @TRUE, 60); stabilize
RunWait(Delay250, "")
FileClose(FileHandle)
RunWait(Delay250, "")
PartSaveName=FileItemize(SaveTemplate)
Base=TimeYmdHms()
NewBase1=StrSub(Base, 3, 17)
NewBase2=StrReplace(NewBase1, ":", "")
NewBase3=StrCat("Quick ",StrSub(NewBase2,1,6)," ",StrSub(NewBase2,7,6))
NewBase4=StrCat(NewBase3, ".sav")
FileRename(PartSaveName, NewBase4)
Beep()
Delay(1)
Beep()
End IF
DirChange(CurrentDir)



Image
Attachments
20211014 175948.jpg
20211014 175948.jpg (419.61 KiB) Viewed 200 times
2021 - Resigned in writing as a 20+ year Matrix Beta and never looked back ...
MarkShot
Posts: 7552
Joined: Sat Mar 29, 2003 6:04 am

RE: Presenting my latest GG series fix

Post by MarkShot »

The save is detected. You wait to the game is finished writing it. Then, you rename with a time stamp. Some WITE-2 turn constructions can be quite time consuming. One might even make a mistake.
2021 - Resigned in writing as a 20+ year Matrix Beta and never looked back ...
Post Reply

Return to “Gary Grigsby's War in the East 2”