priezm / ro-rail

Automatically exported from code.google.com/p/ro-rail
0 stars 0 forks source link

Obstacles/corners cause AI to move outside MaxDistance #48

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What feature would enhance usability or efficiency?
usability

What steps would demonstrate the improvement granted by the recommended
feature?
1. Set a mob on high priority with a kite distance (4 or so) on tank mode.
2. Approach mob and have the homuncuuls run away from the mob.

What is the current behavior in the above situation?
Homunculus will eventually run beyond the max distance as set, usually 
offscreen, where it does not receive commands.

What revision of the product are you using?
v.185

What type of homunculus/mercenary are you using?
Vanil

Please provide any additional information below.
Kiting is working quite well, except when a mob pushes the homunculus out of 
range. Perhaps an improvement would be to have the homunculus to maintain range 
from mob at max range AND within maxdistance range.

Original issue reported on code.google.com by landstei...@gmail.com on 29 Nov 2010 at 7:47

GoogleCodeExporter commented 8 years ago
This is a bug, not a feature request. The AI should never move outside of 
MaxDistance range, because the movement no longer targets specific actors. 
Instead, movement is based on a grid and the tiles are given priority values 
based on actors around them in conjunction with kite range, attack range, skill 
range, etc.

The grid that RAIL generates is designed to automatically ignore tiles that 
would be outside of MaxDistance, or off the map (RO map tiles can only range 
from 0,0 to 1023,1023 due to limitations in the game). Movement to tiles 
outside of this grid should not be possible.

Can you tell me the /where location that this happens most often for you? Also 
helpful would be the relevant state-file options (MaxDistance, etc).

Original comment by faithful...@gmail.com on 29 Nov 2010 at 8:42

GoogleCodeExporter commented 8 years ago
I'll get back to you re: /where, but I know when I kite at a distance of 4 from 
say, Phreeoni, with a maxdistance of 14, I will occasionally (but not always) 
lose sight of the homunc. I have witnessed this regarding other mobs (most 
notably MVPs Turtle General, Phreeoni and GTB, when the character is moving 
alongside the homunculus).

How frequently is the grid generated? It might simply be that I move the char 
after the grid was generated and I should just avoid doing that.

Original comment by landstei...@gmail.com on 29 Nov 2010 at 9:06

GoogleCodeExporter commented 8 years ago
There are actually two grids that are generated. One is for the actual tile 
positions on the map (0,0 to 1023,1023). The second maps positions relative to 
the owner's position with a range of MaxDistance (in your case: -14,-14 to 
14,14). The first one is generated only once at the time RAIL is loaded. The 
second is generated freshly each time AI() is called. (I'm actually going to 
redo this. The rapid generation of tables is wasteful of memory and causes the 
garbage collector to be called too often).

I think your problem might have to do with the AIs current inability to 
properly detect corners and obstacles while chasing after you. If it is 
attempting to stay within MaxDistance but gets stuck around a corner, it 
doesn't have any routines to correct itself now. You'll notice that the AI 
sometimes gets stuck in narrow pathways; this problem is more apparent when 
movement choices are further limited by kiting monsters.

Until I finish a rework of the TileMap.lua code to be more memory friendly, I 
don't want to start adding more onto the movement system. Until then, perhaps 
you can lure MVPs to more open areas?

(Also, once Area of Effect skills [such as Arrow Shower, Bowling Bash, etc] are 
implemented, they will make use of TileMap in a similar fashion: find the 
target position/actor that will hit the best set of targets)

Original comment by faithful...@gmail.com on 30 Nov 2010 at 6:05

GoogleCodeExporter commented 8 years ago
I noticed the effect the other day while MVPing Pharaoh, specifically while in 
the bottom right portal (top side). The homunculus moved North a few cells and 
then made a B-line to the right and off screen (where he met his untimely 
death). I suspect what you're saying re: obstacles is correct.

These minor inconveniences are in no way hindering my ability to MVP, the AI is 
working worlds better than any others that are out there currently.

Original comment by landstei...@gmail.com on 30 Nov 2010 at 9:43

Attachments:

GoogleCodeExporter commented 8 years ago
I'm updating some of the tags on this issue. I'm also marking it low priority 
as it can be avoided and is easy to recover from.

Original comment by faithful...@gmail.com on 2 Dec 2010 at 5:44

GoogleCodeExporter commented 8 years ago
I implemented partial obstacle detection recently. Does this still occur?

Original comment by faithful...@gmail.com on 12 Jan 2011 at 2:24

GoogleCodeExporter commented 8 years ago
Sorry for the late reply here. I'm not sure what you have changed, but the AI 
seems much better with regards to this problem. I'd even say its safe to close 
this issue.

Original comment by landstei...@gmail.com on 11 Feb 2011 at 9:18

GoogleCodeExporter commented 8 years ago

Original comment by faithful...@gmail.com on 23 Apr 2011 at 2:01