OpenXcom Forum

Modding => OpenXcom Extended => OXCE Suggestions DONE => Topic started by: Meridian on September 21, 2017, 07:58:27 pm

Title: [DONE] [Feedback] [Documentation] Hunter-killer
Post by: Meridian on September 21, 2017, 07:58:27 pm
0:56 hunter killer targets skyranger
1:20 hunter killer switches to interceptor (bigger priority)
1:32 hunter killer attacks!


Title: Re: Hunter-killer
Post by: Hobbes on September 21, 2017, 09:00:51 pm
0:56 hunter killer targets skyranger
1:20 hunter killer switches to interceptor (bigger priority)
1:32 hunter killer attacks!

Yes! Yes! Yes! :D

I have several questions on how everything works, especially concerning the ruleset definitions but also regarding how the AI picks the target for the UFOs. Great work!
Title: Re: Hunter-killer
Post by: Meridian on September 21, 2017, 09:24:41 pm
How things work is still pretty open... currently I'm trying the path of least resistance... and I also still have more questions than answers :)

Anyway, to answer at least some:
1. ruleset is pretty minimal atm

Code: [Select]
ufos:
  - type: STR_SMALL_SCOUT
    radarRange: 1000 # hunting range
    hunterKillerPercentage: 100 # % chance to become a hunter-killer when spawned

Bases don't do anything yet, but they will have at least:
- defense perimeter radius
- UFO type(s) to spawn
- how often UFOs can be spawned

2. Target is picked by a simple algorithm: every 10 minutes look at all craft in radar range, score them using attached algorithm and select the most attractive target... the basic idea is "prefer interceptors over transports"
Title: Re: Hunter-killer
Post by: Yankes on September 21, 2017, 11:11:22 pm
This is small step for Meridian but great step for OXCE+ :) I will probably steal this to my 4.0 branch.
Title: Re: Hunter-killer
Post by: Hobbes on September 22, 2017, 12:01:40 am
This is small step for Meridian but great step for OXCE+ :) I will probably steal this to my 4.0 branch.

This is will make me switch to OXCE+
Title: Re: Hunter-killer
Post by: wolfreal on September 22, 2017, 03:13:24 am
This is awesome!. So much possibilities!.
Title: Re: Hunter-killer
Post by: Nord on September 22, 2017, 05:55:01 am
It is... wonderful!
It opens entire new level of gameplay.
Title: Re: Hunter-killer
Post by: SIMON BAILIE on September 22, 2017, 06:12:57 am
Yes it would add a very good new dimension to openxcom.
Title: Re: Hunter-killer
Post by: Meridian on September 22, 2017, 10:05:26 am
Thanks for the vote of confidence :)

I don't think it will be such a revolution... you need to plan a mod with such a feature in mind from the beginning... adding it to existing mods is unlikely (inability to abort a dogfight will break the balance way too much).

But it may be fun to experiment with, I agree.

The feature is not yet finished, I'd say I have only done 10% so far... it will take several more weeks until I can release it.
Stay tuned.
Title: Re: Hunter-killer
Post by: Hobbes on September 22, 2017, 03:07:10 pm
I don't think it will be such a revolution... you need to plan a mod with such a feature in mind from the beginning... adding it to existing mods is unlikely (inability to abort a dogfight will break the balance way too much).

Well, this is a feature that I wanted to include in the Terminator TC right from the beginning :)

Balancing it will be no small trick though, but I'm almost sure that someone will add this to the vanilla game with the proper changes for balance
Title: Re: Hunter-killer
Post by: Nord on September 22, 2017, 06:10:45 pm
(inability to abort a dogfight will break the balance way too much).
Well, you can add a possibility to run away whith some conditions... Like small random or high pilot class, or... A huge space for imagination.
Title: Re: Hunter-killer
Post by: ivandogovich on September 22, 2017, 07:07:01 pm
One of the things I've been thinking about in terms of balance for this feature is using a "Detectability" threshhold.    This could be based on craft "size" but may be better with an integer value.  Stealthy craft could have a .1 value and big fat Avengers could have .9 or some other system.

With the ability in OXCE+ to have equipable items modify craft values, the "Cloaking Device" could become a real thing.

Anyway, just some thoughts.
Title: Re: Hunter-killer
Post by: Yankes on September 22, 2017, 07:37:49 pm
One of the things I've been thinking about in terms of balance for this feature is using a "Detectability" threshhold.    This could be based on craft "size" but may be better with an integer value.  Stealthy craft could have a .1 value and big fat Avengers could have .9 or some other system.

With the ability in OXCE+ to have equipable items modify craft values, the "Cloaking Device" could become a real thing.

Anyway, just some thoughts.
Or throw scripts at this and let imagination run wild, image "neutral" craft that will start attack only if you engage its ally.
Title: Re: Hunter-killer
Post by: The Reaver of Darkness on September 22, 2017, 10:26:11 pm
I REALLY like this, and I have some ideas!

Can you make it allow multiple attack modes? For instance:

UFO attacks, and you have standard and aggressive attack modes available. It defaults to standard, wherein it gives the UFO the weapons priority and automatically engages at the UFO's weapon range. If that's too far away for you, you can select aggressive and get in closer.


I have some other ideas:

* UFO escape timer begins when UFO enters X-Com weapons range. If it's faster than your ship you can't flee, but you might be able to scare it off.

* All UFOs (except any that have no weapon) can attack X-Com craft but will be slow to respond, mostly they attack patrolling ships and anything spending too much time near them.

* When you engage a UFO it begins its escape timer, but sometimes when the timer ends it opts to engage aggressively instead of escape. If it does this, it may run closer to your interceptor and put it in danger.

* You always have full control of the battle when your ship is faster. When yours and their ship are the same speed, neither party can flee unless the other is also trying to flee. If the UFO's run timer ends and it chooses to flee, it will silently remain in flee mode until combat ends or you opt to disengage. Once it begins trying to flee, you can no longer close to a shorter range with it than where you already are.

* Maybe this is getting too complicated but I think it would be fun to use yours and the opponent's speeds together to determine how fast the craft approach each other. When your craft and the UFO are in mutual agreement to close each other, you might find yourself getting up close very rapidly. On the other hand, if you engage a UFO going almost as fast as your interceptor and the UFO is in travel mode (not engaging or fleeing), then you'll close the gap very slowly, possibly buying more time for its timer to finish and give it control of the battle.
Title: Re: Hunter-killer
Post by: Hobbes on September 23, 2017, 06:05:09 am
* All UFOs (except any that have no weapon) can attack X-Com craft but will be slow to respond, mostly they attack patrolling ships and anything spending too much time near them.

One idea I had related to this is to add a new flag to the ufos in the waves field for each alienMission entry, called "intercept" or something. If set to true then this UFO will attack XCom craft upon detection. That way, you could determine some UFOs to act as escorts while the other ones carry their mission.

This brings another issue which is how many UFOs/XCom craft will be allowed in multi-craft engagements because of the UI but I think Stoddard had already come up with something on his work
Title: Re: Hunter-killer
Post by: Meridian on September 23, 2017, 10:13:45 am
Can you make it allow multiple attack modes? For instance:

UFO attacks, and you have standard and aggressive attack modes available. It defaults to standard, wherein it gives the UFO the weapons priority and automatically engages at the UFO's weapon range. If that's too far away for you, you can select aggressive and get in closer.

I allowed only aggressive so that you cannot "cheat" using superior weapon range.
If the UFO was able to attack you in the first place, it's quicker than you and is able to get to you no matter what "you want"... the battle goes as "they want".

If it helps, I could make them come only into their maximum weapon range to make it even harder for xcom...

* UFO escape timer begins when UFO enters X-Com weapons range. If it's faster than your ship you can't flee, but you might be able to scare it off.

There is no escape timer.. hunter killer attacks you, not vice versa.

Hunter killer starts escaping only if it is badly hurt (compared to you).
If it is badly hurt, but you are also badly hurt, it will risk it and try to kill you anyway.
Some hunter killers can even be marked as kamikaze and will never retreat from battle (they will also not be shot down at 50% of health, they will just go down to 0% same as xcom and be destroyed).

Also, once again, if the UFO was able to attack you, it's faster than you.

* All UFOs (except any that have no weapon) can attack X-Com craft but will be slow to respond, mostly they attack patrolling ships and anything spending too much time near them.

Currently it's 10 minutes response time... I think that's not too slow and not too quick either.

* When you engage a UFO it begins its escape timer, but sometimes when the timer ends it opts to engage aggressively instead of escape. If it does this, it may run closer to your interceptor and put it in danger.

There is no escape timer. Kamikaze mode will be available.

* You always have full control of the battle when your ship is faster. When yours and their ship are the same speed, neither party can flee unless the other is also trying to flee. If the UFO's run timer ends and it chooses to flee, it will silently remain in flee mode until combat ends or you opt to disengage. Once it begins trying to flee, you can no longer close to a shorter range with it than where you already are.

When your ship is faster, you don't get attacked.
Maybe only if you patrol/are stationary... but even if I allowed disengage then, the UFO would just attack again one milliseconds later... so no point doing that.

* Maybe this is getting too complicated but I think it would be fun to use yours and the opponent's speeds together to determine how fast the craft approach each other. When your craft and the UFO are in mutual agreement to close each other, you might find yourself getting up close very rapidly. On the other hand, if you engage a UFO going almost as fast as your interceptor and the UFO is in travel mode (not engaging or fleeing), then you'll close the gap very slowly, possibly buying more time for its timer to finish and give it control of the battle.

In OXCE+ approach speed is determined by acceleration stat (which is unused in vanilla).

One idea I had related to this is to add a new flag to the ufos in the waves field for each alienMission entry, called "intercept" or something. If set to true then this UFO will attack XCom craft upon detection. That way, you could determine some UFOs to act as escorts while the other ones carry their mission.

Yes, makes sense.
Will be added.

Default will be true and you can set it to false.
Default true is better than false in my opinion, since the UFO has to pass a percentage test first anyway, so it's still backwards-compatible with vanilla and (probably) will be less ruleset to write for the modder.

This brings another issue which is how many UFOs/XCom craft will be allowed in multi-craft engagements because of the UI but I think Stoddard had already come up with something on his work

In my version, when the aliens are attacking, it's limited to one on one only (minimize button is not allowed... and geoscape timer is stopped during dogfights, so other UFOs can't get to you).
It would be probably possible to make UFOs "smarter" and allow them to minimize dogfights until their colleagues arrive... but I think one on one is already tough enough, no?

Just to clarify, it will not be possible to wait and attack one UFO with multiple interceptors... it's UFOs that are attacking you, not vice versa, so you don't get to say what's gonna happen.

Summary:
- most likely 1:1
- 1 xcom vs multiple UFO would be doable I guess (not easy)
- multiple xcom vs 1 UFO.... no (unless we somehow will be able to "synch" craft to fly in fixed formation = occupy exactly the same spot on the geoscape)
- multiple xcom vs multiple UFO... nope
Title: Re: Hunter-killer
Post by: Solarius Scorch on September 23, 2017, 01:56:06 pm
Also, I think it may be a good idea to add an option of X-Com vessels escorting each other. The already mentioned multiple launch from one base (with all ships matching the slowest craft's speed) is one thing, but I would also like to be able to make formations with crafts from different bases.

Basically, it would mean adding other X-Com planes as valid flight destinations (reach and follow).
Title: Re: Hunter-killer
Post by: BTAxis on September 23, 2017, 02:35:27 pm
When your ship is faster, you don't get attacked.
Maybe only if you patrol/are stationary... but even if I allowed disengage then, the UFO would just attack again one milliseconds later... so no point doing that.

Not if, upon fleeing, the X-COM craft is automatically set to return to base. Possibly with no option to redirect until it gets there, as per post-mission return-to-base. The UFO shouldn't be able to re-engage then.
Title: Re: Hunter-killer
Post by: The Reaver of Darkness on September 23, 2017, 03:22:47 pm
Not if, upon fleeing, the X-COM craft is automatically set to return to base.
That's what I was thinking.


Possibly with no option to redirect until it gets there, as per post-mission return-to-base. The UFO shouldn't be able to re-engage then.
No, you should be able to turn it around immediately. You're the faster craft. If you patrol it again and it gets caught immediately, that's your own fault.
Title: Re: Hunter-killer
Post by: Meridian on September 23, 2017, 03:29:40 pm
UFOs move before xcom moves in openxcom... they would reengage before xcom makes a first step towards the base.
Title: Re: Hunter-killer
Post by: Nord on September 23, 2017, 03:42:21 pm
Ok, of all people giving suggestions, so here is mine:
1. Flee is not an option if UFO is really hunter-killer (and their speed is better). Because it is too easy. :) I mean, common UFO will not engage any airplane (and your crafts is mostly airplanes). So, if it hunts strightly XCOM, it will not release their prey. As i see it - if you launched your unprotected ranger - it is your fault (here maybe needed to be added attractivity parameter of different crafts, so hunter will attack not ranger, but interceptor, if see both in range.)
2. Maybe allow cautious/normal attack and retreat buttons if your craft is faster. (Can be intercepted on patrol or on countercourse, as we do with ufos). Also dont forget that ufo can be slowed by tractor beam from PirateZ.
3. Most complicate - crashed craft tactical mission: hunter knocks you down, then land near to finish your crew. Maybe not any hunter. And maybe not knock down, but force to land.
4. Or maybe not just force to land, but even an option to get landed (as a button).
Upd.:
5. maybe land to lose the craft but save the crew.
Title: Re: Hunter-killer
Post by: Solarius Scorch on September 23, 2017, 04:14:12 pm
3. Most complicate - crashed craft tactical mission: hunter knocks you down, then land near to finish your crew. Maybe not any hunter. And maybe not knock down, but force to land.
4. Or maybe not just force to land, but even an option to get landed (as a button).
Upd.:
5. maybe land to lose the craft but save the crew.

This part is quite interesting, but I doubt it would be considered doable... Too complex.
Title: Re: Hunter-killer
Post by: Meridian on September 23, 2017, 04:31:58 pm
This part is quite interesting, but I doubt it would be considered doable... Too complex.

It's doable, but I don't want that... the hunter-killers should be a problem for you... not a benefit... that's why I also added option that they fight until they are destroyed and don't crash.
Any ground mission is always a benefit for xcom... you could just endlessly farm any alien base like this...
Title: Re: Hunter-killer
Post by: Solarius Scorch on September 23, 2017, 04:48:53 pm
It's doable, but I don't want that... the hunter-killers should be a problem for you... not a benefit... that's why I also added option that they fight until they are destroyed and don't crash.
Any ground mission is always a benefit for xcom... you could just endlessly farm any alien base like this...

Yeah, you are right - I forgot to mention I wouldn't want a ground battle, but losing a craft to save your crew would be OK.
Title: Re: Hunter-killer
Post by: Meridian on September 23, 2017, 05:11:53 pm
Saving the crew somehow is a fair point... many people play xcom as RPG and we don't want to kill their favourite characters, do we... it's not how I play, but I do understand the argument.

If anyone has a good idea how to save the crew that doesn't involve "free bounty" (e.g. ground mission) and involves at least some penalty (e.g. lost craft and cargo? crew travelling 2 days back to base by public transport? :) ), I am listening... a combination of "most realistic" and "least rewarding" solution may get implemented.
Title: Re: Hunter-killer
Post by: Solarius Scorch on September 23, 2017, 05:55:35 pm
Saving the crew somehow is a fair point... many people play xcom as RPG and we don't want to kill their favourite characters, do we... it's not how I play, but I do understand the argument.

Losing people in battle is one thing. Losing a whole ship at random, with nothing to do about it, is just really bad design.

It has noting to do with RP-ing. Fuelling such paranoia will only lead to two possible outcomes: either the player will get desensitized to such setbacks (and eventually to the game as such), or they will become increasingly fearful of leaving the base. Neither leads to an enjoyable game.

One could say that you should accept such events, as it's war and you should be adult about it. Yeah, but also it's a game, not real life. It means the choices are limited. You can't call the president to ask for escorts. You only have the tools that the game game gives you. And if these tools become unreliable, you're out of options.

I understand all this can be taken as an argument against the entire idea, but it's not; I'm as interested in it as your next person. But I think it can use some additional safety measures.

If anyone has a good idea how to save the crew that doesn't involve "free bounty" (e.g. ground mission) and involves at least some penalty (e.g. lost craft and cargo? crew travelling 2 days back to base by public transport? :) ), I am listening... a combination of "most realistic" and "least rewarding" solution may get implemented.

I guess a combination of the following would be a good solution, or at least a good start:


Ideally all these should be settable by craft - a Lightning should be safer to crash-land than an Interceptor.
Title: Re: Hunter-killer
Post by: Meridian on September 23, 2017, 06:16:55 pm
Losing people in battle is one thing. Losing a whole ship at random, with nothing to do about it, is just really bad design.

But hunter-killers are clearly identifiable (by radar circle around them), same for alien bases which can launch them... so you CAN do something about it... avoid them.
Or, if you can't avoid them for some reason, accompany each transport with an interceptor... a good modder will balance it so these CAN be shot down, unless the theme of the mod is about explicitly avoiding them (e.g. Terminator mod or Matrix mod).

I don't know about other people's plans, but if I was to add this feature in my mod, maybe 5-10% of all UFOs would be hunter killers and 50% of alien bases (maybe even since a certain game month).
I definitely wouldn't want all UFOs to attack...

With that in mind, losing a full complement of my best soldiers is totally acceptable for me.

But as I said, I understand that people don't want any losses (just look at that guy from few days ago who recruited 424 soldiers, had zero losses and only 1 hour of infirmary time in September)... I'm not going to go against the flow... but I can at least try to make it so that the game doesn't become easier with this feature implemented... I'd rather not implement it at all.

I guess a combination of the following would be a good solution, or at least a good start:

  • Percentage chance of injuries and/or death.
  • Delay in return. Bonus points if the "transfer" time is hidden, so you never know if the person was saved or not.
  • Percentage chance of losing each item on board.

Ideally all these should be settable by craft - a Lightning should be safer to crash-land than an Interceptor.

Sounds plausible, jet fighters can eject and soldiers (probably) have parachutes under the seat or something.

Not sure why transfer time should be hidden, makes zero sense to me... everyone has a cell phone, radio, built-in beeper in the parachute or just anything else that can confirm the person is still alive.

