Author Topic: [DONE][Suggestion] Alien use Proximity Grenade  (Read 1469 times)

Offline Ethereal

  • Commander
  • *****
  • Posts: 684
    • View Profile
[DONE][Suggestion] Alien use Proximity Grenade
« on: April 04, 2024, 09:04:03 am »
At the moment, the aliens are not using Proximity Grenade at all. Let the AI regard them as ordinary grenades and use them. Just need to be careful so that the AI does not stop regarding the activated Proximity Grenade as a threat.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9084
    • View Profile
Re: [Suggestion] Alien use Proximity Grenade
« Reply #1 on: April 28, 2024, 05:24:39 pm »
todolisted

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9084
    • View Profile
Re: [Suggestion] Alien use Proximity Grenade
« Reply #2 on: August 15, 2024, 01:43:38 pm »
Found some bugs during implementation:

1. OXCE-only: AI could use only the first grenade in the inventory. If this grenade was unavailable (due to turn restriction), it didn't try another grenade.

(OXC doesn't have item-based turn-restrictions, so this bug is irrelevant for OXC.)

Fixed.
https://github.com/MeridianOXC/OpenXcom/commit/e1898b5f3cd68efc06ef41719c5db2e515a1270c

2. OXC and OXCE: AI cannot throw a grenade on a tile without a unit: https://openxcom.org/forum/index.php?topic=12145.0

Temporarily fixed in OXCE only: https://github.com/MeridianOXC/OpenXcom/commit/36668d2fa811a76cb4205a3549973c89f57003f6
Waiting for OXC feedback.

3. OXC and OXCE: there is a small inconsistency in throw trajectory validation and throw trajectory execution: https://openxcom.org/forum/index.php?topic=12147.0

Not fixed yet.
To be investigated.
« Last Edit: August 15, 2024, 01:48:27 pm by Meridian »

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9084
    • View Profile
Re: [DONE][Suggestion] Alien use Proximity Grenade
« Reply #3 on: August 15, 2024, 01:45:40 pm »
Done.

AI can now use proxies.

They start using them on turn 999 by default :)

If you want them to start using proxies sooner, use the following ruleset:

Code: [Select]
ai:
  aiUseDelayProxy: 1   # start using proxies already on turn 1

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9084
    • View Profile
Re: [DONE][Suggestion] Alien use Proximity Grenade
« Reply #4 on: August 15, 2024, 01:46:20 pm »
Sample video attached.

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11721
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: [DONE][Suggestion] Alien use Proximity Grenade
« Reply #5 on: August 15, 2024, 03:18:12 pm »
Splendid! :)