Jump to content

Throttle Decay Done Right


10 replies to this topic

#1 ManDaisy

    Member

  • PipPipPipPipPipPipPipPipPip
  • Elite Founder
  • Elite Founder
  • 3,272 posts
  • LocationKing Of Flower Beds

Posted 04 December 2013 - 12:20 PM

Edit:Got it working... apparently has to be run in administrative mode in windows 7.

Version 2.28 autoit Code;
NOT AUTOHOTKEY CODE.

; Press Esc to terminate script,
HotKeySet("{ESC}", "Terminate")

Global $LastKnownKey = 10000


#include <Misc.au3> ;Version 2.28 autoit... Contains _IsPressed Logic
Local $hDLL = DllOpen("user32.dll")

AutoItSetOption( "SendAttachMode", 1 )
SendKeepActive("[CLASS:MechWarrior Online]" )
SendKeepActive("[CLASS:CryENGINE]")



While 1

;_IsPressed
;60 Numeric keypad 0 key
;61 Numeric keypad 1 key
;62 Numeric keypad 2 key
;63 Numeric keypad 3 key
;64 Numeric keypad 4 key
;65 Numeric keypad 5 key
;66 Numeric keypad 6 key
;67 Numeric keypad 7 key
;68 Numeric keypad 8 key
;69 Numeric keypad 9 key
;57 W key
;53 S key


;Records your last know Throttle
If _IsPressed("60",$hDLL) Then
$LastKnownKey = 0
ElseIf _IsPressed("61",$hDLL) Then
$LastKnownKey = 1
ElseIf _IsPressed("62",$hDLL) Then
$LastKnownKey = 2
ElseIf _IsPressed("63",$hDLL) Then
$LastKnownKey = 3
ElseIf _IsPressed("64",$hDLL) Then
$LastKnownKey = 4
ElseIf _IsPressed("65",$hDLL) Then
$LastKnownKey = 5
ElseIf _IsPressed("66",$hDLL) Then
$LastKnownKey = 6
ElseIf _IsPressed("67",$hDLL) Then
$LastKnownKey = 7
ElseIf _IsPressed("68",$hDLL) Then
$LastKnownKey = 8
ElseIf _IsPressed("69",$hDLL) Then
$LastKnownKey = 9
EndIf

;Resets your Throttle
If _IsPressed("57",$hDLL) Then
While _IsPressed("57", $hDLL)
Sleep(250)
WEnd
ResetThrottle()

ElseIf _IsPressed("53",$hDLL) Then
While _IsPressed("53", $hDLL)
Sleep(250)
WEnd
ResetThrottle()
EndIf

WEnd




;;;;;;;;

Func ResetThrottle()

If $LastKnownKey = 0 Then
Send ("{NUMPAD0}")
ElseIf $LastKnownKey = 1 Then
Send ("{NUMPAD1}")
ElseIf $LastKnownKey = 2 Then
Send ("{NUMPAD2}")
ElseIf $LastKnownKey = 3 Then
Send ("{NUMPAD3}")
ElseIf $LastKnownKey = 4 Then
Send ("{NUMPAD4}")
ElseIf $LastKnownKey = 5 Then
Send ("{NUMPAD5}")
ElseIf $LastKnownKey = 6 Then
Send ("{NUMPAD6}")
ElseIf $LastKnownKey = 7 Then
Send ("{NUMPAD7}")
ElseIf $LastKnownKey = 8 Then
Send ("{NUMPAD8}")
ElseIf $LastKnownKey = 9 Then
Send ("{NUMPAD9}")
EndIf

EndFunc

Func Terminate()
Exit 0
EndFunc ;==>Terminate


Currently throttle decay sucks because its either hold down w or you go back to zero. Its hardly ever used. But what if it didn't do that? Imagine if you had preset your throttle to 50%, using the numpad, then when you needed a little speed boost you held w to thottle up, and when you let go it decayed back to 50% instead of zero, the number that you had preset before. I think this would improve controls greatly for everyone.

Edited by ManDaisy, 04 December 2013 - 03:06 PM.


