Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dealing with adds #651

Open
Dragoo-beep opened this issue Dec 31, 2024 · 6 comments
Open

Dealing with adds #651

Dragoo-beep opened this issue Dec 31, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@Dragoo-beep
Copy link

Description

Wondering what im doing wrong, if my pet pulls 2 mobs we just stand and wait for pet to die or mob to die before we continue.

[13:46:36:496 I] [GoapAgent ] Kill credit detected! Session Total: 7 | Last Combat: 1 | Currently fighting: 1
[13:46:36:529 I] [CombatGoal ] Lost target!
[13:46:36:544 W] [GoapAgent ] New Plan= NO PLAN

I have
Assist Target -> F by default is game settings
Target Pet -> Numpad Multiply has to setup manually
Pet Attack -> Numpad Subtract has to setup manually
This works as if I stop targeting the current target im fighting he retargets via pet instantly.

Gone over the settings many times but im not getting any feedback of what we are trying to do, so im not sure whats happening.

Addon Version

1.7.60

World of Warcraft Client

World of Warcraft Classic

Reproduction Steps

Pull a mob, then pull another, kill first mob, then we know the second target exists but we have no plan.

Last Good Version

No response

Screenshots

No response

Logs

headless_out20241231_003.log

@Dragoo-beep Dragoo-beep added the bug Something isn't working label Dec 31, 2024
@Xian55
Copy link
Owner

Xian55 commented Jan 4, 2025

Gooday!

Wondering what im doing wrong, if my pet pulls 2 mobs we just stand and wait for pet to die or mob to die before we continue.

After i reading the following i have a hunch that you might be set your pet behaviour to Pet Passive by any chance.
Setting your pet to Defensive should resolve the issue.

I'm pretty sure that once you pull more then one target with your pet - accidental body pull even - once the primary target dies, your pet should target the next potential enemy as long as your pet behaviour is set to Defensive.

There's a GoapGoal for it called TargetPetTargetGoal, which is purposefully designed to take advantage of the Defensive behaviour.

As long as your character class properly extracted, and read by the backend, this Goal should be added.

Let me know if the issue still persists.


On the other hand, the following is unrelated to the original issue, however two things caught my eye and they might hinder you to have the expected experience with the project.

[13:43:51:981 I] [WowScreenDXGI ] Rectangle [ X=961, Y=547, Width=958, Height=484 ] - Windowed Mode: True - Scale: 1,00 - Monitor Rect: RawRect { Left = 1920, Top = -5, Right = 3840, Bottom = 1075 } - Monitor Index: 1

  • That Top = -5 hints that, you might have multiple monitors and there might be an overlap between the top and bottom monitors?
  • Width=958, Height=484 i would recommend to stick with the pre-set resolutions, the closest would be like 800x600, as the in game ui uses scaling, in the past i've experienced wierd behaviours due overlapping/overdrawn pixels, which resulted non deterministic strange behaviours.

Such as

[14:00:58:754 I] [GoapAgent        ] New Plan=  Parallel
[14:00:58:773 E] Index was outside the bounds of the array.
System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at Core.ActionBarCostReader.Update(IAddonDataProvider reader) in C:\Users\S\Documents\L\L\Core\Actionbar\ActionBarCostReader.cs:line 48
   at Core.AddonReader.Update() in C:\Users\S\Documents\L\L\Core\Addon\AddonReader.cs:line 73
   at Core.BotController.AddonThread() in C:\Users\S\Documents\L\L\Core\BotController.cs:line 156

In the logs, i saw many negative numbers regarding the actions await times. Like

 184: [13:44:02:588 I] [CastingHandler   ] [Serpent Sting    ] castbar input 61ms -528,5215ms
 399: [13:46:47:474 I] [CastingHandler   ] [Mend Pet         ] castbar input 77ms -487,1486ms

Where you can see two elapsed milliseconds notice

  • the first one is how long does the bound key was pressed, for Mend Pet it was 77 milliseconds
  • the second is how long does it took for the c# backend to detect the keypress effect, if that number negative, then it means that the c# backend was unable read the changes by the addon.

You can think of it as like a cause and effect.

  • You press a button
  • after the button press something going to happen and that happening was not properly propagated from the addon to the c# backend.

I could give you a few hints what you can look up like

  • enforcing fixed framerate/fps in-game, to have consistent game refresh rate you can pick (15-30-60-90-120)
  • disable v-sync - it introduces a big keypress to display update which is hinders the wow addon -> c# backend communication.

@Dragoo-beep
Copy link
Author

Tyvm for the great answer! Pet is on defensive and he is fighting next mob while we are waiting. I did some changes to code where if our pet has a target and we dont, that we always assist pet, and that seems to work. I fixed the -5 offset aswell but doesnt seem to help. I also tried all the resolutions with different cell sizes.