Percentage chance of items being destroyed seems unnecessary, even if it doesn't end up at the bottom of the ocean (or melted during land explosion)... buying new stuff is certainly more economically viable than recovering a couple of knives and rifles half way across the globe.
Title: Re: Hunter-killer
Post by: Solarius Scorch on September 23, 2017, 07:07:13 pm
But hunter-killers are clearly identifiable (by radar circle around them), same for alien bases which can launch them... so you CAN do something about it... avoid them.
Or, if you can't avoid them for some reason, accompany each transport with an interceptor... a good modder will balance it so these CAN be shot down, unless the theme of the mod is about explicitly avoiding them (e.g. Terminator mod or Matrix mod).

I don't know about other people's plans, but if I was to add this feature in my mod, maybe 5-10% of all UFOs would be hunter killers and 50% of alien bases (maybe even since a certain game month).
I definitely wouldn't want all UFOs to attack...

With that in mind, losing a full complement of my best soldiers is totally acceptable for me.

These are exactly the safety measures I mentioned. I don't know how it's going to work, what safety measures you have already planned, etc. It could be that this particular issue. But considering it will be used by modders in a variety of ways, I think it's better to give them more tools for balancing.

But as I said, I understand that people don't want any losses (just look at that guy from few days ago who recruited 424 soldiers, had zero losses and only 1 hour of infirmary time in September)... I'm not going to go against the flow... but I can at least try to make it so that the game doesn't become easier with this feature implemented... I'd rather not implement it at all.

Again, this is not a role-playing issue, or at least not more than other features. It's about preventing the game from being a dick.

Sounds plausible, jet fighters can eject and soldiers (probably) have parachutes under the seat or something.

Yeah, not the best example. Then make it a helicopter. ;) One way or another, I think it should vary between transports.

Not sure why transfer time should be hidden, makes zero sense to me... everyone has a cell phone, radio, built-in beeper in the parachute or just anything else that can confirm the person is still alive.

Purely suspense reasons. I absolutely loved this feature in another game. But it's just a cosmetic thing.

Percentage chance of items being destroyed seems unnecessary, even if it doesn't end up at the bottom of the ocean (or melted during land explosion)... buying new stuff is certainly more economically viable than recovering a couple of knives and rifles half way across the globe.

Good point, though kinda harsh. :D
Title: Re: Hunter-killer
Post by: mumble on September 23, 2017, 07:50:31 pm
I honestly think bigger crafts, particularly like the iron fist, would be interesting to have as an immediate mission in fighting off the attackers. Sure, it might of been shot down, but you could kill the aliens and have survivors, assuming there ARE any.

Possibly even get the iron fist back with an escort, to repair it. Just so a ship being shot down isn't TOO hard a kick in the nuts.

I suppose it could come down to a few factors if a "vehicle defense" happened.

1-size. Really small ships obviously would just end up destroyed
2-crew size. I kinda doubt a single man craft could survive a crash at all. Maybe some of the later fighters, but also, a single man against a crew of mutons is most likely going to be a hopeless endevor. Then again, for piratez, maybe a jetbike could be shot down and a single pirate could fight off a few people...
3- damage scaling. Obviously a helicopter hit with a plasma cannon would not land safely.
4- how many people died in the blast. Roll this against the weapon, the hull armor, and armors of people inside.

I know this would be quiet a chunk of work, but I could see this being an interesting effect for say, attacking an alien base, if you got shot down, and had to retreat before reaching it. Might even bring in new encounter opportunities...
Title: Re: Hunter-killer
Post by: Stoddard on September 24, 2017, 12:10:56 am
Meridian, this is great.

I pity I wasn't able to code this myself.

Please keep up.
Title: Re: Hunter-killer
Post by: SteamXCOM on September 24, 2017, 07:48:31 pm
This seems good.
      I gather it goes like this
      Hunter killer randomly, unexpectedly, jumps XCOM craft:
      (since it is already decided the hunter killer is SUPERIOR to the XCOM craft then the next possibilities occur:

      1- XCOM craft is eliminated
      2- XCOM craft somehow escapes damaged or otherwise; and is forced to abort mission returns to base, this percentage chance of escape increases if the XCOM craft is carrying external armaments

   
   if 1
   then  (to expound upon Solarius Scorch's idea)
     --Percentage chance of injuries and/or death (higher rank has greater survivability for RPG purposes).
    -- Delay in return. the "transfer" time is hidden, so you never know if the person was saved or not.
    --Percentage chance of losing each item on board.
    (whether the XCOM craft destroyed or crash lands is irrelevant, for game purposes it is unavailable for further XCOM missions)
    Yes, LIGHTNINGS and more advanced craft would have more equipment and personnel recovered and/or greater chance of escape.

  As for the delay in return and suspense of who survived or not, the game is 1990's and communications were still uncertain compared to 2017, especially in in remote areas.  Even in more modern territories the Xcom survivors might be keeping a low profile among the population so news of their fate would be delayed as opposed to a routine ground mission where communications are continuously established. 

An XCOM mission might develop where XCOM crash survivors are trying to get from one end of the map to the next with their stuff,  battling hostile locals (that have nothing to do with aliens) that are simply regional armed drug militias, gangs, looters or whatever.  A win might get some AK 47's but not enough to be considered "farming,"  or that mission optionally aborted and the survivors ransomed back.
Title: Re: Hunter-killer
Post by: Ethereal on September 25, 2017, 12:23:05 am
No chance for escape, but all the easier. If the aircraft acceleration is greater than UFO, then he should be able to get out of combat. And UFOs will chase before landing at the base. And if the landing was in the range of the radar UFO, the Stalker is attacking the base. This, by the way, do useful to Missile Defense in the early stages of the game, which is useless against Battleships, but against the smaller ships can come in handy.
Title: Re: Hunter-killer
Post by: Hobbes on September 25, 2017, 05:06:06 am
Yes, makes sense.
Will be added.

Default will be true and you can set it to false.
Default true is better than false in my opinion, since the UFO has to pass a percentage test first anyway, so it's still backwards-compatible with vanilla and (probably) will be less ruleset to write for the modder

I had this idea today: switch from true/false to an integer value, where 0 = no intercept, 1 = intercept any XCom craft, 2 = prioritize XCom interceptors, 3 = prioritize XCom transports

I think the aerial combat would gain if the behavior of the UFOs can be both more randomized and pre-determined regarding its targets. As an example, a UFO could be set to patrol a certain area to prevent any landings by XCom transports. Or, if escorting a Harvester, the UFO escorts would prioritize XCom interceptors. Or 2 escorts could be set each to focus on interceptors/transports or just to attack anyone.
Title: Re: Hunter-killer
Post by: Meridian on September 25, 2017, 10:18:06 am
How will the player know which is which?

Also, HK targeting primarily transports basically means there is no way of handling the situation except avoiding it, am I right?

PS: do you want all attributes on a mission wave (and have same UFOs with potentially different settings) or can all these attributes be UFO level (which might be easier for the user to recognize the threat level)
Title: Re: Hunter-killer
Post by: The Reaver of Darkness on September 25, 2017, 12:07:38 pm
If anyone has a good idea how to save the crew that doesn't involve "free bounty" (e.g. ground mission) and involves at least some penalty
Ship crashes. You send a transport to recover it. Some crew may die in the crash but most probably survive. Equipment also usually survives but some is lost. Craft is lost but you recover materials which you sell for part of its cost.
Penalties include:
1.) it may not be safe to rescue them if more hunters are patrolling the area, but you're limited by time
2.) some loss even with a perfect recovery
3.) you must order a new craft
4.) you must have at least 2 transports in your armada to enable recovery--however you can recover with a craft from a different base
5.) the rescue transport will be busy during the flight to and from the crash site--with a slow transport going a long distance this could take a very long time

Maybe this is "free bounty" but there's other factors to consider relating to whether or not you are capable of rescuing them. You also want to be prepared beforehand, so that when the time comes, rescue can be quick and painless. It's not completely free, and it certainly isn't lossless.




Now I figure the personnel, tech, and other stuff is highly secret so you can't hire civilians to come get them. But just the same it might be possible to arrange for a government agency to rescue the craft. You'd have to pay a large fee which would render the monetary savings minor unless it was jam-packed with expensive stuff, but you would get most of your favorite soldiers back intact.

I also figure if you fail to rescue them, they don't actually die out there. They're simply forced to destroy everything and start new lives in the nearest human settlement that will take them. But either way, you don't have them anymore.
Title: Re: Hunter-killer
Post by: Meridian on September 25, 2017, 12:23:32 pm
I assume over ocean, everyone dies.

Does this actually spawn a mission or is it just a touch-and-go crash site?

A. If it spawns a mission, who will be the enemy?
And should the survivors spawn as xcom and fight as well?
Or should they spawn as civilians you need to save?
Or should they not spawn at all and just be recovered at the end? Or killed if you lose/abort.

B. If it doesn't spawn a mission, can we just simplify it that survivors come back home by public transport after certain amount of days?
Title: Re: Hunter-killer
Post by: Nord on September 25, 2017, 01:22:22 pm
B. If it doesn't spawn a mission, can we just simplify it that survivors come back home by public transport after certain amount of days?
I prefer this.
And yes, "EJECT" button!

Also, without tactical mission - no need to kill all when falling in ocean.
Give passengers a status "recovering from crashsite" for a day or two, so they will store their stats and armor, but lose all equipment
Title: Re: Hunter-killer
Post by: Ethereal on September 25, 2017, 02:55:05 pm
I think it will be more correct. In place of the downtrodden X-COM transport, a point is created for the mission, both for terror. Saves on missions are present, but without equipment and under the control of the player. If he did not arrive, he lost everything and everyone along with the downed transport. I flew and successfully completed the task - I got everything back, and the ship is under repair with 99% of the damage. But the interceptors are destroyed immediately. Together with the pilot. Ie - if there is "allowLanding: false", then there will not be a mission.
Title: Re: Hunter-killer
Post by: Countdown on September 25, 2017, 03:33:00 pm
Just a bystander chiming in. Great job on this feature Meridian, such a cool addition.

I assume over ocean, everyone dies.

Not necessarily. Life rafts/life vests are a thing, even in today's commercial passenger planes.

B. If it doesn't spawn a mission, can we just simplify it that survivors come back home by public transport after certain amount of days?

Sounds like the simplest solution. Lose the craft and all equipment, but have a chance for survival/injury (based on whatever factors you think appropriate ie soldier health, armor, etc) and have them set to return to base in X days based on where they went down. Those that were seriously injured may require extra recovery time.

I agree with those have said that they wouldn't want to lose an entire squad of trained soldiers without even the opportunity for a fight. I think losing the craft and equipment (with the chance to lose a soldier or two ... I'd favor greater chance for survival/injury though) seems like an appropriate negative consequence so these HKs are a big concern, but not game-killing.

Does this actually spawn a mission or is it just a touch-and-go crash site?

A. If it spawns a mission, who will be the enemy?
And should the survivors spawn as xcom and fight as well?
Or should they spawn as civilians you need to save?
Or should they not spawn at all and just be recovered at the end? Or killed if you lose/abort.
If you're to go this route, it could immediately spawn an "escape" mission where the enemy is the race of the craft that shot you down. You have to get all the survivors to the exit and abort, whoever makes it survives and goes back to base. Lose the craft, only equipment recovered is what you had on you when escaping.

If you're worried about farming, make it so even if you kill all aliens on the map, you don't recover equipment/corpses on the ground, only what is on your soldiers. Justification is they still have to "escape" before another alien ship shows up. That said, I think losing a craft and potentially soldiers in the crash is a big enough loss you wouldn't want to use this as "farming."
Title: Re: Hunter-killer
Post by: SteamXCOM on September 25, 2017, 07:11:40 pm
Always should be some chance for escape once hunter/killer on the trail

When "escape" is used, it does not necessarily mean speed XCOMcraft vs speed of enemy but added into that whatever "tricks" can be employed, chaff, electronic counter measures (ECM), decoy missiles, particular pilot skill, evasive tactics  even   ie using terrain features such as clouds or "Hollywood improbabilities" such as unexpected intervention of another air force or an occasional feature anomalies (oh Iron Mountain, fly by that and the UFO compasses go wacko). 

