|
|
|
Page 1 of 1 |
[ 3 posts ] |
|
Waypoint Script : LOTROExtreme
|
|
Posted: August 28th, 2007, 4:32 am
|
|
|
|
gthomas1
gthomas1's Reps:
|
I'm toying with the idea of creating this, but after thinking about it somewhat in my head, I wanted to see if anyone had any better ideas as far as tackling this would be.
UI wise, simple pull down menu allowing user to select a destination and press go. I thought about having static start/stop locations, like the horses are, but that leads to it being a bit more static then I'd like.
Program wise:
road array containing all points on all the roads.
waypoint array containing loc and all connecting waypoints.
When a player presses "go", the idea would be to find the closest road and head directly to it, then map out the best series of waypoints to hit before reaching the destination.
It would start from the end location, and loop through each connecting waypoint to see which one is closer to the player until it finds the path. There are probably more advanced/more accurate ways of doing this, but looking through all the maps, I didn't see any location that would cause a serious problem as most routes are fairly direct. This process should go fairly fast and would only need to be run once and store all the needed waypoints in an array.
For the actual movement, obviously we'd need to follow the "road" (or some other path that isn't going to make you jump off a mountain/get stuck). My concern is that even if I break up the "roads" into different areas (shire, bree, etc), is that it will take up too much time finding the next closest point on the road. I am also concerned about getting stuck in a loop for roads that wind around a hill, fence, or something else, as the player might have to move further from the waypoint in order to get closer to it eventually, which leads more towards a static route, which I wanted to avoid.
Any ideas for a better way of doing it?
|
|
|
|
|
Posted: August 28th, 2007, 8:11 am
|
|
|
|
dididothat
dididothat's Reps:
|
The easiest would be to have a bunch of preset paths.
You could create the paths first using some sort of "way point" every so often. Move so far, then press the way point button..., etc.
Then you would have to move at least close enough to a path and then start/play it.
Not much different then a typical bot might work that uses waypoints to travel a hunting circuit.
There is(was?) a WOW plug-in that could do this.
Otherwise anything else would require some sort of algorithmic pathing.
It's doable, but not so easy. It would require some sort of access of the games geometry data so it could path around objects (like mountains, hills, large obstructions, etc).
Even better, and maybe necessary, the system would have knowledge of where agro MOBs are as a group (from some sort of set DB, plus realtime positioning of self vrs agro MOB) so it can avoid getting killed as it moves along.
(Always wanted to do something like this, no doubt people have done something like this for WOW at least..)
|
|
|
|
|
Posted: September 1st, 2007, 11:14 am
|
|
|
|
wayward
wayward's Reps:
|
Standard way to do this sort of thing would be a breadth-first (or depth-first) search of the node graph. I implemented this in EQ2 about 2 years ago using the very gimpy ACTool framework. If LOTROExtreme had the API hooks for COM/VB it would be a lot easier to use those tools to do it (with a database containing the "subway map" graph of waypoints).
If you're looking to learn about the "right" way to do this, do a little research into BFS / DFS search algorithms...
|
|
|
|
|
Who is online |
|
Users browsing this forum: No registered users and 9 guests |
|
|
|