Giter Site home page Giter Site logo

genshin-dialogue-autoskip's Introduction

genshin-dialogue-autoskip (Keyboard and Mouse Only Version)

Overview

This script automatically skips dialogue in Genshin Impact, always chooses the bottom dialogue option.

Using third-party software is against the game's ToS. Use at your own discretion.

Requirements

  • The game running on the primary display
  • The script run as Admin to allow key and mouse emulation
  • Required Python packages installed with pip install -r requirements.txt
  • In the game's settings, navigate to Settings > Other and set Auto-Play Story to Off.

Usage

  1. Run autoskip_dialogue.py with Admin privileges
    • Tip: You can right-click the handy run.bat file and select "Run as administrator"
  2. Confirm that the auto-detected resolution matches your screen dimensions (it will be saved in .env)
  3. When you're ready, press F8 on your keyboard to start the main loop!

Experimental Gamepad Support

  • The main branch of this repo which you're currently on, is for keyboard+mouse only. If you're using a gamepad to play the game, switch to the gamepad_only branch!

genshin-dialogue-autoskip's People

Contributors

1hubert avatar dunggramer avatar levyvix avatar livour avatar phaes avatar vlsido avatar xdenotte avatar yotamziv298 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

genshin-dialogue-autoskip's Issues

Auto selects the bottom option, but not skips the text

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

Mi.video.mp4

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

Merge controller branch into main

Add the functionality of the controller branch into the main branch ,It's like 20 commits behind.

I could implement this myself but It says that the Controller branch's readme that it is still experimental (Not sure if Readme is up to date). If it's really is still experimental, what other tests/features does it need?

and btw, Is it supposed to work automatically when switching between keyboard/gamepad or do you need to update the .env?

What do I do over here? it says no module named win32api

When I run the batch file as administrator it opens up this and shows this

C:\Windows\System32>pushd "A:\genshin-dialogue-autoskip-main"

A:\genshin-dialogue-autoskip-main>py ./autoskip_dialogue.py
Traceback (most recent call last):
File "A:\genshin-dialogue-autoskip-main\autoskip_dialogue.py", line 6, in
from win32api import GetSystemMetrics
ModuleNotFoundError: No module named 'win32api'
Press any key to continue . . .

ModuleNotFoundError: No module named 'Vgamepad'

\genshin-dialogue-autoskip-main\autoskip_dialogue.py", line 5, in
import vgamepad as vg
ModuleNotFoundError: No module named 'vgamepad'

Do I have to install a virtual controller or something?

2560x1440 support

hey,

I'm having a hard time running this is 1920 x 1080 windowed. My game wont let me play that fullscreen.
Are you considering making this work for 2560 x 1440 ?
I assume this would require changing every pixel coordinate in the script, but perhaps you know the values already.

Thanks a lot 👍

Text isn't skipped at resolution: 3440x1440

When the program is running the dialog buttons are being clicked but the text it'self isn't being skipped. I've tried reinstalling the required packages and python and redownloaded the software but I havn't gotten it to work yet. It used to work like a charm on my smaller older monitor. I checked the .env and it has the correct resolution of my new monitor.

Problem with module imports

I recive this error after installing python and trying to execute file:

import vgamepad as vg
ModuleNotFoundError: No module named 'vgamepad'

Can't run program

I installed everything from requirments.txt
and when I try to run run.bat
I get this

Welcome to Genshin Impact Dialogue Skipper

Traceback (most recent call last):
File "D:\genshinskip\autoskip_dialogue.py", line 19, in
if os.environ['WIDTH'] == '' or os.environ['HEIGHT'] == '':
~~~~~~~~~~^^^^^^^^^
File "", line 685, in getitem
KeyError: 'WIDTH'
Press any key to continue . . .

[Click here] for ALL resolution support (Keyboard Mouse Only)

Summary

I've edited the KBM version to include all resolution support and some other neat features. Sadly, I've been unable to do the same for the controller version due to the way we're detecting inputs.

