PapaJoesSoup / BDArmory

Gun turrets and other weapon systems for KSP
115 stars 57 forks source link

level bombing AI / dive bombing AI / dogfight AI modules #172

Open Hector919 opened 7 years ago

Hector919 commented 7 years ago

currently, the AI kind of offers a rather low amount of control over what happens when you let it engage ground targets. what I'd like to see would be a system that allows the AI three types of engaging targets (dogfight vs. air targets, level bombing, dive bombing aka strafing runs) which are each managed by a separate AI module in order to keep the amount of settings per module to an acceptable level. This way, you could also prevent your air superiority fighters from wasting ammunition and time on ground targets by not giving them a dive bombing module or prevent heavy bombers from entering dogfights by not giving them dogfighting modules.

In my mind, you'de end up with one main AI module and three sub-modules for the three types mentioned above:

in addition, I'd give the individual sub-modules a slider for priority, so you could tell a multirole fighter what to do first. If one day you want to implement a priority system to the point where the AI is weighing the priority of targets according to the situation, you could use the priority setting for that as well, but I don't think that for the first iteration of this system you'd need more than a simple check of "what AI module has the highest priority?".

EDIT/PS: I noticed that something vaguely comparable was suggeested in issue #139 where different air-to-air fighting styles were proposed for the AI (turn fighting vs. boom-and-zoom attacks). It might be possible to use AI submodules as proposed here to implement different styles of air-to-air combat as well.

gomker commented 7 years ago

@Hector919 this is something that many of us on the team have been discussing as well. We will keep this open to update our progress on implementation of features if possible.

Gedas-S commented 6 years ago

Sort of relevant - since v1.2 BDA supports custom AI, i.e. other mods can implement AI which will integrate with BDA just fine. All it needs is to implement the IBDAIControl interface (https://github.com/PapaJoesSoup/BDArmory/blob/master/BDArmory/Control/IBDAIControl.cs). So pretty much anyone can create a new AI, release a mod, and it will seamlessly work with BDA Guard Mode, Wing Commander, Competition Mode, Vessel Switcher and such.

However target selection is currently handled by Weapon Manager Guard Mode, and not the AI, and that part is, unfortunately, not as friendly. :( It's on my todo list, but that's about all the progress I've made. :)