Author Topic: [DONE] [Feedback] [Documentation] Hunter-killer  (Read 21437 times)

Offline Ethereal

  • Colonel
  • ****
  • Posts: 299
    • View Profile
Re: Hunter-killer
« Reply #90 on: February 06, 2018, 11:45:12 am »
By the way, if you activate "radarRange:" for UFOs - the energy shields of alien ships cease to work.

In addition, please check "shieldRecharge:" for UFOs. This meter does not seem to work at all. This is not due to "Hunter-killer". It seems that this device never worked at all.

Online Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 5222
  • Aaand we're back!
    • View Profile
    • My Wiki
Re: Hunter-killer
« Reply #91 on: February 06, 2018, 12:44:07 pm »
No no. I already found a mistake. The truth is not in scripts, but in "armors.rul", but it does not matter. Excuse me.

Glad that you found it... still, the file is wrong and one part of it will not load... you want to fix that, otherwise you will get random errors in the future.

By the way, if you activate "radarRange:" for UFOs - the energy shields of alien ships cease to work.

What does "cease to work" mean exactly?
How did you observe that?
How can I test it? Please at least a few steps describing the scenario...

In addition, please check "shieldRecharge:" for UFOs. This meter does not seem to work at all. This is not due to "Hunter-killer". It seems that this device never worked at all.

As far as I can say, it works fine.
Why do you think it doesn't work? What exactly doesn't work?
Can you give me a ruleset, a save and instructions how to reproduce your issue?

Offline Ethereal

  • Colonel
  • ****
  • Posts: 299
    • View Profile
Re: Hunter-killer
« Reply #92 on: February 06, 2018, 01:57:28 pm »
What does "cease to work" mean exactly?
How did you observe that?
How can I test it? Please at least a few steps describing the scenario...

With power shields, the UFO has something strange. Sometimes they just forget to appear. Ie - the same type of ship flies either with shields, then without them, although in the specifications it is clearly written that there is a shield. And this is in the version of "OXCE +" without the "Hunter-killer". In the version with "Hunter-killer" - without options. If there is a "radarRange:" - UFO do not have power shields.

As far as I can say, it works fine.
Why do you think it doesn't work? What exactly doesn't work?
Can you give me a ruleset, a save and instructions how to reproduce your issue?

Yes, everything here is. https://openxcom.org/forum/index.php/topic,5724.0.html

Maybe I'm wrong and it works. Then I'll just double the generation. But, if it's not hard for you, please check the "shieldRecharge:" for troubleshooting.

Online Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 5222
  • Aaand we're back!
    • View Profile
    • My Wiki
Re: Hunter-killer
« Reply #93 on: February 06, 2018, 08:55:29 pm »
With power shields, the UFO has something strange. Sometimes they just forget to appear. Ie - the same type of ship flies either with shields, then without them, although in the specifications it is clearly written that there is a shield. And this is in the version of "OXCE +" without the "Hunter-killer". In the version with "Hunter-killer" - without options. If there is a "radarRange:" - UFO do not have power shields.

This is a code merge error, since Dec 14th 2017 version (when I merged OXCE 3.10).

It will be fixed soon...

EDIT: fixed version available for download here: https://lxnt.wtf/oxem/builds//ExtendedPlus/Extended+-3.10a-8ad3bef-2018-02-06-win32.7z
Please let me know if it helped.

PS: the shields did not initialize until the UFO reached its first waypoint... that's why you sometimes saw them and sometimes not

Offline Hobbes

  • Commander
  • *****
  • Posts: 3459
  • Infiltration subroutine in progress
    • View Profile
Re: Hunter-killer
« Reply #94 on: February 07, 2018, 05:14:36 am »
@Meridian

Well, first thank you very much for your work in implementing this feature. I already had several ideas but never implemented them until the past days. :)

Here's a small taste of what I'm working on. First image shows the missionZones of North American in the original game, used by ufos to move around and land.



But the second image is more interesting, because it shows the same missionZones but for Tech-Com and designed taking into consideration the new hunter-killer, and several new missions for Skynet.



The grid is a design choice because it will allow for stuff like optimized ufoTrajectories for Tech-Com base & craft detection.

I've also played several hunter killer interceptions and everything has been working nicely. One thing that feels missing though are all those empty buttons and the player can't do anything until the ufo destroys the craft or is destroyed. One suggestion might be buttons to suspend your craft firing, or to limit fire to just one of your weapons. Another could be an evasive maneuvers button that reduces the ufo's aim or even breaks off the engagement and the ufo has to reacquire the target, but preventing the craft from firing while maneuvering.
« Last Edit: February 07, 2018, 05:31:12 am by Hobbes »

Offline Ethereal

  • Colonel
  • ****
  • Posts: 299
    • View Profile
Re: Hunter-killer
« Reply #95 on: February 07, 2018, 08:51:47 am »
Please let me know if it helped.

Yes, it helped. UFO power shields are now in perfect order.

The truth was error, but this is probably due to the fact that the scripts are not registered. After I saved the game, the error did not get out any more. Is this normal, or am I mistaken?

Online Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 5222
  • Aaand we're back!
    • View Profile
    • My Wiki
Re: Hunter-killer
« Reply #96 on: February 07, 2018, 09:33:35 am »
One thing that feels missing though are all those empty buttons and the player can't do anything until the ufo destroys the craft or is destroyed. One suggestion might be buttons to suspend your craft firing, or to limit fire to just one of your weapons.

Ehm, that is already possible, even in vanilla. Just click on weapon you want to disable.

Another could be an evasive maneuvers button that reduces the ufo's aim or even breaks off the engagement and the ufo has to reacquire the target, but preventing the craft from firing while maneuvering.

I will propose some options...

Offline Ethereal

  • Colonel
  • ****
  • Posts: 299
    • View Profile
Re: Hunter-killer
« Reply #97 on: February 07, 2018, 11:39:25 am »
I noted that "Hunter-killer", when hunting fo interceptors, chooses the weakest of all who see it. If there are 2 target in front of him with "allowLanding: false", he chooses the one with less health. This analysis of target should be deleted. He must attack the nearest interceptor. In addition, if he picked up one interceptor, but another interceptor he should not switch until the first interceptor disappears. This will create an opportunity for tactical battles with UFOs, in conditions of mass application of "Hunter-killer".

However, despite all the difficulties, even under the current conditions, I managed to catch the "Hunter-killer" with two interceptors. Attracted by the weaker (which are usually the fastest). But this process must be simplified all the same.

Online Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 5222
  • Aaand we're back!
    • View Profile
    • My Wiki
Re: Hunter-killer
« Reply #98 on: February 07, 2018, 12:11:39 pm »
I noted that "Hunter-killer", when hunting fo interceptors, chooses the weakest of all who see it. If there are 2 target in front of him with "allowLanding: false", he chooses the one with less health. This analysis of target should be deleted.

This is simply not true.
Here is the exact algorithm, it doesn't even consider "total health": https://github.com/MeridianOXC/OpenXcom/blob/oxce3.5-plus-proto/src/Savegame/Craft.cpp#L1455
It does consider "damage taken" and prefers to attack interceptors that are less damaged, and allows more damaged ones to escape.

He must attack the nearest interceptor.

No!

In addition, if he picked up one interceptor, but another interceptor he should not switch until the first interceptor disappears.

No.

This will create an opportunity for tactical battles with UFOs, in conditions of mass application of "Hunter-killer".

I don't understand. Can you please explain?

However, despite all the difficulties, even under the current conditions, I managed to catch the "Hunter-killer" with two interceptors. Attracted by the weaker (which are usually the fastest). But this process must be simplified all the same.

I have explicitly stated that there can be only one interception at a time with a hunter-killer.... by design.
I knew that it is possible (under very special circumstances) to initiate more interceptions... like you did... but I didn't think someone would make the effort to try it.
I guess you forced me to fix this as well... so that under no circumstances can there be more than one interception involving a hunter-killer.

