hectorgimenez / koolo

Diablo II Resurrected bot written in Go
MIT License
80 stars 51 forks source link

Andariel #23

Closed RobotGaston closed 1 year ago

RobotGaston commented 1 year ago

Hello, thank you VERY MUCH for working and improving this amazing thing. I'm very happy that the tombs, stony tomb, and overall new locations where added.

just a quick observation:

  1. I found this "error" mistype:

in current

andariel.go (lines 26 27)

    a.builder.WayPoint(area.CatacombsLevel3),
    a.builder.WayPoint(area.CatacombsLevel4),

while they are supposed to be:

    a.builder.MoveToArea(area.CatacombsLevel3),
    a.builder.MoveToArea(area.CatacombsLevel4),

2nd.

diablo.go

still not working properly for me unfortunately...slow tele to cs from river waypoint - which is fine, just in other places she can go straight to the place she needs to go much faster with certainty. And then in cs sorc wasting time on seals casting teleport on seals instead of clicking on them, then finally after a minute of casting teleport in 1 place in the air close to the seal, she finally presses seal only to skip (ignore) seal defender..., and tele away further to a next seal...) (all monster ignore is turned off in config...)

fixing this cs script would be BIG...

3rd.

Character can stuck in stony_tomb.

If the map is spawning with a CLOSED DOOR and there is a mob behind it, character is getting stuck in front of the closed door attacking the mob hiding behind it which is not in a direct line of a spell trajectory (OBSTACLE on the way). She keep casting casting and casting into the wall (closed door)...instead of making step - telestomping the mob she's trying to attack...

and the Most Important :) 4rd...

this version is CRASHING for me...in random places at random times...it just stoping working with an error leaving character on a battlefield uncontrolled....working working working game after game after game...then suddenly...BOOM, error+crash. :(

here is the log...

DEBUG action/stash.go:28 Checking for items to stash... DEBUG action/stash.go:30 No items to stash... DEBUG health/belt_manager.go:53 Belt Status Health: 4/4 healing, 4/4 mana, 1/8 rejuv. DEBUG internal/bot.go:83 Loading screen detected, waiting until loading screen is gone DEBUG internal/bot.go:89 Load completed, continuing execution DEBUG health/belt_manager.go:32 Using HealingPotion potion on Mercenary [Column: 1]. HP: 70 DEBUG character/blizzard_sorceress.go:66 Monster detected close to the player, casting Blizzard over it FATAL internal/single_supervisor.go:43 Panic detected, Koolo will exit {"panic": "runtime error: index out of range [19] with length 18"} github.com/hectorgimenez/koolo/internal.(SinglePlayerSupervisor).Start.func1 C:/Users/xxx/8/internal/single_supervisor.go:43 runtime.gopanic C:/Program Files/Go/src/runtime/panic.go:914 runtime.goPanicIndex C:/Program Files/Go/src/runtime/panic.go:114 github.com/hectorgimenez/koolo/internal/action/step.(AttackStep).ensureEnemyIsInRange C:/Users/xxx/8/internal/action/step/attack.go:158 github.com/hectorgimenez/koolo/internal/action/step.(AttackStep).Run C:/Users/xxx/8/internal/action/step/attack.go:97 github.com/hectorgimenez/koolo/internal/action.(DynamicAction).NextStep C:/Users/xxx/8/internal/action/action_dynamic.go:47 github.com/hectorgimenez/koolo/internal.(Bot).Run C:/Users/xxx/8/internal/bot.go:102 github.com/hectorgimenez/koolo/internal.(SinglePlayerSupervisor).Start C:/Users/xxx/8/internal/single_supervisor.go:70 main.main.func2 C:/Users/xxx/8/cmd/koolo/main.go:96 golang.org/x/sync/errgroup.(*Group).Go.func1 C:/Users/xxx/go/pkg/mod/golang.org/x/sync@v0.3.0/errgroup/errgroup.go:75

I can't recall the previous version crashing...

second crash:

DEBUG action/clear_area.go:19 Clearing area... {"monsterID": 45} FATAL internal/single_supervisor.go:43 Panic detected, Koolo will exit {"panic": "runtime error: index out of range [24] with length 9"} github.com/hectorgimenez/koolo/internal.(SinglePlayerSupervisor).Start.func1 C:/Users/xxx/8/internal/single_supervisor.go:43 runtime.gopanic C:/Program Files/Go/src/runtime/panic.go:914 runtime.goPanicIndex C:/Program Files/Go/src/runtime/panic.go:114 github.com/hectorgimenez/koolo/internal/action/step.(AttackStep).ensureEnemyIsInRange C:/Users/xxx/8/internal/action/step/attack.go:158 github.com/hectorgimenez/koolo/internal/action/step.(AttackStep).Run C:/Users/xxx/8/internal/action/step/attack.go:97 github.com/hectorgimenez/koolo/internal/action.(DynamicAction).NextStep C:/Users/xxx/8/internal/action/action_dynamic.go:47 github.com/hectorgimenez/koolo/internal.(Bot).Run C:/Users/xxx/8/internal/bot.go:102 github.com/hectorgimenez/koolo/internal.(SinglePlayerSupervisor).Start C:/Users/xxx/8/internal/single_supervisor.go:70 main.main.func2 C:/Users/xxx/8/cmd/koolo/main.go:96 golang.org/x/sync/errgroup.(*Group).Go.func1 C:/Users/xxx/go/pkg/mod/golang.org/x/sync@v0.3.0/errgroup/errgroup.go:75 exit status 1


hectorgimenez commented 1 year ago

Hello! thanks for the feedback, andariel run should be fixed now.

About CS, yup... it's a bit buggy right now. I'm making some changes on the movement in order to make it a bit more reusable by different actions/steps, basically I'm trying to simplify it a bit, so building new runs will be easier. But is not finished yet, I think the same for the 3rd and 4rd problems.

Keep in mind that what you call "this version" is just the main branch, so it's not a version at all, you have the latest but probably not polished or even not working at all.

Anyway, thanks for the feedback!

RobotGaston commented 1 year ago

thank you, read and noted :) Waiting for further tweaks+fixes+improvements with great hope. especially fingers heavily crossed on those crashes fixing...

