Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // This is meant for KuplionĀ“s A3XAI Version = "0.2.1"
- // Open a3xai.pbo and find loadSettings.sqf located in a3xai\init
- // Search for miscLootCount and insert this code underneath :
- ["weaponLootVehicleCount",6],
- ["ammoLootPerWeapon",3],
- ["foodLootVehicleCount",6],
- ["miscLootVehicleCount",6],
- ["medicalLootVehicleCount",3],
- ["medicalLoot",["Exile_Item_InstaDoc","Exile_Item_Bandage","Exile_Item_Vishpirin"]],
- // as shown below.
- ["foodLootCount",2],
- ["miscLootCount",2],
- ["weaponLootVehicleCount",6],
- ["ammoLootPerWeapon",3],
- ["foodLootVehicleCount",6],
- ["miscLootVehicleCount",6],
- ["medicalLootVehicleCount",3],
- ["medicalLoot",["Exile_Item_InstaDoc","Exile_Item_Bandage","Exile_Item_Vishpirin"]],
- ["firstAidKitChance",0.25],
- ["lootPullChance0",0.20,true],
- ["lootPullChance1",0.40,true],
- ["lootPullChance2",0.60,true],
- // Open A3XAI_functions.sqf
- // Search for A3XAI_fixStuckGroup and insert this code underneath:
- A3XAI_generateVehicleLoot = compileFinal preprocessFileLineNumbers format ["%1\compile\A3XAI_utilities\A3XAI_generateVehicleLoot.sqf",A3XAI_directory];
- // as shown below.
- A3XAI_fixStuckGroup = compileFinal preprocessFileLineNumbers format ["%1\compile\A3XAI_utilities\A3XAI_fixStuckGroup.sqf",A3XAI_directory];
- A3XAI_generateVehicleLoot = compileFinal preprocessFileLineNumbers format ["%1\compile\A3XAI_utilities\A3XAI_generateVehicleLoot.sqf",A3XAI_directory];
- A3XAI_getNoAggroStatus = compileFinal preprocessFileLineNumbers format ["%1\compile\A3XAI_utilities\A3XAI_getNoAggroStatus.sqf",A3XAI_directory];
- // Go to a3xai\scripts and open verifyClassnames.sqf
- // Search for A3XAI_sniperList isEqualTo and overwrite existing code underneath with this code :
- if (A3XAI_foodLoot isEqualTo []) then {A3XAI_foodLootCount = 0; A3XAI_foodLootVehicleCount = 0;};
- if (A3XAI_miscLoot isEqualTo []) then {A3XAI_miscLootCount = 0; A3XAI_miscLootVehicleCount = 0;};
- if (A3XAI_medicalLoot isEqualTo []) then {A3XAI_medicalLootCount = 0; A3XAI_medicalLootVehicleCount = 0;};
- if (A3XAI_airReinforcementVehicles isEqualTo []) then {A3XAI_maxAirReinforcements = 0; A3XAI_airReinforcementSpawnChance1 = 0; A3XAI_airReinforcementSpawnChance2 = 0; A3XAI_airReinforcementSpawnChance3 = 0;};
- diag_log format ["[A3XAI] Verified %1 unique classnames in %2 seconds.",(count _verified),(diag_tickTime - _startTime)];
- // Create a new file and name it A3XAI_generateVehicleLoot.sqf
- // Insert code below and save it.
- ******************Code starts below***************************************
- #include "\A3XAI\globaldefines.hpp"
- private ["_vehicle", "_unitLevel", "_weapon", "_magazine", "_lootItem"];
- _vehicle = _this;
- if (isNull _vehicle) exitWith {};
- _unitLevel = A3XAI_unitLevels call A3XAI_selectRandom;
- for "_i" from 1 to A3XAI_weaponLootVehicleCount do {
- _weapon = _unitLevel call A3XAI_getWeapon;
- _magazine = getArray (configFile >> "CfgWeapons" >> _weapon >> "magazines") select 0;
- _vehicle addWeaponCargoGlobal [_weapon,1];
- _vehicle addMagazineCargoGlobal [_magazine,A3XAI_ammoLootPerWeapon];
- };
- for "_i" from 1 to A3XAI_foodLootVehicleCount do {
- _lootItem = (A3XAI_foodLoot call A3XAI_selectRandom);
- _vehicle addItemCargoGlobal [_lootItem,1];
- };
- for "_i" from 1 to A3XAI_miscLootVehicleCount do {
- _lootItem = (A3XAI_miscLoot call A3XAI_selectRandom);
- _vehicle addItemCargoGlobal [_lootItem,1];
- };
- for "_i" from 1 to A3XAI_medicalLootVehicleCount do {
- _lootItem = (A3XAI_medicalLoot call A3XAI_selectRandom);
- _vehicle addItemCargoGlobal [_lootItem,1];
- };
- if (A3XAI_debugLevel > 1) then {
- diag_log format ["A3XAI Debug: Generated loot for AI %1 at %2 with unitLevel %3.",(typeOf _vehicle),(getPosATL _vehicle),_unitLevel];
- };
- true
- *************************** CODE ENDS ABOVE *******************************************
- // Copy A3XAI_generateVehicleLoot.sqf to a3xai\compile\A3XAI_utilities.
- // open A3XAI_releaseVehicleAllow.sqf in a3xai\compile\A3XAI_utilities.
- // Search for if (isDedicated) and insert this code underneath: _object call A3XAI_generateVehicleLoot;
- // as shown below:
- if (isDedicated) then {
- _object call A3XAI_generateVehicleLoot;
- _object addEventHandler ["GetIn",{
- if (isPlayer (_this select 2)) then {
- (_this select 0) call A3XAI_releaseVehicleNow;
- // save and repack pbo.
- // Open config in A3XAI_config.pbo
- // Search for miscLootCount and insert this code underneath:
- /* AI loot quantity settings (Vehicle)
- Note: A3XAI_vehiclesAllowedForPlayers = 1; must be set in order to enable the settings in this section
- --------------------------------------------------------------------------------------------------------------------*/
- //Maximum number of weapons from pistolList, rifleList, machinegunList, sniperList found in vehicles recovered by players. (Default: 5)
- weaponLootVehicleCount = 5;
- //Maximum number of magazines to generate for each weapon loot added to vehicle inventory (Default: 3)
- ammoLootPerWeapon = 3;
- //Maximum number of food loot items from foodLoot found in vehicles recovered by players. (Default: 10)
- foodLootVehicleCount = 2;
- //Maximum number of items to select from miscLoot found in vehicles recovered by players. (Default: 10)
- miscLootVehicleCount = 10;
- //Maximum number of items to select from medicalLoot found in vehicles recovered by players. (Default: 5)
- medicalLootVehicleCount = 3;
- /* AI loot probability settings. AI loot is pre-generated into a pool for each unit and randomly pulled to units as time passes.
- --------------------------------------------------------------------------------------------------------------------*/
- //add to config below miscLoot[] array
- //AI Medical item types.
- // Note: medicalLoot will not be read if generateMedicalFood is enabled.
- //------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- medicalLoot[] = {"Exile_Item_InstaDoc","Exile_Item_Bandage","Exile_Item_Vishpirin"};
- // save and repack pbo.
- // If using a HC copy a3xai.pbo to HC folder and overwrite existing pbo.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement