Sign in to follow this  
Followers 0
moozooh

Using OCR to parse screen text in an otherwise simple script

2 posts in this topic

Hi there.

I'm pretty new to AutoIt; it's a rather complex piece of software that I have basically just started to learn. Many things are still way over my head, so I'd very much appreciate some tips or other help.

I'm trying to make an automated character roller for the Windows version of ADOM 1.2.0+. ADOM is a freeware roguelike RPG with complex combat model that depends on dozens of parameters ranging from obvious to completely esoteric. Some of the game's race/class combinations are powerful in mid/late game, but very squishy at the beginning, and since it's already pretty hard and RNG-heavy as it is, I and many others would opt for using all the tricks available that are still borderline legit to ensure a safer start. Usually if one were to attempt something like this, they would run through the character creation process several times until they got the required month, then repeat a few more times until they get an acceptable stat distribution and/or some special conditions. All of this can be automated, and frankly it should have been in the first place, at least optionally.

What I'm working with atm is a slightly modified version of a base script I got from some person in an old forum thread dedicated to essentially the same purpose; except back then they used DOS version of ADOM which I can't run without DOSBox these days, which frankly I'd rather not use. The DOS version ran entirely in textmode, so it was possible to copy any part of the screen as a block of text and parse it as is by usual means. The modern Windows version, however, must be OCR'd, and this is where my problems start.

I found >this thread with what appears to be an excellent OCR script/plugin that appears to suit my purpose perfectly. However, so far I don't understand at all how to insert it into my roller so that it could parse the screen readout and act accordingly. And when I attempt training the OCR on ADOM's starting screens, it fails with an error ("Variable subscript badly formatted"). No idea which subscript it is and how to fix it.

Man, I guess I'm way too dumb and/or lazy for this, sigh. :

Share this post


Link to post
Share on other sites



Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0