KIvoy / nikke-assistant

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

Assistant can not launch #6

Closed ianlee0800 closed 1 year ago

ianlee0800 commented 1 year ago

When ever I tried to launch the assistant, it shows an error message: 當我啟動助手時,總會跳出一個錯誤訊息而導致程式無法啟動

Failed to execute script 'nikke_interface' due to unhandled exception : 'Agent' object has no attribute 'res_multi'

Traceback (most recent call last): File "nikke_interface.py", line 682, in File "nikke_interface.py", line 90, in initialize_agent File "nikke_agent.py", line 49, in init File "nikke_agent.py", line 79, in initialize_game File "nikke_agent.py", line 263, in set_game_settings AttributeError: 'Agent' object has no attribute 'res_multi'

KIvoy commented 1 year ago

Hey @ianlee0800 it's most likely because it was recognizing the wrong window. Try closing the launcher before starting the agent (SU uses the same name for the game app and the launcher).

ianlee0800 commented 1 year ago

Thank alot for replying, however I've tried to close the launcher and even try to start the assistant without the game starting, it still shows the same error message.

KIvoy commented 1 year ago

hey @ianlee0800 thanks for raising this, could you try the following steps and see if it works:

  1. start launcher
  2. start game
  3. close launcher
  4. start assistant let me know how it goes
ianlee0800 commented 1 year ago

Hello, I am sorry to inform you that after testing this method has not been successful in solving the problem. I have further tested whether full screen and windowing and portrait and landscape displays have any effect and the results show that it does not. I appreciate your assistance and look forward to helping you improve the problem.

KIvoy commented 1 year ago

Hey @ianlee0800 thanks for the info. I'm sorry that the problem still persisted, could you see if there's anything in the app_error.log file and if so, could you upload it here? Meanwhile I'll try to patch the app so it does not crash even if the game is not found at first to see if that'll help pin point the error.

KIvoy commented 1 year ago

@ianlee0800 you can try release v1.3 to see if the issues are resolved.

ianlee0800 commented 1 year ago

Hello! I've tried version 1.3.1 and now th error message is gone. However, somehow the assistant just not able to fina active game window while I have opened the game. Also, I've checked nothing is blocking the game window.

KIvoy commented 1 year ago

sorry to hear that @ianlee0800 could you upload theapp_error.log file and a screenshot of the game & assistant?

ianlee0800 commented 1 year ago

Yes, here are files that you need app_error.log app_log.txt

KIvoy commented 1 year ago

@ianlee0800 interesting so it seems like the game window is not being recognized. May I ask what language/region of the PC client you are playing on? The reason is that the assistant looks for windows applications with the name "NIKKE", and I suspect that the game window is simply not called that name for the version you are playing on.

Here's a simple solution you can try to find out what your game window is actually called:

  1. start game and close the launcher
  2. start assistant
  3. try the function "select game window" and cycle through the windows to find your game, click "Ok", and then click "reload game". That should auto-resize your selected window, and if you select the right one, it should auto-resize your game. Just keep looking until you find your actual game window.
  4. If it works, remember to save your settings so it knows which window to look for next time.
ianlee0800 commented 1 year ago

Thank you for your help, now the assistant is working properly. Incidentally, the version I am currently playing is the Traditional Chinese version, the server is Taiwan, Hong Kong and Macau, and the name of the window is displayed in Traditional Chinese, I don't know if this causes the assistant not to recognize it properly.

KIvoy commented 1 year ago

hey @ianlee0800 you are welcome and thanks for the feedback. It is very likely that different regions of the game have different display names for their regional package. I'm glad that it's working properly for you now though. Interestingly you are probably not the only person that encountered the issue but you are the first one that I was able to get enough information to debug. I'll include this example in the Q&A section so future folks will suffer less.

KIvoy commented 1 year ago

issue is resolved and I'm closing the thread now.