KIvoy / nikke-assistant

A python desktop app that helps with chores of Nikke: Godness of Victory
MIT License
79 stars 9 forks source link

Crash after not finding img (clearly visible) #5

Closed LucasMurtfeld closed 1 year ago

LucasMurtfeld commented 1 year ago

The assistant crashes after i click on any button (example dipatch)

Start NIKKE Start Assistant Check For game with Assistant Game gets found Click DIspatch Assistant Freezes show Error msg in DialogBox then Freezes turns no responsive and crashes

Win10 64 RTX2080 Ryzen7 2700X

Setup: https://i.gyazo.com/92b67340454a5fae6e657e863a2f7674.jpg

KIvoy commented 1 year ago

hey @NivaLada thank you for raising this issue. When certain images could not be detected, it's usually caused by a mismatch between the image on screen and the image at capture. Such difference could be caused by quality, resolution and language.

I was not able to replicated your error by changing the language/image quality, thus it would most likely be caused by resolution. If the screenshot that you've provided is at the original ratio, then your game window seems to not be at the expected resolution of 591x1061 at the capture time of the files. Although the assistant does come with the ability to auto-adjust the resolution for the game window, sometimes it may not function properly if it was recognizing your launcher window or if your window has already been resized manually.

I would recommend the following approach if your screen can support a 591x1061 resolution of the game:

  1. start game
  2. close the launcher (SU named them both NIKKE so sometimes the app gets confused to which is the game window)
  3. set quality to highest
  4. start assistant
  5. click on reload game just to make sure it's reloaded to the optimal resolution.
  6. then try out the tasks

In the unlikely scenario your screen does not support 591x1061, all image files would need to be redone for your supported screen resolution. Although the assistant has native support for resolution adjustment on the fly, it just does not work well enough for Nikke's assets. I do not plan to add more resolution compatibility for the assistant in the short future (as you'll need to redo all the screenshots), you are definitely encouraged to do so if you have some time and we can merge it into the repo as a pr with your desired resolution.

Also please be aware that the current version of the assistant does not officially support English version of the client. Although I tried my best to make the assets language agnostic, in some scenarios it was impossible to do so without sacrificing development speed. Some functions may be broken if you use the English client. Again, you could always work on a version of the assets in English and we can merge that pr in.

LucasMurtfeld commented 1 year ago

Thanks for the fast review <3

my screen res is 1920x1080 and the game did auto adjust its res after launching the assistant I will try to redo the screenshots later today thanks for the the quick response <3