Xian55 / WowClassicGrindBot

Highly configurable and responsive World of Warcraft Classic pixel Grind Bot - No DLL injection or memory tampering, just screen capture and input simulation.
187 stars 127 forks source link

Frame configuration Startup failed! #600

Closed cppbeliever closed 4 months ago

cppbeliever commented 4 months ago

@Xian55 Hello! I get error when start Frame Configuration: err1:Source directory does not exist or could not be found: .\Addons\
There is no such folder(Addons) in the directory(WowClassicGrindBot-dev\BlazorServer) err2:Unable to return normal mode!

log: [16:22:10:288 I] [Program ] zh 2024/7/5 16:22:10 +08:00 [16:22:10:564 I] [Program ] Pid: 121688 [16:22:10:565 I] [Program ] Version: 3.4.3.55417 [16:22:10:659 I] [Program ] Addon version: 1.7.57 [16:22:10:939 I] [Lifetime ] Now listening on: http://localhost:5000 [16:22:10:942 I] [Lifetime ] Application started. Press Ctrl+C to shut down. [16:22:10:943 I] [Lifetime ] Hosting environment: Development [16:22:10:943 I] [Lifetime ] Content root path: D:\HuB\WowClassicGrindBot-dev\BlazorServer [16:22:12:701 D] [WowScreenDXGI ] DataFrames 0 - Texture: Size [ Width=1, Height=1 ] [16:22:12:715 I] [WowScreenDXGI ] Rectangle [ X=0, Y=0, Width=3840, Height=2160 ] - Windowed Mode: False - Scale: 2.00 - Monitor Rect: Left: 0, Top: 0, Right: 3840, Bottom: 2160 - Monitor Index: 0 [16:22:12:718 I] [Program ] WowScreenDXGI [16:22:29:952 I] [AddonConfigurator] DeleteAddon -> Unique Addon Exists

[16:22:29:964 E] [AddonConfigurator] Source directory does not exist or could not be found: .\Addons\

[16:22:30:013 I] [AddonConfigurator] CopyAddonFiles - Success [16:22:30:027 I] [AddonConfigurator] Install - Success [16:22:30:043 I] [ExecGameCommand] /reload [16:22:30:333 I] [WowProcessInput] [Enter] press random 106ms [16:22:30:575 I] [WowProcessInput] [Enter] press random 108ms [16:23:05:331 D] [WowScreenDXGI ] DataFrames 0 - Texture: Size [ Width=1, Height=1 ] [16:23:05:332 D] [FrameConfigurator] ResetConfigState [16:23:05:361 I] [FrameConfigurator] Found WowProcess with pid=121688 WowClassic [16:23:05:393 I] [FrameConfigurator] Client window: Rectangle [ X=0, Y=0, Width=3840, Height=2160 ] [16:23:05:446 I] [FrameConfigurator] Addon installed! Version: 1.7.57 [16:23:05:446 I] [FrameConfigurator] Enter configuration mode. [16:23:05:962 I] [ExecGameCommand] /qwer [16:23:06:241 I] [WowProcessInput] [Enter] press random 118ms [16:23:06:477 I] [WowProcessInput] [Enter] press random 118ms [16:23:06:619 I] [FrameConfigurator] DataFrameMeta { Hash = 10201106, Spacing = 1, Sizes = 2, Rows = 1, Count = 106 } [16:23:07:261 I] [FrameConfigurator] Exit configuration mode. [16:23:07:262 I] [ExecGameCommand] /qwer [16:23:07:551 I] [WowProcessInput] [Enter] press random 115ms [16:23:07:798 I] [WowProcessInput] [Enter] press random 119ms [16:23:08:418 E] [FrameConfigurator] Unable to return normal mode! [16:23:08:499 D] [WowScreenDXGI ] DataFrames 0 - Texture: Size [ Width=1, Height=1 ] [16:23:08:505 D] [FrameConfigurator] ResetConfigState [16:23:08:507 I] [FrameConfigurator] Frame configuration was incomplete! Please try again, after resolving the previusly mentioned issues... [16:23:08:508 D] [WowScreenDXGI ] DataFrames 0 - Texture: Size [ Width=1, Height=1 ] [16:23:08:541 D] [FrameConfigurator] ResetConfigState

Xian55 commented 4 months ago

Hello the c# build process copies the Addons folder into the output.

The build process ensures the all the necessary folders and files exists where they needs to be.

