OpenXcom Forum

OpenXcom Forks => OpenXcom Extended (OXCE) => OXCE Suggestions DONE => Topic started by: Meridian on February 04, 2022, 03:12:01 pm

Title: [DONE] Units ignored by the AI
Post by: Meridian on February 04, 2022, 03:12:01 pm
Units (aliens and civilians) can now be marked as "ignoredByAI".

This will make AI ignore them.

Currently it has the following effects:
1. aliens will not attack ignored civilians
2. civilians will not attack ignored aliens :D
3. civilians will not react to ignored aliens
(4. aliens can't react to civilians in OXC either, so this was not necessary to implement)

Tip for modders: you can use this for example to better implement a hostage rescue mission... enemies will not attack the hostages (at least not directly)

Example:

Code: [Select]
units:
  - type: STR_HOSTAGE
    ignoredByAI: true        # default is false

PS: I tested the most common situations, but I can't guarantee that all situations are covered... should you notice that in some situations it's not working, report it
Title: Re: [DONE] Units ignored by the AI
Post by: The Martian on February 05, 2022, 07:05:09 am
This is a feature I will definitely be putting to use.

I've been having to make a few non-combatant units be part of the alien faction so the AI wouldn't automatically gun them down, but then the player was getting the wrong feedback when they spotted the 'hostile' unit and was shooting them anyway.

Thank you for adding this!!! (https://openxcom.org/forum/Themes/InsidiousV1-k/images/post/thumbup.gif)