RobotGaston commented 1 year ago

--UPDATE--based on a "current main"

firstly, a HUGE thank you, THANk YOU for get ridding of out of range bug. -(Panic detected, Koolo will exit {"panic": "runtime error: index out of range)- This thing is gone. YES.

The "current" main of the program can be useable now at last. Hurray!

Overall, there is a GREAT and noticeable improvement in a working speed of the program on all aspects,

Especially changes that are appreciated - how program now can swing fast circles around on a portal when sorc is not able to click on it for the fist time when trying to go to town,

and 2nd - when she needs to pick up something and can't click on it,- instead of going to town just teleing slightly away and back trying again from a new changed angle. - no need to wait for a loading screens - going to town and back. a big time savour.

now to minor things that still not working...)

...in Chaos sanctuary ...behaviour changed but same problem with the seals remained (( ,- sorc is teleing into the seal unable to press on it with 100% confidence or accuracy..,(

I don't know... maybe it is possible to look how it is implemented in kolbot in it's cs script It is written on java and might it be of help here for us? Or we can get a hint of how to make it work from there but I'm not sure...

next to a new one:

sometimes... sorc get stuck in a2 in arcane sanctuary on a summoners route when he spawns down the map, sorc making a few correct teleporting steps then stopping in one position unable to correctly put a cursor for a next teleport jump. (keeping mouse cursor too close to a player on a place unable to reach and place a mouse cursor on a further platform for a correct and successful teleporting step) - casting tp in place for 30-50 seconds then finding a correct position for a cursor where it should be placed for a correct jump and proceeding going to summoner at last.

I have never seen it happening in "previous 0.2.0" version of a program. Something is off with route calculation I suspect :)

in stoney tombs still getting stuck firing at the door if a location spawns with a door closed in front of the sorc.

Baal . Sorc can get stuck on casting static field on baal at the start of the fight. (She keep casting and casting static field 10-20 times instead of casting it 4 times and switch to primary attacking spell - blizzard) then stopping attack, staying afk, doing nothing, then after minute or two resuming attack and finishing baal successfully with a blizzard.

thank you for updating README file.

Overall... I'm checking this wonderful place 2 times every day impassionately waiting for a new changes to pop up in a branch "main"

Getting very excited every time I see the notice that the program is changed ...)

Thank you Hector. Thank you.

hectorgimenez commented 1 year ago

Thanks for the feedback, I've been working on other parts of the tool recently so I've not had time to focus on runs.

Let's go point by point:

Thanks, any feedback is welcome.

RobotGaston commented 1 year ago

--more observations based on the current main (which has a NEW- moo level added!)--

it is AWESOME to see a cow level implemented! (haven't tested it yet tho thank you for including it into the runs!)

now to the point:

unfortunately I'm facing a new "middle level" of a problem:


sometimes, (30%-35% of the runs) character can't click on waypoint in town (in a3 going to a5) and in a2 going to a3 :( Character in town is coming closer to TOWN waypoint and not clicking on it to select a destination where he should go next. Character is somehow missing a click on town wp and staying near it doing nothing I don't know for how long...Not trying to pick up a wp again. My guess is the program think that it successfully selected a waypoint in town and now got stuck in infinite selection a location from a waypoint menu :(

Could you please look into it? please? It is important....:)


next one: (a middle level of importance):

sometimes, when there is a closed chest on the location (in arachnid cavern for example) character just stop moving staying nearby the closed chest afk doing nothing (the expected action is to click on the chest and move on but sorc is not making this step for some reason (the keys are present in the character's inventory) - If I pick a mouse and click on the chest manually - she proceed further with the level routine - starts moving and killing finishing the location with no further problems)...

problem is sometimes she clicks on the chest and sometimes she doesn't...a floating trouble - could be hard to figure out why is it happening :(


next to the things that can be ignored (not that important):

When character is loaded to town waypoint in a5 (throught prevouse waypoint selection from town wp a3-to town wp a5 (for example) throught wp system) - after character is loaded into a5 town wp it swaps weapon (staying on wp) - trying to cast battle orders before moving to red portal to pindleskin. Then after failed attempt to cast - switching back and proceeding to a red portal. ( DEBUG internal/bot.go:89 Load completed, continuing execution DEBUG character/character.go:53 CTA found: swapping weapon and casting Battle Command / Battle Orders)

--

The previous route in Arcane "problem" could be not looked into for now, In this main sorc is going with more confidence on her route. Yes, she still is getting stuck sometimes but she's finding a correct next point for a jump much faster then I mentioned before. Could be ignored I think :)

I gave up on DIablo (cs) :)... thank you for trying to make it work :) It still has a problems here and there...:( (when lord de seis (a seal defender) is spawning RIGHT NEXT to the seal (right after it was pressed) on TOP of the map (happens rarely),- sorc just ignoring him going down to a position where he usually appearing not finding him there obviously and ignoring this fact moving on :) ) ...but...no matter!.... I understand. It is a difficult location to program with many "ifs..". Maybe one day...

-

thank you for your time. much appreciated!

hectorgimenez commented 1 year ago

thanks, what commit has you been testing so far? I faced some problems like your first and seccond point and addressed them on the latest commit https://github.com/hectorgimenez/koolo/commit/0a192eabaadd1819bd73c59bedc02486b9cf7dde but yeah who knows it might still happening in other circunstances, that part is still very flakky at this point. But first and second point are related to the same issue, object interaction issue.

I suppose the problem you mention for a5 is when the caracter is coming from other act and trying to do pindle, right? I also noticed it now.

About pathing... yeah I want to keep working (and learning) on that part when I have more time.

RobotGaston commented 1 year ago

yes, I'm sorry, I wrote a post and only after that noticed that the main has changed with some bug fixes,

please, IGNORE everything, I wrote above, I'm testing (RUNNING) the latest available main right now (https://github.com/hectorgimenez/koolo/commit/0a192eabaadd1819bd73c59bedc02486b9cf7dde), and not experiencing anything I wrote above, sorry. :)

thank you FOR FIXES!! :)

yes, you are correct, I'm taking about pindle script, when character is appearing in town via wp system coming from another act. :)

I'll get back If there will be anything to report.

I very much love the overall speed increasing in all aspects. On all levels. Good work!

hectorgimenez commented 1 year ago

yup, fixed the buff attempt when WP destination is town, about CS yeah, it's not only the complexity but more that my sorc is not able to clear it haha

RobotGaston commented 1 year ago

cheers , for correcting cata buff attempt in pindlescript :)

Also, a big thx for improving game creation - looks like character now always accurate in game creating and not hurrying up with miss clicking as before.

yes, CS is a very tough location for a sorc to handle... true :) Mine can't survive there either...)

