aliens

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

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8578
    • View Profile
Re: Hunter-killer
« Reply #105 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).

Offline Hobbes

  • Commander
  • *****
  • Posts: 2101
  • Infiltration subroutine in progress
    • View Profile
Re: Hunter-killer
« Reply #106 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 :)
« Last Edit: February 08, 2018, 12:19:42 am by Hobbes »

Offline Ethereal

  • Commander
  • *****
  • Posts: 612
    • View Profile
Re: Hunter-killer
« Reply #107 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.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8578
    • View Profile
Re: Hunter-killer
« Reply #108 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

Offline Ethereal

  • Commander
  • *****
  • Posts: 612
    • View Profile
Re: Hunter-killer
« Reply #109 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.


Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8578
    • View Profile
Re: Hunter-killer
« Reply #110 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...
« Last Edit: February 10, 2018, 09:43:50 pm by Meridian »

Offline Ethereal

  • Commander
  • *****
  • Posts: 612
    • View Profile
Re: Hunter-killer
« Reply #111 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.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8578
    • View Profile
Re: Hunter-killer
« Reply #112 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.

Offline Hobbes

  • Commander
  • *****
  • Posts: 2101
  • Infiltration subroutine in progress
    • View Profile
Re: Hunter-killer
« Reply #113 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)

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
« Last Edit: February 11, 2018, 05:59:40 pm by Hobbes »

Offline Ethereal

  • Commander
  • *****
  • Posts: 612
    • View Profile
Re: Hunter-killer
« Reply #114 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.
« Last Edit: February 11, 2018, 07:28:26 pm by Ethereal »

Offline Yankes

  • Commander
  • *****
  • Posts: 3185
    • View Profile
Re: Hunter-killer
« Reply #115 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)

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).

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8578
    • View Profile
Re: Hunter-killer
« Reply #116 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

Offline Hobbes

  • Commander
  • *****
  • Posts: 2101
  • Infiltration subroutine in progress
    • View Profile
Re: Hunter-killer
« Reply #117 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.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8578
    • View Profile
Re: Hunter-killer
« Reply #118 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?
« Last Edit: February 17, 2018, 10:29:58 pm by Meridian »

Offline Ethereal

  • Commander
  • *****
  • Posts: 612
    • View Profile
Re: Hunter-killer
« Reply #119 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!
« Last Edit: February 17, 2018, 10:47:08 pm by Ethereal »