How this might work is in the dogfight phase instead of the usual range UI engagement buttons the player clicks one of the following buttons:
1 use pilot skill (you evade the UFO and no damage, but encounter continues/ you evade the UFO and it cannot find you, encounter ends, you fail to evade, and UFO  encounter continues, you screw up double damage from UFO next strike )
2 use ecm  (you evade the UFO and no damage,  / you evade the UFO and it cannot find you, encounter ends, you fail to evade encounter continues. whoops, double damage from UFO next strike )
3 use defensive gunnery (you fire back, and UFO is driven off encounter ends, UFO takes a hit, encounter continues, you miss encounter continues, UFO takes hit but double damage from UFO's next strike(note the UFO can never be destroyed, just driven off)),
4 use acceleration (if simply faster you escape encounter ends, if not encounter continues, you mess up and double damage from UFO's next strike)
5 Use anomaly  (becomes randomly available if at all after a certain amount of time, when clicked on a message displays the type of anomaly you took advantage of  (ie "your MAYDAY has alerted a local airforce interceptor wing which chases away the UFO," encounter ends).  If you mess up TRIPLE damage from UFO next strike against you.

"Encounter continues" means UFO hunter Killer is following attacking you and depending upon its firepower and your craft type is how long it will take before you are downed.   Options that result in "no damage" mean your actions interrupted the normal attack rhythm of the hunter killer for a few seconds.    Options that result in the hunter killer doing double or triple damage could be game scaled to mean 25% or more damage than usual against your craft.

You continue to select any available option until
you escape,
the hunter killer is driven off
or you are downed
(NOTE there is a recharge period for an option after selection and developing technology will give higher chances of certain options suceeding).

FYI
Since the dogfight UI is arranged for range the encounter alternately, depending on success of options would increase/ decrease range  as follows
--encounter continues at current range
--distance between Hunter killer and XCOM craft decreases (increasing chance of UFO to strike, using all its weapons)
--distance between  Hunter killer and XCOM craft increases (decreasing chances of UFO to strike, its short range weapons cannot be used)
--distance increases off the scale and XCOM craft escapes hunter killer, encounter ends

Also consider XCOM craft is equipped with "chaff"  and /or  "ECM console" etc  is at the expense of carrying something else, but gives those respective options to use for escape in the event of an occasional  hunter killer attack.

Quote
I assume over ocean, everyone dies.
Higher percentage of death, as per Countdown, rafts etc can save people /equipment

Quote
Does this actually spawn a mission or is it just a touch-and-go crash site? 
A. If it spawns a mission, who will be the enemy?
No aliens, as they consider their job done in removing the immediate threat;  just opportunistic human "scavengers," local milita, gangs etc; and missions not always 100% spawned so you are not "grinding" against scavengers and  abortable so you can just pay a ransom to get your soldiers back.  Sprites that can be used for hostile  human scavengers are already well represented in some mods.

Quote
And should the survivors spawn as xcom and fight as well?
Yes as per above.
 
Quote
Or should they spawn as civilians you need to save?
No
Quote
Or should they not spawn at all and just be recovered at the end?
  variable mission generation is perhaps 25%, the rest of the time persons and a percentage of materials recovered showing up at the base in a few days / weeks later.

Quote
Or killed if you lose/abort.
Mission Abort gives chance to ransom survivors from hostile locals

Quote
B. If it doesn't spawn a mission, can we just simplify it that survivors come back home by public transport after certain amount of days?
  yes
Title: Re: Hunter-killer
Post by: Solarius Scorch on September 25, 2017, 08:08:39 pm
PS: do you want all attributes on a mission wave (and have same UFOs with potentially different settings) or can all these attributes be UFO level (which might be easier for the user to recognize the threat level)

I agree it would be clearer to the player if it was settable per UFO, but on the other hand it would flatten UFO designs into predestined roles - perhaps more than we'd like.

Still, if I were to decide between the two, I'd go with UFOs, not missions.
Title: Re: Hunter-killer
Post by: Meridian on September 25, 2017, 08:11:39 pm
"use anomaly" ?
"ransom from hostile locals on mission abort" ?

I am speechless...

Should I also implement ground staff, so that you can order them to clean toilets?
And maybe also a pizza baking simulator mini-game... to improve soldier morale.
And sex-chat! Every good game needs a built-in sex-chat...

:(  :'(
Title: Re: Hunter-killer
Post by: Solarius Scorch on September 25, 2017, 08:24:30 pm
Don't forget QTE elements. They make every game better, right? :)
Title: Re: Hunter-killer
Post by: Hobbes on September 25, 2017, 09:30:52 pm
How will the player know which is which?

The player will have to guess the target of the HK based on its heading, ufo size, speed, etc. 

Quote
Also, HK targeting primarily transports basically means there is no way of handling the situation except avoiding it, am I right?

Or the player can send ahead interceptors to clear an area of any HKs before sending the transports. Or it will have to send interceptors to escort the transports while they approach the landing area.

Above all it will be an assumption of risk: if you send a transport without any escorts to an area with possible HKs then you risk losing the transport and everyone on board. This might sound brutal but the same happens if you lose all soldiers in a tactical battle when a Blaster Bomb hits the inside of the UFO on the first turns, and cargo planes against fighter craft usually doesn't end well for the former. It also simplifies the 'mission to rescue survivors, etc.', which is a nice idea but perhaps could be implemented later.

Quote
PS: do you want all attributes on a mission wave (and have same UFOs with potentially different settings) or can all these attributes be UFO level (which might be easier for the user to recognize the threat level)

Might be irrelevant: at UFO level, the modder will simply have to create separate entries for each UFO if he/she wants for more diversified behaviour (as an example, a type of Large Scout attacks interceptors, another type attacks transports, etc.), and then create specific missionWaves using the different ufo entries. If the attributes on missioWaves it is simply a matter of assigning the specific flag to each ufo in the wave - and this doesn't invalidate your point regarding recognition, i.e., Medium Scouts can be set on missionWave to prefer attacking transports, Large Scouts have mixed behavior, Terror Ships go after interceptors.

My point is basically to give flexibility to the modder concerning how easy/hard should be for the player to recognize the type of UFO (which is important because you need to give some info to the player) and adjust its tactics accordingly.

Finally another idea just came up (I think you or someone mentioned this before) would be for some alien bases to have a detection radius and send HKs to intercept if any XCom craft is detected (with a flag on either alienMissions or alienDeployments to set the alien base as capable of interception). But this might be complicating things at this point and could be added later. 
Title: Re: Hunter-killer
Post by: The Reaver of Darkness on September 26, 2017, 04:55:14 pm
Does this actually spawn a mission or is it just a touch-and-go crash site?
Maybe touch and go if you get there in time, but alien craft may opt to land there. If that happens, the time limit is greatly reduced (from a few days to a few hours) and if you land to rescue them, you must fight the aliens off.

This could make for an interesting battle, but would require new maps. You'd have the alien ship, x-com craft landed, and crashed x-com craft. The two crews would spawn separately. You could try to run everybody into the landed ship (if they all fit) and abort mission, losing anything you left behind, or you can try to fight all the aliens and take everything home plus extra loot.

One thing that might make it harder is if you have to fit both crews on one ship. Maybe some members of crashed crew begin the site wounded and with diminished morale. They also are auto-equipped with what's available and you don't get to set their equipment. So the site can be more difficult because part of your crew is in a weaker state.

What'll prevent you farming it: you'd randomly lose soldiers even if you play your cards perfectly because some die in the initial crash--especially if it's in water.
Title: Re: Hunter-killer
Post by: Hobbes on September 26, 2017, 11:19:20 pm
and if you land to rescue them, you must fight the aliens off.

What would be the reasoning behind this? With XCom, yeah, definitely makes sense trying to recover crashed UFOs to get access to the aliens technology, but why would the aliens need to assault a crashed craft full of equipped armed troops when they can simply abduct/harvest civilians?

Map-wise, it would actually be pretty simple to implement both craft and a UFO since you'd only need to adjust the script.
Title: Re: Hunter-killer
Post by: mumble on September 28, 2017, 07:53:09 am
 Maybe there should just be 2 parameters for shooting down? JUST shooting down, and trying to extinguish any survivors, as 2 tasks.

I figure in some scenarios, such as piratez, would be mercs might try gunning down and bagging pirates for fame and loot, while xcom UFO's might merely only care about knocking down ships, but have bigger fish to fry than killing all survivors.

also, how would rescue work? I presume if you wipe the attacking aliens, you get everything thats left from being shot down, but what about engagement? Would you have a time limit BEFORE the ufo defense is forced?

I really love the idea of a possible second chance, but the more I think about it, the more problems it would present
Title: Re: Hunter-killer
Post by: Ethereal on September 30, 2017, 04:22:22 pm
I propose to implement the attack of X-COM ships in both versions - and in "alienMissions.rul", as a model of UFO behavior, and in "ufos.rul". This will create flexibility in setting up UFO behavior.
Title: Re: Hunter-killer
Post by: SteamXCOM on October 03, 2017, 05:52:39 pm
"use anomaly" ?
"ransom from hostile locals on mission abort" ?

I am speechless...

Should I also implement ground staff, so that you can order them to clean toilets?
And maybe also a pizza baking simulator mini-game... to improve soldier morale.
And sex-chat! Every good game needs a built-in sex-chat...

:(  :'(


My description in the previous post  is probably a bit more complex than it needs to be.

The goal I gather is to have an UHK (Unidentified Hunter killer) interception
--The UHK is superior to XCOM craft
--it is an unwinnable encounter inasmuch as the XCOM craft goes

The game already has a "dogfight" interface that faces off XCOM craft against a UFO.

Typically, the player uses the buttons to hammer the UFO until its shot down or presses another button that  breaks off  contact if damage to the XCOM craft is too much.

I gather, we want to take some form of that dogfight interface so the UHK faces off against the XCOM craft.

Typically, with that similar dogfight interface, the player now  uses the buttons to try and instead escape the UHK (because it is superior) until that escape is successful or the XCOM craft is shot down. 

Escape means the XCOM craft has successfully eluded the UHK .

The details of what the buttons might actually do are suggested in the earlier post , however game / programming limitations will of course determine what can be done with them to effect the escape of the XCOM craft or no.

And if a tactical mission results from getting shot down, (maybe 25% of the time) the combat mission map would be displayed with any leftover Xcom survivors.  As earlier described, no aliens, just hostile scavenging locals.  If you win, you carry out your stuff and whatever can be recovered from such defeated locals (ak 47's etc). If you lose, yes you lose all.
 IF you ABORT  for one reason or another:
 -- ransom offer from locals for return of your soldiers: game determines how much  and if you pay  the soldiers  show up some time later at a base
 --or not pay ransom, and you never see them again.
 not sure how ordering Pizza or cleaning toilets could be used in this context,
 however SEXCHAT brings up another possibility...
 ....yes, instead of that; NEGOTIATIONS with locals to get your guys back:
 this is not a minigame but just another option after you click ABORT:
 
 Abort button (in tactical) clicked goes to another screen with the following options
 >cancel (returns to tactical)
 >Pay ransom to locals [$$game displays dollar amount$$$](if selected and if enough money deducted and return to Geoscape, otherwise message appears NOT ENOUGH FUNDS) soldiers(not gear) return to base.
 >Negotiate (if selected game displays $$$ amount which can be as little as half the amount or as much as triple the amount of original ransom)
 >>YES pay Negotiated ransom (if selected and if enough money deducted and return to Geoscape)
 >>NO do not pay negotiated ransom(return to Geoscape)
 >abandon soldiers (return to geoscape)
Title: Re: Hunter-killer
Post by: Countdown on October 06, 2017, 05:56:02 am
What would be the reasoning behind this? With XCom, yeah, definitely makes sense trying to recover crashed UFOs to get access to the aliens technology, but why would the aliens need to assault a crashed craft full of equipped armed troops when they can simply abduct/harvest civilians?

I can imagine a world where the aliens want to actually kill XCOM, not just down their craft. You could think of Hunter-Killers as "search and destroy."



My description in the previous post  is probably a bit more complex than it needs to be.


And if a tactical mission results from getting shot down, (maybe 25% of the time) the combat mission map would be displayed with any leftover Xcom survivors.  As earlier described, no aliens, just hostile scavenging locals.  If you win, you carry out your stuff and whatever can be recovered from such defeated locals (ak 47's etc). If you lose, yes you lose all.
 IF you ABORT  for one reason or another:
 -- ransom offer from locals for return of your soldiers: game determines how much  and if you pay  the soldiers  show up some time later at a base
 --or not pay ransom, and you never see them again.
 not sure how ordering Pizza or cleaning toilets could be used in this context,
 however SEXCHAT brings up another possibility...
 ....yes, instead of that; NEGOTIATIONS with locals to get your guys back:
 this is not a minigame but just another option after you click ABORT:
 
 Abort button (in tactical) clicked goes to another screen with the following options
 >cancel (returns to tactical)
 >Pay ransom to locals [$$game displays dollar amount$$$](if selected and if enough money deducted and return to Geoscape, otherwise message appears NOT ENOUGH FUNDS) soldiers(not gear) return to base.
 >Negotiate (if selected game displays $$$ amount which can be as little as half the amount or as much as triple the amount of original ransom)
 >>YES pay Negotiated ransom (if selected and if enough money deducted and return to Geoscape)
 >>NO do not pay negotiated ransom(return to Geoscape)
 >abandon soldiers (return to geoscape)

Sorry to be the bearer of bad news, but wherever the "too complex" line is, I think you're still way over it.
Title: Re: Hunter-killer
Post by: Ethereal on October 06, 2017, 09:05:05 am
I also think that it is not necessary to complicate the process.
If the acceleration of the attacked ship X-COM is higher, then there is an opportunity to exit the battle. Repeated attack of a UFO is possible only after some time.
- Attack of the interceptor - if successful, then the pilot survives in 50% of the cases and immediately gets credited to the base.
- Transport attack - if successful, -
over water - loss of all personnel, ship and equipment.
above the land - there is a point for the mission. Performed successfully - I got everything, but not ship, back. Mission failed or has not arrived - lost everything.
The mission itself is a hard battle with the aliens and a bunch of terrorists, without the presence of a UFO. A Soldiers and equipment of downed ship X-COM - virtual, and returned to the base in the event of a successful mission.

And I think all other excesses are relevant only in different specific mods.
Title: Re: Hunter-killer
Post by: mumble on October 08, 2017, 04:43:12 am
Should it REALLY involve the ship not being gotten back if it lands intact? Even if its horribly fucked up, I figure one could do a lot of repairs on it....or at least maybe salvage the ship for parts? I just don't think it should be a total loss, thats a lot of potential money being blown up even if you save it.
Title: Re: Hunter-killer
Post by: SteamXCOM on October 15, 2017, 10:18:19 pm
Should it REALLY involve the ship not being gotten back if it lands intact?   ..........    I just don't think it should be a total loss, thats a lot of potential money being blown up even if you save it.



Yes I gather that is part of the point of having HunterKillar,
--you  lose all your men together with your craft on this event once triggered.
--the reason is, to make the game somewhat more unpredictable in regards to an occasional catastrophic loss sustained to the player.

Something like this was discussed on another thread, introducing some type of event to kick the player so its not such an easy ride to the finish line

HOWEVER

--include some type of player input / control that has the potential to diminish the HunterKiller (HC)  result:
---you somehow elude HC and nothing else happens
Some measurement of bad things happening if you are hit
you lose only a percentage of your
------ men,
------equipment
------and  (yes, your suggestion) salvage some materials from your craft or even repair it.
Title: Re: Hunter-killer
Post by: Dwarmin on November 08, 2017, 11:07:10 pm
I like the idea of this mod.  :D

It is a significant increase of difficulty, of course.

I'd adjust so that HK's have varying strength-at the start of the game, they should be weak and slow. They shouldn't be able to kill XCOM craft unless you literally hang in there. I'd think they are more interested in driving you away-perhaps they don't bother to pursue. This is just the 'tutorial' however-it gives the player time to absorb the danger and react appropriately. Much like how aliens don't immediately start with Ethereals wielding blaster bombs and heavy plasma. Hostile and persistent craft should start attacking the more successful you are/the more time passes-and those you can't run away from. My only thing is, a bunch of them who were superior to xcom ships, overflying terror mission sites consecutively would pretty much make the game unwinnable at that point, right? Even enough of them early game would pretty much mean that you lose, or would become very boring-you can only fight so many off before you literally have no planes left, and with no planes, you can't intercept and have to rely on hoping the aliens land near your 1st base and patiently wait for you to arrive.

Worse if you didn't build a base that has enough reach for interceptors to escort your skyranger to get spots far on the globe...at that point of the start of the game, I don't see the aliens even seeing XCOM as a threat. I mean, look at it from a lore perspective-Kiryu Kai was the group that tried before XCOM. They neither attacked, or were attacked by the aliens for their entire five months operation time. The aliens literally ignored them, because they were ineffectual. The Spanish didn't need to sink the Aztecs canoes to conquer them either. :P

To sum up. As long as both the intent and the danger is communicated clearly and fairly to the player, and you are given a chance to adjust tactically to this threat over time, I have absolutely no problem with losing a dropship and crew to HK's.

It should be a realistic threat, otherwise there's no point.


...

Other thoughts.

What would be the chance of adding extra XCOM base slots along with this change? Or even mini-bases, of like 2x4, 4x4 8x8 construction blocks, that could be converted into full size bases later (thereby cutting initial lump sum costs). With HK's threatening the skies, we're going to need more interceptor 'slots'. Or we'll get wrecked before we can expand our air defense coverage all over the world. Or just ordinarily wrecked. I always have a hard time trying to figure if I should plug the radar hole in the Pacific, or try to fortify the Americas with a third base, one of which is my HQ usually and has less space for interceptors...

Another good addition-small 1x1 storage bays that can hold aircraft being repaired, or just being held in reserve. You still use hangars to launch and service them, but why waste the space for repairing non-functional or minimally functional craft? If we're going to be fighting dozens more air battles this will require some complements on our end.

This mod should def come with actual named pilots being introduced baseline, with their own skills and callsigns. I mean, INTERCEPTOR 1 has probably killed more aliens than my most elite Xcom soldiers. I wish he had a name...

Edit: Btw, the youtube link is broken, does anyone know where I can see this in action?
Title: Re: Hunter-killer
Post by: Yataka Shimaoka on November 09, 2017, 04:12:20 am
P.S, this is not a mod, its a functionality for modders to allow aliens to intercept Xcom crafts, this is built in oxce+ and disabled, unless a mod activates the function
Title: Re: Hunter-killer
Post by: tkzv on November 24, 2017, 03:45:18 pm
Is this project still alive? Still interested in suggestions?

When your ship is faster, you don't get attacked.
Maybe only if you patrol/are stationary... but even if I allowed disengage then, the UFO would just attack again one milliseconds later... so no point doing that.
UFOs move before xcom moves in openxcom... they would reengage before xcom makes a first step towards the base.
Can you put disengaging X-COM craft a step or two ahead of the UFO, if X-COM is faster? This way fast craft will be able to run away.

minimize button is not allowed
Is there any way to reload or quit the game?

In air combat simulators there's often an option to try to run away from enemies by flying close to surface, hugging the local topography and hoping the pursuer will fail to dodge. Can there be a button like "run away through the hills" (need a better name :) ), that randomly destroys one of the combatants (or both)? Taking into account their maximum acceleration and pilots' stats like bravery and reactions.

Summary:
- most likely 1:1
- 1 xcom vs multiple UFO would be doable I guess (not easy)
- multiple xcom vs 1 UFO.... no (unless we somehow will be able to "synch" craft to fly in fixed formation = occupy exactly the same spot on the geoscape)
- multiple xcom vs multiple UFO... nope
If both "1 xcom vs multiple UFO" and "XCOM formation vs 1 UFO" are doable, what will be the obstacle to combine them?

If anyone has a good idea how to save the crew that doesn't involve "free bounty" (e.g. ground mission) and involves at least some penalty (e.g. lost craft and cargo? crew travelling 2 days back to base by public transport? :) ), I am listening... a combination of "most realistic" and "least rewarding" solution may get implemented.
Can you model explosions and damage like in Battlescape without starting Battlescape? If yes:
1. Model explosions outside the craft. I haven't calculated how the power of UFO cannons compares to Battlescape weapons. If you don't feel like figuring the precise value, make each hit an explosion of Blaster bomb at random points outside the X-COM craft. Not necessarily close to the hull. Those will be wounds inflicted in air.
2. Operatives jump out with parachutes or flying suits. The ones knocked out in step 1 "jump" too. Any items not carried by operatives at launch (either memory or auto-equip) are lost. If memory and auto-equip are both disabled, guess that means everything is lost.
3. Unencumbered operatives land without further injuries. Encumbered ones suffer blunt damage proportional to extra weight, possibly with fatal wounds. Stunned may get extra damage too. If the area is cold water, operatives lose a percentage of HPs.
Wearers of flying suits get no injuries.
4. The results can be displayed similarly to the missile defence shooting during the base assault.
5. UFO makes a pass and bombards the approximate location of operatives with something like Blaster bombs (or Stun bombs). For example, throw operatives randomly on a 4x4 (or 10x10) map. Randomly drop 16 (or 100) bombs.
6. If there is no Battlescape fight, the bombing results appear as text. If the crash landing is going to be followed by Battlescape mission, this may be actual bombs going off before the first turn.
7. Aliens may literally drop some forces to mop-up the area, if the base is crewed by flying creatures or ones able to survive the drop. Cyberdisks, Floaters, Celatids, Ethereals. Maybe Cryssalids and Sectopods. No UFO to capture, no big reward. No mop-up if X-COM fell in water.
8. If the aliens win and some operatives survive, but go MiA, the next retaliation mission will send the battleship to their home base.
9. If X-COM wins or there was no mop-up, travel time to home base depends on the landing region. It may be from 1-2 hours within the base region to a couple of weeks from Antarctica.

Quote
Sounds plausible, jet fighters can eject and soldiers (probably) have parachutes under the seat or something.
Yeah, not the best example. Then make it a helicopter. ;) One way or another, I think it should vary between transports.
Helicopters can shoot off their propellers to let the crew jump safely. Some can even shoot off the propeller and deploy a parachute, but that makes it an easier target.

Don't forget QTE elements. They make every game better, right? :)
https://jollyjack.deviantart.com/art/Quick-Time-Event-89217412 :)

I can imagine a world where the aliens want to actually kill XCOM, not just down their craft. You could think of Hunter-Killers as "search and destroy."
They may want to question the survivors. At the very least, about the target of the next retaliation mission. Hence my suggestion that they can carpet-bomb the crash site with stun bombs.


Two more questions, which I don't remember being mentioned:

1. How many hunters can be there?

2. Do hunters attack ground vehicles, if the mod has them?
Title: Re: Hunter-killer
Post by: The Reaver of Darkness on November 24, 2017, 08:21:38 pm
3. Unencumbered operatives land without further injuries. Encumbered ones suffer blunt damage proportional to extra weight, possibly with fatal wounds.
This seems like an unfair way to punish anyone who chooses to put extra load on their soldiers. For most of us, it'll do nothing at all. I always avoid encumbering my soldiers, and as I've seen in let's plays, others usually do the same. I would just remove that bit, or base injuries on the total amount of weight they're carrying, but then you should probably add in the weight of the soldier as well. If it's in kg (reasonable, based on 20-40 starting strength and 100 max), then you could add 100 for the soldier plus suit and basic equipment. That way, a soldier with very little extra equipment will tend to take less damage than one with a really heavy loadout, but the difference will be smaller than the overall risk itself.
Title: Re: Hunter-killer
Post by: tkzv on November 24, 2017, 11:09:26 pm
There has to be some weight limit. I read about RL parachutes that required dropping people only with pistols — rifles were too heavy and had to be dropped separately. I suggested this. Maybe a fixed weight limit would make more sense. Maybe it will only complicate things unnecessarily and should not be implemented at all.

P.S. Does anybody have the video from the starting post?
Title: Re: Hunter-killer
Post by: Meridian on December 21, 2017, 03:02:27 pm
Is this project still alive? Still interested in suggestions?

Still alive.
Suggestions are always welcome, but I will probably ignore 99% of them for now... I am working on Hobbes' initial requirements, even that requires a crapton of testing... and dogfights are fairly complicated and very very VERY hard to simulate/reproduce/debug anything else than the simplest cases.

PS: I am not planning to rewrite the dogfight code to be super-generic... I will extend it until it becomes saturated and then stop when I finally hit the wall.

P.S. Does anybody have the video from the starting post?

Deleted. Sorry.
Title: Re: Hunter-killer
Post by: NeoWorm on December 27, 2017, 02:05:19 am
Some time ago when this thread opened I spend few days brainstorming ideas and taking notes, since Meridian is around again I think I should write some of the ideas down.

I think the GUI should stay the same for both X-Com intercepting UFOs and UFOs intercepting X-Com. With all the options player have. For the sake of consistency. Even if that choosing disengaging speed will just mean UFO will take more time to get into range. Even better the GUI should be the same and the system working within the GUI we already have. I think there is a potential of UFOs changing their behaviour depending on player actions or other circumstances.

There should be probably UFO maneuvers described in the text line in the GUI. For better readability of the game. Can't check the video if is or isn't already there.

There is, I think, a problem with handling multiple craft battles. When a hunter-killer tries to engage X-Com craft that is already following a UFO. I think the hunter-killer should overtake the interception window making the X-Com craft disengage the original target. If the system gets more complicated (and I believe it will) I think sticking to one UFO vs multiple X-Com crafts would be the best for both programing, tradition and design clarity. Multiple crafts attacking each other could very easily devolve into unreadable mess.

Another thing I think could be problem is attacking X-Com transport planes returning from a mission. As far as I know when ground mission ends, all the loot is transported to the base immediately. That would not happen if the plane is shot down. Also if there will be some sort of mission after the plane is shot down, it should take into consideration all the injusries and lost or used equipment on board. For now simply excluding returning planes from hunter killer AI would be sufficien to avoid all these problems.

The radar range of UFO should be hidden from player. I think at least researching the UFO type should be necessary. Or better UFO type researched and Hyperwave Decoder in range.

Hunter Killers current target should be readable through Hyperwave decoder.

Also an idea of escorting X-Com transports by fighter planes came up in the thread. But it would be kinda difficult since if the UFO, which is almost always faster, picks the transport as a first target the fighter can't do much. There could be solution with either X-Com crafts flying in formations as single node on Geoscape which would need new systems to set it up. Or the hunter killer could just follow X-Com craft for some time at the begining of dogfight in similar manner X-Com can follow UFO, making it possible for another X-Com craft to join in into the fight and reducing this problem to normal one UFO vs multiple X-Com crafts battle. This solution is typical gamedesign avoiding of the problem, but I think it can work well enough.

And now some wild ideas that I had:
Title: Re: Hunter-killer
Post by: The Reaver of Darkness on January 05, 2018, 10:15:09 am
Also an idea of escorting X-Com transports by fighter planes came up in the thread. But it would be kinda difficult since if the UFO, which is almost always faster, picks the transport as a first target the fighter can't do much. There could be solution with either X-Com crafts flying in formations as single node on Geoscape which would need new systems to set it up. Or the hunter killer could just follow X-Com craft for some time at the begining of dogfight in similar manner X-Com can follow UFO, making it possible for another X-Com craft to join in into the fight and reducing this problem to normal one UFO vs multiple X-Com crafts battle. This solution is typical gamedesign avoiding of the problem, but I think it can work well enough.


I don't think Meridian is open to new ideas currently, unless they are very simple. But to make it so the player can use interceptors to defend transports, it could be done like this:

During dogfight, time continues on the geoscape at [5 sec] and you can minimize the encounter at any time. The dogfight remains active in-game and you cannot time-warp if you aren't at stand-off. You can thus go to the geoscape to add interceptors to the fight. The player would want to fly the interceptor very near the transport since they might not have much time to react. It would then be very nice if the player could add interceptors and transport to a squadron which flies at the slowest ship's speed--and for normal fuel, fuel depletes based on speed, with a minimum depletion at half the ship's max speed (it has to stay in the air).
Title: Re: Hunter-killer
Post by: Meridian on February 03, 2018, 10:04:13 pm
Random facts a.k.a. feature description:
----------------
- UFOs can spawn as hunter-killers (HKs), if so configured, see ruleset below
- mission wave ruleset overrides ufo ruleset
- HKs re-evaluate best target every 10 minutes (criteria: transport/fighter, can/cannot land, number of soldiers and pilots, damage already taken)
- when HK starts hunting, it reveals itself, even outside of radar range (this is a temporary decision for testing/balancing, can be reevaluated)
- player is informed when a HK starts hunting any craft, by a popup
- game draws radar circle around HKs
- game draws a line (flight path) to HK's target
- UFOs stop hunting craft that get outside of their radar range (checked every 10 minutes)
- UFOs stop hunting craft that have landed in any xcom base
- UFOs stop hunting craft that were destroyed (in dogfight, during mission or during base defense)
- UFOs that stop hunting, resumes their original destination
- only 1 UFO can attack xcom craft at a time (others are following)
- if UFO attacks craft and craft attacks UFO as well... game treats it as "UFO attacked craft"
- many buttons are disabled in dogfight when HK attacks, attack mode is set to aggressive
- xcom CANNOT retreat from the fight initiated by a UFO
- UFO can abort hunting if it sustains too much damage (more than 33% damage to UFO and less than 50% to xcom => retreat), if it's fast enough
(please note that UFOs crash at 50% damage, so 33% total damage is technically 66% effective damage)
- if you don't use any of these features, the game should work exactly as before, no side effects

Disclaimer:
----------------
This is a very experimental feature... very hard to implement and even harder to test.
Expect crashes, endless loops and all that jazz... when it happens, please report it!

Code: [Select]
ufos:
  - type: STR_SMALL_SCOUT
    radarRange: 1000                # generous radar range, so that it can actually find a prey
    power: 100                      # big gun
    range: 50                       # decent weapon range
    reload: 10                      # dakka
#
    hunterKillerPercentage: 100     # always created as HK, default is 0
    huntMode: 0                     # 0 (default) prefer interceptors, 1 = prefer transports, 2 = random (generated at spawn)

Code: [Select]
alienMissions:
  - type: STR_ALIEN_RESEARCH
    waves:
      - ufo: STR_SMALL_SCOUT
        hunterKillerPercentage: -1  # default is -1, means use value defined at UFO level
        huntMode: -1                # default is -1, means use value defined at UFO level
      - ufo: STR_MEDIUM_SCOUT
        hunterKillerPercentage: 50  # 50% to become a HK at spawn
        huntMode: 1                 # transport killer
      - ufo: STR_LARGE_SCOUT
        hunterKillerPercentage: 100 # always a HK
        huntMode: 0                 # shoot down those xcom fighters

PS: I am also working on generating HKs by alien bases...

Download: https://lxnt.wtf/oxem/builds//ExtendedPlus/Extended+-3.10a-88c2903-2018-02-03-win32.7z
Title: Re: Hunter-killer
Post by: Ethereal on February 04, 2018, 08:41:50 am
Thank you very much! Was waiting for this feature for a long time!

- HKs re-evaluate best target every 10 minutes (criteria: transport/fighter, can/cannot land, number of soldiers and pilots, damage already taken)

Have a check on "allowLanding: false"? How AI distinguishes fighter from transport? With equality of seats and number of pilots, does the AI consider the ship a fighter?

- UFOs stop hunting craft that have landed in any xcom base

Logically, the AI, X-COM craft landed on the base, the within radar of the hunters, needs to give the location of the base.

- if UFO attacks craft and craft attacks UFO as well... game treats it as "UFO attacked craft"

There should be a comparative analysis of speed and acceleration. If the transport X-COM is faster than the hunter, he must be able to escape the attack. But only if he is not on patrol.

As far as I can see, there are no missions to rescue the crew. Does this mean that if the ship X-COM is crashed, everything is lost - the ship, tanks, equipment and the whole crew?

By the way, what happens when an attack occurs when a hunter and a fighter are flying to intercept each other? Who has priority in the attack?
Title: Re: Hunter-killer
Post by: Meridian on February 04, 2018, 11:15:45 am
Have a check on "allowLanding: false"? How AI distinguishes fighter from transport? With equality of seats and number of pilots, does the AI consider the ship a fighter?

if hunting interceptors:
- allowLanding: false is preferred
- craft without soldiers is preferred
- the less pilots onboard, the more attractive
- the less damaged craft, the more attractive (just to allow damaged craft to escape easier when fighting more HKs)

if hunting transports:
- allowLanding: true is preferred
- the more soldiers onboard, the more attractive

Logically, the AI, X-COM craft landed on the base, the within radar of the hunters, needs to give the location of the base.

It could... but they can't do anything with that information anyway... until retaliation is spawned, which is a completely disconnected event.

There should be a comparative analysis of speed and acceleration. If the transport X-COM is faster than the hunter, he must be able to escape the attack. But only if he is not on patrol.

Sorry, can't do technically.
If you have a faster craft, you can escape the hunter before it reaches you...

As far as I can see, there are no missions to rescue the crew. Does this mean that if the ship X-COM is crashed, everything is lost - the ship, tanks, equipment and the whole crew?

Of course.
Last time I checked, when craft built by humans crash, everything explodes, burns and nobody survives.

By the way, what happens when an attack occurs when a hunter and a fighter are flying to intercept each other? Who has priority in the attack?

As I said before: if UFO attacks craft and craft attacks UFO as well... game treats it as "UFO attacked craft"
Title: Re: Hunter-killer
Post by: Ethereal on February 04, 2018, 11:50:09 am
Quote
- the less pilots onboard, the more attractive

This is bad for my mod, because the transports do not have pilots.

Quote
It could... but they can't do anything with that information anyway... until retaliation is spawned, which is a completely disconnected event.

Why not? The base is more priority. Let them attack it, then the basic rocket missile defense will be useful. And there is no defense - get a full assault on the base. It seems like reinforcements have been called.

Quote
Sorry, can't do technically.
If you have a faster craft, you can escape the hunter before it reaches you...

On the oncoming course, the intercept will still take place. It turns out that even Avenger can not avoid him.

Quote
Of course.
Last time I checked, when craft built by humans crash, everything explodes, burns and nobody survives.

This is understandable, but too hardcore. Explicit bust. Let there be a mission, but only for high-tech ships of the late periud. We need a flag that initiates the appearance of a point for the mission after the crash. And the crew is placed in the buffer and is considered (on mission) while there is a point. With the success of the mission - the crew returns with injuries, and the equipment and the ship are lost in any case. If the mission fails or the point is lost - then the crew is considered missing.

And yet, will this feature be combined with OXCE +, or will it be an independent mod?
Title: Re: Hunter-killer
Post by: Meridian on February 04, 2018, 12:20:10 pm
This is bad for my mod, because the transports do not have pilots.

That's why there are other criteria too, "allowLanding" has the biggest impact.

Why not? The base is more priority. Let them attack it, then the basic rocket missile defense will be useful. And there is no defense - get a full assault on the base. It seems like reinforcements have been called.

Why yes?
There will be mods and situations, where this is not desired... I don't want to hardcode it.

On the oncoming course, the intercept will still take place. It turns out that even Avenger can not avoid him.

I don't understand.

This is understandable, but too hardcore. Explicit bust. Let there be a mission, but only for high-tech ships of the late periud. We need a flag that initiates the appearance of a point for the mission after the crash. And the crew is placed in the buffer and is considered (on mission) while there is a point. With the success of the mission - the crew returns with injuries, and the equipment and the ship are lost in any case. If the mission fails or the point is lost - then the crew is considered missing.

The idea has been heavily discussed already and was discarded.
This is an optional feature, if you find it too hardcore, don't enable it... or make the HKs weak enough for your taste.

And yet, will this feature be combined with OXCE +, or will it be an independent mod?

This is part of OXCE+.
Title: Re: Hunter-killer
Post by: clownagent on February 04, 2018, 01:51:44 pm
What is the chance of detection of human crafts for the HKs?
Is it always 100% when in radar range?

Is it possible to mod a "stealth craft", which is harder to detect for the HKs than regular craft?
Title: Re: Hunter-killer
Post by: Ethereal on February 04, 2018, 02:02:31 pm
Quote
Why yes?
There will be mods and situations, where this is not desired... I don't want to hardcode it.

Especially strongly encode and do not. Just an additional flag for the ship or mission - "AttackBase =". This would be very desirable. After all, all the defenses of the base are at war with only one single type of ship. And so - the variety when attacking the base and the usefulness of the starting defensive structures.

Quote
I don't understand.

Sometimes it happens that a slow interceptor, on a collision course, intercepts a UFO which is much faster than it. Ie, enters the combat mode for a moment, but the UFO immediately leaves. When intercepting an X-COM ship, there is no possibility to leave. Ie any UFO, on a collision course, can intercept any, even the fastest ship X-COM?
Title: Re: Hunter-killer
Post by: Meridian on February 04, 2018, 04:18:16 pm
Especially strongly encode and do not. Just an additional flag for the ship or mission - "AttackBase =". This would be very desirable. After all, all the defenses of the base are at war with only one single type of ship. And so - the variety when attacking the base and the usefulness of the starting defensive structures.

I'll consider it.

Sometimes it happens that a slow interceptor, on a collision course, intercepts a UFO which is much faster than it. Ie, enters the combat mode for a moment, but the UFO immediately leaves. When intercepting an X-COM ship, there is no possibility to leave. Ie any UFO, on a collision course, can intercept any, even the fastest ship X-COM?

Just don't go on a collision course?
If you have a faster ship, go around :)

Also, although possible, this scenario is very rare. And can be avoided easily.
Title: Re: Hunter-killer
Post by: Hobbes on February 04, 2018, 05:04:53 pm
Logically, the AI, X-COM craft landed on the base, the within radar of the hunters, needs to give the location of the base.

it's already possible to create behavior you desire without needing to add an additional feature to the HKs - if you play with the 'Aggressive Retaliation' option, then all UFOs can detect XCom bases, not just those UFOs flying Alien Retaliation missions, and if a base is detected, it spawns an attack on that base.

So, if you launch an Interceptor and an HK decides to attack it with Aggressive Retaliation activated, then you run a serious risk of the interceptor base being detected as the HK turns towards the location of the base as it moves towards the Interceptor.

The HK won't attack the base, which is logical since it is meant for aerial combat, not ground assault, but it will relay the info to the Ethereal HQ, which will then activate a specific mission to take out the XCom base.

After all, all the defenses of the base are at war with only one single type of ship. And so - the variety when attacking the base and the usefulness of the starting defensive structures.

So, you'd have UFO scouts attacking alien bases and getting shot by Missile Defenses, or if the UFO lived, Base Defense missions where it would be 30+ soldiers/HWPs against 8-12 aliens, without any terror units or Blaster Launchers? This doesn't sound much of a challenge, just another repetitive training mission for the player to deal with those banzai/kamikaze attacks.

But let's consider that this is desirable for gameplay.

The major technical issue is that a ton of things about Base Defense is hardcoded - you'd need to create different alienDeployments for every UFO type that could attack the base, each with different numbers/types of aliens present, according to the UFO that attacked the base. And from my past requests to developers regarding Base Defense missions, I've learned that they consider Base Defense to be very challenging.

Plus, the numbers of aliens present on Base Defense depends on the size of the base and the number of Hangars present, so this opens a ton of different possibilities/challenges for balancing, which just complicates everything - the difficulty of base defense missions would be random.

However, you currently can have different UFOs attacking bases - it's just a matter of creating different Alien Retaliations, each with a different UFO that performs the attack run, and use missionScripts to switch between UFOs as the campaign progresses. They would all still use the same alienDeployment if they survived the base defenses, making balance a lot easier, but one UFO could be a Transport Carrier (little armor) while another could be a Battleship in the later stages of a campaign.

Title: Re: Hunter-killer
Post by: Ethereal on February 04, 2018, 05:27:45 pm
It's not about detection, but in the attack itself. Technically, the crew of the UFO attacking the base has nothing to do with the configuration and composition of the assault forces attacking the base. As I already wrote above - overcoming anti-aircraft defense, the aliens cause reinforcements with the help of unknown technology. Ie - the composition of assault units attacking the base is the same for all UFOs.

Much easier, more dangerous, but with a chance to escape with the help of the simplest missile defense. And to clone "Alien Retaliations" without introducing a fundamentally new UFO is a bad and not an interesting idea. This functionality allows you to change the behavior of UFOs in the framework of current missions. And any of them.
Title: Re: Hunter-killer
Post by: Hobbes on February 04, 2018, 05:45:27 pm
It's not about detection, but in the attack itself. Technically, the crew of the UFO attacking the base has nothing to do with the configuration and composition of the assault forces attacking the base. As I already wrote above - overcoming anti-aircraft defense, the aliens cause reinforcements with the help of unknown technology. Ie - the composition of assault units attacking the base is the same for all UFOs.

This sounds to me like vanilla behavior.

It really doesn't matter how you justify the reinforcements - on vanilla base defense the aliens only attack the base once when it's detected, and it requires being detected again for subsequent attacks when the "logic" would be that they keep attacking until it's destroyed.

Quote
And to clone "Alien Retaliations" without introducing a fundamentally new UFO is a bad and not an interesting idea.

I wasn't clear - you clone Alien Retaliations precisely to introduce new UFOs to alienRetaliation attack runs, instead of the vanilla Battleship
Title: Re: Hunter-killer
Post by: Ethereal on February 04, 2018, 06:18:00 pm
I wasn't clear - you clone Alien Retaliations precisely to introduce new UFOs to alienRetaliation attack runs, instead of the vanilla Battleship

Without special need, you do not need to clone anything. And here there is no such need. You can assign any UFO from the list as a hunter, without touching the missions at all.
Title: Re: Hunter-killer
Post by: Hobbes on February 04, 2018, 06:56:09 pm
Without special need, you do not need to clone anything. And here there is no such need. You can assign any UFO from the list as a hunter, without touching the missions at all.

This is what I'm reading from the whole discussion.

1) The behavior you want can be replicated right now
* The size of the aliens during base defense is always the same, regardless of the UFO involved
* You can define different UFOs to attack the base, using alienMissions and missionScripts
* The base can be detected either through a vanilla Retaliation mission, or through all the alienMissions by using the 'Aggressive Retaliation' option, however to you how the base is detected is irrelevant
 
2) You don't make the ruleset changes because there's no special need
* Instead you want Meridian to add a new feature for your specific need, which will require more work to him

My conclusion: if you really want to implement this: use what's available and don't expect the developers to address all the needs of modders, because they have limited time and resources to spend in implementing features.

Otherwise, have patience and don't ask for it too much.

It took 18 months (https://openxcom.org/forum/index.php/topic,4679.0.html) to find and convince a developer to add this 'hunter-killer' feature - and I kept waiting and talking about it because I knew it was a game changer, but I also realized that it was very demanding on the technical side, and unless a developer was interested and motivated, no one would ever pick it up.

So, with these kind of requests, either you wait and try not to piss off the developers with constant requests, or you learn to do it yourself, if you're in a hurry :)
Title: Re: Hunter-killer
Post by: Ethereal on February 04, 2018, 07:28:00 pm
Hobbes, You are fundamentally wrong. Read carefully the post of the same Meridian -

Code: [Select]
ufos:
  - type: STR_SMALL_SCOUT
    radarRange: 1000                # generous radar range, so that it can actually find a prey
    power: 100                      # big gun
    range: 50                       # decent weapon range
    reload: 10                      # dakka
#
    hunterKillerPercentage: 100     # always created as HK, default is 0
    huntMode: 0                     # 0 (default) prefer interceptors, 1 = prefer transports, 2 = random (generated at spawn)

Code: [Select]
alienMissions:
  - type: STR_ALIEN_RESEARCH
    waves:
      - ufo: STR_SMALL_SCOUT
        hunterKillerPercentage: -1  # default is -1, means use value defined at UFO level
        huntMode: -1                # default is -1, means use value defined at UFO level
      - ufo: STR_MEDIUM_SCOUT
        hunterKillerPercentage: 50  # 50% to become a HK at spawn
        huntMode: 1                 # transport killer
      - ufo: STR_LARGE_SCOUT
        hunterKillerPercentage: 100 # always a HK
        huntMode: 0                 # shoot down those xcom fighters

Ie the function of the hunter is designed to be added to the mission, and to a certain UFO. And I ask only to supplement the function in that it will facilitate modding not only fo me, but also fo others. In addition, it is quite logical that the UFO, found the landing of the transport, finds the base and attacks it. This functionality would allow creating a separate class of ships - hunters for X-COM, which can be added to any mission.
Title: Re: Hunter-killer
Post by: Hobbes on February 04, 2018, 10:01:48 pm
Hobbes, You are fundamentally wrong.

For the sake of civility, let's just agree to disagree - you have your opinion, mine is different.

Good luck (and patience) with your modding :)
Title: Re: Hunter-killer
Post by: Gordonmull on February 04, 2018, 10:10:36 pm
I really hope that this fantastic work from Meridian will mean that your Terminator mod might be closer to an alpha, Hobbes. I'm really looking forward to that one if you're still going with it.
Title: Re: Hunter-killer
Post by: Hobbes on February 04, 2018, 10:39:46 pm
I really hope that this fantastic work from Meridian will mean that your Terminator mod might be closer to an alpha, Hobbes. I'm really looking forward to that one if you're still going with it.

I got good news for you: I was waiting for this feature to get an alpha ready of the Terminator total conversion ;D

No ETAs though - everytime I look at it I remember something new that needs to be converted or added. But with this feature I should be able to introduce a working Geoscape where you can intercept aerial Hunter Killers, and on the tactical side it's already possible to add a couple of missions (not Base Defense yet though - that's another thing that is taking longer because of missing sprites).
Title: Re: Hunter-killer
Post by: Gordonmull on February 05, 2018, 12:02:22 am
Quote
I got good news for you: I was waiting for this feature to get an alpha ready of the Terminator total conversion ;D

 ;D ;D ;D ;D Superb!

Quote
No ETAs though - everytime I look at it I remember something new that needs to be converted or added. But with this feature I should be able to introduce a working Geoscape where you can intercept aerial Hunter Killers, and on the tactical side it's already possible to add a couple of missions (not Base Defense yet though - that's another thing that is taking longer because of missing sprites).

Especially in wargaming, patience is a virtue ;) It's a great concept and something totally different from other conversions. I've been keeping a hopeful eye out for news!

