Bot gets stuck if multiple targets in range are not in sight

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Message
Author
Shogun
Posts: 45
Joined: Wed Jul 27, 2011 6:08 am

Bot gets stuck if multiple targets in range are not in sight

#1 Post by Shogun » Sun Feb 26, 2012 7:20 am

It happens that the bot targets mobs behind walls or not in line of sight, after MAX_FIGHT_TIME it switches to the next and finally back to the first mob, the bot gets stuck. The common solution is to reduce MAX_TARGET_DIST but this does not really help in instances with lots of sight blocking objects like IDK.

How about remember unattackable mobs? Add these targets to a size limited queue or ringbuffer (max. 10 entries) and do not attack them again but of course fight back.

User avatar
silinky
Posts: 213
Joined: Mon Nov 23, 2009 5:07 am

Re: Bot gets stuck if multiple targets in range are not in s

#2 Post by silinky » Tue Feb 28, 2012 6:17 am

yes, this happens to me a lot too.
for example one time in KS my character got "obstacle in your way" idiotic frog message, because there was a little earthmound between me and the mob. i mean a 10 cm high earth mound. there was 2 mobs and for hours he just switched targets endlessly.

a stuck timer would help i guess. if there is one already can you tell me how to set it up?

bokagavrilov
Posts: 86
Joined: Sun Sep 18, 2011 5:20 am

Re: Bot gets stuck if multiple targets in range are not in s

#3 Post by bokagavrilov » Tue Feb 28, 2012 7:53 am

i think today's patch its the problem..just wait for the next update

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Bot gets stuck if multiple targets in range are not in s

#4 Post by lisa » Tue Feb 28, 2012 12:05 pm

Actually they love their little obstruction error, todays patch is proof.
•Mage/Druid (primary/secondary) class skill Magma Blade:
•Client is now able to sense a collision with solid objects, and players are no longer able to attack through solid obstacles.
Magma Blade wasn't affected by the obstruction error and so in this patch they "fixed" it so that it is.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

User avatar
silinky
Posts: 213
Joined: Mon Nov 23, 2009 5:07 am

Re: Bot gets stuck if multiple targets in range are not in s

#5 Post by silinky » Wed Feb 29, 2012 3:06 am

it is not today's patch, i get this for months now :(

romaniac
Posts: 79
Joined: Sat Feb 04, 2012 8:25 am

Re: Bot gets stuck if multiple targets in range are not in s

#6 Post by romaniac » Sun Mar 11, 2012 4:39 am

I'd like to pick up on this topic again. I also have the problem that occasionally the bot gets permanently stuck switching between two targets that are both hidden behind an obstruction (well, not really, but froggy believes that the fireball cannot penetrate a blade of grass).

Currently I try to work around this by modfiying attack distances and moving waypoints, but it is very difficult. It would be great if the bot could recognize such deadlocks and simply move on to the next waypoint if all targets are obstructed. Any chance to see such a mechanism?

User avatar
silinky
Posts: 213
Joined: Mon Nov 23, 2009 5:07 am

Re: Bot gets stuck if multiple targets in range are not in s

#7 Post by silinky » Mon Mar 12, 2012 1:49 am

another idea is to try to use the skill 1 on those mobs, which hits them with your stick/sword/dagger for a white damage to aggro the mob. after that you don't get the obstacle anymore. for melee this is ok, since shadowstab or slash does not get this error, but for example phantom stab does. weird game this RoM is.

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Bot gets stuck if multiple targets in range are not in s

#8 Post by lisa » Tue Mar 13, 2012 10:04 pm

I have been doing some thinking on this lately and there are a few scenarios

1. There are mobs in your path which you "should" be able to attack but because of the obstruction issue you just an't hit them unless you use melee.

2. The mobs are behind a solid object like a wall.



for 1. you could simply initiate a melee attack and then the fight will start and not really cause any issues, this would be very problematic for 2. though as you couldn't get to your target to be able to melee attack them.

So ideally I think we would need to change the existing ignore mobs system to use a table instead of a single mob. After digging deep into the coding used for the ignore target I have to say it is a big job =(

Firstly you would need to change it to use a table of course, you then need to update the table as required so you would also need to record the time the mob is added to the table and if enough time has passed them remove the mob from the table. If the mob is ignored again while still in the table you would also need to update the time to current time otherwise it would still use the old time.
You couldn't simply clear the table because you might need info of a mob previously ignored.

So in short there won't be a working solution any time for this issue.

Suggestions

If your issue is a staircase like in KS change the waypoint to "RUN" for those few coords, it will ignore targets until they agro on to it. That is how I do stairs in KS.

If the mobs are behind a wall, try adding them to friend list, bot won't initiate an attack on them but it will defend itself from "friends"
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

User avatar
silinky
Posts: 213
Joined: Mon Nov 23, 2009 5:07 am

Re: Bot gets stuck if multiple targets in range are not in s

#9 Post by silinky » Wed Mar 14, 2012 6:19 am

hey i have an idea :) maybe stupid, but worth to try.

the stucking happens on one waypoint, when the bot keeps switching targets, like forever.
so if a bot stays on a waypoint for too long, without any fighting going on, or damaging anything, just keep moving on. don't care about stuck list or anything. only time passed without any "action".

for me even a function to check this would help, i would integrate it where needed.

an unrelated question, not worth a new thread (although related to this somehow): how do i invoke the ATTACK skill on pullonly? i cannot find it in the skills section, and as usual i am writing from work :oops:

hope something helps

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Bot gets stuck if multiple targets in range are not in s

#10 Post by lisa » Wed Mar 14, 2012 7:32 am

