FAForever / FAForever/fa

AI Return a table of positions for potential transport drop points.

Open
#4,383 2 comments 0 reactions 0 assignees View on GitHub
area: AI feature: nav-mesh
Dominant language
Lua
Stars
264
Forks
260
Avg merge
3d 2h
Merged PRs (30d)
21

Description

## Describe the query

This request is for being able to get a group of potential positions for an AI to be able to more intelligently select a drop zone.

The idea is that the AI should make a query to a position on the map. The navmesh should query the imap threat (at a number of specified rings) at the position. It should aim to return positions that would be closest to a certain angle depending on AI and enemy start positions to avoid the AI sending transports over a base to get to a position it thinks is safe. The positions returned should also aim to be at least a minimum threat distance away (t3 sam range by default?) from the closest imap threatType position should there be any at the drop location.

Obviously this is a wish list but I think it would provide some options to fix a major flaw in the AI's transport usage.

```lua
---@param layer String
---@param origin Vector
---@param destination Vector
---@param threatType String
---@param threatRings Integer
---@param minimumThreatDistance Integer
---@param numPointsToReturn Integer
---@return table
function GetSafePositionsAroundLocation(layer, origin, destination, threatType, threatRings, minimumThreatDistance, numPointsToReturn)

local threatTable = GetThreatsAroundPosition(destination, threatRings, true, threatType )
NavMesh and mathmatical magic to select positions that are safe relative to the angle between the AI and the drop position.

end
```

## Visualize the query
Have attached a visual representation on where the query might return positions.

![DropZones](https://user-images.githubusercontent.com/34614077/201033429-f4851a70-bd34-4054-9692-f3fa46f2d1aa.JPG)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.