Title: Re: Hunter-killer
Post by: Ethereal on February 05, 2018, 08:10:14 am
Meridian, now there are references to Hunter-killer and OXCE+. Wait for the merger and release of the new version of OXCE+ with the options Hunter-killer?

And it is possible more in detail about changes brought in "interfaces.rul"? What exactly is added there?
Title: Re: Hunter-killer
Post by: Meridian on February 05, 2018, 10:16:57 am
Meridian, now there are references to Hunter-killer and OXCE+. Wait for the merger and release of the new version of OXCE+ with the options Hunter-killer?

And it is possible more in detail about changes brought in "interfaces.rul"? What exactly is added there?

The changes are merged into OXCE+ and I provided a download link in the announcing post above.

Exact change in interfaces.rul can be seen here: https://github.com/MeridianOXC/OpenXcom/commit/3c59c47ba3ef5ee087d5f146a8ef411ebe3ab4f5#diff-3ec749923b6a5726723383675eba6d7c
Title: Re: Hunter-killer
Post by: Ethereal on February 05, 2018, 08:53:59 pm
Hunter-killer works fine, but a little strange. Arriving in the hunting zone, it rushes to the nearest ship and the target does not change if there is a higher priority. More precisely, he does not have time to change before the attack. In any case, at the start all the transports will have to be sent to missions, accompanied by interceptors, as it should be in the military operation.

