OpenXcom Forum

Modding => OXCE Bugs => OpenXcom Extended => OXCE Bugs from OXC => Topic started by: The Martian on May 02, 2022, 07:11:34 am

Title: "maxRange" on items causes frozen alien units? (OXC and OXCE)
Post by: The Martian on May 02, 2022, 07:11:34 am
OpenXcom Extended Version: 7.5.7 (v2022-03-07)

I've noticed that if I add maxRange: to a weapon and give it to an enemy unit they just stop moving when they come into sight range of an X-Com unit instead of closing the distance and firing.

Here is an example mod that makes all the alien weapons have a setting of maxRange: 9.
Test_maxRange.zip (https://openxcom.org/forum/index.php?action=dlattach;topic=10536.0;attach=56746)

Code: [Select]
items:

  - type: STR_SONIC_CANNON
    maxRange: 9

  - type: STR_SONIC_BLASTA_RIFLE
    maxRange: 9

  - type: STR_SONIC_PISTOL
    maxRange: 9

  - type: STR_DISRUPTOR_PULSE_LAUNCHER
    maxRange: 9

  - type: STR_THERMAL_SHOK_LAUNCHER
    maxRange: 9


This unit can see X-Com soldiers, and hasn't moved for 3 turns:
(https://openxcom.org/forum/index.php?action=dlattach;topic=10536.0;attach=56747)

There are other alien units in similar frozen states as well at the time of the screenshot which is where the
"Attack type=12 target=(24,18,0) weapon=STR_DISRUPTOR_PULSE_LAU..." debug message is most likely coming from.

Here is an even better example, If I reduce the maxRange: to 1 this unit is stuck in place and I can walk soldiers right up to it and it never tries to move forward:
(https://openxcom.org/forum/index.php?action=dlattach;topic=10536.0;attach=56749)
Title: Re: [Bug] maxRange: on items causes frozen alien units?
Post by: Meridian on May 02, 2022, 10:58:15 am
This is a known OpenXcom issue.

Please report to OXC devs.