Hi guys it's me again.
So I've got a question about the Military Logistics module. After I finished my mission with Alive (WW2 based), it worked perfectly on a test that I hold yesterday but for one thing: the reinforcement infantry called by the German commander came in on a vanilla truck. On my search for fixing this I ran onto this code posted in this forum: https://pastebin.com/rJv0rqcF
After tinkering for a while (I'm pretty bad at scripting), I made myself this code:
/* * Custom transport,support, and ammo classes for factions * Used by MP,MCP,ML to place support vehicles and ammo boxes * If no faction specific settings are found will fall back to side */ /* * Mil placement ambient vehicles for sides */ waitUntil {!isNil "ALiVE_STATIC_DATA_LOADED"}; ALIVE_sideDefaultSupports = [] call ALIVE_fnc_hashCreate; [ALIVE_sideDefaultSupports, "EAST", ["O_RU_ZiS_5V_Repair_01","O_RU_ZiS_5V_Fuel_01","O_RU_GAZ_AA_Sapper_car_ifa3_01","O_RU_Prestamo_yarriendo_Jeep_01"]] call ALIVE_fnc_hashSet; // ,"Box_East_AmmoVeh_F" [ALIVE_sideDefaultSupports, "WEST", ["B_DE_Kbelwagen_01","B_DE_Kubelwagen_camo_01","B_BDEKessel_OpelBlitz_Open_01","B_BDEKessel_OpelBlitz_Fuel_01"]] call ALIVE_fnc_hashSet; // ,"Box_IND_AmmoVeh_F" /* * Mil placement random supply boxes for sides */ ALIVE_sideDefaultSupplies = [] call ALIVE_fnc_hashCreate; [ALIVE_sideDefaultSupplies, "EAST", ["LIB_WeaponsBox_Big_SU","LIB_BasicWeaponsBox_SU","LIB_BasicAmmunitionBox_SU","LIB_Mine_Ammo_Box_Su"]] call ALIVE_fnc_hashSet; [ALIVE_sideDefaultSupplies, "WEST", ["csa38_bedna1","csa38_bedna6","LIB_BasicAmmunitionBox_GER","LIB_Mine_Ammo_Box_Ger"]] call ALIVE_fnc_hashSet; /* * Mil logistics convoy transport vehicles fallback for sides */ ALIVE_sideDefaultTransport = [] call ALIVE_fnc_hashCreate; [ALIVE_sideDefaultTransport, "EAST", ["ifa3_gaz","ifa3_gaz2","O_RU_Zis_5V_01"]] call ALIVE_fnc_hashSet; [ALIVE_sideDefaultTransport, "WEST", ["B_BDEKessel_OpelBlitz_Open_01","B_BDEKessel_OpelBlitz_Tarpaulin_01"]] call ALIVE_fnc_hashSet; /* * Mil logistics air transport vehicles fallback for sides */ ALIVE_sideDefaultAirTransport = [] call ALIVE_fnc_hashCreate; [ALIVE_sideDefaultAirTransport, "EAST", []] call ALIVE_fnc_hashSet; [ALIVE_sideDefaultAirTransport, "WEST", []] call ALIVE_fnc_hashSet; /* * Mil logistics airdrop containers fallback for sides */ ALIVE_sideDefaultContainers = [] call ALIVE_fnc_hashCreate; [ALIVE_sideDefaultContainers, "EAST", []] call ALIVE_fnc_hashSet; [ALIVE_sideDefaultContainers, "WEST", ["LIB_BasicAmmunitionBox_GER"]] call ALIVE_fnc_hashSet; /* * Mil placement ambient vehicles per faction */ ALIVE_factionDefaultSupports = [] call ALIVE_fnc_hashCreate; [ALIVE_factionDefaultSupports, "O_RU_608th_RR", ["O_RU_ZiS_5V_Repair_01","O_RU_ZiS_5V_Fuel_01","O_RU_GAZ_AA_Sapper_car_ifa3_01","O_RU_Prestamo_yarriendo_Jeep_01"]] call ALIVE_fnc_hashSet; // ,"Box_East_AmmoVeh_F" [ALIVE_factionDefaultSupports, "B_DE_Kessel", ["B_DE_Kbelwagen_01","B_DE_Kubelwagen_camo_01","B_BDEKessel_OpelBlitz_Open_01","B_BDEKessel_OpelBlitz_Fuel_01"]] call ALIVE_fnc_hashSet; // ,"Box_NATO_AmmoVeh_F" /* * Mil placement random supply boxes per faction */ ALIVE_factionDefaultSupplies = [] call ALIVE_fnc_hashCreate; [ALIVE_factionDefaultSupplies, "O_RU_608th_RR", ["LIB_WeaponsBox_Big_SU","LIB_BasicWeaponsBox_SU","LIB_BasicAmmunitionBox_SU","LIB_Mine_Ammo_Box_Su"]] call ALIVE_fnc_hashSet; [ALIVE_factionDefaultSupplies, "B_DE_Kessel", ["csa38_bedna1","csa38_bedna6","LIB_BasicAmmunitionBox_GER","LIB_Mine_Ammo_Box_Ger"]] call ALIVE_fnc_hashSet; /* * Mil logistics convoy transport vehicles per faction */ ALIVE_factionDefaultTransport = [] call ALIVE_fnc_hashCreate; [ALIVE_factionDefaultTransport, "O_RU_608th_RR", ["O_Truck_02_transport_F","O_Truck_02_covered_F"]] call ALIVE_fnc_hashSet; [ALIVE_factionDefaultTransport, "B_DE_Kessel", ["B_Truck_01_transport_F","B_Truck_01_covered_F"]] call ALIVE_fnc_hashSet; /* * Mil logistics air transport vehicles per faction */ /* * Mil logistics airdrop containers per faction */
So my questions would be: Will my code work or is it outdated by now? In that case, how should I call it in the init.sqf?
Thanks in advance guys!
Ps.: I'm using two custom factions made with ORBAT, don't know if that would cause any trouble...