In-game time in Dota 2

Ask gaming related questions
Cage
Posts: 2
Joined: 21 Feb 2017, 09:27

In-game time in Dota 2

21 Feb 2017, 09:51

I want to write a simple script for Dota 2 replay viewer.
I need to press the Y button (Send, y) at 10:00 in-game time, which switches in-game stats.
How to access the in-game time in the replay? Is it possible to do with AHK?
Attachments
scr.jpg
scr.jpg (353.05 KiB) Viewed 2094 times
John
Posts: 77
Joined: 10 Apr 2014, 08:59

Re: In-game time in Dota 2

23 Feb 2017, 05:52

Quite a few ways to deal with it, only limiting factor is what you can do in order to actually implement it.
Memory reading is one option, but if you're not comfy with it there's a good chance you might get yourself banned while looking for the offsets+address.
You could use one of the many OCR libraries/functions to read the numbers, but they tend to be complex and also heavy. Way heavier than needed just to determine a max 6 long string of 10 possible characters.
That leaves either writing your own simplified OCR 'system' or determining which screen (main menu, in game, etc.) you're on with a handful of "pixelgetcolors", getting the "a_tickcount" as soon as you go from hero selection to in game, subtracting pause durations and having a fairly accurate representation of the current time.
Cage
Posts: 2
Joined: 21 Feb 2017, 09:27

Re: In-game time in Dota 2

24 Feb 2017, 08:24

Thank you for response.
John wrote:Memory reading is one option ... there's a good chance you might get yourself banned
How can I do this by AHK?
Is that really possible to get ban just because of reading memory?
John wrote:writing your own simplified OCR 'system'
Don't realy like OCR here, because positive result will depend on game resolution and can be broken by mouse pointer moving over the in-game time.
John wrote:subtracting pause durations
Too complicated and not enough accurate method, IMHO.
User avatar
eventhorizon
Posts: 158
Joined: 27 Oct 2016, 14:22

Re: In-game time in Dota 2

27 Feb 2017, 10:28

Dota 2 uses VAC anti-cheat software. Although a simple process memory read is benign, you can never be certain you won't get a VAC ban if the vac is upgraded by the devs at some point. Another method might be to write a simple AHK Timer routine you can sync with the onscreen timer that doesn't actually interfere with the game. Once the timer is sync'd properly with the game time, the timer routine could initiate whatever actions you want automatically once the timer reaches a predetermined value. The timer could read the up and down arrow keys, for example, to activate the syncronization so the timer value is within some valid range with the onscreen timer. Just a thought
A computer lets you make more mistakes faster than any invention in human history – with the possible exceptions of handguns and tequila.

Return to “Gaming”

Who is online

Users browsing this forum: Maxol and 33 guests