AI Path Finding (when cost = 100)
Posted: Sat Sep 17, 2011 9:03 pm
Pip,
Last month I came across something after studying the AI scripts.
When developing random maps, I noted that when the AI's unit(team) sits across a water barrier with a destination that is on the other side, it doesn't understand that it needs to go around the water barrier ... It wants to go the shortest distance but it can't, so it basically comes to a stop and if you look very close (
), you can see the AI units scratching their heads!
So, I looked into the matter ... I noted that the players "show route" (that we see) appears to be the same route that the AI looks at when moving to it's destination.
To fix the problem, in the terrainTXT file, I changed the water cost to read 900
.
In the following screen shot, you can see (now) the route that's calculated by this change. Also, I tested this with the AI unit (with both 100 and 900 ap) and the AI unit won't move when it's 100, but it will move (follow the route) when the water = 900 ap ... It's very interesting to say the least!

Last month I came across something after studying the AI scripts.
When developing random maps, I noted that when the AI's unit(team) sits across a water barrier with a destination that is on the other side, it doesn't understand that it needs to go around the water barrier ... It wants to go the shortest distance but it can't, so it basically comes to a stop and if you look very close (

So, I looked into the matter ... I noted that the players "show route" (that we see) appears to be the same route that the AI looks at when moving to it's destination.
To fix the problem, in the terrainTXT file, I changed the water cost to read 900

In the following screen shot, you can see (now) the route that's calculated by this change. Also, I tested this with the AI unit (with both 100 and 900 ap) and the AI unit won't move when it's 100, but it will move (follow the route) when the water = 900 ap ... It's very interesting to say the least!
