ATM AI can have 3 modes of been ordered to move around:
- Fly
- Flylinear
- Attack
The problem is that Attack command always assumes that the target will shoot back so the ship is always moving around even after reaching weapon's fire range, while there are attack operations that are applied against passive targets, mainly mining and salvaging.
So I would suggest a 4th Flight AI state to be added:
- Gathering
Which can behave more or less as Attack but with 2 important changes:
- Stop completely once attack range is reached.
- Rotate so maximum ammount of relevant (mining for roids and salvagers for wrecks) turrets can hit the target.
Additionally 3 QoL features could be also implemented:
- Anti Friendly Fire break. If the shoot action triggers friendly fire, abort current target.
- Anti stall. If the target is still alive after Hit Points / DPS seconds, abort current target.
- Adding full firepower property to the "Gathering" ShipAI mode. If on, the ship will use every single available turret against the target, if off, only the relevant turrets will be used.
EDIT: The "abort current target" may require extra data so scripts can check when a gathering operation ended successfully or not... Maybe AI state can be swaped to "None"? So from script pow, something like this could work:
-- Pseudocode
ai = ShipAI(ship.index)
ai.SetGather(target)
If NOT valid(target) and ai.state == AIState.Gather then
-- Current target was destroyed successfully
elseif valid(target) and ai.state == AIState.None then
-- Gathering operation aborted
end
Suggestion
oreganor
ATM AI can have 3 modes of been ordered to move around:
- Fly
- Flylinear
- Attack
The problem is that Attack command always assumes that the target will shoot back so the ship is always moving around even after reaching weapon's fire range, while there are attack operations that are applied against passive targets, mainly mining and salvaging.
So I would suggest a 4th Flight AI state to be added:
- Gathering
Which can behave more or less as Attack but with 2 important changes:
- Stop completely once attack range is reached.
- Rotate so maximum ammount of relevant (mining for roids and salvagers for wrecks) turrets can hit the target.
Additionally 3 QoL features could be also implemented:
- Anti Friendly Fire break. If the shoot action triggers friendly fire, abort current target.
- Anti stall. If the target is still alive after Hit Points / DPS seconds, abort current target.
- Adding full firepower property to the "Gathering" ShipAI mode. If on, the ship will use every single available turret against the target, if off, only the relevant turrets will be used.
EDIT: The "abort current target" may require extra data so scripts can check when a gathering operation ended successfully or not... Maybe AI state can be swaped to "None"? So from script pow, something like this could work:
Link to comment
Share on other sites
2 answers to this suggestion
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now