Page MenuHomeFeedback Tracker

Situation where AI don't engage properly if player is more than ~150m away
Assigned, NormalPublic

Description

I have a modded mission where AI either don't shoot at each other, or shoot so infrequently that combat practically never resolves.

I have modified The AI somewhat (code below):

  • (based on unarmed prefab)
  • only using pistols
  • AI Steering Max distance to path = 5
  • danger evetn range 250
  • LOD distance 1200
  • 50m hearing perception
  • Obstacle Avoidance on

Details

Severity
Minor
Resolution
Open
Reproducibility
N/A
Operating System
Windows 10 x64
Category
General
Steps To Reproduce

I have a mod that exemplifies the issue: https://github.com/da-ding/wacky-reforger-royale, with dependency https://github.com/da-ding/reforger-shared-utils, containing the following changes.

2 levels of custom prefab for AI:

SCR_ChimeraCharacter : "{98EB9CDD85B8C92C}Prefabs/Characters/Factions/OPFOR/USSR_Army/Character_USSR_Unarmed.et" {
 ID "528AED06AB0ECD29"
 components {
  AIControlComponent "{520EA1D2DB109F34}" {
   components {
    AICharacterMovementComponent "{520EA1D2DB109F01}" {
     ObstacleAvoidance 1
    }
    PerceptionComponent "{54A2CBC75F06064B}" {
     SensorsList {
      EarsSensor "{520EA1D2DB109AA9}" {
       HearingDistance 50
      }
     }
    }
    SCR_AICombatComponent "{55A2C9BE343B2EA1}" {
     m_eAISkillDefault EXPERT
    }
   }
  }
  BaseWeaponManagerComponent "{520EA1D2F659CE5D}" {
   DefaultWeaponIndex 2
  }
  CharacterWeaponSlotComponent "{520EA1D2F659CFDC}" {
   WeaponTemplate "{C0F7DD85A86B2900}Prefabs/Weapons/Handguns/PM/Handgun_PM.et"
  }
  SCR_InventoryStorageManagerComponent "{520EA1D2DB118DE5}" {
   InitialInventoryItems {
    ItemsInitConfigurationItem "{54A4D05608012D36}" {
     PrefabsToSpawn {
      ""
     }
    }
    ItemsInitConfigurationItem "{56607B902B535037}" {
     PrefabsToSpawn {
      "{13772C903CB5E4F7}Prefabs/Items/Equipment/Maps/PaperMap_01_folded.et" "{E1A5D4B878AA8980}Prefabs/Items/Equipment/Radios/Radio_R148.et"
     }
    }
    ItemsInitConfigurationItem "{5888EBE3A98AF2CB}" {
     PrefabsToSpawn {
     }
    }
   }
  }
 }
 coords 11023.155 26.243 11664.993
}
SCR_AIGroup : "{CB58D90EA14430AD}Prefabs/Groups/OPFOR/Group_USSR_SentryTeam.et" {
 ID "0000000000000001"
  AIGroupMovementComponent "{55C4E4E28D6EA047}" {
   ObstacleAvoidance 1
  }
 components {
  AIGroupSteeringComponent "{55C4E4E29127F05A}" {
   "Max Distance to Path" 5
  }
  SCR_AIConfigComponent "{512CC1759AE69D6D}" {
   m_Skill 0.725
  }
 }
 DangerEventRange 250
 DynamicSim_Lod1_distance 1200
 m_aUnitPrefabSlots {
  "{6A4D671F9F9A0D18}Prefabs/Characters/Factions/OPFOR/USSRArmy/Character_USSR_Pistol_WRR.et" "{6A4D671F9F9A0D18}Prefabs/Characters/Factions/OPFOR/USSRArmy/Character_USSR_Pistol_WRR.et" "{6A4D671F9F9A0D18}Prefabs/Characters/Factions/OPFOR/USSRArmy/Character_USSR_Pistol_WRR.et"
 }
}

Add to character group:

SCR_AIGroup : "{CB58D90EA14430AD}Prefabs/Groups/OPFOR/Group_USSR_SentryTeam.et" {
 ID "0000000000000001"
  AIGroupMovementComponent "{55C4E4E28D6EA047}" {
   ObstacleAvoidance 1
  }
 components {
  AIGroupSteeringComponent "{55C4E4E29127F05A}" {
   "Max Distance to Path" 5
  }
  SCR_AIConfigComponent "{512CC1759AE69D6D}" {
   m_Skill 0.725
  }
 }
 DangerEventRange 600
 DynamicSim_Lod1_distance 1200
 m_aUnitPrefabSlots {
  "{6A4D671F9F9A0D18}Prefabs/Characters/Factions/OPFOR/USSRArmy/Character_USSR_Pistol_WRR.et" "{6A4D671F9F9A0D18}Prefabs/Characters/Factions/OPFOR/USSRArmy/Character_USSR_Pistol_WRR.et" "{6A4D671F9F9A0D18}Prefabs/Characters/Factions/OPFOR/USSRArmy/Character_USSR_Pistol_WRR.et"
 }
}

US version similarly constructed.
In the workbench, create a scenario with these groups and place them together. In GameMaster mode, fly a few hundred metres away. Watch the "battle" for a while. Move in closer, at some point they should suddenly start shooting, and one team will all die after not too long.

Additional Information

I briefly tested this in GM mode, but couldn't replicate it in the same way that I can in my scenario.

I tested this with DangerEventRange and LOD distance as a few values (much smaller, much larger), and I didn't notice change in either, but it's probably worth double checking just in case.

Event Timeline

da-ding created this task.Aug 9 2022, 11:13 AM
da-ding updated the task description. (Show Details)
da-ding edited Steps To Reproduce. (Show Details)Aug 9 2022, 11:41 AM
Geez changed the task status from New to Assigned.Aug 30 2022, 1:29 PM