Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FR: Flag or Profile option to allow ships to use primaries to shoot down interceptable missiles/bombs pursing them. #6391

Open
DefCynodont opened this issue Oct 13, 2024 · 1 comment
Labels
ai A feature or issue related to the AI algorithms feature A totally new sort of functionality

Comments

@DefCynodont
Copy link

If it's not too much trouble, Myself, (as well as warmachine and possibly BtA) have a use case for fighters to shoot down bombs that are chasing them. Currently the AI doesn't know how to use it's primary or secondary banks in self defense against bombs or interceptable missiles that it is under threat by.

Ideally, this flag/option would allow fighters to shoot at pursuing interceptable/bombs under certain circumstances, some examples:
if the fighter has no chance to evade,
if it is already directionality facing the bombs,
if it has long range weapons and the bombs are far away thus giving the fighter has enough time to turn around and shoot.

Additionally, allowing the "glide attack" move (as documented in $Glide Attack Percent:) to be used to target a pursuing bombs when the requested feature is active, would be very swell and greatly appreciated.

How feasible would this be? Please and Thank you in advance.

@Goober5000
Copy link
Contributor

This is theoretically possible, but may require a lot of work. The AI code is pretty complex, and even simple upgrades (such as to ai-stay-near-ship) can require changing many bits of code in many functions.

At first glance, what would be necessary to implement this behavior is to look at all the places evade_weapon() is used, then add new logic to chase the weapon rather than evade it, subject to the conditions you mentioned. It would probably be cleaner to add a new submode, SM_CHASE_WEAPON, rather than overload SM_EVADE_WEAPON with special cases. To further complicate things, there is also a top-level mode, AIM_EVADE_WEAPON, that would need to be changed in the same way as the submode.

@Goober5000 Goober5000 added ai A feature or issue related to the AI algorithms feature A totally new sort of functionality labels Oct 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ai A feature or issue related to the AI algorithms feature A totally new sort of functionality
Projects
None yet
Development

No branches or pull requests

2 participants