MestreLion / hackmatch

Exapunks Hack*Match Bot
GNU General Public License v3.0
5 stars 2 forks source link

`Pillow was built without XCB support` when running on Windows #3

Closed MestreLion closed 1 year ago

MestreLion commented 1 year ago

@Aratietur care to test if everything is ok now? Use the git version, not the Pypi one... (pip install git+https://github.com/MestreLion/hackmatch.git). If all works now I'll release an updated version on Pypi

Aratietur commented 1 year ago

C:\Users\nikol\AppData\Roaming\Python\Python311\Scripts>hackmatch-bot [2023-09-07 10:47:42 CRITIC] main: Could not find the game config folder: C:\Users\nikol\OneDrive\Dokumente\My Games\EXAPUNKS*\config.cfg --> the error seems to be in "get_steam_user_id(config["steam_user_name"])" <-- when i enter my steam id here the script works again

After fixing the Steam ID i get the following errors n windowed mode: [2023-09-07 10:51:43 WARNIN] gui : Unsupported game window size: (1372, 797), must be one of ((1920, 1080), (1920, 1200), (1600, 900), (1366, 768)) <-- two Monitors, running on Ultrawide [2023-09-07 10:53:06 WARNIN] gui : Unsupported game window size: (1926, 1109), must be one of ((1920, 1080), (1920, 1200), (1600, 900), (1366, 768)) <-- two Monitors, running on Ultrawide [2023-09-07 10:53:46 WARNIN] gui : Unsupported game window size: (1606, 929), must be one of ((1920, 1080), (1920, 1200), (1600, 900), (1366, 768)) <-- Running only on second Monitor

After switching to fullscreen on second monitor (even while main monitor is running) i get the msg: Game window resized: (1920, 1080)

But after that nothing happens?! When i get into hackmatch i waited ~1min in the starting screen and after that i started a new match and waited until the first match failed. But both times the Bot didn't activate.

Don't know if i'm the problem or if there is still something missing in the script :D

Aratietur commented 1 year ago

ok the bot doesn't recognize that the game is running: C:\Users\nikol\AppData\Roaming\Python\Python311\Scripts>hackmatch-bot Read game settings: C:\Users\nikol\OneDrive\Dokumente\My Games\EXAPUNKS*\config.cfg Launching game and waiting 60 seconds for game window Launch game by Steam URI: steam://rungameid/716490 [2023-09-07 11:11:48 CRITIC] main: Game did not start after 60 seconds

This happens when:

EDIT1: Just tested it with my second monitor only --> same result

EDIT2: The TimeOut only occurred when i don't resize the window: C:\Users\nikol\AppData\Roaming\Python\Python311\Scripts>hackmatch-bot Read game settings: C:\Users\nikol\OneDrive\Dokumente\My Games\EXAPUNKS*\config.cfg Launching game and waiting 60 seconds for game window Launch game by Steam URI: steam://rungameid/716490 Read game settings: C:\Users\nikol\OneDrive\Dokumente\My Games\EXAPUNKS*\config.cfg Game window: <Win32Window left="0", top="0", width="2566", height="1469", title="EXAPUNKS"> [2023-09-07 11:21:19 WARNIN] gui : Unsupported game window size: (2566, 1469), must be one of ((1920, 1080), (1920, 1200), (1600, 900), (1366, 768)) Game window resized: (1920, 1080) [2023-09-07 11:24:43 CRITIC] main: Game window closed [error]

In this case the game started on my mainscreen and i moved it to my second one. After getting back to fullscreen on 2nd monitor i got no error why i needed to close the game.

EDIT3: Started it with --verbose (probably read the end first): C:\Users\nikol\AppData\Roaming\Python\Python311\Scripts>hackmatch-bot --verbose [2023-09-07 11:30:37 DEBUG ] main: Namespace(loglevel=10, benchmark=False, watch=False, timeout=850, string=None, path=None, debug=True) [2023-09-07 11:30:37 INFO ] game: Read game settings: C:\Users\nikol\OneDrive\Dokumente\My Games\EXAPUNKS\76561197960902680\config.cfg [2023-09-07 11:30:37 DEBUG ] game: Parsed game settings: {'DisplayIndex': '1', 'EnableCrtDistortion': 'False', 'EnableHistograms': 'True', 'EnableLeaderboards': 'True', 'EnableMultiplayer': 'True', 'FilterProfanity': 'False', 'ForceLowQualityTextures': 'False', 'Fullscreen': 'True', 'GifOutputDirectory': '', 'KeyMapping.Down': '115', 'KeyMapping.Left': '97', 'KeyMapping.Right': '100', 'KeyMapping.Start': '13', 'KeyMapping.Up': '119', 'KeyMapping.X': '106', 'KeyMapping.Y': '107', 'KeyMapping.Z': '108', 'Language': 'English', 'OS.Windows.UseOpenGL': 'False', 'Resolution.Height': '1080', 'Resolution.Width': '1920', 'ShowTenthPercentile': 'False', 'ShowTopPercentile': 'False', 'UseLargeFonts': 'False', 'UseSoftwareCursor': 'False', 'Volume.Music': '29', 'Volume.Sound': '25', 'Volume.Voice': '26'} [2023-09-07 11:30:37 INFO ] main: Launching game and waiting 60 seconds for game window [2023-09-07 11:30:37 INFO ] game: Launch game by Steam URI: steam://rungameid/716490 [2023-09-07 11:31:20 INFO ] game: Read game settings: C:\Users\nikol\OneDrive\Dokumente\My Games\EXAPUNKS\76561197960902680\config.cfg [2023-09-07 11:31:20 DEBUG ] game: Parsed game settings: {'DisplayIndex': '1', 'EnableCrtDistortion': 'False', 'EnableHistograms': 'True', 'EnableLeaderboards': 'True', 'EnableMultiplayer': 'True', 'FilterProfanity': 'False', 'ForceLowQualityTextures': 'False', 'Fullscreen': 'False', 'GifOutputDirectory': '', 'KeyMapping.Down': '115', 'KeyMapping.Left': '97', 'KeyMapping.Right': '100', 'KeyMapping.Start': '13', 'KeyMapping.Up': '119', 'KeyMapping.X': '106', 'KeyMapping.Y': '107', 'KeyMapping.Z': '108', 'Language': 'English', 'OS.Windows.UseOpenGL': 'False', 'Resolution.Height': '900', 'Resolution.Width': '1600', 'ShowTenthPercentile': 'False', 'ShowTopPercentile': 'False', 'UseLargeFonts': 'False', 'UseSoftwareCursor': 'False', 'Volume.Music': '29', 'Volume.Sound': '25', 'Volume.Voice': '26'} [2023-09-07 11:31:20 DEBUG ] gui : Keymap: {: 'a', : 'd', : 'w', : 's', : '\r', : 'j', : 'k'} [2023-09-07 11:31:20 INFO ] main: Game window: <Win32Window left="0", top="0", width="1606", height="929", title="EXAPUNKS"> [2023-09-07 11:31:20 DEBUG ] gui : Taking window screenshot: Rect(left=0, top=0, right=1606, bottom=929) [2023-09-07 11:31:20 WARNIN] gui : Unsupported game window size: (1606, 929), must be one of ((1920, 1080), (1920, 1200), (1600, 900), (1366, 768)) [2023-09-07 11:31:20 DEBUG ] gui : Taking window screenshot: Rect(left=0, top=0, right=1606, bottom=929) ... ... [2023-09-07 11:31:21 DEBUG ] gui : Taking window screenshot: Rect(left=-1, top=8, right=1605, bottom=937) [2023-09-07 11:31:21 DEBUG ] gui : Taking window screenshot: Rect(left=-35, top=96, right=1571, bottom=1025) [2023-09-07 11:31:21 DEBUG ] gui : Taking window screenshot: Rect(left=-170, top=327, right=1436, bottom=1256) [2023-09-07 11:31:21 DEBUG ] gui : Taking window screenshot: Rect(left=-306, top=453, right=1300, bottom=1382) [2023-09-07 11:31:21 DEBUG ] gui : Taking window screenshot: Rect(left=-603, top=578, right=1003, bottom=1507) [2023-09-07 11:31:21 DEBUG ] gui : Taking window screenshot: Rect(left=-924, top=613, right=682, bottom=1542) [2023-09-07 11:31:22 DEBUG ] gui : Taking window screenshot: Rect(left=-1287, top=529, right=319, bottom=1458) [2023-09-07 11:31:22 DEBUG ] gui : Taking window screenshot: Rect(left=-1557, top=383, right=49, bottom=1312) [2023-09-07 11:31:22 DEBUG ] gui : Taking window screenshot: Rect(left=-1698, top=262, right=-92, bottom=1191) [2023-09-07 11:31:22 DEBUG ] gui : Taking window screenshot: Rect(left=-1756, top=196, right=-150, bottom=1125) [2023-09-07 11:31:22 DEBUG ] gui : Taking window screenshot: Rect(left=-1771, top=178, right=-165, bottom=1107) [2023-09-07 11:31:22 DEBUG ] gui : Taking window screenshot: Rect(left=-1771, top=177, right=-165, bottom=1106) [2023-09-07 11:31:22 DEBUG ] gui : Taking window screenshot: Rect(left=-1771, top=177, right=-165, bottom=1106) [2023-09-07 11:31:22 DEBUG ] gui : Taking window screenshot: Rect(left=-1765, top=177, right=-159, bottom=1106) [2023-09-07 11:31:22 DEBUG ] gui : Taking window screenshot: Rect(left=-1755, top=178, right=-149, bottom=1107) [2023-09-07 11:31:22 DEBUG ] gui : Taking window screenshot: Rect(left=-1754, top=178, right=-148, bottom=1107) ...after that always the same... ...until... [2023-09-07 11:31:23 DEBUG ] gui : Taking window screenshot: Rect(left=-1920, top=0, right=0, bottom=1080) [2023-09-07 11:31:23 INFO ] gui : Game window resized: (1920, 1080) [2023-09-07 11:31:23 DEBUG ] gui : Taking window screenshot: Rect(left=-1920, top=0, right=0, bottom=1080) ...after that always the same...

Like the times before i started the game on my 2nd monitor in fullscreen. After that i switched to windowed (1600900) and switched back to fullscreen (19001200) As you can see the bot is taking screenshots and while beeing in windowed mode the coordinates change. but after switching back to fullscreen it's always the same

MestreLion commented 1 year ago

Looks like the 3 issues were solved, and now we advanced to other 2 distinct ones I can see:

The triple backticks must be in its own line, one for opening the block, then your output, then another line of triple backticks (```)