Announcement

Collapse
No announcement yet.

Custom HotKeys for PR

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Custom HotKeys for PR

    Intro's and Info's:

    This thread is for the purpose of display/distribution of open-source scripts that modify a user's keys (or other automations) when run, which allow for a level customization and flexibility to the player's game. No scripts will be distributed that allow users to gain an unfair advantage, this is not the goal. The goal is to give users the ability to customize their keys for uses present in other games, to automate certain functions that need to be done on a regular basis, etc.

    These scripts are all made using a program called AutoHotKey, a free program available at www.autohotkey.com (download page)
    (Note: AutoHotKey is NOT needed to use these scripts)

    A few notes about these scripts:
    (1) Scripts for AutoHotKey are made in a custom format (.ahk). To run these, all you need to do it download AutoHotKey. However, the scripts can be compiled into an executable format (.exe), which do not need any external programs to run. (Files in this thread will be distributed as both .exe's and .ahk's).
    (2) .exe files do not run faster than .ahk files. In fact, .exe files take longer to load than .ahk files; however, after it is loaded into system memory, it will run as fast as a regular .ahk file, so there is no significant benefit to speed or optimization of using .ahk's over .exe, or vice versa.
    (3) These scripts are all open-source, so you can edit them to your liking. If you need help, you can PM me and I will try to assist you in how to do so. First, however, ensure that you have the file you want to edit downloaded in the .ahk format, and download AutoHotKey, because you will not be able to edit the .exe (after you have customized your script, you can compile it into an .exe if you so desire).
    (4) While the scripts are running, they appear in your taskbar. Right click to get menu options, the only important one is, of course, exit/quit.
    (5) All of these scripts are made with a default keyboard layout in mind. If you need a custom layout version, feel free to contact me and I will help out in my spare time.

    __________________________________________________


    Now for the good stuff: Scripts!

    (Make sure to read up on the known issues with the scripts you are going to use!)

    Crouch Toggle
    Goal: Create a toggleable crouch, that functions just as any other game's built in crouch toggle would.

    Description: This script will alter your Left Control button to function as a toggle in BF2. Tap LCtrl, and the script will 'hold down' the key for you. Tap it again, and it will 'release' the key. It will also break out of the crouch if you change stances, use a chat key or console key, or use the sprint key.


    Known Bugs/Issues and Workarounds:
    • Minor issue
      Crouch will continue to be held after you have died and respawned, meaning that you will respawn crouching.
      [Unable to be fixed at this time]
    • Minor issue
      Crouch will continue to be held when you enter/exit a vehicle.(Enter a vehicle while crouched, and you will remain crouched for example if you get into a seat with a gun-hole you can duck into for cover.
      [Unable to be fixed at this time]
    • Minor bug
      You cannot yet sprint out of the crouch. For some reason, you must release and repress shift before the game allows you to sprint (if you hold shift, it will show the sprint bar, but not begin sprinting and the bar will disappear).
      [Looking for a fix]
    AutoWalk
    Goal: Create a button to allow the player to automatically walk, without using the W&Chatkey glitch currently present in BF2, and allow the player to be able to use other keys while it is being used (jumping, sprinting, strafing)

    Description: Double tap W quickly to start the autowalk. Tapping W or S will stop the autowalk. You can sprint, jump, change stance, and strafe (and etc) while the autowalk is on. (Can also be used in vehicles, for those long drives.)
    (Currently, the double-tap timelimit is 175 milliseconds. If you press W, and then press W within that timelimit, auto-walk will begin. Outside of that timelimit, and it won't trigger the autowalk. This helps to stop accidental triggering of the walk, but isn't perfect.)


    Known Bugs/Issues and Workarounds:
    • Major issue
      By default, double-tapping W causes the player to sprint. It must be disabled for this script to work properly (you will autosprint, instead of autowalk). If you do not desire this feature to be present in the game, you can remove it manually by going to C:\Users\*****\Documents\Battlefield 2\Profiles, opening Controls.con in Notepad, and completely deleting the line near the top "ControlMap.addKeyToTriggerMapping c_PIAltSprint IDFKeyboard IDKey_W 1000 0" (make sure to keep a backup of the original controls.con!)
      [Looking for an Alternative]
    • Minor issue
      Holding A/D does not stop holding W. You cannot look at a 90 degree angle from your path and strafe to the side without the script stopping W from being held while A/D are held down, and having W be held down again after A/D is released. For now, you can look at 45 degree angles while you are automatically walking and keep a straight path if you hold the opposing strafe key.
      [Unable to be fixed at this time]
    • Minor issue
      It seems that sometimes when moving forward and going prone will begin the autowalk (while prone), most specifically notable when playing medic (due to proning to revive frequently). Unknown as to why it does this and why it is inconsistent, or if it is simply human error tapping the button by accident.
      [Looking for a fix]


    Notes: I am looking into creating other ways that you can trigger the autowalk, such as other keyboard keys or unique keys like mousewheel left/right, thumb buttons, etc... using a single tap for those keys so that they act as a dedicated key for the function.
    EjectSafe
    Goal: Create a Failsafe for hitting E on accident.

    Description: Prevents you from accidentally bailing out of a vehicle by requiring E to be double-tapped before it does anything.
    (Currently, the double-tap timelimit is 3/4ths of a second. This ensures that you should have a fairly good time to double-tap, so that you aren't fumbling to re-tap the key in case of an emergency. If all else fails, it should be possible to just tap E like a madman to eject.)

    Known Bugs/Issues, Workarounds, and other notes:
    • Major issue
      Currently works by using Insert as your Enter/Exit key, and making it so that double-tapping E will cause Insert to be tapped once. You must change your control settings ingame so that insert is your enter/exit key (make sure to clear the insert key from the 'Create Squad' binding first).
      [Looking for an Alternative]
    • Major issue?
      Occasionally it seems that you won't enter the vehicle on the first try, but I think it's just me not actually tapping the key, but thinking I did (as I'm not used to tapping twice as of yet).
      [Looking into]
    • Major issue
      Script has broken on me after working perfectly fine previously. Unknown of cause, and script has been fixed for now. I highly suggest making use of a secondary binding for Enter/Exit (Y and P work fine) until I can confirm that this is not an issue.
      [Persistent issue??]


    Notes: I'll be working in a way to set this to toggling on and off with a press of another button soon. (Example: E works normally. Press P, and the E now needs to be double tapped. Press P again, and it works normally again)
    I also am looking into a way to make it so that you don't need to bind the game's enter/exit to a different key such as insert. However, this creates the issue that when typing in chat, the E key won't work unless you were to double tap. The current workaround both allows the function of a failsafe and does not mess with chat functions.
    __________________________________________________


    Comments? Ideas? Complaints? Post them!









    Disclaimer: I am not responsible for how these scripts work outside of BF2; the hotkeys for these scripts are suspended when BF2 is not active, but the script can be altered to run in other programs if one so desires. If a anti-cheat system such as PunkBuster or VAC bans you, it is your responsibility to follow up by contacting support for that service. That being said: I will attempt to assist you in the case that you are PunkBuster banned from BF2, should it occur. AutoHotKey scripts are NOT a cause to be banned, unless suspicious code is used in making them. If for any reason you are banned in BF2 by punkbuster, contact evenbalance, and if you need my assistance please do contact me through PM.

    Again, I stress: PunkBuster will NOT ban you for use of these scripts, and it has been stated so by evenbalance employees. I use many of them myself personally, and if for any reason you do get banned, you can contact me to help you fix the issue!

  • #2
    Re: Custom HotKeys for PR

    Suggestions/Ideas that I am considering/working on:



    Overall:
    1. Combining multiple scripts (can be done, but since you can't choose you're stuck with all of them running at once, which is no good.)
    2. Creating a miniature 'install' which will let you choose what scripts you want to install, and configures it to your personal keybindings (again, can be done. Don't have the knowledge of how to do so yet, however).


    Script Ideas:
    1. ...Nothing's here yet.

    (Open to suggestions!)

    Comment


    • #3
      Re: Custom HotKeys for PR

      I find everything useless but the double tap exit key. We don't have such a long distances to overcome for you to need some sort of ''autopilot'', for me its just another thing I need to worry about not hitting 99% of the time.

      Thanks for the post but if you're such a coach potato that you aren't willing to hold a key, then you shouldn't be playing games.

      Comment


      • #4
        Re: Custom HotKeys for PR

        autoshovel? :)
        more of an issue when repairing the old bridges and aa guns

        Comment


        • #5
          Re: Custom HotKeys for PR

          I changed my eject key to H instead of E which is too close to the standard direction keys. Takes a while to get used to

          Ive forgotten which key I set for parachute though, just got squished last time


          If you find yourself in a fair fight, then you have obviously failed to plan properly.

          Comment


          • #6
            Re: Custom HotKeys for PR

            Originally posted by bjoffe View Post
            autoshovel? :)
            more of an issue when repairing the old bridges and aa guns
            That would be good!!

            Plus a script that makes you double tap "J" in order to type in teamchat would solve alot of errors with people chating in the wrong channel

            Comment


            • #7
              Re: Custom HotKeys for PR

              I like the sound of the crouch toggle, there are many situations where I'm defending and my poor pinky gets tired after a while :(.

              The autoshovel would be great too!

              I didn't join a squad once and this guy named Nardini took me into the back room and beat me with a sock of oranges.

              Comment


              • #8
                Re: Custom HotKeys for PR

                Originally posted by thegreatnardini View Post
                I like the sound of the crouch toggle, there are many situations where I'm defending and my poor pinky gets tired after a while :(.

                The autoshovel would be great too!
                My crouch is remapped to c, letting me hold it down with either my pointer finger or my thumb. Crouch as lctrl is really one of the oddest things I've ever seen as far as keybinds.

                Autoshovel would be spectacular. It takes a long time to shovel something by oneself.
                "It's called a randomizer, and it's fitted to the guidance systems and operates under a very complex scientific principle called pot luck."

                Comment


                • #9
                  Re: Custom HotKeys for PR

                  Originally posted by bjoffe View Post
                  autoshovel? :)
                  more of an issue when repairing the old bridges and aa guns
                  Start shoveling, and while keeping the mouse button depressed open xfire. This way you can even read the tg forums with the built-in browser while constructing a base :row__573:


                  Originally posted by orpal View Post
                  Thanks for the post but if you're such a coach potato that you aren't willing to hold a key, then you shouldn't be playing games.
                  Once you drive a truck to bunkers on kashan to build a quick fb, and the first guy spawning in takes it as a personal transport, you will realize autowalk is very useful.
                  sigpic

                  Comment


                  • #10
                    Re: Custom HotKeys for PR

                    Maybe you could make a program with checkboxes for each script. So you could just download the program, and all the scripts would launch from that, and you could update the program and have everyone download it each time.

                    Comment


                    • #11
                      Re: Custom HotKeys for PR

                      I may use the autocrouch one and maybe the eject one. I don't have any ideas for other things that are needed.
                      |TG-69th|chrisweb89


                      Comment


                      • #12
                        Re: Custom HotKeys for PR

                        Originally posted by orpal View Post
                        I find everything useless but the double tap exit key. We don't have such a long distances to overcome for you to need some sort of ''autopilot'', for me its just another thing I need to worry about not hitting 99% of the time.

                        Thanks for the post but if you're such a coach potato that you aren't willing to hold a key, then you shouldn't be playing games.
                        While you may feel this way, that's only your view.

                        I made two of these scripts for myself to use permanently; the exit and crouch toggle.

                        You see, I now am the proud owner of a Macbook Pro. Where the LCtrl button would be is now half of a ctrl button, and a fn function button. My pinky now has to do an awkward manuever underneath my hand to crouch, so I decided I wanted a darn crouch toggle. So I made it.

                        Being such a large guy, I've got big hands. You know what that means: I frequently fatfinger the W key and hit E; not a delightful predicament. So, I figured I would make some kind of failsafe so failures like myself can have an easy way out.

                        The autowalk is simply an alternative to the current ingame form of autowalk, which has come in handy now and then; holding W and then pressing a chat key will keep you walking.
                        This is also probably really handy when doing menial driving work, say on Kashan. Hop in a logi truck, drive to the entrance of the base, tap w twice, and you can effectively watch the map, look around you, and every now and then just adjust your vehicles course during the long drive to, say, South Village. Anything that even might remotely help a player using logistics truck is a good thing in my book.

                        Originally posted by bjoffe View Post
                        autoshovel? :)
                        more of an issue when repairing the old bridges and aa guns
                        It sounds like a good idea. It's possible, however that means it would hold down your mouse button when you hit that key, so for now you could literally tap that button and fire off your entire mag.

                        I'm not too sure if there would be a bit issue about it, but I'll look into making it nonetheless.

                        Originally posted by Sabre_Tooth_Tigger View Post
                        I changed my eject key to H instead of E which is too close to the standard direction keys. Takes a while to get used to

                        Ive forgotten which key I set for parachute though, just got squished last time
                        I find that the nearest set of default open keys (y, h) from the direction keys tend to be a bit far to reach and hit when not looking at the keyboard.

                        I tried setting it to Y a while ago, but it became more of a chore and I actually on one occasion managed to hit it by accident while in the helicopter. I think I was trying to hit the T commo rose or something.


                        It's actually possible to have two taps of Spacebar use the parachute key, ala BF2142. If anyone is interested, let me know.

                        Originally posted by llPANCHOll View Post
                        That would be good!!

                        Plus a script that makes you double tap "J" in order to type in teamchat would solve alot of errors with people chating in the wrong channel
                        Well, except for the fact that we would have to get all of them to download the script, which wouldn't help anything.

                        So much for Wickens having peace and quiet any time soon...

                        Originally posted by sporkife View Post
                        My crouch is remapped to c, letting me hold it down with either my pointer finger or my thumb. Crouch as lctrl is really one of the oddest things I've ever seen as far as keybinds.
                        Reloading while crouched sounds like an awkward affair. Maybe it's just my big fingers though.

                        Originally posted by Startrekern View Post
                        Maybe you could make a program with checkboxes for each script. So you could just download the program, and all the scripts would launch from that, and you could update the program and have everyone download it each time.
                        I know 'how' to make the installer/selecter, but I don't know 'how' to make it. If you know what I mean.

                        I can make it just like any old prompt that shows up on your screen and you just hit the button to choose the script etc etc, but I just don't know how to make that through the code just yet.





                        I don't seem to be able to edit my second post to add the autoshovel to the list of ideas. I need help with that.

                        Comment


                        • #13
                          Re: Custom HotKeys for PR

                          I just re-mapped keys to solve the whole accidental ejection thing. My enter/exit key has been End since I started leaving A-10s in the air without a pilot.

                          Autowalk, well, I've 3 of my trusty chat buttons to choose from.

                          Couch toggle, now that's one I could use. I hold crouch/ctrl for so long something that my pinky starts hurting. That and my ctrl button is now just ct-.

                          | |

                          Comment


                          • #14
                            Re: Custom HotKeys for PR

                            Originally posted by MarineSeaknight View Post
                            Autowalk, well, I've 3 of my trusty chat buttons to choose from.
                            That's what the auto-walk is trying to pull you away from. Instead, you can now check around you while still moving forward (you can't look right, strafe left, while the chat button is down), as well as sprint or change stance (if someone shoots at you while you are autowalking you have to hit enter, then hit ctrl/z, whereas you can either see him earlier/drop to the ground immediately and then stop, with the autowalk).

                            Of course, it's personal preference, but the point of autowalk is to give you much more flexibility and awareness when you're walking.

                            Comment


                            • #15
                              Re: Custom HotKeys for PR

                              Originally posted by MarineSeaknight View Post
                              My enter/exit key has been End since I started leaving A-10s in the air without a pilot.
                              I've bailed out of an aircraft twice or three times, once in a hydra huey during an attack run on muttrah, and once on Kashan in a Havok. luckily the havok was steady enough and high enough that the copilot recovered before it went splat >.>

                              That was an interesting fall though.


                              As for the crouch script, I encountered an issue. I sometimes get alt-tabbed from PR and it says something about the hotkey being used 70ish times in the last 9251235154325 milliseconds. Is that normal..?

                              Comment

                              Connect

                              Collapse

                              TeamSpeak 3 Server

                              Collapse

                              Advertisement

                              Collapse

                              Twitter Feed

                              Collapse

                              Working...
                              X