Jump to content
Sign in to follow this  
realzoro

AutoHotkey preparation for 1.20 release

Recommended Posts

I'm very hyped about the 1.20 release tomorrow, especially when taking the server wipe into account. Since I'm planning to nolife DayZ for a while I wanted to make my life a bit easier. The most important thing for me was to have a crosshair overlay to have no disadvantage compared to players that use a permanent crosshair. My monitor doesn't have one and I don't want to draw something physically on my screen. The other thing I wanted to be able to is autowalking so I can relax my fingers from time to time.

I managed to accomplish these two things ( in a very basic way ) with AutoHotkey v2 - https://www.autohotkey.com/ and want to share it.

 

The Autowalk script:

NumpadAdd::
{
    if WinActive("ahk_exe DayZ_x64.exe")
        Send "{w down}"
}

NumpadSub::
{
    if WinActive("ahk_exe DayZ_x64.exe")
        Send "{shift down}{w down}"
}

When pressing "+" on the numpad it will hold down the "W" key until you manually release it (by pressing and releasing it).

When pressing "-" on the numpad it will hold down both the "W" key and the "shift" key until you manually release both (by pressing and releasing both).

Disadvantages: Works only if DayZ is the active window. Need to press the keys to stop it.

 

The crosshair-overlay script:

Samples: https://imgur.com/a/FjD311C

bmp := LoadPicture("dayzchv2a.bmp")

if bmp
    dayzch := Gui()
    dayzch.BackColor := "EEAA99"
    WinSetTransColor("EEAA99", dayzch)
    dayzch.Add("Picture",,"dayzchv2a.bmp")
    dayzch.Opt("-Caption")
    dayzch.Opt("AlwaysOnTop")
    dayzch.Show("Maximize")
    dayzch.Move(-10, -6, 1920, 1080)

This script is dependant on the bitmap with the crosshair. It is a 1920x1080 argb bitmap with everything transparent except the crosshair itself. I wanted to have the cs:go classic static crosshair so I am using this bitmap: https://easyupload.io/fnsaqq (it needs to be in the same folder as the script). I wish I could upload it right here, but I couldn't figure it out. imgur was converting it and I don't know if it works then.

Disadvantages: Works only when DayZ runs in window mode. Right now the crosshair itself is clickable (dont't know yet how to make it non-clickable) so my mousecursor shows sometimes when i move the mouse fast. I had to move it by -10, -6 pixels to have it really on the middle. This exact script works only with 1920x1080 resolution. The bitmap could be smaller - no need for 1920x1080 pixels, just the crosshair itself should be enough, but it was my first attempt and I'm glad it works.

Suggestions for improvement are appreciated.

 

See you in 1.20.

Share this post


Link to post
Share on other sites
On 2/13/2023 at 5:10 PM, realzoro said:

server wipe

turned out to be misinformation

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×