Waypoint Radius

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
Amihimarue
Posts: 6
Joined: Wed Aug 11, 2010 1:58 pm

Waypoint Radius

#1 Post by Amihimarue » Wed Aug 11, 2010 7:01 pm

Hi, i have problem with rombot. My english is to poor, so i ilustrated my problem.

Bot works now that(chain mode - mob, mob, mob and most time bot never back to waypoint, because distance is too high and he blocked on some boxes/trees):
Image


So i need to do some waypoint radius, should bot never target and attack mobs outside allowed waypoint range.
Like this:
Image




My question is - can i do that ? if yes, please tell me where and how.


PS. on patch 3.0.3 im forced to download new version of bot, that version attacks all 360" character degree (old only attacks front of character, better for me. So can i back to old "only front attack"?)
Last edited by Amihimarue on Wed Aug 11, 2010 7:07 pm, edited 1 time in total.

Valleyguy
Posts: 100
Joined: Wed Aug 04, 2010 11:34 pm
Location: Canada

Re: Stuck problems

#2 Post by Valleyguy » Wed Aug 11, 2010 7:06 pm

Amihimarue wrote:Hi, i have problem with rombot. My english is to poor, so i ilustrated my problem.

Bot works now that(chain mode - mob, mob, mob and most time bot never back to waypoint, because distance is too high and he blocked on some boxes/trees):
Image


So i need to do some waypoint radius, should bot never target and attack mobs outside allowed waypoint range.
Like this:
Image




My question is - can i do that ? if yes, please tell me where and how.


PS. on patch 3.0.3 im forced to download new version of bot, that version attacks all 360" character degree (old only attacks front of character, better for me. So can i back to old "only front attack"?)

I think you will find the new one will keep your bot on path better with the 360 degree fighting mine never gets lost on the paths and if he gets jammed the new bot has a auto un-stick code to get him back to the way point... id try it man you might like the results. to avoid getting too deep in chain killing monsters away from your path reduce the ProfileOption("MAX_TARGET_DIST", 200); to 150 or 125...
Image

Amihimarue
Posts: 6
Joined: Wed Aug 11, 2010 1:58 pm

Re: Waypoint Radius

#3 Post by Amihimarue » Wed Aug 11, 2010 7:11 pm

Yea, but old bot works fine (only attack in front). Problem is 360" degree attack.
But better solution is control waypoint distance, if bot move too far (like 300-400 range), he need to back on track.
Im wondering if bot have thats mechanics or similiar?

EDIT

@Valleyguy
Thx dude :) You solve my problem. (Max_target_distance to reduce chainkilling)

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

Re: Waypoint Radius

#4 Post by rock5 » Thu Aug 12, 2010 1:59 am

Amihimarue wrote:But better solution is control waypoint distance, if bot move too far (like 300-400 range), he need to back on track.
Im wondering if bot have thats mechanics or similiar?
I think this is a good idea. Is there such a mechanic? There should be. It should only target mobs that aren't too far away from the 2 waypoint you are walking between.

Edit: Actually that approach wont work if 2 waypoints are very far away from each other. You'd still want to attack monsters along the way even if you are out of range of the waypoints. Instead you'd have to calculate the distance of the monster to the line from waypoint a to b, which can easily be done.

Actually this is something I can do, I'm going to start working on it. We will need a profile variable for the distance from the path to attack monsters and a default value. Maybe "MAX_TARGET_DIST_FROM_PATH"? I was never very good with variables. And a default of 250? How does that sound?
  • 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

Amihimarue
Posts: 6
Joined: Wed Aug 11, 2010 1:58 pm

Re: Waypoint Radius

#5 Post by Amihimarue » Thu Aug 12, 2010 2:30 am

Sounds good, 250 is perfect :) Cant wait for result.

User avatar
Administrator
Site Admin
Posts: 5307
Joined: Sat Jan 05, 2008 4:21 pm

Re: Waypoint Radius

#6 Post by Administrator » Thu Aug 12, 2010 6:21 am

We could, potentially, calculate the closest point to the player on the segment between two waypoints, and use the radius from that. Isn't math fun?

Valleyguy
Posts: 100
Joined: Wed Aug 04, 2010 11:34 pm
Location: Canada

Re: Waypoint Radius

#7 Post by Valleyguy » Thu Aug 12, 2010 6:54 am

rock5 wrote:
Amihimarue wrote:But better solution is control waypoint distance, if bot move too far (like 300-400 range), he need to back on track.
Im wondering if bot have thats mechanics or similiar?
I think this is a good idea. Is there such a mechanic? There should be. It should only target mobs that aren't too far away from the 2 waypoint you are walking between.

Edit: Actually that approach wont work if 2 waypoints are very far away from each other. You'd still want to attack monsters along the way even if you are out of range of the waypoints. Instead you'd have to calculate the distance of the monster to the line from waypoint a to b, which can easily be done.

Actually this is something I can do, I'm going to start working on it. We will need a profile variable for the distance from the path to attack monsters and a default value. Maybe "MAX_TARGET_DIST_FROM_PATH"? I was never very good with variables. And a default of 250? How does that sound?

I love math thats why I am a Civil Engineer :) and not a programmer heh.... anyway you all ready have your var in the profile the Max Target Dist can and should = the Max Path Dist its already a radius number if i only want to target enemies at 150 (avoiding obstacles) then my distance away from my path i ever really want to be is either half that (75) or all of it (150) ...

cause you think of it i will run up to 150 already away from my path to attack something when i am done fighting i would have to check my path over 150? go back under look for another mob within 150 of me... etc...
Image

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

Re: Waypoint Radius

#8 Post by rock5 » Thu Aug 12, 2010 7:36 am

Valleyguy wrote:love math thats why I am a Civil Engineer :) and not a programmer heh.... anyway you all ready have your var in the profile the Max Target Dist can and should = the Max Path Dist its already a radius number if i only want to target enemies at 150 (avoiding obstacles) then my distance away from my path i ever really want to be is either half that (75) or all of it (150) ...

cause you think of it i will run up to 150 already away from my path to attack something when i am done fighting i would have to check my path over 150? go back under look for another mob within 150 of me... etc...
Actually that's a good point. After all, the purpose of Max Target Distance is to keep you from going too far from the path. So what we should do instead is just change the way it checks Max Target Distance. Of course if the waypoint type is "wander" it will have to work as it does now.
  • 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

User avatar
Administrator
Site Admin
Posts: 5307
Joined: Sat Jan 05, 2008 4:21 pm

Re: Waypoint Radius

#9 Post by Administrator » Thu Aug 12, 2010 7:56 am

The math is fairly simple. Actually, far more simple than you might think. I've made up a small graphic to show you what's going on here.

X = player
A,B = waypoints
V = point between A and B that's closest to the player
seg_circle_collision.PNG
Once we find V, we do our distance checking from there.

This is, I assume, what you're asking for?

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

Re: Waypoint Radius

#10 Post by rock5 » Thu Aug 12, 2010 10:29 am

There are probably a few ways to calculate the distance. I saw a few ways of doing it online but I ended up calculating my own way. I've tested the math. It works. And I've done preliminary tests on the patch. Can someone who can reproduce the problem of getting pulled away from the path, please test it.
Attachments
Distance_To_Path.zip
patch for player.lua
(738 Bytes) Downloaded 125 times
  • 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

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 1 guest