Now I have to spend hours to just prepare such a scenario... thanks :/

Offline Ethereal

  • Colonel
  • ****
  • Posts: 299
    • View Profile
Re: Hunter-killer
« Reply #99 on: February 07, 2018, 01:01:13 pm »
This is simply not true.
Here is the exact algorithm, it doesn't even consider "total health":

Apparently I was mistaken. UFO hour chased a high-speed single-seat aircraft, without even trying to attack a more powerful, but slower two-seater interceptor. Quite possible.

By the way, about the original - it's impossible. If there are 2 identical fighters in front of the UFO - he immediately switch to the one closest to the UFO.

I have explicitly stated that there can be only one interception at a time with a hunter-killer.... by design.
I knew that it is possible (under very special circumstances) to initiate more interceptions... like you did... but I didn't think someone would make the effort to try it.
I guess you forced me to fix this as well... so that under no circumstances can there be more than one interception involving a hunter-killer.

Now I have to spend hours to just prepare such a scenario... thanks :/

It is extremely unprofitable for me, since I will have to reduce the strength of the weapons from the UFO. In my mod, not always 1 interceptor (even the most technologically advanced) copes with large UFOs in normal conditions.

I don't understand. Can you please explain?

What is on the screen - and there is a tactical battle. Lure the hunter into a trap and destroy with superior forces.

Well, if a double interception becomes impossible, then there is no question of any tactical battles with a UFO. It will simply not be possible under any circumstances.
« Last Edit: February 07, 2018, 01:10:40 pm by Ethereal »

Online Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 5222
  • Aaand we're back!
    • View Profile
    • My Wiki
Re: Hunter-killer
« Reply #100 on: February 07, 2018, 01:17:54 pm »
It is extremely unprofitable for me, since I will have to reduce the strength of the weapons from the UFO. In my mod, not always 1 interceptor (even the most technologically advanced) copes with large UFOs in normal conditions.

Not every UFO needs to be a hunter-killer.

The most fundamental idea of a hunter-killer is that "it attacks you"... and it doesn't give you a chance to wait for reinforcements, or escape, or anything else (you wouldn't do that if you were a hunter-killer either).

It's the very definition of a hunter-killer... if it allowed you to wait/escape, it wouldn't be a hunter-killer anymore.

PS: all I can recommend is to balance hunter-killers for single interceptions... and balance non-hunter-killers for multi-interceptions... you can have both HKs and non-HKs... large powerful ships anyway normally have a completely different agenda than hunting your craft.

PS2: I will try to allow escaping if you're quicker than the hunter-killer... but if I was a modder, I would make hunter-killers the quickest thing in the universe anyway
« Last Edit: February 07, 2018, 01:24:15 pm by Meridian »

Offline Hobbes

  • Commander
  • *****
  • Posts: 3459
  • Infiltration subroutine in progress
    • View Profile
Re: Hunter-killer
« Reply #101 on: February 07, 2018, 01:28:09 pm »
I noted that "Hunter-killer", when hunting fo interceptors, chooses the weakest of all who see it. If there are 2 target in front of him with "allowLanding: false", he chooses the one with less health. This analysis of target should be deleted. He must attack the nearest interceptor. In addition, if he picked up one interceptor, but another interceptor he should not switch until the first interceptor disappears. This will create an opportunity for tactical battles with UFOs, in conditions of mass application of "Hunter-killer".

It should be random whether the UFO attacks the nearest or the weakest craft.

Setting 'nearest' or 'weakest' as the single condition to determine the attack opens the door for the player to detect this permanent AI behavior and use the same tactic repeatedly against 'hunter-killers', creating player exploits that make the air game boring.

Random behavior was already used by Julian Gollop and the designers of the original game to make the tactical AI look smarter than it really is, because the human brain is hardwired to create patterns, even if there aren't any in reality and it is merely random.

And one modder will want the 'hunter-killer' to attack nearest because it suits better its mod needs, the other modder will want weakest. Making one behavior permanent might limit this feature's use.

