aliens

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

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9098
    • View Profile
[DONE] [Feedback] [Documentation] Hunter-killer
« 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!


« Last Edit: July 17, 2018, 01:57:42 pm by Meridian »

Offline Hobbes

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

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9098
    • View Profile
Re: Hunter-killer
« Reply #2 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"
« Last Edit: September 21, 2017, 09:27:08 pm by Meridian »

Offline Yankes

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

Offline Hobbes

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

Offline wolfreal

  • Colonel
  • ****
  • Posts: 298
    • View Profile
Re: Hunter-killer
« Reply #5 on: September 22, 2017, 03:13:24 am »
This is awesome!. So much possibilities!.

Offline Nord

  • Commander
  • *****
  • Posts: 1746
  • The Gate is open.
    • View Profile
Re: Hunter-killer
« Reply #6 on: September 22, 2017, 05:55:01 am »
It is... wonderful!
It opens entire new level of gameplay.

Offline SIMON BAILIE

  • Commander
  • *****
  • Posts: 676
    • View Profile
Re: Hunter-killer
« Reply #7 on: September 22, 2017, 06:12:57 am »
Yes it would add a very good new dimension to openxcom.

Offline Meridian

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

Offline Hobbes

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

Offline Nord

  • Commander
  • *****
  • Posts: 1746
  • The Gate is open.
    • View Profile
Re: Hunter-killer
« Reply #10 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.

Offline ivandogovich

  • Commander
  • *****
  • Posts: 2381
  • X-Com Afficionado
    • View Profile
    • Ivan Dogovich Youtube
Re: Hunter-killer
« Reply #11 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.

Offline Yankes

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

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1512
    • View Profile
Re: Hunter-killer
« Reply #13 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.
« Last Edit: September 22, 2017, 10:27:43 pm by The Reaver of Darkness »

Offline Hobbes

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