|
Post by Sikat on Apr 4, 2017 12:51:12 GMT
Anyway to find patterns with transparency? For example find the borders of a portrait only, not the portrait itself as the portrait can change.
|
|
|
Post by AnkuLua on Apr 4, 2017 14:30:31 GMT
How about just finds only one side of the border? Use region if necessary. Please share the screenshot.
|
|
|
Post by Sikat on Apr 4, 2017 14:54:05 GMT
How about just finds only one side of the border? Use region if necessary. Please share the screenshot. Not possible. Find the Icon type and MP cost of each skill. Click on the highest MP cost damage skills. Note that skill buttons are only fixed on the X axis, the Y axis could change depending on the swipe (and device lag of course).
|
|
|
Post by Mercobots on Apr 4, 2017 17:01:54 GMT
try find only the "MP" word using findAll() and create a Region from the :getTaget()
i hope this help you
local skils = findAll("mp.png")
for i, image in ipairs(skils) do image:highlight(2) local target = image:getTarget() local region = Region(target:getX(),target:getY(),"pic width","pic height"):highlight(2) -- Here use ocr function + Region click(image) end
|
|
|
Post by AnkuLua on Apr 5, 2017 0:09:53 GMT
farrusco's answer is correct. You could try to black the background of numbers.
|
|
|
Post by noncecents on Dec 3, 2017 17:25:12 GMT
Note that this was never resolved. I'm now handling Sikat's project and I've been revisiting complaints by users that the MP numbers are often read incorrectly (particularly specific numbers like 4,5 and 7) which breaks the script.
I can duplicate the issue under specific circumstances such as when the numbers are partially overlaid over certain icons, though there are far too many conditions to account for programatically. I've already blacked out the number image backgrounds and I've spent days trying to crop the numbers in various ways to make them work better, to no significant success.
The reality here is that transparency support is probably the only way that this particular problem will ever be solved to the satisfaction of the players.
|
|
|
Post by AnkuLua on Dec 4, 2017 1:13:34 GMT
Please share the screenshots and number images. We will try to help.
|
|
|
Post by noncecents on Dec 9, 2017 14:52:51 GMT
Number images are in github.com/NonceCents/FFBEAutoZContinued/tree/master/image, named mp and 2mp. Both sets are tried. Example: The icons with swords and MP values 45 and 27 frequently have trouble, but not all of the time. i.imgur.com/63tPk9s.jpgThis is not a scaling issue as it happens at script resolution as well as others. It is intermittent, but that appears to be somewhat related to where the skill gets positioned on the list because the game seems to place the MP icon in a slightly different position relative to the skill icon.
|
|
|
Post by noncecents on Dec 18, 2017 20:03:16 GMT
|
|
|
Post by AnkuLua on Dec 18, 2017 23:28:58 GMT
It seems that there is no problem to find the number. Please use highlight() to make sure that you have the right region to find number.
Or you can use save() to save the number region and share with us.
|
|
|
Post by Mercobots on Dec 18, 2017 23:31:57 GMT
ok create a file called ss.lua and copy this code there luaLib = loadstring(httpGet("https://raw.githubusercontent.com/mercobots/luaLib/master/luaLib.lua")) luaLib()
commonLib = loadstring(httpGet("https://raw.githubusercontent.com/AnkuLua/commonLib/master/commonLib.lua")) commonLib() local function _getFullSS()
simpleDialog("SS", "Procede ?")
local width = getRealScreenSize():getX() local height = getRealScreenSize():getY() local SS_name = tostring(width .. "X" .. height .. "_" .. random_string(5) .. ".png") local SS = Region(0, 0, width, height) local ss_path = scriptPath() .. "ss_images/"
mkdir(ss_path)
setImagePath(ss_path) SS:save(SS_name) toast("done") wait(3)
toast("Report SAVED at " .. ss_path .. SS_name)
scriptExit() end
_getFullSS() use it and get all numbers from 0-9 once done zip ss_images folder and post here to download! After that i will send to you a script test
|
|
|
Post by noncecents on Mar 4, 2018 22:07:37 GMT
I did use highlight; I know what I'm doing. Read the script or try it with the debug function in FFBE; I already captured the matched areas and saved them to confirm that it's not a region issue. The issue (once again) is that sometimes the background behind the numbers interferes with the confidence of the number evaluation. Cropping the number images smaller results in further (consistent) issues with evaluating the numbers. The problem is intermittent and situational because of the large number of possible backgrounds behind the numbers.
At this point I will assume that transparency support is not forthcoming so I will not likely continue development of the script for FFBE. I've already lost nearly all of my userbase with AnkuLua's implementation of a timer on the free version.
|
|