Dismount Loop & Run Over Prevention System

If you liked this item, please rate it up on Steam Workshop page.

Author: Atlas

Last revision: 8 Apr at 02:09 UTC (2)

File size: 492.43 KB

On Steam Workshop

Description:

===========================================================================
Dismount Loop & Run Over Prevention System
===========================================================================

A fully autonomous and customizable AI enhancement mod that prevents mechanized/motorized infantry from
entering frustrating dismount/remount loops and getting killed by vehicles running them over. This mod realistically improves the handling of combat for these groups exclusively. A fix for a vanilla bug that’s been present for more than 10 years!
https://feedback.bistudio.com/T81303

Unpopular opinion, low level AI mods (Lambs, DCO and the likes) are generally buggy and only worth it in some applications. They will sometimes break scenarios, waypoints and many other things. On top of that, they are generally difficult for other mod devs to work around. That said, I’ll do my best to accommodate users of those mods. However, I can’t and will not assure compatibility for all mods. Check the compatibility list below.

"Honestly, this is a must have and there’s no-downsides whatsoever to have it running" -Klean

"I’ve been waiting for this mod since 2013!" -Mickey

Created as a script for my scenario then ported as a mod. https://steamcommunity.com/sharedfiles/filedetails/?id=3412763627

===========================================================================
COMPATIBILITY
===========================================================================
Please tell me in the comments if you have compatibility data on any popular mod or scenario!

– Works with SP, MP, Dedicated Server, Headless Client
– No dependencies required (CBA_A3 required if you want to tweak settings)
– Does not modify vanilla group configs

MODS:

– Compatible with: ACE3, Lambs_Danger, DCO, ASR_AI3, CF_BAI, isky’s A.I Skill Tweaks, HAL-NR6, ALiVE, ArmA Commander, Zeus, Project Injury Reaction, Ren’s AI behavior modification.

– Most likely compatible with but untested: Antistasi, Vindicta, Overthrow

– Untested and probably will conflict with: BCombat

– NOT COMPATIBLE: VCOM
===========================================================================
FEATURES
===========================================================================

– FULLY AUTONOMOUS: Works automatically on any mission, no setup required
– Optimized code and very low performance impact.
– Applies protection to all infantry units when hit by vehicles of the same side.
– Only manages "organic" mech/motor infantry where driver and cargo are same group.
– Prevents AI infantry from immediately re-boarding after dismounting
– Prevents vehicles from abandoning their troops
– Forces crew (driver/gunner/commander) to stay in vehicle
– Controlled disembark: Infantry only dismounts when enemies detected (3+)
– Vehicle speed management: Keeps APCs with dismounted infantry
– Vehicle stops if infantry falls behind (>75m)
– Auto-remount after 60 seconds without combat to allow for vehicle travel
– Urban area detection: Won’t remount in cities
– Player-led squads excluded from behavior management
– Headless Client / Multiplayer compatible
– Zero dependencies

===========================================================================
CONFIGURATION (Optional)
===========================================================================
You can override settings if you have CBA loaded in Addon Options

OR

You can override settings in your mission’s init.sqf BEFORE the mod initializes.
Add these lines at the TOP of your init.sqf:

// General
DPS_ENABLED = true; // Enable/disable DPS (can toggle mid-mission)
DPS_DEBUG = false; // Show debug messages in RPT

// Timing
DPS_CHECK_INTERVAL = 10; // Main coordination check interval (seconds)
DPS_AUTO_REMOUNT_DELAY = 60; // Seconds without combat before auto-remount
DPS_EMBARK_COOLDOWN = 45; // Minimum seconds between embark attempts
DPS_DISMOUNT_COOLDOWN = 30; // Minimum seconds between dismount triggers
DPS_BEHAVIOR_COOLDOWN = 45; // Cooldown for behavior changes

// Speed (km/h)
DPS_SPEED_COMBAT = 3; // Speed when infantry in combat
DPS_SPEED_AWARE = 5; // Speed when infantry aware
DPS_MAX_INFANTRY_DISTANCE = 75; // Distance before vehicle stops (meters)

// Combat & Threat Detection
DPS_THREAT_RANGE = 300; // Range to detect enemies (meters)
DPS_MIN_ENEMIES_DISMOUNT = 3; // Min enemies to trigger controlled dismount

// Controlled Disembark
DPS_CONTROLLED_DISEMBARK = true; // Enable controlled disembark system

// Urban Detection
DPS_URBAN_CHECK = true; // Enable urban area detection
DPS_URBAN_RADIUS = 75; // Urban check radius (meters)
DPS_URBAN_MIN_BUILDINGS = 5; // Min buildings for "urban" area

// Friendly Run-over Protection
DPS_RUNOVER_PROTECTION = true; // Enable friendly run-over protection
DPS_RUNOVER_INVULN_TIME = 10; // Seconds of invulnerability after run-over

// Crew Bailout
DPS_HEAVY_DAMAGE_THRESHOLD = 0.75; // Vehicle damage (0-1) to allow crew bailout

// Healing
DPS_HEAL_LEGS_ON_EMBARK = true; // Heal AI leg damage when re-boarding

// Vehicle types (which vehicles to manage)
DPS_VEHICLE_TYPES = ["APC", "Car", "Tank", "Wheeled_APC_F", "Tracked_APC", "MRAP"];

===========================================================================
PUBLIC FUNCTIONS (For Mission Makers)
===========================================================================

Force allow remount:
[vehicle1, vehicle2] call DPS_fnc_allowRemount;

Force controlled disembark:
[vehicle] call DPS_fnc_controlledDisembark;

Check if vehicle is organic mech infantry:
private _isOrganic = [vehicle] call DPS_fnc_isOrganicMechInfantry;

===========================================================================
TROUBLESHOOTING
===========================================================================

Q: Infantry won’t remount after combat
A: Check if they’re in an urban area (5+ buildings). Urban areas prevent
auto-remount. Use: [vehicle] call DPS_fnc_allowRemount; to force it.

Q: Vehicles not being managed
A: DPS only manages "organic" mech infantry where driver and cargo are same
group. Transport vehicles (different groups) are ignored by design.

Q: Debug messages
A: Set DPS_DEBUG = true; in your init.sqf to see what’s happening.

Q: Helicopters/aircraft being affected
A: This was fixed in v2.3. Aircraft are now excluded entirely.

Q: Infantry dismounting on their own in combat
A: v2.3 uses setUnloadInCombat + disableAI "AUTOCOMBAT" to prevent this.
If issues persist, check for conflicting AI mods.

===========================================================================
CREDITS
===========================================================================

Author: AtlasActual
License: APL-SA

===========================================================================

Download
Revisions:

Old revisions of this mod are available below. Click the link to download.