aliens

Author Topic: [DONE][Suggestion] Is it possible to send multiple fighters at a UFO at once?  (Read 2720 times)

Offline Bonakva

  • Colonel
  • ****
  • Posts: 197
    • View Profile
Is it possible to send multiple fighters to a UFO at once?
I accidentally found out that it is possible to send an escort through "shift". Is it possible to send several ships from different bases at once? After 100 UFOs it's annoying to click on each fighter separately....
« Last Edit: February 19, 2023, 11:47:27 am by Meridian »

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8974
    • View Profile
Re: Is it possible to send multiple fighters to a UFO at once?
« Reply #1 on: February 12, 2023, 12:44:02 pm »
No, such option has not been implemented yet.

Offline Buscher

  • Colonel
  • ****
  • Posts: 168
    • View Profile
Re: [Answered] Is it possible to send multiple fighters to a UFO at once?
« Reply #2 on: February 12, 2023, 02:48:03 pm »
As a side note: I did try my hand at that feature. Major parts of it was integrated in this pull request.
The original proof of concept behavior was that all crafts get the same target. I am not sure how we came to the decision (maybe it was me) but I went for setting up a framework so crafts follow the first craft/the wing leader instead by setting the first craft as destination. For the wing leader framework I did try my hand at intercepting non-hunter-killer with wing crafts having the wing leader as their destination. You can have a look here. One thing I am not sure about this implementation is what happens if you have two wings following two different UFOs.

I suppose the much easier solution is to change the current implementation to the proof of concept behavior. For this purpose you can edit this line to L315 below.

Code: [Select]
310 for (std::vector<Craft*>::iterator i = _crafts.begin(); i != _crafts.end(); ++i)
311 {
312 if ((*i) != _crafts.front())
313 {
314 //(*i)->setDestination(_crafts.front()); // follow wing leader
315 (*i)->setDestination(_target); // get the same target as the wing leader
316 }

You can test the feature by starting a new vanilla campaign. Wait for the first UFO. Open your interceptor window. Shift-leftclick Interceptor-1. Leftclick Interceptor-2. Target UFO.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8974
    • View Profile
Re: [Answered] Is it possible to send multiple fighters to a UFO at once?
« Reply #3 on: February 12, 2023, 03:34:36 pm »
OK, I have moved this thread into Suggestions board.

Offline ontherun

  • Colonel
  • ****
  • Posts: 391
  • public troll no. 1
    • View Profile
Re: [Suggestion] Is it possible to send multiple fighters to a UFO at once?
« Reply #4 on: December 08, 2023, 02:45:34 am »
Second that

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8974
    • View Profile
Well, it's difficult, but I finally made at least some decision.

As a side note: I did try my hand at that feature. Major parts of it was integrated in this pull request.

The original proof of concept behavior was that all crafts get the same target. I am not sure how we came to the decision (maybe it was me) but I went for setting up a framework so crafts follow the first craft/the wing leader instead by setting the first craft as destination.

It makes sense in "escort the skyranger to the destination" situations.

Less in "intercept UFO with multiple interceptors".
Even less in "intercept UFO with multiple interceptors from different bases".

And there's also the "check starting conditions" issue.

I guess it was the less painful decision at the time.
Not sure who made it.

For the wing leader framework I did try my hand at intercepting non-hunter-killer with wing crafts having the wing leader as their destination. You can have a look here. One thing I am not sure about this implementation is what happens if you have two wings following two different UFOs.

This is too complicated.
Both code-wise and user-experience/friendliness-wise.
I looked at it several times over the last year, and wasn't able to come up with a solution I'd like.

I suppose the much easier solution is to change the current implementation to the proof of concept behavior.

Agreed.
But I let the user decide between the two approaches.

The default for flying UFOs is "everybody goes after the UFO individually".
The default for crashed/landed UFOs and every other type of target is "follow the wing leader".
The user can change the default via a toggle button, see screenshot.

https://github.com/MeridianOXC/OpenXcom/commit/fe4f8cf9dafbd37a7bed9c46f5f088b7d3aaec7d

Offline mutantlord

  • Colonel
  • ****
  • Posts: 136
    • View Profile
Nice implementation, been looking forward to this, next stop the Hanger feature? One can hope and dream!