Author Topic: "maxRange" on items causes frozen alien units? (OXC and OXCE)  (Read 2291 times)

Offline The Martian

  • Commander
  • *****
  • Posts: 754
  • "It implores you to listen to its arguments..."
    • View Profile
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

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:
Spoiler:

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:
Spoiler:
« Last Edit: February 12, 2023, 04:47:50 pm by Meridian »

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9092
    • View Profile
Re: [Bug] maxRange: on items causes frozen alien units?
« Reply #1 on: May 02, 2022, 10:58:15 am »
This is a known OpenXcom issue.

Please report to OXC devs.