Gauss Overlay Macro

Thread in 'MechWarrior Online' started by ProtoformX, Jun 10, 2014.

  1. ProtoformX

    ProtoformX Active Member

    84
    3
    12
    I'm working on a new AutoHotkey macro that uses a GUI overlay for the Gauss rifle.


    http://www.youtube.com/watch?v=hTppQwuh_D4


    The forum says my link is invalid, so just go to YouTube for this video:

    https://www.youtube.com/watch?v=QQMsaQ5NGfA

    UPDATE4 - Okay, I have an updated version for you guys to try. This one takes a different approach to turning the overlay on and off. It's not as cool as being automatic, but it should work for just about anyone. When you get into a match the GUI will not attempt to launch itself anymore. You'll need to press Ctrl+Alt+G(While in-game) to toggle it on and off. If you forget to toggle it off when you exit MWO the Ctrl+Alt+G combo will not be able to hide the overlay(an AutoHotkey limitation it seems). You'll either need to exit from the tray icon or use the key combo Windows+Alt+G. As always, let me know what problems you have. At this time, I'm not able to explain why several of you are experiencing a problem with the PPC group not firing. I'm continuing to investigate the problem. Please let me know if there's any change with this version.


    AutoHotkey is required.


    Paste the following code into a text document and save it. Rename the document to GaussOverlay.ahk and run it by double-clicking. Launch MWO; the overlay should activate when you start testing grounds or enter a live match. If you open the menu, tab out, make it to the score screen, or anything other than piloting a 'Mech, the overlay should turn off.

    Code:
    /*
    BEGIN COMMENTS
    
    
    CREDIT:
    kuangmk11 posted a wonderful AutoHotkey macro at this link:
    http://mwomercs.com/forums/topic/134382-cant-you-just-macro-the-gauss/page__view__findpost__p__2751940
    His macro was utilized as a base to build a Gauss overlay for MWO.
    
    
    ProtoformX is the primary contributor to this project.
    
    
    INSTRUCTIONS:
    1.) Place the Gauss rifle in Weapon Group 2(Must be right mouse button).
    2.) Place the PPC's or other weapons you want to fire with the Gauss rifle in Weapon Group 6.
    3.) Launch the script and run MWO.  It doesn't matter which order you start them in.
    4.) while MWO is active, press Ctrl+Alt+G to toggle on and off the overlay.  If MWO is not active,
        instead press Windows+Alt+G to toggle.  Hold the right mouse button to charge the Gauss and 
        use it just like normal.  On release, Weapon Group 6 will also fire.  Weapon fire sync will
        work whether the overlay is active or not.
    
    
    PROGRESS BAR LEGEND:
    Lime:    Weapons reloading status.
    Blue:    Gauss charge remaining.
    Yellow:  Charge status.
    
    
    
    
    END COMMENTS
    */
    
    
    
    
    #NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
    #Warn  ; Recommended for catching common errors.
    SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
    SetWorkingDir %A_ScriptDir%/B  ; Ensures a consistent starting directory.
    #singleinstance Force
    
    
    xMidScrn  := A_ScreenWidth //2
    yMidScrn  := A_ScreenHeight //2
    Gui1X     := xMidScrn - xMidScrn *.1
    Gui1Y     := yMidScrn - yMidScrn *.15
    Gui2X     := xMidScrn
    Gui2Y     := yMidScrn
    Charging  := 0
    MyIndex1  := 0
    MyIndex2  := 100
    MyIndex3  := 100
    Toggle    := 0
    Recycling := 0
    Charging  := 0
    Charged   := 0
    percent   := 0
    
    
    Gui, Destroy
    Gui, +AlwaysOnTop
    Gui, Color, Black
    Gui -Caption
    Gui +ToolWindow
    Gui, Add, Progress, vMyProgress1 h8 w130 cFACC2E Background2E2E2E xp+20 yp+130
    Gui, Add, Progress, vMyProgress2 h8 w130 c2E9AFE Background2E2E2E yp-8
    Gui, Add, Progress, Vertical vMyProgress3 h49 w8 cLime Background2E2E2E xp-22 yp-58
    Gui, Show, Y%Gui1y% X%Gui1X%, MWO_Gauss_Overlay, NoActivate, Title of Window
    WinSet, Transcolor, Black, ahk_class AutoHotkeyGUI
    GuiControl,, MyProgress2, %MyIndex2%
    GuiControl,, MyProgress3, %MyIndex3%
    Gui, Hide
    Return
    
    
    ;When in Windows press Windows+Alt+G to toggle the script on and off
    #!G::
    toggle:=!toggle ;toggles up and down states. 
      if toggle
        {
        Gui, Show 
        WinActivate MechWarrior Online
        }
      Else
        {
        Gui, Hide
        }
    return
    
    
    #IfWinActive MechWarrior Online
    
    
    ;When in MWO press Ctrl+Alt+G to toggle the script on and off
    ^!G:: 
    toggle:=!toggle ;toggles up and down states. 
      if toggle
        {
        Gui, Show 
        WinActivate MechWarrior Online
        }
      Else
        {
        Gui, Hide
        }
    return
    
    
    Rbutton::
    IF (Recycling == 0)
    {
      Charging := 1
      Loop,1
      {
        Settimer, gCharge, 75
      }
    }
    Return
    
    
    Rbutton up::
    settimer, gWindow, off
    if ((Charging == 0) and (charged == 1))
    {
    send, {6 down}
    sleep, 25
    send {6 up}
    Recycling := 1
    settimer, gRecycle, 185
    MyIndex3 := 0
    GuiControl, +CFACC2E, MyProgress3
    GuiControl,, MyProgress3, %MyIndex3%
    }
    charged := 0
    charging := 0
    MyIndex1 := 0
    MyIndex2 := 100
    GuiControl,, MyProgress1, %MyIndex1%
    GuiControl,, MyProgress2, %MyIndex2%
    Return
    
    
    gCharge:
    Loop,1
    {
      GetKeyState, state, Rbutton, P
      if state = U
       break
      MyIndex1 := MyIndex1 + 11.12
      GuiControl,, MyProgress1, %MyIndex1%
    }
    if MyIndex1 >= 100
    {
    settimer,gCharge,off
    Charging := 0
    Charged  := 1
    GuiControl, +CRed, MyProgress1 ;RED
    GuiControl, +CRed, MyProgress3 ;RED
    GuiControl,, MyProgress1, %MyIndex1%
    GuiControl,, MyProgress2, %MyIndex2%
    GuiControl,, MyProgress3, %MyIndex3%
    settimer, gWindow, 125
    }
    Return
    
    
    
    
    gWindow:
    Loop,1
    {
    GetKeyState, state, Rbutton, P
    if state = U
       break
    MyIndex2 := MyIndex2 - 11.12
    GuiControl,, MyProgress2, %MyIndex2%
    }
    if MyIndex2 = 100
    {
    settimer, gRecycle, off
    GuiControl, +CLime, MyProgress3
    GuiControl,, MyProgress3, %MyIndex3%
    Recycling := 0
    }
    Return
    

    UPDATE3 - Timing has been greatly improved. I've even improved on what the original GaussBeeps script had for timing(Which was great). I rewrote almost the entire firing portion of the script. I've also further improved resolution compatibility. 1680x1050 is now working; however, the progress bars are slightly too large because I haven't made their sizes dynamic yet. It still works great. Dynamic progress bars will be going in next, then we can really start testing resolutions.

    UPDATE2 - Made a small change that should increase compatibility with other resolutions.

    UPDATE1 - I need beta testers. This was designed in 1920x1200. I've written parts of it to scale with resolution, but I've only tested a few different res's. If you're having trouble getting the GUI to activate, let me know your resolution. If your resolution is significantly different than mine, you're probably going to have problems.

     
  2. Business

    Business Advanced Member

    270
    7
    26
    Might actually use a gauss rifle with this.
     
  3. Falconium

    Falconium Administrator Staff Member

    1,499
    474
    67
    I've always been one to refrain from using hotkeys or macros to make the game other than it is. But believe me when I say that is strictly a personal, sort of hard-core kinda restraint that I place on myself. I do NOT penalize or criticize anyone for using hotkeys/macros like this, provided these are not actually changing how the game itself works (no auto-headshots please ;)).

    So yeah, I think alot of players would be glad to get their hands on something like this, including many of the high-ELO meta players.
     
  4. ProtoformX

    ProtoformX Active Member

    84
    3
    12
    Nice, that's what I'm going for.




    [quote author=Falconium535 link=topic=6829.msg44773#msg44773 date=1402375314]
    I've always been one to refrain from using hotkeys or macros to make the game other than it is. But believe me when I say that is strictly a personal, sort of hard-core kinda restraint that I place on myself. I do NOT penalize or criticize anyone for using hotkeys/macros like this, provided these are not actually changing how the game itself works (no auto-headshots please ).

    So yeah, I think alot of players would be glad to get their hands on something like this, including many of the high-ELO meta players.
    [/quote]
    Yep, I can appreciate that opinion and I expect some stronger viewpoints as well. :rofl:
     
  5. Solahma

    Solahma Star Lord

    2,279
    532
    197
    Might explain why so many higher-ELO players have started using Gauss again... hmmm
     
  6. ArkNemesis

    ArkNemesis Well-Known Member

    107
    1
    25
    Seems interesting.

    I often prefer to use only my mouse to pilot my mechs, but I suck so much with Gauss that I would like to give it a try.

    Could you tell me where I could download this script to try it?
     
  7. ProtoformX

    ProtoformX Active Member

    84
    3
    12
    It'll be available for download in the next couple of days!
     
  8. Motörhead

    Motörhead Benefactor

    1,127
    248
    58
    Looks like cheating to me :D
    Gauss load-up was introduced specifically to avoid this ;)
    I guess you'll make pop-tarters really happy with this macro (because really, does it have any other uses?)!

    Anyway it looks a really nice and well planned macro, if it's legal to use it, then ofc it would bring enormous advance to jump sniper, basically a chargeless gauss.

     
  9. FuzzyBunny

    FuzzyBunny MechSpecs Addict

    521
    9
    25
    This is a graphics display mainly, useful for people who have trouble seeing the normal indicator, or try to hold the charge to long. You'd be a fool if you didn't think there wasn't already a macro running rampant in people that essentially turn the charge mechanic into nothing more than a slightly delayed fire.

    It's simple. Set macro so that when you click, it simulates holding the button for the required time, then just lets go so the shot fires. I'd be almost willing to lay money TONS of people already use this as easy as it is to program good keyboards and mice to do macros. All the down from some top tier players looking for any edge on down to the craptastics cheese balls who will do whatever it takes to try to look 'good' when they aren't.
     
  10. Lan

    Lan Mech Wrangler

    1,570
    201
    79
    You may want to read through the following text aswell before you start releasing this, I'm only advising - not judging you.

    http://mwomercs.com/forums/topic/107033-custom-modifications-to-the-mwo-game-client/

     
  11. ProtoformX

    ProtoformX Active Member

    84
    3
    12
  12. Lan

    Lan Mech Wrangler

    1,570
    201
    79
    I am not a native speaker but that's not how I interpret the text.

    Your script has two parts to it, the first bit is a more visually clear chargeup instead of the sights turning green and only the chargeup sound. The second bit is the synching of firing so that you synchfire the PPC's at the same time you fire the Gauss.

    According to my intepretation, the first bit conflicts with:

    The second bit conflicts with:

    All of this may be hogwash, the game moderators may be just fine with this, I don't know. But I'm reading it differently then you.
     
  13. Soy

    Soy Min-Max Maniac

    1,024
    227
    71
    Seems like this was discussed almost a year ago on initial Gauss changes.

    My opinion is that I wouldn't use it (tool in vid) personally; whether or not someone else is using it isn't really my business unless it's inhibiting my ability to play the game the way the designers intended (ie everyone is Gauss botting 24/7).

    But I would say that using something like in the OP's clip would not help you be a better player, if anything it would limit your growth. These types of things stymie the development of mastery for a particular weapons firing cadence, instead relying on 3rd party cues and such. It leads to rigidity.

    I'm not judging, just saying.

    Don't wait to be told when you can do things, know what you can do and when. Feel it. Become one with your weapon and have complete control it then you will never need this sort of thing.
     
  14. ProtoformX

    ProtoformX Active Member

    84
    3
    12
    As this is not about the validity of the use of my macro in MWO, I'll keep this limited:
    1.) There is no tactical advantage. Explain to me what it is if you think there is.
    2.) This makes no modification to MWO's visuals. This is an overlay; e.g. a window on top of MWO. It does not interact with MWO in any way. Everything is based on the use of the right mouse button. It's the equivalent of putting a piece of tape in the middle of your monitor.
    3.) There is no improvement to aim.
    4.) There is no additional information provided that isn't already available.
    5.) Macroing weapon timing already has PGI's blessing.


    That said, if you want to continue this discussion, please start a new thread and I'll join you there!
     
  15. Business

    Business Advanced Member

    270
    7
    26
    Who cares? Too much talk about something simple. Everyone knows that macros have been and are currently in use and that they aren't prohibited by pgi.

    Not like a ban from this game would be a bad thing, considering how godawful it is right now
     
  16. ProtoformX

    ProtoformX Active Member

    84
    3
    12
    See the updates in the first post.
     
  17. Remarius

    Remarius Star Lord

    3,374
    546
    192
    Wasn't going to comment as I've been hearing hard rumours for a while about a similar program among some of the 12 man teams that also includes sound triggers but that post drew me in.

    It has to be the worst self deceit I've seen in a long time.

    Just saying a mantra doesn't make it true and you are splitting hairs in a way no reasonable person would. That's the rule often used in trials in the UK. How would an average reasonable person look at it?

    Arguing that its the third party mod providing the overlay and that is somehow not modding the visuals is laughable. Any reasonable person would see that the video directly shows visual modification. You went out of your way to describe them and their use.

    Point 1 is neatly illustrated by your own footage... so I put your own question back to you. How is that not giving you an advantage as it clearly gives explicit timing information. If it didn't give you an advantage no one would use it - your defence seems to entirely lie in how you define "tactical".

    As it happens I agree with Soy. The program is a crutch.
     
  18. ProtoformX

    ProtoformX Active Member

    84
    3
    12
    Thanks for calling me unreasonable. I appreciate the personal attack! Now, as I said, feel free to start a thread. This isn't the place for the discussion.
     
    WVAnonymous likes this.
  19. Hamond

    Hamond New Member

    1
    0
    1
    I'm just going to leave this here...
     
  20. ProtoformX

    ProtoformX Active Member

    84
    3
    12
    I'll be awaiting any contact from PGI.


    Removed my beta script and added a similar script that uses beeps instead of a GUI. We'll see what PGI says, but at least you can enjoy the benefits of my GUI script via the beeps script until then.
     
top-fast
top-fast
top-fast
top-fast