I also looked into the negative numbers and I tested it on 3 different computers they all have negative numbers, and my friend has the same on his computer (I didnt help him to set it up so he must have done exact same mistake).

I tested with capping fps to 30, 60, 120 etc, I tried changing hertz and v-sync is also disabled.

Im guessing the same bug makes us engage in pvp randomly aswell despite a strict "AllowPvP": false.

[10:45:11:659 W] [TargetBlacklist ] (0,17035,MINO) is player or pet!
[10:45:11:660 I] [GoapAgent ] New Plan= Blacklist Target
[10:45:11:752 I] [GoapAgent ] New Plan= Follow Arathi Highlands_2025_01_05_13_02_17
[10:45:11:753 I] [Navigation ] [LocalPathingApi] distance is close 7,690509. Keep RouteToWaypoint.
[10:45:12:098 I] [GoapAgent ] New Plan= Pull Target
[10:45:12:145 I] [PullTargetGoal ] Stop auto interact!
[10:45:12:178 I] [FollowRouteGoal ] Found target!
[10:45:12:503 W] [CastingHandler ] [Hunter's Mark ] ... Failed try again!
[10:45:12:504 I] [ReactCastError ] React to SPELL_FAILED_NOT_READY -- wait until its ready
[10:45:12:753 I] [PullTargetGoal ] Preventing pulling possible tagged target!

We engage about 30% of enemy players.

@Xian55
Copy link
Owner

Xian55 commented Jan 6, 2025

Gooday.

Tyvm for the great answer! Pet is on defensive and he is fighting next mob while we are waiting. I did some changes to code where if our pet has a target and we dont, that we always assist pet, and that seems to work.

It would be great if you could share the mentioned changes in a PR or just sending a diff about the specific changes, it would help a project a lot.

I also looked into the negative numbers and I tested it on 3 different computers they all have negative numbers, and my friend has the same on his computer (I didnt help him to set it up so he must have done exact same mistake).

In the past, i've seen user logs who had similar negative numbers, however i was yet to figure out what would case it. Personally i have never seen such issue, i mean the volume of it, it may happens once of twice but not that consistency what your log presented.

Im guessing the same bug makes us engage in pvp randomly aswell despite a strict "AllowPvP": false.

So you are trying to tell me that, even tho the "AllowPvP": "false" is set, the bot still actively engaging enemy players. Keep in mind that once an enemy player is engaging you, the bot will fight back.

@Dragoo-beep
Copy link
Author

CombatGoal.zip
I just changed some stuff in combatgoal with chatbot so this will need some work as its pretty scuffed, but it beat just watching pet die.

So you are trying to tell me that, even tho the "AllowPvP": "false" is set, the bot still actively engaging enemy players. Keep in mind that once an enemy player is engaging you, the bot will fight back.

Yes exactly :P We actively engage in pvp. This happens to my friend aswell he added players to the blacklist for a mega scuffed fix.

@Xian55
Copy link
Owner

Xian55 commented Jan 6, 2025

CombatGoal.zip I just changed some stuff in combatgoal with chatbot so this will need some work as its pretty scuffed, but it beat just watching pet die.

So you are trying to tell me that, even tho the "AllowPvP": "false" is set, the bot still actively engaging enemy players. Keep in mind that once an enemy player is engaging you, the bot will fight back.

Yes exactly :P We actively engage in pvp. This happens to my friend aswell he added players to the blacklist for a mega scuffed fix.

If you were kind enough to provide logs where the mentioned issue exists, i might be able to see what went wrong, thanks!

@Dragoo-beep
Copy link
Author

The above log is from when we engaged a player;

[10:45:11:659 W] [TargetBlacklist ] (0,17035,MINO) is player or pet!
[10:45:11:660 I] [GoapAgent ] New Plan= Blacklist Target
[10:45:11:752 I] [GoapAgent ] New Plan= Follow Arathi Highlands_2025_01_05_13_02_17
[10:45:11:753 I] [Navigation ] [LocalPathingApi] distance is close 7,690509. Keep RouteToWaypoint.
[10:45:12:098 I] [GoapAgent ] New Plan= Pull Target
[10:45:12:145 I] [PullTargetGoal ] Stop auto interact!
[10:45:12:178 I] [FollowRouteGoal ] Found target!
[10:45:12:503 W] [CastingHandler ] [Hunter's Mark ] ... Failed try again!
[10:45:12:504 I] [ReactCastError ] React to SPELL_FAILED_NOT_READY -- wait until its ready
[10:45:12:753 I] [PullTargetGoal ] Preventing pulling possible tagged target!

I will save a full log for next time I see him engage in pvp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants