Skip to content

Fix inventory full checker #1376

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Sep 12, 2022
Merged

Conversation

item4
Copy link
Contributor

@item4 item4 commented Sep 9, 2022

I was make PR changing FP gacha, but I feel something strange and I make new PR.

  1. I don't know reason why is working wrong, but I must change inv_full.png for Kr server because FGA can not detect Reinforce button.
  2. There is no requirement for changing detection area, only need setting similarity for detecting. So I did not change location definition at this PR.
  3. The logic about inventory full checking is also used for Auto battle. Old PR cover FP gacha only. I fix that for changing also used for AB.
  4. I exclude some changes about FP gacha. Because:
    1. There is some difference among each servers about first free FP gacha screen. Kr service has FP cost icon on screen but others is not.
    2. I need fix inventory full checking much more then FP gacha. So I drop or split them. If you want these contents also, I will make PR after merging this.

This PR tested on Kr server and it's fine.

item4 and others added 4 commits September 9, 2022 17:09
1. Sometimes, detector guess wrong some white and black things as inven_full in battle and fp summon
2. I tried to increase similarity rate but it's fail.
3. I find inventory was full, there must be selling button with current detect target(enhancement button)
4. I fix to use this button
@item4
Copy link
Contributor Author

item4 commented Sep 11, 2022

@reconman It was merged on my branch and pr already by your changes. I will test it and attach video.

@item4
Copy link
Contributor Author

item4 commented Sep 11, 2022

Running on 2ce97bf

record.mp4

@item4
Copy link
Contributor Author

item4 commented Sep 11, 2022

What I want to detect for catch inventory was full

image

But

Can not catch it. So I decrease similarity. It was work, but has side-effects

Expected screens, but can not dectect now

2022-09-11 11 28 00
2022-09-11 11 28 50
2022-09-11 11 29 33

Wrong detection on low similarity

2022-09-11 11 29 33

What really I want to detect

Case 1. detect text correctly

image
image

Case 2. detect two buttons

image
image

Problems what I can not solve

  1. Without changing region size or similarity , I can not detect inven_full.png from detecting region.
  2. I tried changing region size to fit to kr text but it was not working. (I don't know reason why)
  3. I tried to decrease similarity but it cause false-positive.
  4. I tried to replace inven_full.png to more lager size for fitting without change region size. but that also not working

@reconman
Copy link
Collaborator

reconman commented Sep 11, 2022

I think you didn't notice that your image is much bigger than the button in the screenshot.

This is the inven_full.png next to the actual button.

You probably forgot to take the image in 720p.

@reconman
Copy link
Collaborator

Please test the latest build again.

@item4
Copy link
Contributor Author

item4 commented Sep 11, 2022

@reconman Wow. Good It works! I did not know pattern image must capture in 720p. but how can i take 720p correctly? resize after screenshot? or other method here?

@reconman
Copy link
Collaborator

Yes, you need a photo editor like Adobe Photoshop or the free online Photopea to scale your image down.

@reconman reconman merged commit ba8d04e into Fate-Grand-Automata:master Sep 12, 2022
@item4 item4 deleted the fix-inv-full branch September 12, 2022 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants