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.
179 stars 123 forks source link

[Private Server] Vanilla 1.12.1 - using Season of Master 11400 Client #450

Closed Darkjamin closed 1 year ago

Darkjamin commented 1 year ago

Hello there,

I was wondering how to get this to work on WoW vanilla (not classic). I tried to set it up, but the addon keeps giving LUA errors and is not working. Additionally "wow" is not detected, although wow.exe (1.12.1) is launched and I'm logged in with character.

Is my understanding correct, if I try to "adapt" and "get it to work" the "DataToColor" addon, the rest should work. Or am I mistaken?

Thank you for your time.

Xian55 commented 1 year ago

Hello there 👋

As stated in the readme, the DataToColor addon and the backend is designed for the modern clients

As they are sharing the same lua API, which made really convenient for me, to keep up to date. There are only a few breaking lua api which were changed over the 2 years, and it is mostly about the channelling and spell casting. (Versions.lua)

On the other hand, the backend code is designed such a way to rely on the new wow folder structure. World of Warcraft/


For the addon: So in theory yes it is possible as long as you can find equivalent lua API for the DataToColor addon to work. Otherwise have to check what kind of lua API is available for the given (1.12.1) client.

Not so long ago(maybe end of ?BFA?), they changed the Frame drawing api - something about BackdropTemplateMixin - many old addon broken because of this change, so im not even sure if any pixel even would show up in the old client without any changes.

Not sure how the old client handles localization, events, as the addon uses global variables to detect certain state of the casting, error feedback and such, those things have to be validated. (EventHandler.lua)

Many info, about the target is remain unknown such as personal buffs in the old vanilla, however the backend relies on it, so probably only a limited feature set will be available, and ofc no casting info, and interrupting since those were not exposed to the public lua api.


For the backend to work: You may have to edit certain rules, such as handling GCD, spellcasting, and mounting, as the rules have been changed over the years, and many quality of life changes has been added to the new modern clients.


If you interested in spending time about the topic, i would recommend to explore the old client (1.12.1) lua api calls first hand and then decide on if its worth porting, or create a new project and follow the same step as the WowClassicGrindBot did.

One final thing is, i'm not sure how extensively documented the old clients 1.12.1 and 3.3.5a. If you find a good resource feel free to share here.

Darkjamin commented 1 year ago

Thank you very much for your reply. It seems it's going to be some work to get it done. I'm by no means an experienced programmer, but I can try my best.

One final thing is, i'm not sure how extensively documented the old clients 1.12.1 and 3.3.5a. If you find a good resource feel free to share here.

I did find another Github, that has a similar addon for the 1.12.1 and 3.3.5.a. Hope it's ok to share it here: https://github.com/Serenalyw/PixelBot

That might provide the information needed to get WCGB to work on 1.12.1 and 3.3.5a, maybe?

thank you.

Xian55 commented 1 year ago

After a quick peek at Serenalyw/PixelBot project, it seems it uses the pixels only for the movement, i was yet to find the lua code part, which generates the corresponding pixels. Everything else is handled by the addon, the in-game state is not exposed to the backend(python)

The rotation files uses CastSpellByName and UseAction lua api calls which are protected in the modern client.

Darkjamin commented 1 year ago

Hi there,

Thank you for all the the information.

So far I've been able to get the addon to "stay active" in wow 1.12.1, without LUA's error, but still no pixels ^^. WoW Gets detected in the backend and such:

12:54:22 | Enter configuration mode. -- | -- 12:54:22 | Addon installed! Version: 1.7.24 12:54:22 | Client window: {X=8,Y=31,Width=1920,Height=1080} 12:54:22 | Found WowProcess 12:54:17 | /reload 12:54:17 | AddonConfigurator.Install - Success 12:54:17 | AddonConfigurator.CopyAddonFiles - Success

Well it's an adventure I guess, let's see if we can get it to work :)

Thx.

Darkjamin commented 1 year ago

Ok Time to Share the results. There is good and there is less good news. Starting with the less good news... I was unable to modify the LUA code of the addon to get it working. The good news though, is that I'm currently using this bot successfully on 1.12.1 server...

How? It involves using the 1.14 client, "a proxy" that converts the 1.14 client into 1.12 packets accepted by the server (HermesProxy) - [It works really really well and is not too complicated to get working].

I play on my own 1.12.1 SPP server. So I don't really care about being detected or anything like that, so the proxy is a non-issue for me.. Just want to be able to have a lot of bots and do party stuff with them later on. They claim you can use it to play on private servers (works for 1.12.x and 2.4.x servers) as far as I could read, while using the 1.14 or the othet TBC Classic client.

The good news of using that method you can use the addons written for the new versions. [That works also very well].

Now, the only issue I still face with the bot is that it detect all except the Core.PlayerReader.SpellBeingCast ==> That one stays always on 0... and I can see it while I try to pull a mob with IE a mage: ERR_SPELL_FAILED_INTERRUPTED->CAST_START.. is what a get. Except for that, the bot does all perfectly well: pathing, vendoring, bags check, swag (showing equipment, life, mana).. all good. Just need to solve that last issue with the SpellBeingCast not registering.

So while this might not be the solution I was expecting, it turns out, that this can be used on 1.12 and 2.4 servers if you use the proxy.

Have fun :)

Xian55 commented 1 year ago

Hey, i'm aware of HermesProxy. It is a really ambitious project, sniffing the packets based on opcode and translating them it is a wonderful idea.

Personally tried out before with the 2.5.2 client, it worked really well. If i recall correctly there was minor issue regarding spell casting as well. I don't remember exactly what was the problem but there was something about different lua API in the addon, had to change something in Versions.lua file.

At the time, when i tried out HermesProxy only provided translation with very specific client versions, and at the time maybe ?2.5.4? was the latest live version.

Back then my goal was to improve the navigation system, by validating the Coordinates in game compare to what the backend can obtain.


If could share logs about what's going on at your side, i might be able to provide more support.

The related log files can be found the following locations

example file format: out20221111.log

Xian55 commented 1 year ago

The recently mentioned issue regarding spell casting, was on my end.

When i worked on #149 #341 most likely doesn't considered the fact that vanilla / som client combat log not includes SpellId.

After #456 should work better with SoM client.

However with #456 i've introduced some issues in Classic, as a result there's a slight inaccuracy determining the SpellQueueTimeWindow when switching PullTargetGoal -> CombatGoal, partially reverting it until further investigation.

Be sure to checkout d05936c3976d0d9de76802abf6293afcfb8f9a4b and in-game the addon version must be at least

1.7.25
Darkjamin commented 1 year ago

Hi there. Thanks I tested the fix. During the Combat Sequence all is well it seems (when it's close to the mob). During the pull sequence, it start casting, after like 0.5 sec it moves, then start casting again. The requested log is attached :) out20221119.log

Xian55 commented 1 year ago

After #457 should properly detect the current cast SpellID, therefor can anticipate the remaining cast time / GCD in order to avoid interrupting spell cast.

By looking at the provided log, i was be able to repro the issue, it seems the Mage_1 profile was yet to be updated to the new SpellQueue window based casting thus sometimes interrupts the spell cast. This behaviour is the same across every client what i've tested, SoM, and Warth as well.

I will be updating some of the low level class profiles soon.

Xian55 commented 1 year ago

With #458 Mage profiles should perform much better then before as considering the new CastingHandler #352

Darkjamin commented 1 year ago

Hi Xian55, thanks for all you do. I've downloaded everything again, installed on a clean VM, checked the mage profile (they are the new ones), and tested with a fresh char. But the behavior is the same. Here is the new logfile. out20221120_001.log

Xian55 commented 1 year ago

It seems none of my recent effort made any difference.

Can you give a detailed description about what setup you running with:

Darkjamin commented 1 year ago

Hi Xian55,

I use this as server: https://github.com/celguar/spp-classics-cmangos/releases/download/v2.0/SPP_Classics_V2.exe

The vanilla one in there. The 1.12.1, also tested on a private 1.12.1 shard today same results.

As client I use: https://wowdl.net/client/wow-classic-1.14.0.40618-all-languages

As for the hermes proxy I use the stable release version here:

https://github.com/WowLegacyCore/HermesProxy/releases/tag/v3.0

Funny the kast version of hermes was from mei. By copying the link right now I just saw they released a new version 17hrs ago.

Teated on normal windows 10 pc and in a vmware player win10 versio as well.

Let me know if you nee any more info.

Thanks a lot.

On Sun, 20 Nov 2022, 18:32 Xii, @.***> wrote:

It seems none of my recent effort made any difference.

Can you give a detailed description about what setup you running with:

  • Server type / version
  • Client Version(s) (hermes proxy, etc..)

— Reply to this email directly, view it on GitHub https://github.com/Xian55/WowClassicGrindBot/issues/450#issuecomment-1321195516, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXEACJFZZSGTLMVEBTZWXRLWJJOA7ANCNFSM6AAAAAARYQATYQ . You are receiving this because you authored the thread.Message ID: @.***>

Xian55 commented 1 year ago

After #461 while using SoM client 11400 casting state should be detected properly.

So there's an example of how the blizzard lua api could change within the same expansion of the game / base game.

UnitCastingInfo, UnitChannelInfo different in these two client versions

Xian55 commented 1 year ago

After #462

While connected to a live remote server you have a ping greater then 0. In this case anticipating the next possible action can be handy, eliminating most downtime as possible due using SpellQueueWindow

However when you ran the server locally this could introduce some issues. In this case i suggest to specify in the ClassConfiguration file the "SpellQueue": false

example:

{
  "SpellQueue": false,
// ... rest example ...
  "Loot": true,
  "PathFilename": "1-5_Gnome.json",
}
Darkjamin commented 1 year ago

Hi Xiann55,

Thank you so much for this. It is really working well now with the changes you made.

Awesome work and help you do. Thanks a lot and have a great day.