1hubert / genshin-dialogue-autoskip

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

help, line 19 error #33

Closed deka123A closed 9 months ago

deka123A commented 10 months ago

Traceback (most recent call last): File "C:\Users\adeka\autoskip_dialogue.py", line 19, in if os.environ['WIDTH'] == '' or os.environ['HEIGHT'] == '':


  File "<frozen os>", line 685, in __getitem__
KeyError: 'WIDTH'
1hubert commented 10 months ago

hello!

there's an issue where github changes .env into env.txt, when downloaded as an individual file.

it's supposed to be called .env

it's a file that initially looks like this (when opened with windows notepad):

WIDTH=
HEIGHT=

But after successfuly running the script for the first time, it stores your auto-detected screen resolution, in my case:

WIDTH=1920
HEIGHT=1080

so, make sure that there's a .env file in the same directory as autoskip_dialogue.py, and if there isn't, rename env.txt -> .env (if it exists) or create a new .env file yourself, adhering to the template i've described above.

deka123A commented 9 months ago

it worked thanks so much!

I need to clarify something, to your program to run successfully I need the "auto" at the left up turn on right?

1hubert commented 9 months ago

I need to clarify something, to your program to run successfully I need the "auto" at the left up turn on right?

Yes. There's a setting in Genshin for auto-playing dialogue, make sure it's turned on.

EDIT: My mistake. It needs to be turned off. Disable "Auto-Play Story" in settings.

deka123A commented 9 months ago

why i am asking is that, the auto function waits all of the dialogue texts to be printed and then move to next, sometimes if just click you can skip entire dialogue without looking at it. I though your program does that + choose dialogue option.

1hubert commented 9 months ago

I though your program does that + choose dialogue option.

it should do that. something's wrong.

after running the script on my machine, turns out the Settings->Other->"Auto-Play Story" option needs to be off. sorry for confusing you earlier.

deka123A commented 9 months ago

it seems that it doesnt

only chooses dialogue option, and waits if there's none.

1hubert commented 9 months ago

1) What's your screen resolution? (some people had the same issue when running the game on an ultra wide monitor which has UI elements shifted in comparison to 16:9 monitors) 2) Are you running the game in fullscreen? (you should)

śr., 17 sty 2024, 07:00 użytkownik deka123A @.***> napisał:

it seems that it doesnt

only chooses dialogue option, and waits if there's none.

— Reply to this email directly, view it on GitHub https://github.com/1hubert/genshin-dialogue-autoskip/issues/33#issuecomment-1894991395, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMGVRXQ2P6ADZTEZ2VJA473YO5SIXAVCNFSM6AAAAABBSFJGEWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOJUHE4TCMZZGU . You are receiving this because you modified the open/close state.Message ID: @.***>

deka123A commented 9 months ago

2560 1440 16;9 fullscreen

1hubert commented 9 months ago

thanks!

this friday i'll be visiting a friend who happens to have a monitor with your screen resolution, will test the script on his pc and possibly release a fix.

śr., 17 sty 2024, 10:53 użytkownik deka123A @.***> napisał:

2560 1440 16;9 fullscreen

— Reply to this email directly, view it on GitHub https://github.com/1hubert/genshin-dialogue-autoskip/issues/33#issuecomment-1895460324, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMGVRXSAAJ6Z7Y3RLXWWSODYO6NSHAVCNFSM6AAAAABBSFJGEWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOJVGQ3DAMZSGQ . You are receiving this because you modified the open/close state.Message ID: @.***>