tiger@sound.net on 11/4/2006 at 10:17
(I have stumbled and mumbled through jtbalogh's AutoHotKey logic for several days, now. And then I finally got lucky with the start of something that some might want to play-test, hopefully?)
I am using T3 standards, pretty much, with Run as the normal default.
But some of the normal keys, in my options.ini, are set to "None".
While some other slightly hidden NumPad ones are being used, now.
(And I never need to use those NumPad keys, BTW.) :)
Code:
Shift=None
Ctrl=None
Alt=None
NumPad1=Walk
NumPad2=Creep
NumPad3=Crouch
My T3-Shift_Ctrl_Toggles.ahk, for AutoHotKey, from jtbalogh's logic.
(BTW, I used double Sends to help guarantee a key's change.)
Code:
#SingleInstance force ;force a single instance
#HotkeyInterval 0 ;disable the warning dialog if a key is held down
#MaxHotkeysPerInterval 500 ;help respond to mouse
#MaxThreads 20 ;use 20 (the max) instead of 10 threads
#InstallKeybdHook ;forces the unconditional installation of the keyboard hook
#UseHook On ;not interfere with numpad, and increase responsiveness
SetBatchLines, -1 ;makes the script run at max speed
SetKeyDelay, -1, -1 ;fastest response (might be better with -1, 0)
SetMouseDelay, -1
SetWinDelay, -1
mMoveRun := 0
mMoveWalk := 1
mMoveCreep := 1
mMoveMax = 1
isShift := False
mMoveState1 := 0
isCtrl := False
mMoveState2 := 0
; reset stuck keys
Send, {NumPad1 up}
Send, {NumPad2 up}
Send, {NumPad3 up}
return
ExitSub:
ExitApp ;The only way for an OnExit script to terminate itself is to use ExitApp
#ifWinActive, Thief - Deadly Shadows ; name of game in taskbar
Shift::
if (isShift == False) {
isShift := True ; run once
mMoveState1 := mMoveState1 + 1
if (mMoveState1 > mMoveMax)
mMoveState1 := 0
if (mMoveState1 == mMoveRun) {
Send, {NumPad1 up}{NumPad1 up} ; releasing walk
} else if (mMoveState1 == mMoveWalk) {
Send, {NumPad1 down}{NumPad1 down} ; holding walk
Send, {NumPad2 up}{NumPad2 up} ; releasing creep
mMoveState2 := 0
}
}
Shift up::
isShift := False ; reset
return
Ctrl::
if (isCtrl == False) {
isCtrl := True ; run once
mMoveState2 := mMoveState2 + 1
if (mMoveState2 > mMoveMax)
mMoveState2 := 0
if (mMoveState2 == mMoveRun) {
Send, {NumPad2 up}{NumPad2 up} ; releasing creep
} else if (mMoveState2 == mMoveCreep) {
Send, {NumPad2 down}{NumPad2 down} ; holding creep
Send, {NumPad1 up}{NumPad1 up} ; releasing walk
mMoveState1 := 0
}
}
Ctrl up::
isCtrl := False ; reset
return
Alt::
Send, {NumPad1 up}{NumPad1 up} ; releasing walk
mMoveState1 := 0
Send, {NumPad2 up}{NumPad2 up} ; releasing creep
mMoveState2 := 0
Send, {NumPad3 down}{NumPad3 down}{NumPad3 up}{NumPad3 up} ; toggle crouch
return
Also you might notice, during your gameplay, that Crouch resets my Walk or Creep back to a normal Run mode. (But you can still use my Walk or Creep, with Crouch, if you want much slower crouching movements.) You can switch between Walk and Creep rather freely. But pressing Walk or Creep, twice in a row, will return you back to Run mode, just like a normal toggle-key should react.
Jumping will get you out of a normal Crouch, but not with the Walk or Creep modes included while crouching. Plus carrying anything seems to do the very same thing.
So, now, I need an opinion about these play-oriented situations with jumping or carrying and about my rather shabby AutoHotKey logic, of course.
Thanks! :)
... Jim ...
jtbalogh on 11/4/2006 at 13:32
Hey Clyp, you can read,
(
http://www.tweakguides.com/TDS_1.html)
(
http://www.ttlg.com/forums/showthread.php?t=84672)
For the little program Tiger, it works okay. You will not need to duplicate keystrokes like, {NumPad2 up}{NumPad2 up}, so remove all duplicates. (You can edit your post with the corrections if you like, and put a note or new post that you modified it). Also, put a warning not to switch to the desktop or menu because keys will get stuck. Eventually you will need a timer, an Escape routine and a different way to reset keys to handle that. It will also be easier to code in the long run if you use boolean instead of integer to track keys, since you are using regular toggle now instead of four-way. You also can also use the same keys and not need extra Numpads to handle it, since program intercepts keys and reprograms them. (I could PM you later with solution.)
BTW, you might label a name to your little program, "set run, walk, creep keys to toggle".
tiger@sound.net on 11/4/2006 at 22:24
Thank you, jtbalogh, for your interests in my little mess-ter-piece. :cool:
(Now, I'll go and make changes and then test them, the best that I can.)
And yes, I have noticed that my little AutoHotKey logic will want to stay active, even after I exit my T3 game. (And I am very lucky that my Alt-key seems to make things right, again, in Windows.)
And, of course, that same Alt-key works extremely well as a very quick "escape key", for those extra modes, when you are climbing or carrying something.
BTW, it seems that those extra-slow Walk and Creep modes are helping me, with my slow backward-drops from these T3 edges. ;)
And to jtbalogh, any and all help will be appreciated! So, Thanks!:thumb:
(PS I will gladly delete my "masterpiece" for your more masterful one?)
... Jim Nada... aka [email]tiger@sound.net[/email]
tiger@sound.net on 12/4/2006 at 03:25
For testing towards this version of my T3-Shift_Ctrl_Toggles.ahk . . .
First, I simply added those keys, back into my options.ini.
Quote:
Shift=Walk
Ctrl=Creep
Alt=Crouch
(And no problems, there and really no need, either, btw.)
Second, I removed the second Send of a keystroke, so then
"Send, {NumPad1 up}{NumPad1 up}" simply became "Send, {NumPad1 up}".
(And then it seemed to slip keystokes, now and then, when changing quickly.)
Third, I took out those NumPad keys and replaced them with the normal ones.
And you'll find those changes in T3-Shift_Ctrl_Toggles.ahk-with-problems.zip.
But, now for me,
it will lock-down the Shift key, permanently, until I exit the game and reset it.
And it will either ignore the toggle or simply lock-down the Ctrl-key.
But the Alt-key works, which might be the results of the T3's built-in toggle?
So, maybe, your results will differ, folks? :cool:
(BTW, I have an old HP with a simple keyboard serial-line connection.)
And yes, all of my Accessibility Options are turned off, in my Windows XP Pro.
... Jim Nada... (tiger@sound.net)
(
http://www.myfilelink.co.uk/file.aspx?id=13a341020fa047f4b6083c955daa82c0) T3-Shift_Ctrl_Toggles.ahk-with-problems.zip
jtbalogh on 12/4/2006 at 23:45
Did the PM I sent you clear things up?
tiger@sound.net on 13/4/2006 at 02:14
Quote Posted by jtbalogh
Did the PM I sent you clear things up?
Yes, it did. (As well as this AutoHotKey newbie can understand it.) :cool:
I tested it, several times and I noticed that only the Crouch key will release both the Walk and Creep modes for the normal default of Run.
(Was this a part of your "master plan"?)
ie: I couldn't simply press Walk, once to get it to toggle "on" and then twice to toggle it to "off", like my first T3-Shift_Ctrl_Toggles.ahk can do, btw.
(But if you want I will try my best to incorperate this normal "toggle action"?)
Thanks! :thumb:
jtbalogh on 13/4/2006 at 06:49
My test indicates it works. See my PM. (To verify, looks like shift was walk/run, ctrl was creep, alt was crouch. For a vanilla T3 install, creep may need tweaking to be noticible.)
jtbalogh on 14/4/2006 at 02:13
I am glad your game is working. Have fun thieving. :cheeky:
RavynousHunter on 14/4/2006 at 02:24
ive found a value in ::default.ini:: under the [Physics] section, called ::MaxZForMantle:: (default val is 5), and i was wondering if any one of you have edited this before and noted its effects. because it would be cool if you could make Garrett able to mantle anything, despite heigt. :)