PS: all I can recommend is to balance hunter-killers for single interceptions... and balance non-hunter-killers for multi-interceptions... you can have both HKs and non-HKs... large powerful ships anyway normally have a completely different agenda than hunting your craft.

Today I'm gonna do some testing with UFO waves that consist of a transport and 2 escorts with 'hunter killer' activated. I'll let know later how this goes.
« Last Edit: February 07, 2018, 01:31:56 pm by Hobbes »

Offline Ethereal

  • Colonel
  • ****
  • Posts: 299
    • View Profile
Re: Hunter-killer
« Reply #102 on: February 07, 2018, 01:34:51 pm »
Not every UFO needs to be a hunter-killer.

The most fundamental idea of a hunter-killer is that "it attacks you"... and it doesn't give you a chance to wait for reinforcements, or escape, or anything else (you wouldn't do that if you were a hunter-killer either).

It's the very definition of a hunter-killer... if it allowed you to wait/escape, it wouldn't be a hunter-killer anymore.

PS: all I can recommend is to balance hunter-killers for single interceptions... and balance non-hunter-killers for multi-interceptions... you can have both HKs and non-HKs... large powerful ships anyway normally have a completely different agenda than hunting your craft.

PS2: I will try to allow escaping if you're quicker than the hunter-killer... but if I was a modder, I would make hunter-killers the quickest thing in the universe anyway

It's much easier to leave it as it is. Double interception does not need to be removed. It is too difficult to execute. I have a mod that is too specific, in terms of aviation.

Or leave a loophole in the form of the option - "doubleInterception = (false) (true)", where "false" is the default. Then everyone will be happy. :)

Offline Hobbes

  • Commander
  • *****
  • Posts: 3459
  • Infiltration subroutine in progress
    • View Profile
Re: Hunter-killer
« Reply #103 on: February 07, 2018, 09:41:16 pm »
I've just performed a test of the Counter Air mission and you can see it in progress below.

The basic scenario is 3 HK Escorts performing a Counter Air mission, which consists of Skynet trying to stop Resistance craft from flying during a period of time over a specific region.

Meanwhile, the Resistance base sends a Spectre, which is a V-22 that can carry 1 weapon and has extended range to check the Boston region. V-22s are the work horses of the Resistance, and can be adapted to carry passengers, weapons, radar and/or fuel, but they'll have problems dealing with a single HK Escort.

This is what happened:



Btw, the experience was very tense, to be watching the several near misses where the Spectre barely avoided detection. At a certain point I even started trying to change the return home flight path to avoid crossing the HK's detection range.

I have mixed feelings about the radar ranges of the HKs being displayed - it's very useful to have on debug mode, but not displaying it would make the experience even more tense for a player, since I've got 3 types of HKs (Scout, Assault and Escort) and they all have different radar ranges.

One thing I noticed was that the first attacking HK stopped using its radar once it decided to evade the Spectre after taking damage. Is that intentional?
« Last Edit: February 07, 2018, 09:53:33 pm by Hobbes »

Offline Yankes

  • Moderator
  • Commander
  • ***
  • Posts: 2129
    • View Profile
Re: Hunter-killer
« Reply #104 on: February 07, 2018, 11:01:57 pm »
It should be random whether the UFO attacks the nearest or the weakest craft.

Setting 'nearest' or 'weakest' as the single condition to determine the attack opens the door for the player to detect this permanent AI behavior and use the same tactic repeatedly against 'hunter-killers', creating player exploits that make the air game boring.

Random behavior was already used by Julian Gollop and the designers of the original game to make the tactical AI look smarter than it really is, because the human brain is hardwired to create patterns, even if there aren't any in reality and it is merely random.

And one modder will want the 'hunter-killer' to attack nearest because it suits better its mod needs, the other modder will want weakest. Making one behavior permanent might limit this feature's use.
This could be good place to use scripts, you get target craft and ufo and return one value, craft with biggest value will be attacked. One problem right now is lot of boilerplate to enable scripts in geoscape, another is that I have lot of my own project that move on snail speed and because of this I can't help Meridian a lot with adding this.