Remarks.
1. If there is a "radarRange" in a UFO, then there must be a "radarChance:".
2. As the  justly remarked clownagent, "stealth craft", too, will not be superfluous. It is also desirable to have an invisibility generator in hinged ship modules.
3. The version of "OXCE +" with "Hunter-killer" does not at all see third-party scripts.
Title: Re: Hunter-killer
Post by: Meridian on February 05, 2018, 09:36:07 pm
Hunter-killer works fine, but a little strange. Arriving in the hunting zone, it rushes to the nearest ship and the target does not change if there is a higher priority. More precisely, he does not have time to change before the attack.

Valid point... I will think how to best fix that.

3. The version of "OXCE +" with "Hunter-killer" does not at all see third-party scripts.

what kind of 3rd party scripts?
Title: Re: Hunter-killer
Post by: Ethereal on February 05, 2018, 10:15:23 pm
what kind of 3rd party scripts?

A script for ENERGY SHIELD units for units and a script for additional types of damage.

Code: [Select]
    damageUnit:
      - offset: 50
        code: |
          unit.reduceByResistance to_gauss 10;
          unit.reduceByResistance to_sonic 11;

The script "ARMOR ENERGY SHIELD" is large. Here is the file.

No scripts work, even if they are written to another file. However, in the latest version of "OXCE +" without "Hunter-killer" - everything works fine.
Title: Re: Hunter-killer
Post by: ohartenstein23 on February 05, 2018, 10:59:36 pm
A script for ENERGY SHIELD units for units and a script for additional types of damage.

Code: [Select]
    damageUnit:
      - offset: 50
        code: |
          unit.reduceByResistance to_gauss 10;
          unit.reduceByResistance to_sonic 11;

The script "ARMOR ENERGY SHIELD" is large. Here is the file.

No scripts work, even if they are written to another file. However, in the latest version of "OXCE +" without "Hunter-killer" - everything works fine.

