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.
173 stars 120 forks source link

Retry after corpse herbing and skinning fail #404

Closed AsterNighT closed 2 years ago

AsterNighT commented 2 years ago

Is your feature request related to a problem? Please describe. When the bot herb/skin a mob, there're chances that it will fail due to not enough in-game skill level.

Describe the solution you'd like We could retry after the herb/skin attempt fails. But the fail could be be a random fail (indicated by a "failed attempt" prompt) or simply too low level (indicated by a "require xxx xxx" prompt). They are somewhat hard to tell. Maybe a few retries like 5 or so when herbing/skinning would do.

Describe alternatives you've considered I don't see any alternatives. Maybe, you can OCR the prompts to tell the reason or scan the database for the skill level needed and black list certain mobs from herbing/skinning.

Xian55 commented 2 years ago

Hello there.

The solution for the described issue already exist in fact, it does what you described in the suggested solution.

a few retries like 5 or so when herbing/skinning would do.

The addon already take advantage of the UIErrorsFrame to report what was the last issue regarding player action. Except the part when fail due to not enough in-game skill level. as probably using a printf like format Requires %s. Thats the only matching format i've found in here


There is a formula about calculating the requirement of eligible gathering. target level * 5 with a constraint of minimum level 5.

However extracting the player skills having some difficulties, as the related lua API returns with localized string. So need an addon lib which can translate it to English, i have not found one yet.

Regarding OCR, i don't want to deal with localized text at backend side.

AsterNighT commented 2 years ago

So it should retry if the attempt fails. But in my case I haven't seen a retry ever. Is there any setting required to enable that?

Xian55 commented 2 years ago

There's no toggle or option for that. Please upload a log with a session where you think a retry should have happened.

AsterNighT commented 2 years ago

Took me some time but, here