Reporting back. Everything that is written in this topic is not true any more, (except my BIG gratitude..)

As I can see, sorc is not experiencing anything that was previously reported, and running correctly - selecting waypoints, pressing on the chest in arachnid, teleporting to summoner. I salute you. Kudos for corrections.

of course, there is a LOT of things to wish for to be implemented :) (realising a line of sight for example, and correctly detect columns and obstacles on a line of fire, open all chests in cow level, click on every rock...for a character to be self aware (monitor BO status) about BO status - if BO is gone - reapply it again. It will be gone in the middle of long clearing locations - in cow level for example...) But the current main is running just fine by me at last! (we reached 0.2.0 released version state but much BETTER, STRONGER, FASTER.).

Oh and I remembered one more thing according to difficulty for a sorc to stay alive on a location. (and a thing that can be coded) On a hell baal run, if "Stygian dolls" are spawned in the throne it is more then 50% chance for sorc to die :(. They are getting close to the sorc very fast , surrounding her, then she fires a spell to them and they explode all at once killing sorc with them... :) Solution (as I imagining it to myself) - realise dolls and change fighting behaviour - always try to keep distance to them - not allowing them to get closer,- fire at them form a distance, allowing merc to deal with them...:) Or just simply - if dolls are detected and present - end run - move to the next script. :)

anyhow,

Topic can be closed+deleted. :)

Thank you.

hectorgimenez commented 1 year ago

The line of sight thing... at some point, I need to think about it also.

I think automatic rebuff is something relatively easy to implement, but not sure "when". I mean, if character is teleing in baal and detects that buff is over and stops to rebuff probably in less than one second will have 30 monsters over it, so it's a bit more tricky.

Opening chests in cows level, I'm not sure how good is that? It's worth to do it? (I have no idea, honestly). But we can make it configurable for the run (or for all of them).

About the Stygian dolls those mobs move too fast, I don't think with current attack rotation implementation we can build something robust enough to detect/move/attack so fast.

Btw, I will close this ticket, feel free to open another one if you have any other feedback or detects more issues.

Thanks.