You have defined the scripts: tag twice under extended in your ruleset file when you added that extra damageUnit tag (which by the way, doesn't do anything). What's probably happening is that sometimes this script tag is taking load priority, overwriting the other scripts in the game's memory, and the not working in just the new version is a statistical artifact. This file works just fine for me when I comment out this code:
Code: [Select]
  scripts:
    damageUnit:
      - offset: 50
        code: |
          unit.reduceByResistance to_gauss 10;
          unit.reduceByResistance to_sonic 11;
Title: Re: Hunter-killer
Post by: Ethereal on February 06, 2018, 09:38:05 am
You have defined the scripts: tag twice under extended in your ruleset file when you added that extra damageUnit tag (which by the way, doesn't do anything). What's probably happening is that sometimes this script tag is taking load priority, overwriting the other scripts in the game's memory, and the not working in just the new version is a statistical artifact. This file works just fine for me when I comment out this code:

No need to mistakenly believe that I am not able to work with scripts. In fact, I affirm - in the version of "OXCE +" with "Hunter-killer" user scripts do not work. In the latest version of "OXCE +" without "Hunter-killer" - everything works fine. If not laziness - try it yourself.
Title: Re: Hunter-killer
Post by: Meridian on February 06, 2018, 09:50:03 am
No need to mistakenly believe that I am not able to work with scripts. In fact, I affirm - in the version of "OXCE +" with "Hunter-killer" user scripts do not work. In the latest version of "OXCE +" without "Hunter-killer" - everything works fine. If not laziness - try it yourself.

Ohartenstein is the most skilled person with scripts after Yankes.
And I can 100% confirm what he is saying.
Please try again after the fix he described...
Title: Re: Hunter-killer
Post by: Ethereal on February 06, 2018, 10:50:00 am
Do you read what I'm writing? One and the same, without any fixes, works in one version, but in another version it does not work. I provided a file with scripts. I'm sure there are no errors in this file.

Oops. Pardon me! I have a few annoying typos in "armors.rul", because of which the shields did not work.
Title: Re: Hunter-killer
Post by: Meridian on February 06, 2018, 10:55:59 am
Do you read what I'm writing? One and the same, without any fixes, works in one version, but in another version it does not work. I provided a file with scripts. I'm sure there are no errors in this file.

Did you read what we have written?
There ARE errors in your file!

It can happen that one and the same file works and doesn't at the same time... because it is not a valid YAML file.
You have two "scripts:" entries and only one can be loaded.
Depending on which one is loaded, it either works or not.

To give you an easier-to-understand example, it is the same as if you defined something like this:

Code: [Select]
items:
  - type: STR_WEAPON
    power: 40
    power: 60

This weapon would sometimes have power 40 and sometimes power 60.

Same with your scripts:

Code: [Select]
extended:
  scripts:
    createUnit:
      - offset: 1

<snip>

  scripts:
    damageUnit:
      - offset: 50
        code: |
          unit.reduceByResistance to_gauss 10;
          unit.reduceByResistance to_sonic 11;

Either the upper scripts will load... then it works... or the lower scripts will load... then it doesn't work.
Title: Re: Hunter-killer
Post by: Ethereal on February 06, 2018, 11:10:27 am
No no. I already found a mistake. The truth is not in scripts, but in "armors.rul", but it does not matter. Excuse me.
Title: Re: Hunter-killer
Post by: Ethereal 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.
Title: Re: Hunter-killer
Post by: Meridian 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?
Title: Re: Hunter-killer
Post by: Ethereal 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.
Title: Re: Hunter-killer
Post by: Meridian 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
Title: Re: Hunter-killer
Post by: Hobbes 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.

(https://i.imgur.com/ghFYOLY.png?1)

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.

(https://i.imgur.com/xXFNEUk.png?1)

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.
Title: Re: Hunter-killer
Post by: Ethereal 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?
Title: Re: Hunter-killer
Post by: Meridian 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...
Title: Re: Hunter-killer
Post by: Ethereal 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.
Title: Re: Hunter-killer
Post by: Meridian 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 :/
Title: Re: Hunter-killer
Post by: Ethereal 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.
Title: Re: Hunter-killer
Post by: Meridian 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
Title: Re: Hunter-killer
Post by: Hobbes 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.
Title: Re: Hunter-killer
Post by: Ethereal 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. :)
Title: Re: Hunter-killer
Post by: Hobbes 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:

(https://i.imgur.com/Vlgg8aZ.gif)

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?
Title: Re: Hunter-killer
Post by: Yankes 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.
Title: Re: Hunter-killer
Post by: Meridian on February 07, 2018, 11:30:57 pm
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?

It's not a bug, it's implemented that way... if it's intended?.... well, open for discussion.

When HK has taken significant damage while xcom didn't... HK can decide to abort the hunting (and deny a ground mission to xcom... to be improved how)... at which point it stops being a HK and be just a normal UFO (without radar range).
Title: Re: Hunter-killer
Post by: Hobbes on February 08, 2018, 12:17:54 am
It's not a bug, it's implemented that way... if it's intended?.... well, open for discussion.

When HK has taken significant damage while xcom didn't... HK can decide to abort the hunting (and deny a ground mission to xcom... to be improved how)... at which point it stops being a HK and be just a normal UFO (without radar range).

I agree with the logic of it exiting combat to deny ground missions, but it might make sense for it to exit toward a despawn area, following  the logic of self-preservation.

This dogfight is a specific situation where the craft is outgunned, so it would be more tense if the damaged hunter-killer re-engaged my craft after it had suffered additional damage from other hunter-killers. But I can live without that :)
Title: Re: Hunter-killer
Post by: Ethereal on February 08, 2018, 03:06:34 am
I agree with the logic of it exiting combat to deny ground missions, but it might make sense for it to exit toward a despawn area, following  the logic of self-preservation.

No no no no no! This will create a situation where it is possible to remove the threat from the detected bases without having high-speed aviation.

By the way, about power shields in UFOs. If the power shield has fallen one time, then it no longer restores. Ships "C-COM" charge them on the base, which can not do UFOs. It would be good to fix this, by completely restoring the UFO shield with every new interception. Then the retreat of "HK" will be more motivated.
Title: Re: Hunter-killer
Post by: Meridian on February 10, 2018, 07:22:02 pm
New features time:

Feature 1: Allow UFO to change speed when starting hunting

Issue: HKs were attacking at the current cruising speed, which was (with vanilla ruleset) not quite enough.

Solution 1: (already existing solution!) Specify trajectories for such UFOs in a way that they never slow down.

Solution 2: (new) Specify an attribute on UFO itself that it should change speed when it starts hunting:

Code: [Select]
ufos:
  - type: STR_SMALL_SCOUT
    huntSpeed: 90                         # when a target is found, speed up to 90% of your maximum speed

0 = don't change speed, i.e. keep current speed
1-99 = set speed to a percentage of maximum speed
100 = speed up to maximum
100+ = yes you filthy modders, you can go beyond maximum speed... but only during the chase, when intercepted, the maximum speed will be correctly considered for all relevant calculations and game mechanics

Feature 2: In "slow mode" handle UFO hunting logic every game tick

For all the micro-managers out there... if your geoscape setting is "5 Sec" or "1 Min", the UFO will reconsider its target every 5 seconds instead of just every 10 minutes.

Feature 3: Introducing kamikaze hunter-killers

To stop feeding the player with missions and points (and with consideration of future features), a kamikaze hunt behavior was introduced.
It can be defined on UFO-level or on AlienMission-Wave-level... same as for example huntMode.

Code: [Select]
ufos:
  - type: STR_SMALL_SCOUT
    huntBehavior: 1                           # default is 2, only applies to HKs, not to normal UFOs

0 = flee if losing (i.e. if ufo damage is more than 33% (=effective 66%) and craft damage is less than 50%)
1 = never flee, when damage reaches 50% (=effective 100%), self-destruct instead of crashing
2 = (default) randomly choose 0 or 1 at spawn

Code: [Select]
alienMissions:
  - type: STR_ALIEN_RESEARCH
    waves:
      - ufo: STR_SMALL_SCOUT
        huntBehavior: -1                # default is -1, means use value defined at UFO level

-1 = (default) use UFO's setting
0,1,2 = override UFOs setting with this new setting

Feature 4: Allow disengage if craft is quicker than HK

Disengage sets destination to home base as normal... and gives the craft a small distance advantage so that it is not immediately re-intercepted.
Only possible if craft's max speed is higher than HK's max speed.

Feature 5: Added evasive maneuvers support when fighting HKs

- HK has 50% of its usual chance to hit (=AFTER considering all other bonuses/maluses)
- craft has double the weapon reload time (in this case 2x aggressive reload time)
- the icon for "Cautious attack" was reused, but target distance is the same as for aggressive attack
- only available when the craft has at least one weapon

Note: even though it is on the same place as "Cautious" button, it doesn't use any cautious logic! It has different target distance and different reload base time. And different translation (STR_EVASIVE_MANEUVERS)

Feature 5: Improved HK behavior consistency

- when a HK attacks a craft all other (= minimised) interceptions are canceled (to prevent both abuse by player and dead-lock, and other side effects leading to crashes)
- when a HK is attacked by a different craft than it is currently hunting, game acts as if it was hunting the attacking craft

Feature 6: Ruleset to prevent craft from detecting alien bases

Craft can now be flagged to not be able to detect alien bases.
By default all craft are capable, you can mod them not to be capable.

Code: [Select]
crafts:
  - type: STR_SKYRANGER
    allowAlienBaseDetection: false    # default is true

Download: https://lxnt.wtf/oxem/builds//ExtendedPlus/Extended+-3.10a-355a4d6-2018-02-10-win32.7z
Title: Re: Hunter-killer
Post by: Ethereal on February 10, 2018, 09:31:20 pm
Feature 3: Introducing kamikaze hunter-killers

Self-destruction with the enemy?

- HK has 50% of its usual chance to hit (=AFTER considering all other bonuses/maluses)
- craft has double the weapon reload time (in this case 2x aggressive reload time)

Do not understand. Hunter-killer has -50% accuracy, or the ship attacked by him? In any case, all such fines, it is desirable to determine individual options.

- when a HK attacks a craft all other (= minimised) interceptions are canceled (to prevent both abuse by player and dead-lock, and other side effects leading to crashes)
- when a HK is attacked by a different craft than it is currently hunting, game acts as if it was hunting the attacking craft

But this is in vain. It would be better to do this as an individual (editable) option. It is necessary to Big and Very Large UFOs, disconnect from this function.

allowAlienBaseDetection: false

Unexpectedly and very useful! You can create a separate class of reconnaissance aircraft.

Title: Re: Hunter-killer
Post by: Meridian on February 10, 2018, 09:39:00 pm
Self-destruction with the enemy?

Yes, to prevent farming them.

Also, don't think about it as self-destruct.... think of it as "fight until the end"... just like XCOM does. It's only fair to give such option to aliens too :)

Do not understand. Hunter-killer has -50% accuracy, or the ship attacked by him? In any case, all such fines, it is desirable to determine individual options.

UFO gets -50% accuracy, XCOM get +100% reload time.
It's just another type of attack...
Title: Re: Hunter-killer
Post by: Ethereal on February 11, 2018, 08:12:42 am
Meridian, please return the group interception of the Hunter-killer and eliminate the penalty for accuracy for the UFO, because of which the fight with some transports, with high evasiveness but unarmed, becomes endless. Output both in the editable options. Let everyone decide for themselves what exactly he needs. Please.
Title: Re: Hunter-killer
Post by: Meridian on February 11, 2018, 09:53:27 am
Meridian, please return the group interception of the Hunter-killer

I cannot return it even if I wanted... it doesn't work, it never did... it has side effects ranging from wrong calculations to crashes.

and eliminate the penalty for accuracy for the UFO, because of which the fight with some transports, with high evasiveness but unarmed, becomes endless.

This already works as you want.

UFO only has the penalty when you choose "evasive maneuvers".
If you choose "aggressive attack", it does NOT have the  penalty.
Title: Re: Hunter-killer
Post by: Hobbes on February 11, 2018, 04:35:09 pm
Meridian,

I've created a page to explain OXCE+ rulesets on the UFOPaedia.org for modder reference. I've already added the hunter-killer info you posted:

https://www.ufopaedia.org/index.php/Ruleset_Reference_OXCE%2B_(OpenXcom) (https://www.ufopaedia.org/index.php/Ruleset_Reference_OXCE%2B_(OpenXcom))

I'm going to try to add the rest of the features listed on other pages, or at least those I'm using for Tech-Com at the moment.

EDIT - While compiling OXCE+ ufo, craft and craftWeapons sections on the wiki, using the info on this link: https://github.com/Yankes/OpenXcom/blob/OpenXcomExtended/Extended.txt,  I came up with a couple of questions that you might be able to clarify about the new features:
* sightRange - appears to be hardcoded and used for both ufos and crafts, but OXCE allows craftWeapons to give a bonus to this value. There's no indication of what it is used for - is this the range to detect bases (either alien or xcom)?
* Are craft/ufo "sightRange" and "marker" hardcoded?
* weaponType - no explanation to what this is used, other than the default is 0
Title: Re: Hunter-killer
Post by: Ethereal on February 11, 2018, 07:20:28 pm
* sightRange - appears to be hardcoded and used for both ufos and crafts, but OXCE allows craftWeapons to give a bonus to this value. There's no indication of what it is used for - is this the range to detect bases (either alien or xcom)?

"sightRange" - it is used to detect bases. Perhaps there is something else, but very unlikely. For the rest of the is used the usual radar.

* weaponType - no explanation to what this is used, other than the default is 0

Quote
Extended version of OpenXcom
Mod version 3.10a

Code: [Select]
  - type: STR_CRAFT_TYPE #default config ...
    weapons: 4          #weapon number increased to 4.
    weaponTypes:        #definition of allowed weapon types in craft. Max 4 different types per slot.
      - 0               #slot 1 accepts weapons with type 0. This is default.
      - 0               #slot 2 accepts weapons with type 0.
      - [0, 4, 13]      #slot 3 accepts weapons with type 0, 4 and 13.
      - 1               #slot 4 accepts weapons with type 1.

Code: [Select]
craftWeapons:
  - type: STR_CRAFTWEAPON_TYPE #default config ...
    weaponType: 1 #default value 0.
Title: Re: Hunter-killer
Post by: Yankes on February 12, 2018, 09:28:28 pm
Meridian,

I've created a page to explain OXCE+ rulesets on the UFOPaedia.org for modder reference. I've already added the hunter-killer info you posted:

https://www.ufopaedia.org/index.php/Ruleset_Reference_OXCE%2B_(OpenXcom) (https://www.ufopaedia.org/index.php/Ruleset_Reference_OXCE%2B_(OpenXcom))

I'm going to try to add the rest of the features listed on other pages, or at least those I'm using for Tech-Com at the moment.

EDIT - While compiling OXCE+ ufo, craft and craftWeapons sections on the wiki, using the info on this link: https://github.com/Yankes/OpenXcom/blob/OpenXcomExtended/Extended.txt,  I came up with a couple of questions that you might be able to clarify about the new features:
* sightRange - appears to be hardcoded and used for both ufos and crafts, but OXCE allows craftWeapons to give a bonus to this value. There's no indication of what it is used for - is this the range to detect bases (either alien or xcom)?
* Are craft/ufo "sightRange" and "marker" hardcoded?
bug in documentation, both UFO and XCrafts can modify `sightRange`, all things defined in `craftWeapons`->`stats` can be used in craft and ufo too (but some are not used).
Title: Re: Hunter-killer
Post by: Meridian on February 17, 2018, 09:35:29 pm
Second batch of new directly and indirectly related features:

Feature 1: Fixed and unhardcoded UFO and craft custom geoscape markers

Now you can give your hunter-killers various different geoscape globe markers if you want.

Code: [Select]
extraSprites:
  - type: GlobeMarkers
    width: 63
    height: 3
    subX: 3
    subY: 3
    files:
      0: Resources/Geoscape/GLOBE_UFO_AREA51.PNG
crafts:
  - type: STR_SKYRANGER
    marker: 10
ufos:
  - type: STR_MEDIUM_SCOUT
    marker: 11
alienDeployments:
  - type: STR_TERROR_MISSION
    markerIcon: 12

Feature 2: Removed the recently added "allowAlienBaseDetection" flag... just use "sightRange: 0" instead for the same effect

Feature 3: Save the crew when attacked by a hunter-killer and destroyed

- craft is lost
- HWPs are lost
- equipment is lost

- fighter pilots manage to eject just in time
- transport crew jumps out (with parachutes)

- and they take the normal transport back to base
(same as when they were hired)

Feature 4: Small tweak to craft attraction formula

- when hunting interceptors, consider number of soldiers too,
so that if both (interceptor and transport) are allowed to land and there are no pilots and no damage taken on anyone,
HK still correctly switches to interceptor (i.e. craft with less people onboard) and stops hunting the transport (craft with more people onboard)

Feature 5: User option to allow escorting friendly craft

With this option turned on, you can now tell your interceptors to follow your transports, for example.

The escort will fly at max speed until it reaches the escortee and then it will match speed with the escortee.

It will also consume less fuel while escorting, based on escortee's speed... but not less than 50% and not more than 100%.
I.e. interceptor speed = 7000, transport speed = 2000
When escorting, the interceptor will consume fuel based on speed 3500 (because speed 2000 was below 50% of 7000)

Btw. 50% fuel consumption is also used when patroling, for those who didn't know that.

Feature 6: Two new flags to keep the craft after a failed mission

- one on craft ruleset (e.g. to simulate paratroopers)
- one on alien deployment ruleset (e.g. to simlaute craft not waiting for you during escape missions)

Code: [Select]
alienDeployments:
  - type: STR_EXALT_COVERT_EXTRACTION
    keepCraftAfterFailedMission: true
crafts:
  - type: STR_DROPSHIP
    keepCraftAfterFailedMission: true

Download: https://lxnt.wtf/oxem/builds//ExtendedPlus/Extended+-3.10a-5bac9c2-2018-02-17-win32.7z
Title: Re: Hunter-killer
Post by: Hobbes on February 17, 2018, 09:59:06 pm
Feature 3: Save the crew when attacked by a hunter-killer and destroyed

- craft is lost
- HWPs are lost
- equipment is lost

- fighter pilots manage to eject just in time
- transport crew jumps out (with parachutes)

- and they take the normal transport back to base
(same as when they were hired)

Had already thought of something similar but I'd define a chance (50%?) for every pilot/transport crew to survive the ejection and the return back to base. Pilots do get killed when their aircraft is destroyed in firefights.
Title: Re: Hunter-killer
Post by: Meridian on February 17, 2018, 10:22:00 pm
Had already thought of something similar but I'd define a chance (50%?) for every pilot/transport crew to survive the ejection and the return back to base. Pilots do get killed when their aircraft is destroyed in firefights.

Yes, it's a good question.
There are many scenarios and probably all make sense.

I thought about it relatively long... and at the end I just went by the famous Warboy's quote "i hate the player and i want him dead, but i don't want to piss him off"

My thoughts:
 - player pays with craft and equipment... it's quite enough
 - there is no difference between 10% chance and 90% chance... with both you will lose your A-team if the campaign is long enough (for 90%, you lose your team every 10th time, which is more often than you can train them)
 - most players just rage-quit if something like this happens... I don't want to be the one they curse for eternity

If you still want that chance :) please let me know, where it should be defined, e.g.:
- global
- or per ufo type
- or per craft type
- or something else
and I will add it, it's easy.
Default value will however be 100% survival chance.

And is it per soldier or per whole team?

Also, how (if at all) would you like to inform the player if and who survived:
- status bar in dogfight?
- popup window after dogfight
- something else?
- not at all

Please note this affects only dogfights, where you are attacked by a HK... i.e. in vanilla encounters, you still lose everything. But there you also have the option to abort any time you want.

I'd love to hear other people's opinions too.

Completely alternative option is to make the "Eject" button... and let the user decide if they want to eject or not... but who would not want to eject?
Title: Re: Hunter-killer
Post by: Ethereal on February 17, 2018, 10:42:19 pm
Feature 2: Removed the recently added "allowAlienBaseDetection" flag... just use "sightRange: 0" instead for the same effect

But this is in vain. In many mods, there are radar modules for the  "sightRange" aircrafts, and thanks to them, the bases will be able to discover those ships that should not do this. A big request to return the option in the next update.

For the rest - many thanks!
Title: Re: Hunter-killer
Post by: Meridian on February 17, 2018, 10:46:48 pm
But this is in vain. In many mods, there are radar modules for the  "sightRange" aircrafts, and thanks to them, the bases will be able to discover those ships that should not do this. A big request to return the option in the next update.

I don't understand.

There is "radarRange" and there is "sightRange".

I didn't change radar range at all.
And sight range is used only for base detection, nothing else, so everything is fine.

Or in other words... I didn't change anything... I just removed the option, because it was already possible to do it differently and with the same effect.

If you still disagree, please explain what you meant exactly.
Title: Re: Hunter-killer
Post by: Ethereal on February 17, 2018, 10:55:24 pm
I don't understand.

There is "radarRange" and there is "sightRange".

I didn't change radar range at all.
And sight range is used only for base detection, nothing else, so everything is fine.

Or in other words... I didn't change anything... I just removed the option, because it was already possible to do it differently and with the same effect.

If you still disagree, please explain what you meant exactly.

No, not the same. I use additional radar with a bonus to both "radarRange" and "sightRange". They are, to a greater extent, for special, reconnaissance aviation and are intended for the purpose of finding bases. "allowAlienBaseDetection" was for me a very good option that allowed to disconnect from the reconnaissanc of certain ships.
Title: Re: Hunter-killer
Post by: Meridian on February 17, 2018, 11:05:29 pm
No, not the same. I use additional radar with a bonus to both "radarRange" and "sightRange". They are, to a greater extent, for special, reconnaissance aviation and are intended for the purpose of finding bases. "allowAlienBaseDetection" was for me a very good option that allowed to disconnect from the reconnaissanc of certain ships.

You mean you have additional craft weapons that increase sightRange?

Well, then just set "sightRange: -1000000" (or any big negative number you like) on the craft and even these additional weapons will have no effect.

Title: Re: Hunter-killer
Post by: Ethereal on February 17, 2018, 11:18:00 pm
You mean you have additional craft weapons that increase sightRange?

Well, then just set "sightRange: -1000000" (or any big negative number you like) on the craft and even these additional weapons will have no effect.

Okay. It works. Thanks for the help.
Title: Re: Hunter-killer
Post by: Hobbes on February 17, 2018, 11:36:50 pm
Yes, it's a good question.
There are many scenarios and probably all make sense.

I thought about it relatively long... and at the end I just went by the famous Warboy's quote "i hate the player and i want him dead, but i don't want to piss him off"

Amen.

How about, "pilots die while allowing the passengers to eject"? This is only used if there are pilots, otherwise all crew survives and returns home after some days.
Title: Re: Hunter-killer
Post by: Ethereal on February 17, 2018, 11:48:57 pm
Concerning the escort.
The ship can be directed to itself. In this case, it freezes on the spot and it's not clear what is involved. On the base, of writing, he escorts, and in fact he escorts himself!   :D
Title: Re: Hunter-killer
Post by: Meridian on February 17, 2018, 11:58:10 pm
Concerning the escort.
The ship can be directed to itself. In this case, it freezes on the spot and it's not clear what is involved. On the base, of writing, he escorts, and in fact he escorts himself!   :D

Lol, good point :)
I'll fix that in the next version.

But basically at the moment it behaves the same way as patrolling, just with full fuel consumption.
Title: Re: Hunter-killer
Post by: Ethereal on February 18, 2018, 07:54:39 am
No, the escort is useless. If the Hunter-Killer hunts for transport, then he destroys the transport, and the escort safely flies to the base after that, with a sense of accomplishment. That's delirium! There should not be such a thing! If the Hunter-Killer is impatient to attack the transport, then for starters he will have to fight with the fighter guarding him. And at once with all. In the later stages of the game this does not matter, and at the start of the game there are no fighters that would be faster than a UFO, and therefore to intercept the enemy and save transportation is impossible in such conditions. Sense of this escort then?

"keepCraftAfterFailedMission:"
It is possible more in detail, how it to apply? With the presence or absence of this parameter in the "alienDeployments:" or "crafts:" no changes found.
Title: Re: Hunter-killer
Post by: Meridian on February 18, 2018, 09:16:01 am
No, the escort is useless. If the Hunter-Killer hunts for transport, then he destroys the transport, and the escort safely flies to the base after that, with a sense of accomplishment. That's delirium! There should not be such a thing! If the Hunter-Killer is impatient to attack the transport, then for starters he will have to fight with the fighter guarding him. And at once with all. In the later stages of the game this does not matter, and at the start of the game there are no fighters that would be faster than a UFO, and therefore to intercept the enemy and save transportation is impossible in such conditions. Sense of this escort then?

Escort is a way to follow a craft... without you having to click a million times.
The hunter-killer will attack who you as a modder configure him to attack... I'm not guilty of that (by default an interceptor).
And even if he would like to attack the transport first, you have a fast interceptor nearby and can attack him first.

In my opinion, everything is fine, the modder can decide what happens, and the player has to do a lot less clicks.

"keepCraftAfterFailedMission:"
It is possible more in detail, how it to apply? With the presence or absence of this parameter in the "alienDeployments:" or "crafts:" no changes found.

"keepCraftAfterFailedMission: true"
Title: Re: Hunter-killer
Post by: Ethereal on February 18, 2018, 09:28:30 am
Escort is a way to follow a craft... without you having to click a million times.
The hunter-killer will attack who you as a modder configure him to attack... I'm not guilty of that (by default an interceptor).
And even if he would like to attack the transport first, you have a fast interceptor nearby and can attack him first.

In my opinion, everything is fine, the modder can decide what happens, and the player has to do a lot less clicks.

But at the start of the game, the UFO is faster than the interceptor. Click, do not click, but the transport will be attacked first, since the interceptor can not catch up with the UFO. Let it be, at least, the escort participates in the battle with the UFO along with the transport that it guards.

"keepCraftAfterFailedMission: true"

I do not know. Can not understand. I do not see any effect at all.
Title: Re: Hunter-killer
Post by: Meridian on February 18, 2018, 09:40:53 am
But at the start of the game, the UFO is faster than the interceptor. Click, do not click, but the transport will be attacked first, since the interceptor can not catch up with the UFO.

Configure hunt mode to 0 and it will attack the interceptor first.
For example:

Code: [Select]
ufos:
  - type: STR_LARGE_SCOUT
    hunterKillerPercentage: 100
    huntMode: 0  # prefer attacking interceptors

Let it be, at least, the escort participates in the battle with the UFO along with the transport that it guards.

Maybe. I'll have a look if it is possible. Can't promise.

I do not know. Can not understand. I do not see any effect at all.

The effect is that if you lose a battlescape mission (for example everybody gets killed)... you will not lose the craft.
Title: Re: Hunter-killer
Post by: Ethereal on February 18, 2018, 09:49:48 am
Configure hunt mode to 0 and it will attack the interceptor first.

I use hunters for interceptors and hunters for transports. Both are inscribed in narrative.

The effect is that if you lose a battlescape mission (for example everybody gets killed)... you will not lose the craft.

It's clear. Got it. Thank you.
Title: Re: Hunter-killer
Post by: Eddie on February 18, 2018, 04:11:20 pm
Completely alternative option is to make the "Eject" button... and let the user decide if they want to eject or not... but who would not want to eject?

An eject button makes sense if it allows you to save more soldiers/equipment than the default behaviour. For example for interceptors, again if chance of survival is not 100% when craft is destroyed.

Another scenario:
Say survival chance of a crash is not 100%. If you see a HK coming for your transport then you can choose if you want to take the chance of a fight. If the transport has enough firepower, you might win the fight and save everything but at the risk of crew death if the fight goes badly. If the transport is unarmed/too weak anyway, wouldn't you try to land somewhere before the HK catches you? Abandon the transport, possibly saving some equipment (all that you can carry)?
That would need an "abandon ship" button in the craft screen. Then you generate a battlescape where you can put equipment on your soldiers. After three rounds or something, the battlescape ends and all items on the ground are lost. The crew with carried equipment is transferred to a "crew on foot" craft (like the expedition in piratez) that makes it's way home at reduced speed and is immune to interception.
Less work to code would be to just change the craft to a foot patrol, with all equipment saved.

Edit: spelling
Title: Re: Hunter-killer
Post by: efrenespartano on February 18, 2018, 07:59:58 pm


Feature 5: User option to allow escorting friendly craft

With this option turned on, you can now tell your interceptors to follow your transports, for example.

The escort will fly at max speed until it reaches the escortee and then it will match speed with the escortee.

It will also consume less fuel while escorting, based on escortee's speed... but not less than 50% and not more than 100%.
I.e. interceptor speed = 7000, transport speed = 2000
When escorting, the interceptor will consume fuel based on speed 3500 (because speed 2000 was below 50% of 7000)

Btw. 50% fuel consumption is also used when patroling, for those who didn't know that.


Hi, Meridian! Just a question: when this new features are going to be updated for the Android version? The last update was v2018-01-31 and I really want to try it on my phone. This update, (2018-01-31) does have the Hunter-Killer behavior?