[19:50:34:415 INF] [LocalPathingApi] distance is close 41.202103. Keep RouteToWaypoint.
[19:50:34:416 INF] New Plan=  Approach Target
[19:50:34:786 INF] New Plan=  Pull Target
[19:50:34:798 INF] Stop auto interact!
[19:50:35:185 INF] [Faerie Fire] instant input 66ms True 173.7359ms
[19:50:35:186 INF] [Faerie Fire] instant usable: True->False -- NONE->CAST_SUCCESS
[19:50:35:186 INF] [Faerie Fire] ... AfterCastWaitBuff | Buff: True | pb: 6 | pd: 0 | tb: 0 | td: 1 | miss: NONE | 0ms
[19:50:35:187 INF] [Faerie Fire] ... AfterCastWaitMeleeRange
[19:50:38:559 INF] [Faerie Fire] GCD: 0ms | Cast: 0ms | Next spell -396ms
[19:50:38:563 INF] New Plan=  Combat
[19:50:38:826 INF] [Rake] instant input 62ms True 172.675ms
[19:50:38:827 INF] [Rake] instant usable: True->False -- NONE->CAST_SUCCESS
[19:50:38:828 INF] [Rake] GCD: 1000ms | Cast: 0ms | Next spell 604ms
[19:50:39:893 INF] [Claw] instant input 68ms True 157.0112ms
[19:50:39:894 INF] [Claw] instant usable: True->False -- NONE->CAST_SUCCESS
[19:50:39:895 INF] [Claw] GCD: 1000ms | Cast: 0ms | Next spell 604ms
[19:50:41:227 INF] [Claw] instant input 52ms True 3.7514ms
[19:50:41:228 INF] [Claw] instant usable: True->False -- NONE->CAST_SUCCESS
[19:50:41:229 INF] [Claw] GCD: 1000ms | Cast: 0ms | Next spell 604ms
[19:50:44:682 INF] [Rip] instant input 68ms True 145.6004ms
[19:50:44:683 INF] [Rip] instant usable: True->False -- NONE->CAST_SUCCESS
[19:50:44:684 INF] [Rip] GCD: 1000ms | Cast: 0ms | Next spell 604ms
[19:50:45:682 INF] [Claw] instant input 69ms True 80.4767ms
[19:50:45:683 INF] [Claw] instant usable: True->False -- NONE->CAST_SUCCESS
[19:50:45:684 INF] [Claw] GCD: 1000ms | Cast: 0ms | Next spell 604ms
[19:50:46:722 INF] [Tiger's Fury] instant input 72ms True 158.4394ms
[19:50:46:723 INF] [Tiger's Fury] instant usable: True->False -- NONE->CAST_SUCCESS
[19:50:46:724 INF] [Tiger's Fury] GCD: 0ms | Cast: 0ms | Next spell -396ms
[19:50:50:791 INF] [Rake] instant input 78ms True 182.906ms
[19:50:50:792 INF] [Rake] instant usable: True->False -- NONE->CAST_SUCCESS
[19:50:50:793 INF] [Rake] GCD: 1000ms | Cast: 0ms | Next spell 604ms
[19:50:52:833 INF] [Tiger's Fury] instant input 72ms True 208.1596ms
[19:50:52:834 INF] [Tiger's Fury] instant usable: True->False -- NONE->CAST_SUCCESS
[19:50:52:834 INF] [Tiger's Fury] GCD: 0ms | Cast: 0ms | Next spell -396ms
[19:50:56:007 INF] Kill credit detected! Known kills: 1 | Fighting with: 0
[19:50:56:051 INF] Lost target!
[19:50:56:066 INF] New Plan=  Consume Corpse
[19:50:56:067 INF] ----- Safe to consume a corpse.
[19:50:56:081 INF] New Plan=  Loot
[19:50:56:127 INF] [NpcNameFinder] type = Corpse
[19:50:56:157 INF] Look at possible closest corpse and try once again...
[19:50:56:186 INF] LootGoal: Should gather 19402 ? True
[19:50:56:187 INF] LootGoal: Target Last Target Found!
[19:50:56:287 INF] LootGoal: Loot Successful after 40.1912ms
[19:50:56:291 INF] New Plan=  Skinning
[19:50:56:667 WRN] Last Target not found!
[19:50:56:667 INF] Found Npc Name ? True | Count: 1 0.0003ms
[19:50:56:772 INF] > NPCs found: {X=760,Y=126,Width=215,Height=12}
[19:50:56:772 INF] Found corpse
[19:50:56:994 INF] Started casting ? True 221.5846ms
[19:50:59:021 INF] Gathering Successful!
[19:51:02:023 INF] Loot Failed after 3000.9494ms
[19:51:02:108 INF] [NpcNameFinder] type = None
[19:51:02:123 INF] New Plan=  Corpse Consumed
[19:51:02:124 INF] ----- Corpse consumed. Total: 0 | Remaining: 0
[19:51:02:138 INF] New Plan=  Follow Route
[19:51:02:139 INF] [LocalPathingApi] distance is close 41.788193. Keep RouteToWaypoint.
[19:51:02:229 INF] [NpcNameFinder] type = None
[19:51:07:180 INF] [NpcNameFinder] type = None
[19:51:07:265 INF] FollowRouteGoal: Random jump

It claims to successfully gather but actually didn't.


As for the localization part I have two suggestions.

  1. The bot now is optimized for a English client. There're already a few features unavailable/works suboptimal on non-English clients (NPC targeting). It is acceptable to do something on English Client only.
  2. As you put in another issue, the bot is a tool made from tinker for tinker. Is it possible to ask users to submit their strings if they want some feature in their localization?
Xian55 commented 2 years ago

Based on the provided log and the timeframe, the casting has been started at 19:50:56:994 it took 3s to complete it 19:50:59:021.

However looting does failed after again 3 second of timeout 19:51:02:023.

Does the loot window not closed after 3 seconds?

It is recommended to use FasterLooting

Xian55 commented 2 years ago

Based on the submitted log snippet, when this kind of event occurs, (A) do you have interact with the corpse and skin it again, and wait for the castbar? (B) when you interact with the corpse just have to loot it?

AsterNighT commented 2 years ago

I'm using fastlooting. No, it does nothing and just leave after the failed skin attempt. It does seem to stop for a while though. No second castbar is shown. And concerning when you interact with the corpse just have to loot it? can you be a little bit more specific?

Xian55 commented 2 years ago

Never mind the last message.

Could you make a build of fix/skinning-retry-attempt-skipped this branch and give it a try?

Logs would be nice about your results, thanks. 🙇

AsterNighT commented 2 years ago

It does not seem to fix the problem, still it won't retry.

[22:44:25:149 INF] New Plan=  Approach Target
[22:44:25:282 DBG] Stick to initial target!
[22:44:25:719 INF] New Plan=  Pull Target
[22:44:25:720 INF] Stop auto interact!
[22:44:26:279 INF] [Cat Form] instant input 63ms False 420.8198ms
[22:44:26:755 INF] [Cat Form] instant input 53ms False 420.4265ms
[22:44:26:822 INF] [Cat form] instant input 53ms True 5.9546ms
[22:44:26:826 INF] [Cat form] instant usable: True->False -- NONE->CAST_SUCCESS
[22:44:28:358 INF] [Faerie Fire] ... gcd interrupt: False | usable: True | remain: 1500ms | 1527.9069ms
[22:44:28:676 INF] [Faerie Fire] instant input 100ms True 169.1715ms
[22:44:28:677 INF] [Faerie Fire] instant usable: True->False -- NONE->CAST_SUCCESS
[22:44:28:681 INF] [Faerie Fire] ... AfterCastWaitBuff | Buff: True | pb: 6 | pd: 0 | tb: 0 | td: 1 | miss: NONE | 0ms
[22:44:28:681 INF] [Faerie Fire] ... AfterCastWaitMeleeRange
[22:44:29:586 INF] [Faerie Fire] GCD: 99ms | Cast: 0ms | Next spell -295ms
[22:44:29:603 INF] New Plan=  Combat
[22:44:29:904 INF] [Rake] instant input 69ms True 210.528ms
[22:44:29:905 INF] [Rake] instant usable: True->False -- NONE->CAST_SUCCESS
[22:44:29:906 INF] [Rake] GCD: 1000ms | Cast: 0ms | Next spell 606ms
[22:44:30:917 INF] [Claw] instant input 95ms True 144.4341ms
[22:44:30:918 INF] [Claw] instant usable: True->False -- NONE->CAST_SUCCESS
[22:44:30:919 INF] [Claw] GCD: 1000ms | Cast: 0ms | Next spell 606ms
[22:44:32:184 INF] [Claw] instant input 70ms True 177.9513ms
[22:44:32:186 INF] [Claw] instant usable: True->False -- NONE->CAST_SUCCESS
[22:44:32:186 INF] [Claw] GCD: 1000ms | Cast: 0ms | Next spell 606ms
[22:44:34:612 INF] [Rip] instant input 101ms True 165.3206ms
[22:44:34:613 INF] [Rip] instant usable: True->False -- NONE->CAST_SUCCESS
[22:44:34:614 INF] [Rip] GCD: 1000ms | Cast: 0ms | Next spell 606ms
[22:44:36:506 INF] [Tiger's Fury] instant input 89ms True 124.5673ms
[22:44:36:507 INF] [Tiger's Fury] instant usable: True->False -- NONE->CAST_SUCCESS
[22:44:36:508 INF] [Tiger's Fury] GCD: 0ms | Cast: 0ms | Next spell -394ms
[22:44:40:615 INF] [Rake] instant input 102ms True 142.1388ms
[22:44:40:616 INF] [Rake] instant usable: True->False -- NONE->CAST_SUCCESS
[22:44:40:616 INF] [Rake] GCD: 1000ms | Cast: 0ms | Next spell 606ms
[22:44:42:683 INF] [Tiger's Fury] instant input 58ms True 177.8568ms
[22:44:42:684 INF] [Tiger's Fury] instant usable: True->False -- NONE->CAST_SUCCESS
[22:44:42:684 INF] [Tiger's Fury] GCD: 0ms | Cast: 0ms | Next spell -394ms
[22:44:46:714 INF] Kill credit detected! Known kills: 1 | Fighting with: 0
[22:44:46:715 INF] [Claw] instant input 91ms True 111.0796ms
[22:44:46:716 INF] [Claw] instant usable: True->False -- NONE->CAST_SUCCESS
[22:44:46:716 INF] [Claw] GCD: 1000ms | Cast: 0ms | Next spell 606ms
[22:44:46:754 INF] Lost target!
[22:44:46:769 INF] New Plan=  Consume Corpse
[22:44:46:769 INF] ----- Safe to consume a corpse.
[22:44:46:784 INF] New Plan=  Loot
[22:44:46:875 INF] LootGoal: Should gather 19402 ? True
[22:44:46:875 INF] LootGoal: Target Last Target Found!
[22:44:48:337 INF] LootGoal: Loot Successful after 1388.2407ms
[22:44:48:353 INF] New Plan=  Skinning
[22:44:48:864 WRN] Last Target not found!
[22:44:48:909 INF] [NpcNameFinder] type = Corpse
[22:44:48:992 INF] Found Npc Name ? True | Count: 2 69.0457ms
[22:44:49:089 INF] > NPCs found: {X=891,Y=132,Width=203,Height=15}
[22:44:49:090 INF] Found corpse
[22:44:49:325 INF] Started casting ? True 234.7229ms
[22:44:51:340 INF] Gathering Successful! CAST_SUCCESS | background: True
[22:44:51:341 INF] Loot Successful after 0.0001ms
[22:44:51:342 INF] [NpcNameFinder] type = None
[22:44:51:357 INF] New Plan=  Corpse Consumed
[22:44:51:357 INF] ----- Corpse consumed. Total: 0 | Remaining: 0
[22:44:51:372 INF] New Plan=  Follow Route
[22:44:51:374 INF] FollowRouteGoal: RefillWaypoints - findClosest:True - ThereAndBack:True
[22:44:51:462 INF] [NpcNameFinder] type = None
[22:44:52:150 INF] Pathfinder - 143.25127 - <779.3938, 5420.5215, 0> -> <821.32007, 5557.5, 0> 685.4407ms
[22:44:53:256 INF] [NpcNameFinder] type = None
[22:44:53:271 INF] New Plan=  Pull Target
[22:44:53:274 INF] Stop auto interact!
[22:44:53:608 INF] [Faerie Fire] instant input 56ms True 157.4618ms
[22:44:53:609 INF] [Faerie Fire] instant usable: True->False -- NONE->CAST_SUCCESS
[22:44:53:610 INF] [Faerie Fire] ... AfterCastWaitBuff | Buff: True | pb: 6 | pd: 0 | tb: 0 | td: 1 | miss: NONE | 0.0001ms
[22:44:53:611 INF] [Faerie Fire] ... AfterCastWaitMeleeRange
[22:44:55:608 INF] [Faerie Fire] GCD: 0ms | Cast: 0ms | Next spell -394ms
[22:44:55:613 INF] New Plan=  Combat
[22:44:55:876 INF] [Rake] instant input 85ms True 141.7862ms
[22:44:55:876 INF] [Rake] instant usable: True->False -- NONE->CAST_SUCCESS
[22:44:55:877 INF] [Rake] GCD: 1000ms | Cast: 0ms | Next spell 606ms
[22:44:56:916 INF] [Rake] instant input 72ms True 132.0214ms
[22:44:56:916 INF] [Rake] instant usable: True->False -- NONE->CAST_SUCCESS
[22:44:56:917 INF] [Rake] GCD: 1000ms | Cast: 0ms | Next spell 606ms
[22:44:57:929 INF] [Claw] instant input 72ms True 74.5661ms
[22:44:57:930 INF] [Claw] instant usable: True->False -- NONE->CAST_SUCCESS
[22:44:57:931 INF] [Claw] GCD: 1000ms | Cast: 0ms | Next spell 606ms
[22:44:58:920 INF] [Claw] instant input 74ms True 0.0002ms
[22:44:58:920 INF] [Claw] instant usable: True->False -- NONE->CAST_SUCCESS
[22:44:58:921 INF] [Claw] GCD: 1000ms | Cast: 0ms | Next spell 606ms
[22:45:02:904 INF] [Rip] instant input 100ms True 32.118ms
[22:45:02:905 INF] [Rip] instant usable: True->False -- NONE->CAST_SUCCESS
[22:45:02:906 INF] [Rip] GCD: 1000ms | Cast: 0ms | Next spell 606ms
[22:45:03:318 INF] Turning too fast!
[22:45:04:973 INF] [Tiger's Fury] instant input 86ms True 180.2489ms
[22:45:04:974 INF] [Tiger's Fury] instant usable: True->False -- NONE->CAST_SUCCESS
[22:45:04:975 INF] [Tiger's Fury] GCD: 0ms | Cast: 0ms | Next spell -394ms
[22:45:09:054 INF] [Rake] instant input 53ms True 172.3083ms
[22:45:09:055 INF] [Rake] instant usable: True->False -- NONE->CAST_SUCCESS
[22:45:09:056 INF] [Rake] GCD: 1000ms | Cast: 0ms | Next spell 606ms
[22:45:13:043 INF] [Tiger's Fury] instant input 84ms True 116.1302ms
[22:45:13:044 INF] [Tiger's Fury] instant usable: True->False -- NONE->CAST_SUCCESS
[22:45:13:045 INF] [Tiger's Fury] GCD: 0ms | Cast: 0ms | Next spell -394ms
[22:45:16:551 INF] Kill credit detected! Known kills: 1 | Fighting with: 0
[22:45:16:589 INF] Lost target!
[22:45:16:604 INF] New Plan=  Consume Corpse
[22:45:16:605 INF] ----- Safe to consume a corpse.
[22:45:16:619 INF] New Plan=  Loot
[22:45:16:695 INF] LootGoal: Should gather 19402 ? True
[22:45:16:695 INF] LootGoal: Target Last Target Found!
[22:45:16:938 INF] LootGoal: Loot Successful after 198.4905ms
[22:45:16:949 INF] New Plan=  Skinning
[22:45:17:345 WRN] Last Target not found!
[22:45:17:345 INF] [NpcNameFinder] type = Corpse
[22:45:17:418 INF] Found Npc Name ? True | Count: 4 58.6736ms
[22:45:17:632 INF] > NPCs found: {X=780,Y=170,Width=141,Height=5}
[22:45:17:633 INF] Found corpse
[22:45:17:715 INF] Started casting ? True 81.0405ms
[22:45:19:738 INF] Gathering Successful! CAST_SUCCESS | background: False
[22:45:22:742 INF] Loot Failed after 3002.5602ms
[22:45:22:867 INF] [NpcNameFinder] type = None
[22:45:22:882 INF] New Plan=  Corpse Consumed
[22:45:22:883 INF] ----- Corpse consumed. Total: 0 | Remaining: 0
[22:45:22:897 INF] New Plan=  Follow Route
[22:45:22:902 INF] [LocalPathingApi] distance is close 5.3845735. Keep RouteToWaypoint.
[22:45:22:987 INF] [NpcNameFinder] type = None
[22:45:24:910 INF] [NpcNameFinder] type = None
AsterNighT commented 2 years ago

Oops I witnessed a retry! Here's the good logs:

[22:55:47:855 INF] New Plan=  Loot
[22:55:47:945 INF] LootGoal: Should gather 18124 ? True
[22:55:47:946 INF] LootGoal: Target Last Target Found!
[22:55:48:118 INF] LootGoal: Loot Successful after 128.038ms
[22:55:48:125 INF] New Plan=  Skinning
[22:55:48:485 WRN] Last Target not found!
[22:55:48:486 INF] [NpcNameFinder] type = Corpse
[22:55:48:535 INF] Found Npc Name ? True | Count: 3 34.8755ms
[22:55:48:621 INF] > NPCs found: {X=932,Y=201,Width=37,Height=11}
[22:55:48:621 INF] Found corpse
[22:55:48:851 INF] Started casting ? True 229.7525ms
[22:55:50:869 WRN] Gathering Failed! SPELL_FAILED_TARGETS_DEAD attempts: 1
[22:55:50:949 INF] Found corpse
[22:55:50:968 INF] Started casting ? True 18.4502ms
[22:55:52:976 WRN] Gathering Failed! SPELL_FAILED_TARGETS_DEAD attempts: 2
[22:55:53:015 INF] Found corpse
[22:55:53:042 INF] Started casting ? True 26.1971ms
[22:55:53:043 INF] Loot Successful after 0.0001ms
[22:55:53:166 INF] [NpcNameFinder] type = None
[22:55:53:181 INF] New Plan=  Corpse Consumed
[22:55:53:181 INF] ----- Corpse consumed. Total: 0 | Remaining: 0
Xian55 commented 2 years ago

Can you describe the situation when Gathering Failed! SPELL_FAILED_TARGETS_DEAD happened?

Personally haven't seen that error message before.

AsterNighT commented 2 years ago

I cannot see any difference between what happens on the two logs. Only in the second one the bot instantly retried after the first try. There's nothing special about the situation, at least I cannot see any. If it may help, I can record a video on this.

Xian55 commented 2 years ago

Just updated the fix/skinning-retry-attempt-skipped branch with, not enough skill level detection to avoid long downtime when unable to skin or herb the target.

The addon version also updated to 1.7.17

The error message on the screen should appear with green tint like Requires Mining 300 or Requires Skinning 305 etc.

Xian55 commented 2 years ago

Hey, have you had any time to check out fix/skinning-retry-attempt-skipped?

Have you been experiencing no retry attempt, lately?

AsterNighT commented 2 years ago

Haven't really got any failed attempts in my daily runs due to level upgrades. I would try on other mobs later today.

AsterNighT commented 2 years ago

The same issue lingers.

[22:36:00:001 INF] Lost target!
[22:36:00:155 WRN] New Plan= NO PLAN
[22:36:12:196 INF] New Plan=  Consume Corpse
[22:36:12:197 INF] ----- Safe to consume a corpse.
[22:36:12:210 INF] New Plan=  Loot
[22:36:12:289 INF] LootGoal: Should gather 18127 ? True
[22:36:12:305 INF] LootGoal: Target Last Target Found!
[22:36:12:421 INF] LootGoal: Loot Successful after 57.7228ms
[22:36:12:425 INF] New Plan=  Skinning
[22:36:12:824 WRN] Last Target not found!
[22:36:12:870 INF] [NpcNameFinder] type = Corpse
[22:36:12:981 INF] Found Npc Name ? True | Count: 5 95.9408ms
[22:36:13:055 INF] > NPCs found: {X=1263,Y=168,Width=117,Height=33}
[22:36:13:056 INF] Found corpse
[22:36:13:275 INF] Started casting or interrupted ? True - LastError: NONE 218.3611ms
[22:36:15:288 INF] Gathering Successful! CAST_SUCCESS | background: False
[22:36:18:339 INF] Loot Failed after 3049.8121ms
[22:36:18:426 INF] [NpcNameFinder] type = None
[22:36:18:439 INF] New Plan=  Corpse Consumed
[22:36:18:442 INF] ----- Corpse consumed. Total: 0 | Remaining: 0
[22:36:18:453 INF] New Plan=  Follow Route
Xian55 commented 2 years ago

Please upload the whole log file, without the full context, i might going on a wrong direction determining the root cause.

AsterNighT commented 2 years ago

Here, the outxxxxxxx.log file is filled with former logs so I only take log of this session. test.log

Xian55 commented 2 years ago

I think i got this time. Seems to be more reliable at current fix/skinning-retry-attempt-skipped branch with https://github.com/Xian55/WowClassicGrindBot/pull/407/commits/a7a25661d6c7b7269a21fbcd29bda29f7223df6a

Indeed there was a time window of blind spot, where the Casting started event were not detected Possible caused 3s downtime. On the other hand, after the cast is ended, the result were not properly awaited, or the previous non related cast could interfered.

AsterNighT commented 2 years ago

Err still not working 0824.log

Xian55 commented 2 years ago

Are you sure you have pulled fix/skinning-retry-attempt-skipped branch with https://github.com/Xian55/WowClassicGrindBot/commit/a7a25661d6c7b7269a21fbcd29bda29f7223df6a ?

Can you tell a little bit about your setup, like

AsterNighT commented 2 years ago

Yes I am using the latest version. Concerning my settings:

Xian55 commented 2 years ago

Personally i'm unable to reproduce these these results, so i'm only trying in the dark. I assume there's something with the latency, here having 40ms.

if you could take a look at https://github.com/Xian55/WowClassicGrindBot/commit/3b202e21ca8158e17be8a1374f04a24e00c224f1 would appreciate 🙇

AsterNighT commented 2 years ago

Still not working. I doubt if this would have something to do: I notice that sometimes there will be a "Another action in progress" prompt while skinning. Which will push the "Failed attempt" prompt down some distance.

Xian55 commented 2 years ago

There are multiple source of grabbing the error message of the current action. All of the errors going to end up the top center part of the screen is called UIErrorsFrame

For casting, im parsing the combat log, which is the raw error, later going to be propagated to UIErrorsFrame.

On the other hand with the latest pushed change https://github.com/Xian55/WowClassicGrindBot/commit/3b202e21ca8158e17be8a1374f04a24e00c224f1

Only SPELL_CAST_SUCCESS is accepted as successful result.

Could you upload the related log?

AsterNighT commented 2 years ago

0824-2.log I don't really see any difference.

Xian55 commented 2 years ago

So based on the logs, sometimes the Background: true means that somehow not detecting the loot window open/closed state.

Another attempt https://github.com/Xian55/WowClassicGrindBot/commit/4d65a86cb370940492caa5c8367f1ceb034ffa00

Xian55 commented 2 years ago

Okay, i think i found out what's going on. It seems Skinning based spells appears in the CombatLog, however herbalism gathering does not... 😨

It does not appear in the combat log, but casting this spell!

They might have updated current patch. I'm fairly certain that i tested the herb gathering feature extensively with the Bog Lords back in the day.

Nonetheless this situation is the same both in classic, classic ptr, and classic beta so i guess its seems broken consistently. 🤷

Xian55 commented 2 years ago

https://github.com/Xian55/WowClassicGrindBot/commit/72255a25474e7665c168efec0677a17a40d6e04b with this should perform more reliably. If you could send a feedback on retry attempt, i would appreciate. 🙇

AsterNighT commented 2 years ago

Would love to try it tonight. I wonder what's your work time? Not being personal but you seem always online and ready for an update. I may not be able to reply as soon and I sincerely apologize for it.

Xian55 commented 2 years ago

My schedule is ever changing at the moment, happily spending time on the project as long as i learn something new.


As you put in another issue, the bot is a tool made from tinker for tinker. Is it possible to ask users to submit their strings if they want some feature in their localization?

Back to OCR, it seems an overkill for me, on the other hand the result might not fit in Realtime environment what this project is attempting to achieve.

About BlazorServer/Frontend localization, only accepting the change if there's a compile time solution, so during runtime doesn't have to lookup dictionaries. BlazorServer already in bad shape in terms of memory management.

AsterNighT commented 2 years ago

well it now does not gather at all 0825.log

Xian55 commented 2 years ago

The npc name has to be within the NpcNameFinder.Area range.

[19:31:15:043 INF] Lost target!
[19:31:15:046 INF] New Plan=  Consume Corpse
[19:31:15:046 INF] ----- Safe to consume a corpse.
[19:31:15:047 INF] New Plan=  Loot
[19:31:15:118 INF] LootGoal: Should gather 19734 ? True
[19:31:15:119 INF] LootGoal: Target Last Target Found!
[19:31:15:350 INF] LootGoal: Loot Successful after 150.8478ms
[19:31:15:351 INF] New Plan=  Skinning
[19:31:15:599 INF] [NpcNameFinder] type = Corpse
[19:31:16:652 INF] Found Npc Name ? False | Count: 0 1047.3801ms
[19:31:16:653 WRN] Unable to gather Target(0)!
[19:31:16:654 INF] [NpcNameFinder] type = None
[19:31:16:660 INF] New Plan=  Corpse Consumed
[19:31:16:661 INF] ----- Corpse consumed. Total: 0 | Remaining: 0
[19:31:16:662 WRN] New Plan= NO PLAN

Which is roughly the big white rectangle area. On full hd resolution looks like this.

For safety to to avoid picking up the default UI texts from accepted quests, and exclude the player, player pet, and target frame.

target_names

AsterNighT commented 2 years ago

I did not quite change anything since the last update, and I'm pretty sure the name is in the area. I set maxCameraDepth to 2.5 for this.

Xian55 commented 2 years ago

Those pesky bog lords are quite huge.

[19:31:16:652 INF] Found Npc Name ? False | Count: 0 1047.3801ms
AsterNighT commented 2 years ago

Yes but these pesky bog lords are what I kill for testing right before this patch. I could do a few more tries.

AsterNighT commented 2 years ago

Oh my bad, now everything works fine. I think the issue is fixed.

Xian55 commented 2 years ago

Was it something worth to share about the issue?

AsterNighT commented 2 years ago

I'd say it it really a troublesome one. Always posting the full log will help, but we definitely could use some more detailed way to report the bug. For a video game complicate like this linear log seems insufficient. What if we can somehow dump the GOAP key changes, within a debug mode. Will that help?

Xian55 commented 2 years ago

What if we can somehow dump the GOAP key changes, within a debug mode. Will that help?

The currently used message template New Plan= already express such change.

If you willing to give more facts and details about what happened, might be able to help out.

AsterNighT commented 2 years ago

Not sure, after all I didn't debug the code myself really. Do you ever find it hard to tell where is wrong?

Xian55 commented 2 years ago

For me, the log are verbose enough to narrow down where the issue might be.

The retry attempt was an exception to this regard, as i was under the impression that, Skinning = Herb Gathering shares the same behavior. The issue was really that the SkinningGoal code shared both CombatLog(CastEvent) events and (LastUIError). the latter one is less reliable as don't hold it state for long, only 1 frame. On the other hand, in game the Last UI Error caches the error, doesn't update it every single attempt, so it is more tricky to rely on it.

However mob Herb Gathering spell caught me off guard, spellcast does not show up in combatlog, so the cast state were not detected at all.

In this month, i did put too much faith on 3rd party code of Blizzard, and the Stormlib of them being working consistently and reliably wasted so much time to figure out what went wrong.

adamssullivan commented 2 years ago

I am having what appears to be the same issue with gathering boglords. It finds the target but doesn't seem to be doing the consume activity. If I manually consume and it fails to consume it will in fact retry. Seems strange. I am running 1.7.17 addon out20220828.log

Xian55 commented 2 years ago

First of all, the Skinning Goal, is unable find the target. Thats why it says

2022-08-28 10:24:04.029 -07:00 [INF] Found Npc Name ? False | Count: 0 1013.6338ms
2022-08-28 10:24:04.032 -07:00 [WRN] Unable to gather Target(0)!

If you are certain about the bog lords name is inside the marked white rectangle. Then be sure to checkout 9b421d430b12edaee48c15510383238e480607f7 as i did some fix regarding the mouse cursor.

On top of this, be sure to set the Cursor Size 32x32, in Esc -> Interface -> Accessibility -> Cursor Size -> 32x32


I'm going to take a look what's going on, about 1-2 hours eta.

adamssullivan commented 2 years ago

I did zoom out a bit more and that did help with the above problem of searching but it will just find it the 5 times and then give up. The Cursor size was at default I did change it to 32x32 but it appears that is the default size. It seems like it just isn't "Right Clicking" Thanks again! out20220828.log

Xian55 commented 2 years ago

There are no longer left or right mouse clicks at all, because when the mouse down event happens only for a short time, and game is unable to recover from rotating the camera with mouse state, as a result the camera could be rotated and ends up in a weird angle.

Instead using Interact With Mouseover. since https://github.com/Xian55/WowClassicGrindBot/pull/388

Be sure to update the key bindings, accordingly.

image

adamssullivan commented 2 years ago

I was unaware of that change. Thanks! When was the Interact with mouseover added? I have been farming humanoids for cloth for at least the last 3 weeks maybe longer so I have not been skinning or herbing. Thanks again for such good work. Is there a way to tip you?

Xian55 commented 2 years ago

https://github.com/Xian55/WowClassicGrindBot/pull/388 has been merged 17 days ago.

If you give a star to the project, that's more then enough for me. 🙇