#2 Mechteric

    Member

  • PipPipPipPipPipPipPipPipPipPip
  • Overlord
  • Overlord
  • 7,308 posts
  • LocationRTP, NC

Posted 04 December 2013 - 12:33 PM

that just sounds like cruise control on a car

but I don't see how it would really add much value, since usually stopping is more important than coming back to X% speed, cuz you know you might not wanna go past that hill and get a face full of AC20.

Edited by CapperDeluxe, 04 December 2013 - 12:35 PM.


#3 ManDaisy

    Member

  • PipPipPipPipPipPipPipPipPip
  • Elite Founder
  • Elite Founder
  • 3,272 posts
  • LocationKing Of Flower Beds

Posted 04 December 2013 - 12:40 PM

Because I'm such a nice guy, I'll actually let people try it so they can bow down and see how superior my controls are. I'll be whipping together a little auto it script, very simple and basic, and posting it here in a couple days. Trust me it makes a hell of a lot of difference for keyboard users.

Hopefully... things work out ok, dunno if mwo has anything against key_press, or send_key.

Edited by ManDaisy, 04 December 2013 - 12:42 PM.


#4 ManDaisy

    Member

  • PipPipPipPipPipPipPipPipPip
  • Elite Founder
  • Elite Founder
  • 3,272 posts
  • LocationKing Of Flower Beds

Posted 04 December 2013 - 12:44 PM

View PostCapperDeluxe, on 04 December 2013 - 12:33 PM, said:

that just sounds like cruise control on a car

but I don't see how it would really add much value, since usually stopping is more important than coming back to X% speed, cuz you know you might not wanna go past that hill and get a face full of AC20.



Ah yeah, in that case you'd just switch to 0% throttle to come to a full stop wouldn't you? You still would not be holding w down so nothing should keep you going.

Edited by ManDaisy, 04 December 2013 - 12:44 PM.


#5 Bhael Fire

    Banned - Cheating

  • PipPipPipPipPipPipPipPipPip
  • Ace Of Spades
  • Ace Of Spades
  • 4,002 posts
  • Twitter: Link
  • Twitch: Link
  • LocationThe Outback wastes of planet Outreach.

Posted 04 December 2013 - 12:55 PM

I'd pretty much keep default at 0 kph and just use throttle decay as is.

Whenever I'm not using throttle decay and I need to fluctuate speed while using cruise on the number pad I just press the next higher/lower number.

In other words, you get the same functionality of the OP's suggestion using the numpad.

#6 Corvus Antaka

    Member

  • PipPipPipPipPipPipPipPipPipPip
  • Knight Errant
  • Knight Errant
  • 8,310 posts
  • Twitch: Link
  • LocationInner Sphere

Posted 04 December 2013 - 01:01 PM

dont use throttle decay.

#7 ManDaisy

    Member

  • PipPipPipPipPipPipPipPipPip
  • Elite Founder
  • Elite Founder
  • 3,272 posts
  • LocationKing Of Flower Beds

Posted 04 December 2013 - 01:22 PM

View PostColonel Pada Vinson, on 04 December 2013 - 01:01 PM, said:

dont use throttle decay.


I'm gonna post it, use it, try it , and see if you like it. Trust me its a good feel. I'll give ya a reason to use throttle decay.

Edited by ManDaisy, 04 December 2013 - 01:22 PM.


#8 BigTaeng

    Member

  • PipPipPipPipPipPip
  • Star Colonel V
  • Star Colonel V
  • 307 posts
  • LocationBotany Bay

Posted 04 December 2013 - 01:23 PM

What exactly is the point? Sounds to me you bascially wrote a script that does exactly what you can do already if you turn throttle decay off.

What am I missing here?

#9 ManDaisy

    Member

  • PipPipPipPipPipPipPipPipPip
  • Elite Founder
  • Elite Founder
  • 3,272 posts
  • LocationKing Of Flower Beds

Posted 04 December 2013 - 01:45 PM

A lot actually. it gives an organic feel to movement. But please! Let me post the script before you make up your minds!

#10 ManDaisy

    Member

  • PipPipPipPipPipPipPipPipPip
  • Elite Founder
  • Elite Founder
  • 3,272 posts
  • LocationKing Of Flower Beds

Posted 04 December 2013 - 02:48 PM

Edit:Got it working... apparently has to be run in administrative mode in windows 7.




; Press Esc to terminate script,
HotKeySet("{ESC}", "Terminate")

Global $LastKnownKey = 10000


#include <Misc.au3> ;Version 2.28 autoit... Contains _IsPressed Logic
Local $hDLL = DllOpen("user32.dll")

AutoItSetOption( "SendAttachMode", 1 )
SendKeepActive("[CLASS:MechWarrior Online]" )
SendKeepActive("[CLASS:CryENGINE]")



While 1

;_IsPressed
;60 Numeric keypad 0 key
;61 Numeric keypad 1 key
;62 Numeric keypad 2 key
;63 Numeric keypad 3 key
;64 Numeric keypad 4 key
;65 Numeric keypad 5 key
;66 Numeric keypad 6 key
;67 Numeric keypad 7 key
;68 Numeric keypad 8 key
;69 Numeric keypad 9 key
;57 W key
;53 S key


;Records your last know Throttle
If _IsPressed("60",$hDLL) Then
$LastKnownKey = 0
ElseIf _IsPressed("61",$hDLL) Then
$LastKnownKey = 1
ElseIf _IsPressed("62",$hDLL) Then
$LastKnownKey = 2
ElseIf _IsPressed("63",$hDLL) Then
$LastKnownKey = 3
ElseIf _IsPressed("64",$hDLL) Then
$LastKnownKey = 4
ElseIf _IsPressed("65",$hDLL) Then
$LastKnownKey = 5
ElseIf _IsPressed("66",$hDLL) Then
$LastKnownKey = 6
ElseIf _IsPressed("67",$hDLL) Then
$LastKnownKey = 7
ElseIf _IsPressed("68",$hDLL) Then
$LastKnownKey = 8
ElseIf _IsPressed("69",$hDLL) Then
$LastKnownKey = 9
EndIf

;Resets your Throttle
If _IsPressed("57",$hDLL) Then
While _IsPressed("57", $hDLL)
Sleep(250)
WEnd
ResetThrottle()

ElseIf _IsPressed("53",$hDLL) Then
While _IsPressed("53", $hDLL)
Sleep(250)
WEnd
ResetThrottle()
EndIf

WEnd




;;;;;;;;

Func ResetThrottle()

If $LastKnownKey = 0 Then
Send ("{NUMPAD0}")
ElseIf $LastKnownKey = 1 Then
Send ("{NUMPAD1}")
ElseIf $LastKnownKey = 2 Then
Send ("{NUMPAD2}")
ElseIf $LastKnownKey = 3 Then
Send ("{NUMPAD3}")
ElseIf $LastKnownKey = 4 Then
Send ("{NUMPAD4}")
ElseIf $LastKnownKey = 5 Then
Send ("{NUMPAD5}")
ElseIf $LastKnownKey = 6 Then
Send ("{NUMPAD6}")
ElseIf $LastKnownKey = 7 Then
Send ("{NUMPAD7}")
ElseIf $LastKnownKey = 8 Then
Send ("{NUMPAD8}")
ElseIf $LastKnownKey = 9 Then
Send ("{NUMPAD9}")
EndIf

EndFunc

Func Terminate()
Exit 0
EndFunc ;==>Terminate

Edited by ManDaisy, 04 December 2013 - 02:59 PM.


#11 ManDaisy

    Member

  • PipPipPipPipPipPipPipPipPip
  • Elite Founder
  • Elite Founder
  • 3,272 posts
  • LocationKing Of Flower Beds

Posted 04 December 2013 - 03:03 PM

Done... You guys will like the sprinting feeling when you try it.

Edited by ManDaisy, 04 December 2013 - 03:03 PM.






5 user(s) are reading this topic

0 members, 5 guests, 0 anonymous users