Thank you very much for all of your work! ¡Un fuerte abrazo desde México!
Title: Re: Hunter-killer
Post by: Meridian on February 18, 2018, 08:14:33 pm
Hi, Meridian! Just a question: when this new features are going to be updated for the Android version?

In 1-2 weeks.
Title: Re: Hunter-killer
Post by: efrenespartano on February 18, 2018, 08:43:50 pm
In 1-2 weeks.

Awesome, thank you!
Title: Re: Hunter-killer
Post by: Meridian on February 18, 2018, 10:08:11 pm
A few more features:

Feature 1: Simplified and optimized craft attraction formula

- number of pilots doesn't matter anymore
- maximum craft speed now matters (when hunting interceptors, prefer fast craft over slow... when transports, slow over fast)

So together:
1. first priority: can land vs. cannot land
2. second priority: has soldiers vs. doesn't have soldiers .... full capacity matters, not actual number of people on board
3. third priority: slow vs. fast

Bugfix 2: Fixed fuel consumption when escorting

- only decrease fuel consumption when in escort range (moddable, default is 20 nautical miles)

Bugfix 3: Fixed a craft being able to escort itself

Feature 4: Fighter craft that are near the HK's target will now JOIN the fight

- this feature can be disabled by a global flag
- "near" = 20 nautical miles by default (moddable)
- only craft with at least one loaded weapon will join
- HK first targets the original target, after the target is destroyed (or escaped), it just targets "random" next target

Code: [Select]
escortRange: 20                    # default, nautical miles
escortsJoinFightAgainstHK: true    # default, set to false if you want to balance HK's for one-on-one fights

Feature 5: Two new global variables for pilot/crew survival chances when shot down by a HK

- by default both are 100%

Code: [Select]
crewEmergencyEvacuationSurvivalChance: 100      # default
pilotsEmergencyEvacuationSurvivalChance: 100    # default

Download: https://lxnt.wtf/oxem/builds//ExtendedPlus/Extended+-3.10a-5e505aa-2018-02-18-win32.7z
Title: Re: Hunter-killer
Post by: Ethereal on February 18, 2018, 10:51:31 pm
A few more features:

Feature 1: Simplified and optimized craft attraction formula

- number of pilots doesn't matter anymore
- maximum craft speed now matters (when hunting interceptors, prefer fast craft over slow... when transports, slow over fast)

And as a result, in the original game, the hunter of interceptors will chase the Avenger, and the hunter of transports will chase the Fire Storm. With the old system was more correct.

On the other hand, how do aliens know that people have transport, and what is an interceptor?

Of course, can rebalance the characteristics. However, please, return the old system of determining goals by the number of passengers. At least as an option.

Thanks for the update.

P.S. In general, it seems to me, it's time to introduce 2 global variables for aviation - "Transport" and "Interceptor", that would determine their status (The interceptor can't do ground missions, as in "allowLanding: false".). And the hunter is oriented easier, and the players.
Title: Re: Hunter-killer
Post by: Hobbes on February 18, 2018, 11:28:15 pm
A few more features:

Thank you :)

Code: [Select]
crewEmergencyEvacuationSurvivalChance: 100      # default
pilotsEmergencyEvacuationSurvivalChance: 100    # default

EDIT: I set it to 75 both, I didn't understood before that these were global settings, thanks!
Title: Re: Hunter-killer
Post by: Meridian on February 19, 2018, 12:04:10 am
And as a result, in the original game, the hunter of interceptors will chase the Avenger, and the hunter of transports will chase the Fire Storm. With the old system was more correct.

No.
Why do you tell me I'm an idiot EACH time I make a post?
Have you tested it?
I have implemented the fucking thing... I KNOW how it works, damnit.

In the original game, for example when hunting interceptors, it will hunt in the following order of preference:
1. Firestorm (score 1'095'800)
2. Interceptor (score 1'097'900)
3. Lightning (score 1'608'900)
4. Skyranger (score 1'613'240)
5. Avenger (score 1'620'600)

Avenger is clearly the last priority.

On the other hand, how do aliens know that people have transport, and what is an interceptor?

They can read minds? Literally.
They have transports and fighters too?
They have IQ higher than 5?

Of course, can rebalance the characteristics. However, please, return the old system of determining goals by the number of passengers. At least as an option.

It's still there... read again please.

Thanks for the update.

Man, you pissed me off.
Thanks!

P.S. In general, it seems to me, it's time to introduce 2 global variables for aviation - "Transport" and "Interceptor", that would determine their status (The interceptor can't do ground missions, as in "allowLanding: false".). And the hunter is oriented easier, and the players.

That's what the frikkin "allowLanding" flag is for.
Title: Re: Hunter-killer
Post by: Ethereal on February 19, 2018, 07:07:29 am
It's still there... read again please.

Man, you pissed me off.

Comrade, what translates to me, this stupid online machine, then I understand. And do not be angry. Without knowledge of the language, it is monstrous difficult to me to understand all this.
Title: Re: Hunter-killer
Post by: Hobbes on February 19, 2018, 04:06:21 pm
Comrade, what translates to me, this stupid online machine, then I understand. And do not be angry. Without knowledge of the language, it is monstrous difficult to me to understand all this.

Tovarishch, you understand the language well enough to make requests and disagree with Meridian's choices, da? :)

Meridian is angry with your attitude, not minimize his emotions by telling not to be angry and blaming the computer translation. You may not have intention to offend, but comrade Meridian is not a machine who can ignore his own emotions.

Suggestion to improve communication - do not judge quickly changes introduced by Meridian. You may have valid argument, but disagreeing from the start is usually bad way to present your argument on discussions here.

Finally, what is mod of yours that you're developing? Can we download it?
Title: Re: Hunter-killer
Post by: Ethereal on February 19, 2018, 05:36:35 pm
Finally, what is mod of yours that you're developing? Can we download it?

Of course (https://openxcom.org/forum/index.php/topic,5724.0.html). But the version is too old. As soon as the problem with tanks is solved there (https://openxcom.org/forum/index.php/topic,4187.msg92371.html#msg92371), will be an update.

Title: Re: Hunter-killer
Post by: Kammerer on February 19, 2018, 05:55:54 pm
This bug is already fixed in the latest version: https://github.com/MeridianOXC/OpenXcom/commit/108b504b2f331121009e11c0814f9743e3d172c2

And I can only agree with Hobbes. If you don't understand how an in-game mechanic works, first you should at least try and test it. If you need a better translation of release notes, try asking for help - there's a lot of Russians here who could help you.
Title: Re: Hunter-killer
Post by: Meridian on February 19, 2018, 07:16:06 pm
This bug is already fixed in the latest version: https://github.com/MeridianOXC/OpenXcom/commit/108b504b2f331121009e11c0814f9743e3d172c2

That's a different bug.

The bug with tanks not being able to go on higher ground has not been fixed yet.
Title: Re: Hunter-killer
Post by: Kammerer on February 19, 2018, 07:22:59 pm
Ah, OK, sorry for the misinformation.
Title: Re: Hunter-killer
Post by: Meridian on February 20, 2018, 10:26:16 pm
One more bigger feature:

Allow HKs to escort/protect other (normal) UFOs from the same mission

Aliens can now also tell their UFOs to escort and protect other UFOs... hunter-killer can escort, normal UFOs can be escorted.
Escort works only for UFOs from the same mission.
Definition is just a flag on the mission wave, for example:

Code: [Select]
alienMissions:
  - type: STR_ALIEN_RESEARCH
    waves:
      - ufo: STR_SMALL_SCOUT
        count: 1
        trajectory: P0
        timer: 10
        hunterKillerPercentage: 0
      - ufo: STR_MEDIUM_SCOUT
        count: 1
        trajectory: P2
        timer: 10
        hunterKillerPercentage: 100
        escort: true                    # medium scout will escort the small scout
      - ufo: STR_LARGE_SCOUT
        count: 2
        trajectory: P4
        timer: 10
        hunterKillerPercentage: 100
        escort: true                    # two large scouts will also escort the small scout, because only normal UFOs can be escorted (the medium is HK, not normal UFO)

@Ethereal: I have reverted some changes related to HWPs... they should now be able to go uphill... mostly. But it's not a final fix yet.

Download: https://lxnt.wtf/oxem/builds//ExtendedPlus/Extended+-3.10a-e0505e2-2018-02-20-win32.7z
Title: Re: Hunter-killer
Post by: efrenespartano on February 21, 2018, 02:21:11 pm


One more bigger feature:

Allow HKs to escort/protect other (normal) UFOs from the same mission

Aliens can now also tell their UFOs to escort and protect other UFOs... hunter-killer can escort, normal UFOs can be escorted.
Escort works only for UFOs from the same mission.

Actually, this is a nice feature, Meridian! So, this means our interceptors maybe could encounter more than 1 UFO with the same mission? This could encourage us to scramble our interceptors in squadrons, not just only 1 lonely fighter. I like this very much, thank you!


Enviado desde mi Blade A510 mediante Tapatalk

Title: Re: Hunter-killer
Post by: Ethereal on February 21, 2018, 09:01:44 pm
@Ethereal: I have reverted some changes related to HWPs... they should now be able to go uphill... mostly. But it's not a final fix yet.

I confirm - the error is corrected. Thanks for the update.
Title: Re: Hunter-killer
Post by: Ethereal on February 23, 2018, 05:21:08 pm
It seems that the options "hunterKillerPercentage:" and "escort:" do not work in the supply missions of alien base. Please check.
Title: Re: Hunter-killer
Post by: Meridian on February 23, 2018, 07:24:51 pm
It seems that the options "hunterKillerPercentage:" and "escort:" do not work in the supply missions of alien base. Please check.

Yes, supply mission UFOs cannot become hunter-killers.
Also, the last UFO of the retaliation mission (the one that attacks your base) cannot become a hunter-killer.

That's by design... these UFOs have special designation... and are not affected by these flags.
Title: Re: Hunter-killer
Post by: Ethereal on February 23, 2018, 08:54:31 pm
Yes, supply mission UFOs cannot become hunter-killers.
Also, the last UFO of the retaliation mission (the one that attacks your base) cannot become a hunter-killer.

That's by design... these UFOs have special designation... and are not affected by these flags.

It's a pity. Supply ships in the escort and need the most. It would be correct if the Hunter-killer guarded the cargo ship of supply.
Title: Re: Hunter-killer
Post by: Meridian on February 23, 2018, 11:13:18 pm
It's a pity. Supply ships in the escort and need the most. It would be correct if the Hunter-killer guarded the cargo ship of supply.

I'll have a look if I can force at least non-primary-objective UFOs from supply missions to hunt... maybe.
Title: Re: Hunter-killer
Post by: Meridian on February 23, 2018, 11:24:17 pm
One last big feature set, after this I plan only small tweaks and bugfixes... unless someone will have a brilliant new idea.

Feature 1: Allowed alien missions to spawn multiple UFOs at once

Until now, alien mission could spawn only 1 UFO every 30 minutes, regardless if the timer was set to zero and regardless if multiple UFOs were defined in the same wave.
Now, if timer is zero, next UFO(s) will spawn immediately.

Please note there is still a mandatory initial delay of 30 minutes between alien mission creation and first UFO generation.
This limit will NOT apply to "base hunt missions", see feature 4 at the bottom... but it does apply to all other missions.

Feature 2: Allowed alien bases to spawn mission sites

The mission would spawn even before this change, but it would not be able to finish its objective, i.e. create a terror/mission site... instead the UFO would just land.
Now the UFO gets correctly converted into a terror/mission site.

Feature 3: Allowed alien bases to stop generating supply/gen missions after reaching a limit

Supply missions (resp. "genMissions") can now stop after a limit is reached.

Code: [Select]
alienDeployments:
  - type: STR_ALIEN_BASE_ASSAULT
    genMission:
      STR_ALIEN_SUPPLY: 100
    genMissionFreq: 6
    genMissionLimit: 4                 # new attribute, allows specifying how many genMissions can be spawned in total by one base, default 1000

Feature 4: Alien bases can now scan for xcom craft and generate hunt missions

Besides supply missions (resp. "genMissions"), the base can also create "hunt missions".
The base can now have following parameters, defined on alienDeployment:
- radar range
- radar chance
- hunt mission distribution, based on months passed and with weights
- hunt mission maximum frequency

Scan is done every 10 minutes.
If an xcom craft is detected, hunt mission is generated.
Another mission can be generated only after a delay specified by max frequency (e.g. 5 hours).

UFOs start/spawn at the base location.
Exception are supply missions and last UFO of the retaliation mission, which start at their usual locations, not at the base location.

You can see base radar range on the globe, if the base was discovered already.
I recommend setting base radar range to 80-90% of the HK radar range... otherwise HKs would stop hunting immediately,
because they follow normal hunting logic... i.e. stop hunting if there is nothing in their radar range.

Code: [Select]
alienDeployments:
  - type: STR_ALIEN_BASE_ASSAULT
    genMission:                        # this is still supported, both supply/gen missions and hunt missions can be generated independently
      STR_ALIEN_SUPPLY: 100
    genMissionFreq: 6                  # this is still supported
    genMissionLimit: 4                 # new attribute, allows specifying how many genMissions can be spawned in total by one base, default 1000
#
    baseDetectionRange: 600            # base radar range, in nautical miles
    baseDetectionChance: 50            # base radar chance (once every 10 minutes), in percent
    huntMissionMaxFrequency: 300       # generate hunt mission max every 300 minutes (= 5 hours)
    huntMissionWeights:                # which hunt mission to generate, based on months passed and weights
      0:
        STR_ALIEN_RESEARCH: 100
        STR_ALIEN_HARVEST: 0
        STR_ALIEN_ABDUCTION: 0
      1:
        STR_ALIEN_RESEARCH: 60
        STR_ALIEN_HARVEST: 30
        STR_ALIEN_ABDUCTION: 10
      3:
        STR_ALIEN_RESEARCH: 40
        STR_ALIEN_HARVEST: 30
        STR_ALIEN_ABDUCTION: 30
      5:
        STR_ALIEN_RESEARCH: 20
        STR_ALIEN_HARVEST: 30
        STR_ALIEN_ABDUCTION: 50
      7:
        STR_ALIEN_RESEARCH: 5
        STR_ALIEN_HARVEST: 20
        STR_ALIEN_ABDUCTION: 75

Download: https://lxnt.wtf/oxem/builds//ExtendedPlus/Extended+-3.10a-776a6df-2018-02-23-win32.7z
Title: Re: Hunter-killer
Post by: robin on February 23, 2018, 11:31:05 pm
cut
Amazing!
I have a dumb question: I noticed a download link at the bottom, is this a separate exe from OXCE+?
Title: Re: Hunter-killer
Post by: Meridian on February 23, 2018, 11:40:27 pm
Amazing!
I have a dumb question: I noticed a download link at the bottom, is this a separate exe from OXCE+?

No, these links are OXCE+
I just update the "official" OXCE+ download link less often... once a new version is ready and at least a bit tested.
The links at the bottom of my posts here are "snapshots" (or "nightlies" or "previews") or whatever we want to call them :)
Title: Re: Hunter-killer
Post by: Hobbes on February 24, 2018, 12:21:27 am
Skynet appreciates your efforts in securing its bases. You shalt not be terminated :D
Title: Re: Hunter-killer
Post by: Ethereal on February 24, 2018, 11:39:16 am
About the escorts of supply ships - the need has disappeared.  Now the very fact of the presence of the alien base can be turned into a serious problem for the player. Even missions without UFOs are generated. Now, and without supply convoys, it will be not boring, to put it mildly.

Thanks for the update!

One last big feature set, after this I plan only small tweaks and bugfixes... unless someone will have a brilliant new idea.

The idea was here already voiced. Stealth Generators. And for the ships "C-COM", and for the Hunter-Killer. This requires that "radarChance:" work for UFOs. At the moment it does not work.
Title: Re: Hunter-killer
Post by: Meridian on February 24, 2018, 11:53:15 am
The idea was here already voiced. Stealth Generators. And for the ships "C-COM", and for the Hunter-Killer. This requires that "radarChance:" work for UFOs. At the moment it does not work.

With the current implementation of hunting, radarChance doesn't make much sense on UFOs... hunter-killers are scanning every 5 seconds... so even if you set the chance to just 1%, they will still find you in only 8 minutes in average.

Alien bases have radar chance, but they are scanning every 10 minutes, not every 5 seconds.
Title: Re: Hunter-killer
Post by: Meridian on February 24, 2018, 02:10:33 pm
A few more tweaks to escorts and a build for Android:

Feature 1: All escorts now spawn at their escortee's current location

Feature 2: Base supply ships can now also be escorted by HKs

Code: [Select]
alienMissions:
  - type: STR_ALIEN_SUPPLY
    points: 0
    objective: 5
    raceWeights: {} #Special case, race comes from base.
    waves:
      - ufo: STR_SUPPLY_SHIP
        count: 1
        trajectory: P9
        timer: 0
        objective: true                 # cannot become a HK/escort
      - ufo: STR_LARGE_SCOUT
        count: 2
        trajectory: P9
        timer: 0
        hunterKillerPercentage: 100
        escort: true
        objective: false                # can become a HK/escort

Download for Windows: https://drive.google.com/open?id=1f5D_YF0ADK8IphQ7YOYAR2LgwCAXefvU
Download for Android: https://drive.google.com/open?id=128eGtMuY9stDc3H1gnzJLq5llyF2UgXo
Title: Re: Hunter-killer
Post by: Ethereal on February 24, 2018, 03:27:22 pm
It was wonderful. Now in my mod almost every second UFO is a Hunter-killer, bases of aliens are spammed with terror and retaliation, and the most long-range weapon, which was almost a cheat, became rather ordinary. Thank you so much!

One request - when the Hunter-killer intercepts the, the pilot's bonus on the speed of approach is taken into account. I understand that the aliens are telepathic, but not so much! Let the approach speed be the standard for all who are attacked by the Hunter.
Title: Re: Hunter-killer
Post by: Hobbes on March 12, 2018, 08:35:17 pm
Feature 2: Allowed alien bases to spawn mission sites

The mission would spawn even before this change, but it would not be able to finish its objective, i.e. create a terror/mission site... instead the UFO would just land.
Now the UFO gets correctly converted into a terror/mission site.

This will eventually be documented on the wiki but if you are using escort HKs on terror mission sites generated by bases, you'll need to set the code like this to properly work:

Code: [Select]
alienMissions:
  - type: STR_SKYNET_INTERDICTION
    waves:
      - ufo: STR_HK_TRANSPORT_1
        count: 1
        trajectory: T7
        timer: 15000
        objective: true
      - ufo: STR_HK_FIGHTER_1
        count: 1
        timer: 10
        trajectory: T0
        objective: true
        escort: true

The escort (STR_HK_FIGHTER_1) also requires objective: true for the terror site to appear
Title: Re: Hunter-killer
Post by: Nord on March 22, 2018, 07:48:14 am
A little question: what about tftd encounters over land?
Title: Re: Hunter-killer
Post by: Meridian on March 22, 2018, 03:43:10 pm
A little question: what about tftd encounters over land?

I allowed them when UFO attacks XCOM, not the other way around.
Title: Re: Hunter-killer
Post by: Meridian on May 07, 2018, 09:44:20 pm
In next version, there will be a user option to turn on/off HKs radar circles.
Flight paths (lines) will still be visible.

Modders can also decide to enforce this setting as usual.
Title: Re: Hunter-killer
Post by: robin on June 23, 2018, 11:04:50 am
Trying this feature with the "escort" flag:
is it normal that ufos fly exactly on top, like stacked, of each other?
also if one ufo is downed, the other stay still (like stuck) over the crash site.
finally, no radar circle is drawn despite having the option enabled.
Version 3.10a 2018-05-19

I'm probably doing something wrong.

  - type: STR_ALIEN_DROP_XSMALL
    points: 4
    objective: 3
    siteType: STR_DROP_MISSION_SMALL
    spawnZone: 3
    raceWeights: *raceWeightsAlienDrop
    waves:
      - ufo: STR_UFO_PROBE
        count: 1
        trajectory: P1
        timer: 15000
        hunterKillerPercentage: 0
        escort: false
      - ufo: STR_UFO_SCOUT
        count: 1
        trajectory: P1
        timer: 10
        hunterKillerPercentage: 0
        escort: false
      - ufo: STR_UFO_PROBE
        count: 1
        trajectory: P0
        timer: 10
        hunterKillerPercentage: 100
        escort: true
      - ufo: STR_UFO_PROBE
        count: 1
        trajectory: P1
        timer: 10
        hunterKillerPercentage: 100
        escort: true
      - ufo: STR_UFO_SCOUT
        count: 1
        trajectory: P7
        timer: 10
        objective: true
        hunterKillerPercentage: 0
        escort: false

(Actually i wanted to add an ufo probe after the last ufo scout, as its escort, but then the terror site is not generated).
i guess this:
[...]
The escort (STR_HK_FIGHTER_1) also requires objective: true for the terror site to appear
is the solution to the last bit... unless it's a supply mission in which case it must be false
Title: Re: Hunter-killer
Post by: Ethereal on June 23, 2018, 12:40:39 pm
finally, no radar circle is drawn despite having the option enabled.

Radius of radars in UFOs should be indicated in the characteristics of the UFOs themselves.

Code: [Select]
  - type: STR_SMALL_SCOUT
    radarRange: 600

  - type: STR_HARVESTER
    radarRange: 700

Etc.
Title: Re: Hunter-killer
Post by: Meridian on June 23, 2018, 01:09:39 pm
Trying this feature with the "escort" flag:
is it normal that ufos fly exactly on top, like stacked, of each other?
also if one ufo is downed, the other stay still (like stuck) over the crash site.
finally, no radar circle is drawn despite having the option enabled.
Version 3.10a 2018-05-19

I'm probably doing something wrong.

(Actually i wanted to add an ufo probe after the last ufo scout, as its escort, but then the terror site is not generated).
i guess this:is the solution to the last bit... unless it's a supply mission in which case it must be false

1/ it is normal that UFOs fly exactly on top of each other (that's how escorting works)... you can maybe make the second UFO tiny little bit slower to show some distance, but it may accumulate a lot over longer distances and if the first one starts slowing down, it will catch up anyway

2/ if one is shot down, the other should attack you immediately, no? but yeah, it is a scenario I probably didn't think of and will need to be addressed

3/ no radar circles is weird, probably radarRange is missing as Ethereal said

4/ mission spawning I have to check too... I might be that only the last UFO can spawn a mission
Title: Re: Hunter-killer
Post by: Solarius Scorch on June 23, 2018, 07:00:34 pm
2/ if one is shot down, the other should attack you immediately, no? but yeah, it is a scenario I probably didn't think of and will need to be addressed

The surviving UFO should commence a rescue mission, of course. ;)
Title: Re: Hunter-killer
Post by: Ethereal on June 23, 2018, 07:31:49 pm
2/ if one is shot down, the other should attack you immediately, no? but yeah, it is a scenario I probably didn't think of and will need to be addressed

Yes, it's time to think about fighting with several UFOs at the same time. and simultaneously equalize the speed at UFO escort (which would check the speed of both the escort and the escorted ship, so that a slower escort would not lag behind the one whom it should accompany (With the supply mission, everything is in order. With the rest, the speed is different.)).
Title: Re: Hunter-killer
Post by: Meridian on June 23, 2018, 07:59:46 pm
Yes, it's time to think about fighting with several UFOs at the same time.

That's not what I meant.
And I explained already twice why this is never going to happen, I won't repeat myself again...

and simultaneously equalize the speed at UFO escort (which would check the speed of both the escort and the escorted ship, so that a slower escort would not lag behind the one whom it should accompany (With the supply mission, everything is in order. With the rest, the speed is different.)).

Just make escorts quicker... that's how it works in real life and the only way it makes sense.
Faster craft escort slower craft... fighter jets escort freighters... freighters don't escort fighter jets.

What scenario do you have for zeppellins escorting a millenium falcon?
Title: Re: Hunter-killer
Post by: Ethereal on June 23, 2018, 08:29:39 pm
Just make escorts quicker... that's how it works in real life and the only way it makes sense.
Faster craft escort slower craft... fighter jets escort freighters... freighters don't escort fighter jets.

It's clear. Simply in the original, the larger the UFO, the higher its speed. And to simulate the escort of large transports by light fighters is difficult. Probably will have to change the concept.

What scenario do you have for zeppellins escorting a millenium falcon?

I did not quite understand, or rather did not understand at all, about the connection of zeppelins with falcons, but oh well.

Yes, one remark, with "huntBehavior: 1". If HK attacks a patrolling ship with an escort, then after the attacker HK is destroyed, and the patrolling and his escort, without orders and notifications, begin to return to the base.
Title: Re: Hunter-killer
Post by: Meridian on June 23, 2018, 08:32:10 pm
@robin: I can't find any issues with stuck HKs... maybe it's because of missing radarRange? Can you try again after you give them radarRange and if you still have issues, give me a save or a video or something for me to see how you did it...?
Title: Re: Hunter-killer
Post by: The Reaver of Darkness on June 23, 2018, 09:36:41 pm
It's clear. Simply in the original, the larger the UFO, the higher its speed. And to simulate the escort of large transports by light fighters is difficult. Probably will have to change the concept.
In real life, it makes sense for the larger UFOs to be faster. They will be dealing with intense fluid dynamics at those speeds, and larger craft will have less resistance relative to their mass. But a smaller craft could potentially keep up with it if it were to fly in its wake.

So to simulate this realism, you could design a small craft which is only to be used as an escort, which is able to fly as fast as what it escorts.
Title: Re: Hunter-killer
Post by: Ethereal on June 24, 2018, 08:58:34 am
@robin: I can't find any issues with stuck HKs... maybe it's because of missing radarRange? Can you try again after you give them radarRange and if you still have issues, give me a save or a video or something for me to see how you did it...?

And I understood what's wrong. At HK escort the goal is to accompany a certain UFO and attack the X-COM aircraft in the range of the radar. If the escorted ship has crashed or landed, the escort hangs over it. When the principal completed the mission and flew away, only then the escort mission ends. HK also flies but after a while. In missions (RESEARCH, HARVEST, ABDUCTION), the escort ship, after the disappearance of the main ship, begins to carry out the same mission (something is looking for, landing), and only then flies away.

I do not think that there is anything to correct. So even more interesting. Especially if it is not visible circles enemy radar and do not know that the landed ship - HK, and you guide defenseless transport on him.  :D It would be nice if the HK was to take off for the attack.
Title: Re: Hunter-killer
Post by: Meridian on June 25, 2018, 12:03:19 pm
(Actually i wanted to add an ufo probe after the last ufo scout, as its escort, but then the terror site is not generated).

This is a bug in vanilla... that a terror site is not generated.

When determining the ufos's "wave", it takes the last wave number, not the one that should be saved with the ufo.
E.g. when you spawn 5 UFOs in 5 waves all at the same time... each UFO will have wave 5... instead of having waves 1,2,3,4,5.

I will talk to Warboy if he wants to fix it... if not I will probably fix it in OXCE+.
Title: Re: Hunter-killer
Post by: robin on June 25, 2018, 09:57:06 pm
@robin: I can't find any issues with stuck HKs... maybe it's because of missing radarRange? Can you try again after you give them radarRange and if you still have issues, give me a save or a video or something for me to see how you did it...?
I think that could be the cause. Will test as soon as I can.
Title: Re: Hunter-killer
Post by: Meridian on July 29, 2018, 10:46:09 am
(Actually i wanted to add an ufo probe after the last ufo scout, as its escort, but then the terror site is not generated).

This is a bug in vanilla... that a terror site is not generated.

When determining the ufos's "wave", it takes the last wave number, not the one that should be saved with the ufo.
E.g. when you spawn 5 UFOs in 5 waves all at the same time... each UFO will have wave 5... instead of having waves 1,2,3,4,5.

I will talk to Warboy if he wants to fix it... if not I will probably fix it in OXCE+.

This will be fixed in the next OXCE+ version.

Just to explain again, UFOs with "objective: true" (e.g. terror mission ship or base supply ship) needed to be the last ones in the mission definition.

Now, you can put more waves after this "last" UFO if you want (for example some HK escorts) and it will still work.

PS: you can even have multiple UFOs with "objective: true" now in the same mission and spawn 7 terror sites at once :P
Title: Re: [DONE] [Feedback] [Documentation] Hunter-killer
Post by: Meridian on October 14, 2018, 02:42:42 pm
Two small updates:

1. Since OXCE 5.1 2018-10-14, the hunt missions will not start from the alien base, until you explicitly say so. On the good side, if you say so, they will not only take off from the base, but also land back in the base.

Code: [Select]
alienMissions:
  - type: STR_MY_HUNT_MISSION
    operationType: 6    # hunt mission

This is a breaking change, please update your mods!
For more info, see here: https://openxcom.org/forum/index.php/topic,6557.msg104669.html#msg104669



2. Reaver wanted the retargeting of hunter-killers to have more delay.

A new global parameter hunterKillerFastRetarget has been added:

Code: [Select]
hunterKillerFastRetarget: false     # default is true

"false" means that HKs retarget only once every 10 minutes

"true" means that HKs retarget every 5 seconds when you are in slow mode (buttons "5Sec" and "1Min"), in other modes only once every 10 minutes
Title: Re: [DONE] [Feedback] [Documentation] Hunter-killer
Post by: Meridian on January 12, 2019, 05:30:48 pm
Two more updates:

1. HKs don't attack craft returning from a mission anymore.

Because the player cannot redirect the craft and avoid HKs and/or enemy base.

2. HKs can instantly destroy defenseless craft when player presses the red self-destruct button.

Defenseless means:
- slower than the UFO
- has no more ammo left
- there are no more active (still flying) projectiles
Title: Re: [DONE] [Feedback] [Documentation] Hunter-killer
Post by: ohartenstein23 on January 12, 2019, 05:54:37 pm
How does the 'defenseless' feature interact with multiple interceptors? For example, your transport is guarded by an interceptor armed with a slow-firing missile - in-between shots of that missile, it sounds like the transport would fulfill all three of those criteria and get hit pretty hard, even though the escort is readying to fire again.
Title: Re: [DONE] [Feedback] [Documentation] Hunter-killer
Post by: Meridian on January 12, 2019, 06:35:12 pm
How does the 'defenseless' feature interact with multiple interceptors? For example, your transport is guarded by an interceptor armed with a slow-firing missile - in-between shots of that missile, it sounds like the transport would fulfill all three of those criteria and get hit pretty hard, even though the escort is readying to fire again.

Alright, back to manually activated self-destruct button then...
Title: Re: [DONE] [Feedback] [Documentation] Hunter-killer
Post by: Ethereal on January 12, 2019, 06:46:20 pm
Alright, back to manually activated self-destruct button then...

Taran, of course, preferable, in the absence of the ship X-COM opportunities to return fire(only when a single intercept - not a group). If that's the only way, let there be self-destruction.
Title: Re: [DONE] [Feedback] [Documentation] Hunter-killer
Post by: ohartenstein23 on January 12, 2019, 06:47:57 pm
Sorry to burst your bubble on it. I like the idea of the "going in for the kill" feature on defenseless craft, but with the fact that the dogfight windows are agnostic of each other makes it hard to check for escorts.

Can we get pointers to the other craft from the GeoscapeState somehow? We could then check for player craft that are targeting the transport, at the same location, and in a dogfight, to see if the transport is escorted.

Edit: Oh, we can check for other player craft from _game->getSavedGame(), right?
Title: Re: [DONE] [Feedback] [Documentation] Hunter-killer
Post by: Meridian on January 12, 2019, 08:09:52 pm
Button added, original post updated.
Title: Re: [DONE] [Feedback] [Documentation] Hunter-killer
Post by: Meridian on May 14, 2020, 01:08:45 pm
Update: since OXCE v6.5 the hunter-killers with "huntBehavior: 1" will fight until they reach 0% of their HP.

Until now they fought until 50% of their HP, same like other UFOs (but were destroyed instead of crashed).
Title: Re: [DONE] [Feedback] [Documentation] Hunter-killer
Post by: Nord on October 13, 2021, 08:59:59 am
Hint:
For custom GlobeMarkers to work, you need to delete the old rule,
Code: [Select]
extraSprites:
  - delete: GlobeMarkers
Discovered here (https://openxcom.org/forum/index.php/topic,10192.0.html).
Title: Re: [DONE] [Feedback] [Documentation] Hunter-killer
Post by: Meridian on January 21, 2022, 03:38:36 pm
New feature since OXCE 7.4.4

Supply missions and Hunt missions generated by alien bases can now use also explicitly defined alien race(s)... until now the race always came from the alien base itself.

Attributes `genMissionRaceFromAlienBase` and `huntMissionRaceFromAlienBase`.

Example for supply missions:

Code: [Select]
alienDeployments:
  - type: STR_ALIEN_BASE_ASSAULT
    genMission:
      STR_ALIEN_SUPPLY: 25
      STR_ALIEN_TEST1: 25
      STR_ALIEN_TEST2: 25
      STR_ALIEN_TEST3: 25
    genMissionFreq: 6
    genMissionRaceFromAlienBase: false    # true (default) = take race from base (vanilla behavior); false = take from mission 'raceWeights' if not empty (if empty take from base)

Code: [Select]
alienMissions:
  - type: STR_ALIEN_SUPPLY
    raceWeights:
      0:
        STR_ETHEREAL: 50
        STR_MUTON: 50

Hunt missions work similarly.
Title: Re: [DONE] [Feedback] [Documentation] Hunter-killer
Post by: psavola on August 22, 2022, 12:54:41 pm
Two more updates:

1. HKs don't attack craft returning from a mission anymore.

Because the player cannot redirect the craft and avoid HKs and/or enemy base.

I just noticed (2022-08-16) that if your craft runs out of fuel for whatever reason and is forced to return to the base going through an alien base territory, hunter-killer will spawn and destroy the craft.

The player cannot redirect the craft at that point, but has somewhat more control so that the crafts don't run out of fuel in a location where the return route goes through dangerous territory. But it still makes me wonder if this scenario should also be an exception?

Title: Re: [DONE] [Feedback] [Documentation] Hunter-killer
Post by: Solarius Scorch on August 22, 2022, 03:03:54 pm
The player cannot redirect the craft at that point, but has somewhat more control so that the crafts don't run out of fuel in a location where the return route goes through dangerous territory. But it still makes me wonder if this scenario should also be an exception?

Not really my call, but I agree that such craft should also be immune to hunter killers.
One could say "you should have minded the fuel", but... it's really a long shot, not really workable.
Title: Re: [DONE] [Feedback] [Documentation] Hunter-killer
Post by: Meridian on August 22, 2022, 09:44:27 pm
Done.
Title: Re: [DONE] [Feedback] [Documentation] Hunter-killer
Post by: psavola on February 13, 2023, 07:35:26 am
An observation: a returning craft through base radar range apparently still triggers the hunter-killer (but it won't appear on the globe unless there are other crafts nearby). If another craft is detected outside the radar range, the hunter-killer will attack it instead.

So this results in HK attacking a second craft which would not have triggered on its own. Is this also a scenario that should have been excepted (i.e. the HK won't spawn at all based on returning craft)?

In the attached screenshot, the craft returning to the base appeared to trigger the HK from the base. Triton accompanied by an escort was well away from the base or HK detection range, heading a round-about route to the landed UFO. The HK targeted the escort right away, even though it was outside its or base's detection range. I don't really grasp how this kind of "out of range targeting" could occur.. Does the spawned HK "invisibly" follow the returning craft and thus expand its detection range, for example? Attached is a save from TWoTS 2.56.
Title: Re: [DONE] [Feedback] [Documentation] Hunter-killer
Post by: Meridian on February 13, 2023, 03:16:02 pm
A returning craft is ignored by hunter-killer UFOs.

It is not ignored by the alien base. The alien base can still create a new mission when somebody flies by.

This is also your case.
A new mission was generated, the generated HK has ignored the returning craft and happily continued flying around until it found your patrolling crafts and attacked them.
Title: Re: [DONE] [Feedback] [Documentation] Hunter-killer
Post by: Meridian on April 09, 2023, 04:02:00 pm
Since OXCE v7.8.16, craft returning after mission or low on fuel will not trigger alien base hunt missions.

Reason 1: it is possible to abuse this to player's advantage
Reason 2: less confusion in situations similar to what happened above