well the trouble is that it thinks it is using skills, it only checks targets HP to determine if you haven't done any damage. So you couldn't check if you haven't done anything ina period of time.

As for staying at 1 waypoint for a period of time I actually have a WP I use which has just 1 waypoint, so that wouldn't be that good of a way to deal with the issue.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

User avatar
silinky
Posts: 213
Joined: Mon Nov 23, 2009 5:07 am

Re: Bot gets stuck if multiple targets in range are not in s

#11 Post by silinky » Wed Mar 14, 2012 7:46 am

hmm, yes, my dogmeat script is also 1 waypoint in fact :)
but this is not a problem since if i stay too long on WP nr 1, and it gets boring, and moves to next waypoint, that is also nr 1 so no biggie for me i guess.

do you have an idea for me to make a function to check the time spent in a WP, and if it is exceeded to move on to the next one? i would include this into the more risky waypoints.

thanks for the input!

User avatar
silinky
Posts: 213
Joined: Mon Nov 23, 2009 5:07 am

Re: Bot gets stuck if multiple targets in range are not in s

#12 Post by silinky » Wed Mar 14, 2012 8:23 am

ok here's an untested (and probably wrong) function i made, any correction is appreciated :)

Code: Select all

function timespent(ts_seconds)
	ts_start = os.time()
	while (ts_seconds < os.difftime(os.time(), ts_start)) do
		yrest(1000) -- or some "wait a second" function
	end
	__WPL:setWaypointIndex(nextnumber);
end
how can i find out what the nextnumber is? supposed it is a good approach

[EDIT] ts_seconds is the seconds after which the bot forces itself to the next waypoint not caring if other mobs are near

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Bot gets stuck if multiple targets in range are not in s

#13 Post by lisa » Wed Mar 14, 2012 9:02 am

if you call that function you will do nothing at all for the specified time, so I don't think that is what you want.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

User avatar
silinky
Posts: 213
Joined: Mon Nov 23, 2009 5:07 am

Re: Bot gets stuck if multiple targets in range are not in s

#14 Post by silinky » Wed Mar 14, 2012 9:19 am

another idea :)

in player.lua at line 806 there is a condition, and in line 811 self:clearTarget(), after this line we could add another condition, set in the profile as an option, to move to next waypoint, if true, after line 811 there would be a command to go to next waypoint. if false, only clear target and target something else.

how does this sound?

Shogun
Posts: 45
Joined: Wed Jul 27, 2011 6:08 am

Re: Bot gets stuck if multiple targets in range are not in s

#15 Post by Shogun » Wed Mar 14, 2012 9:31 am

lisa wrote:So ideally I think we would need to change the existing ignore mobs system to use a table instead of a single mob. After digging deep into the coding used for the ignore target I have to say it is a big job =(
No, not a big job. There already exists an implementation to ignore the last targeted mob and it's just a couple of lines needed to extend that to a table. I sent the coding to rock about 2 weeks ago. My bot is running fine with the changes.

User avatar
silinky
Posts: 213
Joined: Mon Nov 23, 2009 5:07 am

Re: Bot gets stuck if multiple targets in range are not in s

#16 Post by silinky » Wed Mar 14, 2012 9:35 am

can you send it to me too? :)
thx!

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Bot gets stuck if multiple targets in range are not in s

#17 Post by lisa » Wed Mar 14, 2012 9:56 am

So in your table you also took in to concideration

self.Last_ignore_target_ptr (6 occurances in bot)
self.LastTargetPtr (12 occurances in bot )
self.Last_ignore_target_time (8 occurances in bot)

for each ignored mob and removed the mob from the table after a specified amount of time?
If not then it's a bandaid job which will only cause issues in the end.

Or did you simply clear the table after killing a mob successfully, which would of course still try to attack the last ignored mob anyway.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Bot gets stuck if multiple targets in range are not in s

#18 Post by rock5 » Wed Mar 14, 2012 10:02 am

Any idea about seeing how long you spend at a waypoint or making it move to the next waypoint, wont work. Mobs are found while moving too, so if you tell it to break and head to next waypoint, it will reaquire the targets as soon as it starts moving. Only an ignore table will work.

But I've never liked the idea of an ignore table. There have been numerous times I've seen the bot get blocked by a blade of grass or something. Then it moves to the next target, kills that, then goes back and kills the first target. If we use an ignore table, it would miss that first mob.

On the other hand, if I'm making a waypoint file where there are walls, I'll just reduce the MAX_COMBAT_DIST so it doesn't target mobs on the other side of the walls. I prefer this solution.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

Shogun
Posts: 45
Joined: Wed Jul 27, 2011 6:08 am

Re: Bot gets stuck if multiple targets in range are not in s

#19 Post by Shogun » Wed Mar 14, 2012 10:03 am

silinky, you have pm. I will also send that to lisa.

User avatar
silinky
Posts: 213
Joined: Mon Nov 23, 2009 5:07 am

Re: Bot gets stuck if multiple targets in range are not in s

#20 Post by silinky » Wed Mar 14, 2012 10:28 am

nice, thx :) i will integrate into the scripts, and hope it will be included in the next revisions in some form.

my bot (the priest one) met another related error 10 minutes ago on my home pc. it was fighting iron rune warrior boss in ks, and noticed that the fight was taking too long. it hit only with melee attack, and while hitting it, my screen was spammed with the obstacle error... besides the fact that it is stoopid to say that when the mob is 1 foot away from you, it was also kind of annoying because priest with melee attack cannot do very good damage..

i made it step back 1 step and problem was solved. dunno maybe a grain of sand was between the bot and the mob...

can i somehow program this to take a step back when the obstacle message appears on screen?

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 17 guests