Here's the link to the .bat and .py file or download it from my fork, for anyone interested in this all resolution version! (GitHub doesn't let users attach .bat or .py files)

Please leave a comment if you're having issues with any particular resolutions and I'll try work on a fix ASAP.

I'll be continuing development and hoping to get controller support and a UI setup before submitting a pull request.

Solution

We're scaling the resolution by dividing the variables provided and multiplying by the detected resolution.

Controller and other issues

The issue with the controller version is how we're detecting inputs. TL;DR, it doesn't work (at least not as of Sep 2023). From my testing the program isn't able to detect the auto play button at all, even in the KBM solution I've attached. It's basically redundant so we should remove it.

Extra info (for anyone interested)

It seems that the only thing triggering the selecting of dialogue is the "is_dialogue()" function, in the controller version, and the "is_dialogue_option_available()" function, in the KBM version, because of this, and the way the conditions are setup in main, the program just tries every dialogue selection option regardless of UI (KBM, DS4, Xbox) and hopes one works (define_ui() and is_dialogue_playing() are currently broken, they can be removed and the code still works). We'll need a better way of detecting game pads (they do exist, it can be done).

Stuck on "RUNNING"

when running the script, it says running and nothing happens.

bottom option isn't selected and dialogue isnt skipped.

any help is appreciated, thank you!

EDIT: running as admin, everything i assume is downloaded correctly as i am not getting an error

resolution is set in env as 1920x1080

runtime error

hi im getting this issue

any idea what could be causing this ?

Thank you!

Capture

pyautogui not found

So it cant find pyautogui
image
but if I try to install it
image
it says I already have it

Also for some reason the command in the txt isnt working idk
image

My friend told me to try it in VS Code aswell as running run.bat as admin which both gave me the same output

help, line 19 error

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

ModuleNotFoundError: No module named 'vgamepad' after installing vgamepad

Just downloaded this script and tried to run it but get this error every time. I installed the contents of the requirements.txt file successfully with pip. I tried restarting and moving the script to my C drive, but it still gets the same error. Sorry if this is a dumb question, I don't really know anything about coding.

C:\Windows\system32>pushd "D:\Toolkit\Mirror\Desktop\Applications\Scripts\genshin-dialogue-autoskip-main"

D:\Toolkit\Mirror\Desktop\Applications\Scripts\genshin-dialogue-autoskip-main>py ./autoskip_dialogue.py
Traceback (most recent call last):
File "D:\Toolkit\Mirror\Desktop\Applications\Scripts\genshin-dialogue-autoskip-main\autoskip_dialogue.py", line 5, in
import vgamepad as vg
ModuleNotFoundError: No module named 'vgamepad'

error

ModuleNotFoundError: No module named 'win32api'

xbox gamepad support

Hello!, I would like to know if support for xbox-like gamepads is possible, because the script does not work quite correctly, it does not skip dialogs, and at the stage of choosing an answer, the script moves the options up and down. Perhaps I'm doing something wrong?

need help w the screen resolution part

it says this and im not sure how to fix it, this is the only part im struggling ;-;

if os.environ['WIDTH'] == '' or os.environ['HEIGHT'] == '':
~~~~~~~~~~^^^^^^^^^
File "frozen os", line 679, in getitem
KeyError: 'WIDTH'

Not working

Nothing happens when it runs. Only sound on start? that new device connected.

1366x768 support

Hi, thanks for the script. Here is a modified values that works for me on 1366x768 dispaly

BOTTOM_DIALOGUE_MIN_X = 921
BOTTOM_DIALOGUE_MAX_X = 1237
BOTTOM_DIALOGUE_MIN_Y = 553
BOTTOM_DIALOGUE_MAX_Y = 583

PLAYING_ICON_X = 48
PLAYING_ICON_Y = 21

DIALOGUE_ICON_X = 921
DIALOGUE_ICON_LOWER_Y = 574
DIALOGUE_ICON_HIGHER_Y = 562

LOADING_SCREEN_X = 1200
LOADING_SCREEN_Y = 700

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.