brianuuu / AutoController_swsh

Automation for various tasks in Pokemon Sword & Shield and other Pokemon games on Nintendo Switch
70 stars 19 forks source link

TableturfCloneJelly can't execute for long time #17

Closed StarFlyFUN closed 6 months ago

StarFlyFUN commented 6 months ago

[ERROR] Unable to detect turn start for too long This error will occur frequently. Can you modify the program to execute the surrender command when a timeout event occurs, and then rerun the script to achieve uninterrupted operation.

brianuuu commented 6 months ago

The error depends on what happened before it, post the log here so I can debug it

StarFlyFUN commented 6 months ago

The error depends on what happened before it, post the log here so I can debug it

I have resolved the issue. My system language was not set to English, which caused AI recognition to be abnormal. But what's interesting is that it can run for a long time before it ends. thanks you

brianuuu commented 6 months ago

hm system language doesn't change anything for this program

StarFlyFUN commented 6 months ago

hm system language doesn't change anything for this program

Maybe not, you can try to reproduce it by changing the language to "简体中文". AI will randomly get stuck during the calculation steps. After changing to English yesterday, I woke up today and found that the program had been executed more than 100 times If any further malfunctions occur, I will submit the logs later Have a nice day ,thank you

StarFlyFUN commented 6 months ago

2023-12-26_07-45-10_Log.log Due to the cold weather in the northern hemisphere, it's a bit difficult to get out of bed. But I thought for a while, and for your convenience in debugging, I uploaded the logs

brianuuu commented 6 months ago

that is really short and doesn't have any significant warnings or fault, this is mostly caused by camera delay being longer than 1 second, and most likely caused by using the PC while the program is running making the video output start lagging

StarFlyFUN commented 6 months ago

that is really short and doesn't have any significant warnings or fault, this is mostly caused by camera delay being longer than 1 second, and most likely caused by using the PC while the program is running making the video output start lagging

屏幕截图 2023-12-26 083149 I have used camera delay testing before, but if it is a delay issue, even if I switch languages to English, this issue should always occur

brianuuu commented 6 months ago

the delay accumulates over time, was the previous error log happens after another error happened before it and without resetting the camera?

StarFlyFUN commented 6 months ago

the delay accumulates over time, was the previous error log happens after another error happened before it and without resetting the camera?

I tried more than ten times yesterday, including restarting my PC. But when the language is set to Chinese, the problem will quickly occur. However, when I set the switch to English, this kind of problem did not occur again. Even when I use my PC at the same time, the program always runs stably. My personal guess is that the Chinese characters in the screen may have caused interference

brianuuu commented 6 months ago

ah ok I think I know why, when it tries to detect turn start it wants to detect the card name's grey box, but Chinese characters can cover a lot of the grey part so it couldn't detect it

StarFlyFUN commented 6 months ago

ah ok I think I know why, when it tries to detect turn start it wants to detect the card name's grey box, but Chinese characters can cover a lot of the grey part so it couldn't detect it

0