marcincichocki / breach-protocol-autosolver

Solve breach protocol minigame in second(s). Windows/Linux/GeForce Now/Google Stadia. Every language.
MIT License
67 stars 4 forks source link

Wrong or no input. Default settings. #374

Closed LeaLangley closed 9 months ago

LeaLangley commented 9 months ago

Describe the bug

Wrong or no input. In keyboard mode , with AHK or NirCmd it does nothing then put the mouse in top left of my screen. In mouse mode , with AHK or NirCmd it falsely clicks positions on screen leading to failure.

To Reproduce

im not sure , maybe its my screen seize ( 1680 x 1050 ) , but i have the right screen selected.

Expected behavior

Solve without issues.

Software information

Additional note

it reads the breach perfectly and finds a valid route , just the input dosnt work as expected. https://cdn.discordapp.com/attachments/974231454106124288/1165125093245075456/image.png

the version of https://gitlab.com/jkchen2/cpah works just fine in default state and the ahk input version , but i would love to use this project instead.

marcincichocki commented 9 months ago

@LeaLangley Thanks for opening the issue. Let me start by saying that ahk input is mostly for geforce now and stadia users. So I'll cover only nircmd here.

I would suggest you to check if running nircmd on its own work. For this please:

  1. open window command line (type cmd in windows menu and hit enter)
  2. paste and run this command: timeout /t 3 & %localAppData%\Programs\breach-protocol-autosolver\resources\win32\nircmd\nircmd.exe sendkeypress 0x1b
  3. Alt tab to Cyberpunk 2077.
  4. after ~3 seconds you should see escape key being pressed (main menu should toggle).

I can't really think why above wouldn't work (at that's pretty much what autosolver is doing). It might be that some program is blocking nircmd from sending keys. I cannot tell yet.

LeaLangley commented 9 months ago

i havent changed any navigation keys in game (https://gitlab.com/jkchen2/cpah works with the same keys just fine)

i think the issue is that the mouse dosnt goes over the first Code so the navigation key dont get registered, since u cant move in the breach with navigation keys until u move u mouse over a code.

i also disabled all mods and made double checks but with no success.

the timeout /t 3 & %localAppData%\Programs\breach-protocol-autosolver\resources\win32\nircmd\nircmd.exe sendkeypress 0x1b test worked as expected and did press ESC/ open Pause menu

btw where is the settings file for the tool ? i wanted to reset them just to be sure , i reinstalled the tool but the settings keept the same , also i for future , if we manage to fix the issue or the tool works , i would like to reset the stats it shows.

LeaLangley commented 9 months ago

yeah im starting to get the feeling

"i think the issue is that the mouse dosnt goes over the first Code so the navigation key dont get registered, since u cant move in the breach with navigation keys until u move u mouse over a code."

is actually the issue , the mouse get moved top left of my screen , if im quick and move my mouse fast to the breach codes , it does navigate in them.

maybe there is a issue with getting the right position / sending input in the right position.

those are my screens: 1th screen , Left , 1280 x 1024 , not main screen. 2th screen , right , 1680 x 1050 , my main screen.

cyberpunk is played on my main/2th screen , and in beach protocol auto solver it is selected as my screen. cyberpunk is played in 1680 x 1050 and windowed borderless.

marcincichocki commented 9 months ago

You're right. This is an issue with the game. To reproduce this, just move cursor to the top left corner and try to use arrow keys to select codes. Spoiler, you cannot. I already had an issue with 1360x768 resolution, but the workaround was easy there.

So when cursor is moved to top left corner by either ahk or nircmd, breach protocol does not register any input. This only applies to some specific resolutions tho like yours.

The cursor must be moved away to not mess ocr up. Maybe I could move it to either one of the bottom corners?

LeaLangley commented 9 months ago

@marcincichocki i just checked (by myself) if i move courser to the bottom i can use navigation keys . if i move it to top i cant , so moving it in the bottom area should work.

2 more things. a reset to default settings and reset stats buttons would be nice. as soon as the problem is fixed i wanna reset my stats so they are accurate.

i appreciate the time and help from u and im looking forward of using the tool with fixed version ^^

marcincichocki commented 9 months ago

@LeaLangley Fix was deployed in version 2.11.0. Reset for settings and stats is also there. Thank you for opening this issue.

LeaLangley commented 9 months ago

i just tested it and it works great , thank you a lot! ^^