ALiVEOS / ALiVE.OS

ALiVE Open Source GPL v2
http://alivemod.com/
Other
160 stars 80 forks source link

AI Attack helicopters don't respawn/resupply #803

Closed Bellends closed 12 months ago

Bellends commented 1 year ago

Prerequisites

Description

I created a dynamic mission on Takistan (CUP) Between 2 slightly edited versions of CUP factions (USMC vs TakistanArmy) the only things i changed through orbat were the camouflages of USMC as i couldn't get them to spawn with their desert camo, and takistan army tank classes because i felt they were a little op. Everything seems to be in working order with my mission besides that ai helicopters on both sides don't resupply, my manually placed attack helicopters are used until they are destroyed and then never replaced again.

i was hoping that there was some code i could put into Staticdata.sqf and init, as i edited these for this mission to allow logistics vehicles to be faction specific (uh60 and ch47 for usmc, mi8 and mi8mt for TA) and figured this might have something to do with it, but upon retesting this mission without these custom files nothing changed.

Note that planes continue to spawn and carry out air support tasks, respawning even after being destroyed, its the helicopters that don't

Init.sqf: `call compile preprocessFile "staticData.sqf";

if(isServer) then { waitUntil {!isNil "ALiVE_STATIC_DATA_LOADED"}; call compile (preprocessFileLineNumbers "staticData.sqf"); };`

Staticdata.sqf: `if (!isServer) exitWith {};

waitUntil {!isNil "ALiVE_STATIC_DATA_LOADED"};

ALIVE_factionDefaultTransport = [] call ALIVE_fnc_hashCreate; [ALIVE_factionDefaultTransport, "CUP_O_TKI", ["CUP_O_V3S_COVERED_TKA","CUP_O_URAL_EMPTY_TKA"]] call ALIVE_fnc_hashSet; [ALIVE_factionDefaultTransport, "CUP_B_USMCDES", ["CUP_B_MTVR_USMC"]] call ALIVE_fnc_hashSet;

ALIVE_factionDefaultAirTransport = [] call ALIVE_fnc_hashCreate; [ALIVE_factionDefaultAirTransport, "CUP_O_TKI", ["O_Takistan_Mi_6T_Hook_01","O_Takistan_MI_8MT_01"]] call ALIVE_fnc_hashSet; [ALIVE_factionDefaultAirTransport, "CUP_B_USMCDES", ["B_United_States_of_AmericaArmy_CH_53E_Super_Stallion_DES_01","B_United_States_of_AmericaArmy_MH_60S_Seahawk_M3M_DES_01"]] call ALIVE_fnc_hashSet;`

Steps to Reproduce

  1. Mil Logistics module, tried with both side and faction/faction only, all available reinforcements with infinite pool & dynamic reinforcements type
  2. Linked to mil ai commander, (constant reinforcement type, often intel, faction override CUP_0_TKI (Custom faction classname)
  3. ai commander is linked to 1 mil and 1 civ objective in combat zone (both objective only) ai commander is also linked to Air component commander
  4. everything in Air component commander is set to yes beside persistence. faction overide is CUP_O_TKI again, all available ATO's correct airspace markers (a total of 2, one over the airport and another over the combat zone
  5. 4 manually placed mi24d attack helicopters linked with the air component commander, and virualised via link with virutal ai module
  6. 2 placed and unlinked mil and civ objectives for starting position (mil obective has place air units and supply units set to yes but i rarely see any of these vehicles spawn in.)
  7. the placement of empty helipads on both faction sides to allow the spawning of helicopters (none do)

Expected behavior: [What you expected to happen] Either the manually placed helicopter units to respawn/resupply after a certain amount of time after being destroyed or AI commander automatically continues to resupply these units and place them elsewhere

Actual behavior: [What actually happened] manually placed attack Helicopters are used and once destroyed will no longer respawn, ai commander will never use attack helicopters again, only logistics based helicopters for reinforcement.

I'm sorry if this is a little messy Ive tried to be as thorough as i could, its my first time doing this, thanks for reading.

DarrellJMartin commented 1 year ago

Please try with vanilla units. Would not be able to reproduce without a list of addons used. Please also provide the mission file and a session rpt with ATO module set to debug.

DarrellJMartin commented 12 months ago

Tested in vanilla (cba_a3 & ALiVE) and working fine.