UI elements got moved?
It seem like some UI elements got moved around and the detection isn't working anymore. I could fix the offset for deck_cursor:
ui.py: DECK_CURSOR_ROI_TOP_LEFT = np.array([285, 415])
But I'm not deep enough into all this to fix deck.py and possible following things.
I had a feeling that the detection was off because I tried a different capture device, tried changing the tv color on the switch settings, I even tried running the program on my Mac rather then my pc. Nothing worked.
Not sure if this will help, but have you by any chance tried changing the numbers by the same amount that you did with the deck cursor element?
After that is done, I’m guessing the game screen needs to be reconfigured as well.
Not sure if this will help, but have you by any chance tried changing the numbers by the same amount that you did with the deck cursor element?
No, I haven't. But even the deck screen has different offsets depending on the elements.
If you compare my screenshot to the ones on the test branch (best to overlay them), you can see everything shifted a bit to the right and a tiny bit to the bottom. But in addition to that they added the title bar above the cards so that shifted even more down. And when you compare the green squares on my screenshot, you can see the spacing between the cards is also different.
After that is done, I’m guessing the game screen needs to be reconfigured as well.
Yes, definitely.
So I decided to work on trying to fix it and I discovered some potentially useful things.
First, one of the updates for the game changed the look of the deck selection screen. From looking at old screenshots, there is now a title above the deck, shifting everything down and they are closer together. The left half now has the addition of a second page of stored decks, so those buttons got moved slightly.
Took me awhile to figure out how to turn on debug mode, I thought I was supposed to turn it on in flask when running the program, but eventually I found the checkbox on the website.
From what I observed, the program takes a screenshot at certain times and puts them into memory, it then uses that screenshot with the black and white to see the cards easily, the program is only going to be looking at the part of the screen where those green boxes are in the overlay.
It looks like I’m going to have to run the program with debug mode turned on, then change one of the positions of the tiles, run the program again to see what changed after the program takes the screenshot, change the tile again, give up the existing game and go back to the character screen then run the program again so that the changes appear.
This is going to be tedious, and I think I found what I need to change. If anyone has suggestions or has already made progress on getting the tiles moved I would appreciate the help.
Yes, since the game's UI was updated, all positions need to be adjusted accordingly. I would appreciate it if you could submit a PR to fix that. (My NS was broken. 😭)
Thanks for posting the update in the read.me file. When I was attempting to fix the elements for the program to see the cards in the deck, it seems the timing for when it takes the picture is off as well. When I check the pictures in debug, it isn’t on the correct screen when debugging.
I’m starting the program when my cursor is hovering on one of the players to battle.
I’ll post a screenshot but I’m not sure we’re the timing portion is or if it needs changing.
I'm not sure if there is a new scene or not in the game flow (for example, selecting stages, which doesn't exist in the previous version of game)
If not, you can always increase all numbers in the sleep statements to wait the animation finished.
Otherwise, you might need to insert new commands for those new scenes, like pressing A to select a stage.