1hubert / genshin-dialogue-autoskip

A simple python script to automatically skip dialogue in Genshin Impact
MIT License
56 stars 25 forks source link

Auto selects the bottom option, but not skips the text #37

Closed SoyCbas closed 6 months ago

SoyCbas commented 6 months ago

I installed the script succesfully, and picked my resolution also apparently succesfully, but the text never skips, just the selection boxes.

https://github.com/1hubert/genshin-dialogue-autoskip/assets/131220704/d4f205b3-dd78-4a54-8eb6-ef2288d51494

Also I'm kinda stupid for this coding things so if you need more info just ask or feel free to insult me if I'm being an idiot :).

Using 1366x768 screen Crappy out of date Hp laptop Genshin Impact Ver 4.5 Crappy NPC from Liyue Freshly installed python 3.12.2 Auto Play Off from settings Running from .bat as admin

1hubert commented 6 months ago

it seems like your "auto play on/off" icon in the top-left corner of your video footage is white, which is unexpected as it used to be orangeish and judging from youtube videos like this there wasn't any official change.

try changing line 215 in autoskip_dialogue.py to this:

return pixel(PLAYING_ICON_X, PLAYING_ICON_Y) == (255, 255, 255)
SoyCbas commented 6 months ago

Hi, now I understood the mistake, and yup, the problem was the colors of the button. At first i tried to use 255 255 255 and it did go crazy in the loading screen, so then I used MsPaint to know the RGB values of the button, and change them according to the color of the button. Captura

return pixel(PLAYING_ICON_X, PLAYING_ICON_Y) == (236, 229, 216)

Changing the line to that color fixed the problem. Thank you!

I read the original code and saw that the RGB color was the same as in mspaint, so I don't know what really did the trick but it works now. Thanks for your support <3

1hubert commented 6 months ago

that's great and very clever of you! 🎉🎉 i'm glad you figured it out, and thank you for describing the exact steps you took and providing the exact rgb values!! i'll check if the colors on my end changed too, and if they did will update the script.

pt., 15 mar 2024, 18:24 użytkownik SoyCbas @.***> napisał:

Hi, now I understood the mistake, and yup, the problem was the colors of the button. At first i tried to use 255 255 255 and it did go crazy in the loading screen, so then I used MsPaint to know the RGB values of the button, and change them according to the color of the button. Captura.PNG (view on web) https://github.com/1hubert/genshin-dialogue-autoskip/assets/131220704/339e0489-dbd1-4897-b08d-657a0b7ae4ed

return pixel(PLAYING_ICON_X, PLAYING_ICON_Y) == (236, 229, 216)

Changing the line to that color fixed the problem. Thank you!

— Reply to this email directly, view it on GitHub https://github.com/1hubert/genshin-dialogue-autoskip/issues/37#issuecomment-2000117316, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMGVRXXAMOUWFSLV534CEITYYMVF7AVCNFSM6AAAAABEVLPMHGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMBQGEYTOMZRGY . You are receiving this because you commented.Message ID: @.***>

SoyCbas commented 6 months ago

Apparently there is something to do with changing the resolution in the game that's weird, so for example I was using a lower resolution config with alt+enter to "force" the game to fullscreen (using a lower 16:9 resolution to fill the entire screen [also the menu doesn't change it's size too much if you ask]) but when I did that the script didn't skip the text, such as before, and I checked it's RGB colors again. They're a little bit different so the script didn't work.

Sin título

This only happens when change the resolution to another different to the primary monitor even if it's just by a few pixels, so if you're running the game with the original screen res that the game gives you, then there shouldn't be any problems and the colors are the same as in the script. But if you change the screen resolution the colors change in the game and the script doesn't work so you need to edit that line to the colors that appear on the image.

return pixel(PLAYING_ICON_X, PLAYING_ICON_Y) == (235, 228, 216)

I don't know if the colors change on different screens, but if someone else is having this problem, his colors may differ a little bit.

I hope that this helps someone else having this problem, and again thank you!