Skip to content
This repository has been archived by the owner on Apr 9, 2020. It is now read-only.

Not working #1

Open
ghost opened this issue Jan 22, 2020 · 1 comment
Open

Not working #1

ghost opened this issue Jan 22, 2020 · 1 comment
Assignees

Comments

@ghost
Copy link

ghost commented Jan 22, 2020

No description provided.

@admin-ll55
Copy link
Owner

admin-ll55 commented Jan 30, 2020

hi, the script should be working even if the image files are changed (as long as their filenames are in sync with the script) as i change them after each patch. i think you should try to save the image files in the following way:

  1. capture screenshot via prtscr button
  2. crop the unit from the screenshot
  3. save the image with 32bit png file with software like paint.net

a few notes:

  1. try to capture the characteristics instead of the whole unit image
  2. keep the size of the image as minimal
  3. do not use transparency color
  4. try to run a test script like this to check if the script pick up the actual unit
from PyMacroV2 import *
#x is monitor resolution width
#y is monitor resolution length
#0.97 is the tolerance; 0.97 = 97% similar to the image presented in the game against the filename
print(FindImage("filename", 0, 0, x, y, 0.97))
#[-1,-1] means it failed to locate the unit
  1. try capture from the actual game and compare it with the image file saved before manually

as a matter of fact, i will try to make transparency template matching working but that's another project (i.e. PyMacroV2) and i am busy at other things right now.

@admin-ll55 admin-ll55 self-assigned this Jan 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant