Tuesday, April 17, 2012

CanPathTo() problem

The CanPathTo() function seems to return the wrong information on many maps. This has lead to units pathing into mountains that they can't get to (and getting stuck) and units simply not moving on maps like Isis because the AI thinks it's land units can't reach their destination and they end up waiting for transports (another issue).



Is there anything that can be done in a patch to correct this?|||We're looking into improvements, but I can't give you any more information than that.|||Any way you can post the function so I can see if I can make my own and possibly improve it?|||I'll have to get back to you about this. I can't give an answer one way or the other currently.|||Please do help Sorian out with this. It's a crucial issue for the AI being able to navigate properly on the stock maps (let alone user-created maps). He's put a lot of his time and effort (at no charge) into making your product more fun and enjoyable for your customers.



If his hard work doesn't motivate GPG's assistance, then at least consider that it would make GPG look good (and make your product more functional) to resolve this critical bug report (and as a side benefit, would support the premiere mod to come out of the user community to date). =)|||yacoub|||Any word on this yet DFS?|||I'll have something very soon on this. I haven't forgotten :P|||Awesome, just wanted to check in.|||Quote:|||Well, from the replies DFS has made it sounds like he is trying to get something done. It will get fixed eventually, it has to. We just have to wait until it does.|||Heya,



We will not have this fixed in time for the next patch. It's a complicated problem that we're having both engine and script changes to fix.



The engine stuff we simply can't have in the next patch because it affects more than just skirmish.



The script fixes, however, you can probably mimic what we are doing.



The functionality we are creating is basically putting down more hint markers in marker chains. Then when you are creating an attack find a point on the chain that is nearby and create the chain off of that new point.



I hope this helps.|||It's wonderful to see that you are working on it.



Thank you.



We look forward to the improvements.



And, thank you for responding, too.|||I am absolutely impressed with the help we are getting from the devs. Makes me glad I decided to purchase, and then mod for this game.|||sorian|||As a map creator I'd like more control over the behaviors of the ai. I think letting an actual person have more input towards the ai actions would greatly improve it's abilities.



I'm thinking something like this:

AI sets a final destination point to attack, a high value target

AI finds an optimal pathing distance radius; x/mapscale = OpDist

At each interval AI generates a list of combat markers, known units around area, other markers

Sorts targets, finds target positions in the direction of the final target and prioritizes target positions:

combat markers / defense points * high value targets (factories, etc)

if there arent any combat markers in the radius of the current OpDist then use any other markers as they're more likely to have enemy activity

Repeat until final target is pathed



Giving basically a list of mini targets a certain distance from the last target, say 100 meters apart. So using shorter pathing distances but still having a final target of any distance away and giving the map makers more control by prioritizing combat markers.

No comments:

Post a Comment