E.Y.E: Divine Cybermancy

E.Y.E: Divine Cybermancy

Not enough ratings
Hold to Aim
By Zwiadowca
Commands to enter in your autoexec.cfg to enable hold to aim without third party programs
   
Award
Favorite
Favorited
Unfavorite
Background
I saw a tutorial on the EYE steam forums for enabling hold to aim using a third party program, figured I would show how you can achieve the same result using just the power of the bind and alias commands.
Drawbacks
ADS transition time
There is a short cool down of 0.5 seconds between ads transitions where changes to the attack2 input do not have any effect on the ads state. Inputs to the ads button during this time will be ignored, resulting in ads being toggled for short presses of the ads button, or the "hold to aim" button becoming a "hold to not aim" button if releasing and then pressing and holding the ads button shortly after beginning an ads transition. Given that the wait command is frame rate dependent, there's not really any way to fix this without first capping the frame rate to a value you can always achieve. Since being able to toggle ads is useful for fixing being in an unexpected ads state, Ill leave this as a feature, where the aim button is a toggle aim button for presses shorter than half a second, and a hold to aim button for presses longer than half a second.

ADS toggled off by other actions
Various commands in the game such as sprinting, changing weapons, using special abilities, or even running into a wall will stop your character from aiming down sight. If you are holding down the ads button when performing these actions, releasing the ads button after the character can ads again will result in the ads toggling on. Returning to the correct state is as easy as tapping the ads button again quickly, or performing another action that will stop the player from aiming down sights while not holding down the ads button. Some of these can be fixed but it does increase the size of the config considerably

Unable to parry
The ads button is used to perform other actions in the game, such as healing yourself with a med kit, detonating thrown grenades and parrying with a melee weapons. While the first two are unaffected by the config, the last depends on the attack2 button being held down for as long as we want to continue to parry. However the attack2 button is automatically lifted by our config both when pressing the ads button down and when raising the ads button back up, meaning we cannot parry. There are two solutions to this.
  • 1 Bind a second key to the attack2 command, with the second key behaving like the original ads toggle. This second button can now be our parry button when using melee weapons.
  • 2 Toggle the behaviour of the ads button between hold to aim and toggle aim, depending on which weapon is active. Selecting weapons with the slotx commands (buttons 1 through to 0 by default) will select weapons depending on the order in which they are added to your inventory, using the previous and next weapon commands does the same and the last weapon used command works as expected. Without changing this behaviour to be more consistent using something akin to Saeletra's Easier Weapon/Gear Bind Selection, fixing this isn't really feasible through toggling the ads behaviour.

Stuck in ADS if attack button lifted after ads button
If you release your ads button while still holding down your attack button, your character will continue to aim down sights until your next ads input.
Tutorial
The Files
  • Create a config file with a unique name (I use hold_to_aim.cfg) in the game's config folder (By default this should be "steamapps/common/EYE/EYE/cfg"
  • Pick a config with a complexity and solution of your choice from the ones listed below
  • If you wish to change any of the default keybinds, modify them in the cfg file. To change the ads button from the secondary mouse button to the x button, you would replace all occurances of mouse2 with x. A full list of all keyboard keys recognised can be found on the valve developer wiki
  • Add the command "exec hold_to_aim" (or your custom config name) to your autoexec.cfg file. If you do not have an autoexec.cfg file, create one in the same folder as the hold to aim config.
  • If you are in game, run the same command or "exec autoexec" in the in-game console. Otherwise the config should be executed on every game start

The Configs
Simple Config
// Simple alias +hold_aim "+attack2; wait 5; -attack2;" alias -hold_aim "+attack2; wait 5; -attack2;" bind mouse2 +hold_aim bind mouse3 +attack2
Stuck in ADS while shooting fix - prioritise ads transition
This version will prioritise moving between hipfire and aiming down sights over the attack button. If transitioning while firing your weapon, you will have to release and press the attack button again.

With this version there is a chance of your gun continuing to fire after releasing the attack key close to releasing the ads key
// Simple alias +hold_aim "+attack2; wait 5; -attack2;" alias -hold_aim "+attack2; wait 5; -attack2;" bind mouse2 +hold_aim bind mouse3 +attack2 // Stuck in ADS after shooting fix alias +hold_aim_interrupt_shooting "-attack; wait 5; +hold_aim" alias -hold_aim_interrupt_shooting "-attack; wait 5; -hold_aim" alias +custom_attack "+attack; bind mouse2 +hold_aim_interrupt_shooting" alias -custom_attack "-attack; bind mouse2 +hold_aim; bind mouse1 +custom_attack
Stuck in ADS while shooting fix - prioritise shooting
This version will prioritise shooting over adsing. Extra care is taken to ensure the attack key does not become stuck due to -hold_aim_resume_shooting pressing the attack key down after mouse1 is already released.

With this version there is still a small chance of the original problem still occurring if releasing the attack key and ads key near-simultaneously (namely being stuck in ads while the ads button isn't held, or stuck outside of ads while the ads button is held)
// Simple alias +hold_aim "+attack2; wait 5; -attack2;" alias -hold_aim "+attack2; wait 5; -attack2;" bind mouse2 +hold_aim bind mouse3 +attack2 // Stuck in ADS after shooting fix alias +hold_aim_resume_shooting "-attack; wait 5; +hold_aim; wait 5; +attack" alias -hold_aim_resume_shooting "-attack; wait 5; -hold_aim; wait 5; +attack" alias +custom_attack "+attack; bind mouse2 +hold_aim_resume_shooting" alias -custom_attack "bind mouse2 +hold_aim; wait 20; -attack" bind mouse1 +custom_attack
Special Thanks
Thank you Boxyt for discovering the problem with being unable to parry with melee weapons when using this config