cppbeliever commented 4 months ago

@Xian55 err2:Unable to return normal mode!

why is that?

Xian55 commented 4 months ago

Be sure that in the following folder D:\HuB\WowClassicGrindBot-dev\BlazorServer\Addons does exists.

With the content of D:\HuB\WowClassicGrindBot-dev\Addons

cppbeliever commented 4 months ago

@Xian55
I made sure the following directories exist (by manually copying them,There is no Addons folder when building with c#) "D:\HuB\WowClassicGrindBot-dev\Addons"

Xian55 commented 4 months ago

Be sure that the game window(top left hand corner) always visible, always on top and can be seen by you.

During the FrameConfiguration process, the game has to be always on top, if you see the game screen then the c# code can seen it as well.

Sometimes you need to click at the game so the input sending like pressing the enter and copy and paste the addon command works fine.

Like pasting this command in the /qwer chat.

If you stuck at this process you might want to do a manual /reload in order to set the addon in the proper mode, before initiating the Frame Configuration

cppbeliever commented 4 months ago

@Xian55
i made sure the game window(top left hand corner) always visible, always on top and can be seen.

When I manually type /qwer, the character does not respond.

Xian55 commented 4 months ago

When I manually type /qwer, the character does not respond.

After typing the /qwer at the top left corner of the screen the coloured pixel cells should change mode.

There are two modes

You may want to look at these https://github.com/Xian55/WowClassicGrindBot/wiki/Guidance-for-good-DataFrame

cppbeliever commented 4 months ago

@Xian55 I type /qwer into the game window and the upper left corner turns various colors (only shade of blues), but my bot doesn't respond.

Xian55 commented 4 months ago

I type /qwer into the game window and the upper left corner turns various colors (only shade of blues)

That is the correct behaviour, that command only mean to check if the addon is installed to your game and responds the given command.

but my bot doesn't respond.

That's fine.


If you have troubles with the FrameConfiguration Auto mode, you can try the Manual one, and see in what step the flow is broken for you. Everything what you need to do is going to be presented.

cppbeliever commented 4 months ago

@Xian55

When I start frame configuration manually the following message appears: “Addon Rect(Size [ Width=0, Height=0 ]) size issue. Either too small or too big!“

it's a warning

Xian55 commented 4 months ago

That's correct, during the very first read, there's no read value that's why the [Width=0, Height=0] are zero.

On the other hand i can only provide help if you show me all of the log messages, cherry picking one line can be miss leading, i cannot see the big picture.

cppbeliever commented 4 months ago

@Xian55

unable to read player class! 2222

Xian55 commented 4 months ago

Could you send me an image which shows both the game and the browser as well?


image This is correct behaviour, the Size and Rows and Count values are way too high, probably reading the pixels from another application?

Be sure that the game window top left corner does not obstructed by any other window(like the browser what you using).

cppbeliever commented 4 months ago

@Xian55

My game client and browser are on the same computer, but after I click the start button of frame configuration, I will manually switch back to the game client, and the game client will be on top, so there is no object that will block the upper left corner of the game client.

Xian55 commented 4 months ago

Make the browser window to attach to the right side of the screen(spit the screen half), so the game window top left corner always can be seen.

cppbeliever commented 4 months ago

out20240705.log

this is my blazor server log.

Xian55 commented 4 months ago

DataFrameMeta { Hash = 10201106, Spacing = 1, Sizes = 2, Rows = 1, Count = 106 }

This seems to be a correct reading.

cppbeliever commented 4 months ago

@Xian55 I found the reason. I accidentally deleted a file called frame_config.json(WowClassicGrindBot-dev\HeadlessServer\). How can I get it back? It is not in the code and it will not be automatically generated when I rebuild it with C#.

Xian55 commented 4 months ago

frame_config.json is generated by the FrameConfiguration process. https://github.com/Xian55/WowClassicGrindBot/issues/600#issuecomment-2210551643

After you finish it either by Auto or the Manual mode.

cppbeliever commented 4 months ago

@Xian55 thanks!

Xian55 commented 4 months ago

if you want to run headless server, you have to complete the Frame Configuration process first in the BlazorServer application, this going to generate the frame_config.json. Once you have a working BlazorServer application then you can use that config to feed into headless.

You can use the following script to make it possible to start using HeadlessServer, run.bat

cppbeliever commented 4 months ago

@Xian55 thanks!

cppbeliever commented 4 months ago

@Xian55

I get error when start set up frame configuration(auto->start).There is no obstruction in the upper left corner of my game client, only a fill-in-the-blank box.

error log: Unable to identify ClientVersion UnitRace and UnitClass!

Xian55 commented 4 months ago

Unable to identify ClientVersion UnitRace and UnitClass!

Please provide the full log file, picking a single line does not tell the whole story of your problem.

Please provide a screenshot of your running game client.

Xian55 commented 4 months ago

i'm seeing that you are keep using new addon names, be sure to delete the old addon instance INSTALL_LOCATION/Interface/Addons

cppbeliever commented 4 months ago

@Xian55 Before creating the new addon name, I deleted the old addons from the directory (World of Warcraft\classic\Interface\AddOns)

Xian55 commented 4 months ago

Please enable the following command to see if theres any LUA errors in-game

https://www.wowace.com/projects/rarity/pages/faq/how-to-enable-and-disable-script-errors-lua-errors

You can, however, enable them using this command:

/console scriptErrors 1

Once you're done reporting a problem, and no longer wish to see error messages, feel free to disable them with this command:

/console scriptErrors 0
cppbeliever commented 4 months ago

@Xian55 After I used the first command in the game, I clicked frame configuration:auto->start, and no Lua errors were reported in the game.

Xian55 commented 4 months ago

After carefully inspecting your provided image i can see a color of greenish/brownish/yellowish which does not supposed to be there.

image

cppbeliever commented 4 months ago

@Xian55 Is it because my wow version (3.4.3(55417)) is not supported?

Xian55 commented 4 months ago

If it is a classic client, it should work unless you having LUA errors in game.

However the current latest game clients from the classic clients are:

Is there a live classic version of Wrath of the lich king ?

Xian55 commented 4 months ago

Are you using any kind of overlay application such as

Also i'm seeing some weird watermarks on your screen image

cppbeliever commented 4 months ago

@Xian55

I installed the software(Steam,Discord) ,but it doesn't start. I don't have these software(RivaTuner Statistic server,f.lua) installed.

The software in the picture above has no effect, because I ran this software yesterday and my robot ran normally.

Xian55 commented 4 months ago

Are you playing on the official servers ?

cppbeliever commented 4 months ago

@

Are you playing on the official servers ?

no

Xian55 commented 4 months ago

Can you run the following commands in-game and show me your results

You can use the /dump command to get a value.

So it is worth to mention that the addon name is different for everyone, it depends on what kind of name you chosen, last time you picked cgxh and pppp. So based on that i can send a template.

/dump pppp.C.CHARACTER_RACE_ID

/dump pppp.C.CHARACTER_CLASS_ID

/dump pppp.ClientVersion

Please show me the results of these commands you might need to change the pppp part!

cppbeliever commented 4 months ago

@Xian55

run command: /dump pppp.C.CHARACTER_RACE_ID return:[1]=7 run command: /dump pppp.C.CHARACTER_CLASS_ID return:[1]=8 run command: /dump pppp.ClientVersion return:[1]=4

Xian55 commented 4 months ago

That means you are a Gnome Mage with Wrath client. The addon works fine.

However for some reason the backend the c# code cannot read the the addon at the top left hand corner.

You might try to run the game not exclusive fullscreen mode.

Either

You might also try to run the BlazorServer.exe with admin privileges, and make sure the world of Warcraft client is NOT running with admin privileges. The goal is to BlazorServer.exe have higher privileges then the game.

Normally BlazorServer.exe does not requires admin privileges, however for debugging purposes we can check it.

cppbeliever commented 4 months ago

@Xian55 I set the game client to window mode, and then started Blazor Server as an administrator, but the problem still exists.

out20240705.log

cppbeliever commented 4 months ago

@Xian55 When I click auto->start, sometimes it will automatically enter /yy three times in the game chat window, and sometimes it will enter /yy twice. It's very strange.

Xian55 commented 4 months ago

After you press the Auto > Start you may try to click anywhere on the game screen, for me sometimes switching from the browser to the game does not work properly.

At my side works well, with the live sod ptr client.

[16:32:59:677 I] [Program        ] en 05/07/2024 16:32:59 +02:00
[16:32:59:828 I] [Program        ] Pid: 15444
[16:32:59:828 I] [Program        ] Version: 1.15.3.55391
[16:32:59:898 I] [Program        ] Addon version: 1.7.59
[16:33:00:198 I] [Lifetime       ] Now listening on: http://localhost:5000
[16:33:00:201 I] [Lifetime       ] Application started. Press Ctrl+C to shut down.
[16:33:00:202 I] [Lifetime       ] Hosting environment: Development
[16:33:00:202 I] [Lifetime       ] Content root path: X:\Programming\WowClassicGrindBot\BlazorServer
[16:33:01:212 D] [WowScreenDXGI  ] DataFrames 0 - Texture: Size [ Width=1, Height=1 ]
[16:33:01:252 I] [WowScreenDXGI  ] Rectangle [ X=3, Y=39, Width=1920, Height=1080 ] - Windowed Mode: True - Scale: 1.25 - Monitor Rect: Left: 0, Top: 0, Right: 3440, Bottom: 1440 - Monitor Index: 0
[16:33:01:253 I] [Program        ] WowScreenDXGI
[16:33:06:137 D] [WowScreenDXGI  ] DataFrames 0 - Texture: Size [ Width=1, Height=1 ]
[16:33:06:138 D] [FrameConfigurator] ResetConfigState
[16:33:06:167 I] [FrameConfigurator] Found WowProcess with pid=15444 WowClassicT
[16:33:06:188 I] [FrameConfigurator] Client window: Rectangle [ X=3, Y=39, Width=1920, Height=1080 ]
[16:33:06:211 I] [FrameConfigurator] Addon installed! Version: 1.7.59
[16:33:06:211 I] [FrameConfigurator] Enter configuration mode.
[16:33:06:713 I] [ExecGameCommand] /dc
[16:33:07:090 I] [WowProcessInput] [Enter] press random 127ms
[16:33:07:359 I] [WowProcessInput] [Enter] press random 112ms
[16:33:07:499 I] [FrameConfigurator] Addon installed! Version: 1.7.59
[16:33:07:499 I] [FrameConfigurator] Enter configuration mode.
[16:33:08:002 I] [ExecGameCommand] /dc
[16:33:08:272 I] [WowProcessInput] [Enter] press random 117ms
[16:33:08:606 I] [WowProcessInput] [Enter] press random 100ms
[16:33:08:828 I] [FrameConfigurator] DataFrameMeta { Hash = 10101106, Spacing = 1, Sizes = 1, Rows = 1, Count = 106 }
[16:33:08:886 I] [FrameConfigurator] Exit configuration mode.
[16:33:08:887 I] [ExecGameCommand] /dc
[16:33:09:197 I] [WowProcessInput] [Enter] press random 117ms
[16:33:09:530 I] [WowProcessInput] [Enter] press random 101ms
[16:33:10:216 D] [FrameConfigurator] DataFrameMeta { Hash = -1, Spacing = 0, Sizes = 0, Rows = 0, Count = 0 }
[16:33:10:233 D] [WowScreenDXGI  ] DataFrames 106 - Texture: Size [ Width=267, Height=1 ]
[16:33:10:306 I] [FrameConfigurator] Found SoM Dwarf Paladin!
[16:33:10:371 I] [FrameConfigurator] Frame configuration was successful! Configuration saved!
[16:33:10:384 D] [FrontendUpdate ] Thread stopped!
[16:33:10:390 W] Thread stopped!
[16:33:16:388 I] [Lifetime       ] Application is shutting down...
Xian55 commented 4 months ago

After carefully inspecting your provided image i can see a color of greenish/brownish/yellowish which does not supposed to be there.

image

If you disable the addon, does that yellow color still remains at top left corner ? That yellow color does not supposed to be there!

image

Xian55 commented 4 months ago

That color should look like this during configuration mode. image

Like it was stated in the readme.md, be sure to use the default Contrast, Brightness and Gamma settings image

cppbeliever commented 4 months ago

After carefully inspecting your provided image i can see a color of greenish/brownish/yellowish which does not supposed to be there. image

If you disable the addon, does that yellow color still remains at top left corner ? That yellow color does not supposed to be there!

image

After disabling the plugin, there is no color block in the upper left corner of the game.

cppbeliever commented 4 months ago

That color should look like this during configuration mode. image

Like it was stated in the readme.md, be sure to use the default Contrast, Brightness and Gamma settings image

I set it up like you did.

Xian55 commented 4 months ago

Resolution should not be a problem nor does the fullscreen and windowed mode.

using 4K fullscreen settings

[16:51:39:641 I] [Program        ] en 05/07/2024 16:51:39 +02:00
[16:51:39:798 I] [Program        ] Pid: 14308
[16:51:39:799 I] [Program        ] Version: 1.15.3.55391
[16:51:39:871 I] [Program        ] Addon version: 1.7.59
[16:51:39:905 E] [Program        ] FrameConfig doesn't exists or window rect is different then config!
[16:51:40:167 I] [Lifetime       ] Now listening on: http://localhost:5000
[16:51:40:172 I] [Lifetime       ] Application started. Press Ctrl+C to shut down.
[16:51:40:172 I] [Lifetime       ] Hosting environment: Development
[16:51:40:173 I] [Lifetime       ] Content root path: X:\Programming\WowClassicGrindBot\BlazorServer
[16:51:41:266 D] [WowScreenDXGI  ] DataFrames 0 - Texture: Size [ Width=1, Height=1 ]
[16:51:41:298 I] [WowScreenDXGI  ] Rectangle [ X=0, Y=0, Width=3440, Height=1440 ] - Windowed Mode: False - Scale: 1.25 - Monitor Rect: Left: 0, Top: 0, Right: 3440, Bottom: 1440 - Monitor Index: 0
[16:51:41:300 I] [Program        ] WowScreenDXGI
[16:51:44:936 D] [WowScreenDXGI  ] DataFrames 0 - Texture: Size [ Width=1, Height=1 ]
[16:51:44:937 D] [FrameConfigurator] ResetConfigState
[16:51:44:952 I] [FrameConfigurator] Found WowProcess with pid=14308 WowClassicT
[16:51:44:984 I] [FrameConfigurator] Client window: Rectangle [ X=0, Y=0, Width=3440, Height=1440 ]
[16:51:45:005 I] [FrameConfigurator] Addon installed! Version: 1.7.59
[16:51:45:006 I] [FrameConfigurator] Enter configuration mode.
[16:51:45:508 I] [ExecGameCommand] /dc
[16:51:45:788 I] [WowProcessInput] [Enter] press random 100ms
[16:51:46:122 I] [WowProcessInput] [Enter] press random 128ms
[16:51:46:365 I] [FrameConfigurator] Addon installed! Version: 1.7.59
[16:51:46:366 I] [FrameConfigurator] Enter configuration mode.
[16:51:46:867 I] [ExecGameCommand] /dc
[16:51:47:157 I] [WowProcessInput] [Enter] press random 103ms
[16:51:47:430 I] [WowProcessInput] [Enter] press random 124ms
[16:51:47:611 I] [FrameConfigurator] DataFrameMeta { Hash = 10101106, Spacing = 1, Sizes = 1, Rows = 1, Count = 106 }
[16:51:47:672 I] [FrameConfigurator] Exit configuration mode.
[16:51:47:673 I] [ExecGameCommand] /dc
[16:51:47:897 I] [WowProcessInput] [Enter] press random 118ms
[16:51:48:105 I] [WowProcessInput] [Enter] press random 100ms
[16:51:48:757 D] [FrameConfigurator] DataFrameMeta { Hash = -1, Spacing = 0, Sizes = 0, Rows = 0, Count = 0 }
[16:51:48:766 D] [WowScreenDXGI  ] DataFrames 106 - Texture: Size [ Width=355, Height=1 ]
[16:51:48:842 I] [FrameConfigurator] Found SoM Dwarf Paladin!
[16:51:48:883 I] [FrameConfigurator] Frame configuration was successful! Configuration saved!
[16:51:48:899 D] [FrontendUpdate ] Thread stopped!
[16:51:48:903 W] Thread stopped!
[16:51:54:912 I] [Lifetime       ] Application is shutting down...
cppbeliever commented 4 months ago

@Xian55

My monitor is a TCL 4k screen.

Xian55 commented 4 months ago

When you manually type /yy in game, what colors do you see at the top left hand corner?

Excepted colors during configuration mode ( the most left(first) cell should have magenta like color, the rest is shade of blue) image

Expected colors during normal mode(the colors may vary) the grey ish outline at left and top is my bad due capturing the image. image

cppbeliever commented 4 months ago

After I click the auto->start button, Blazor generates an error log and the following image appears in the upper left corner of the game: 1

Then, I manually entered /yy in the game, and the following image appeared: 2

cppbeliever commented 4 months ago

I then double-checked the game settings according to the instructions in the readme.