From 06e5c709332ab2ee1c42e3fe99d4967fb3350c0d Mon Sep 17 00:00:00 2001 From: Chris Cardozo Date: Mon, 23 Nov 2020 02:01:29 -0500 Subject: [PATCH] logging for weapBuild 239 Logging for Config based loadoutsns in config-based loadouts --- .../custom_server/Configs/blck_configs.sqf | 19 +++ .../Configs/blck_configs_mil.sqf | 13 ++ .../Configs/blck_dynamicConfigs.sqf | 147 ++++++++++-------- @GMS/addons/custom_server/init/build.sqf | 4 +- 4 files changed, 116 insertions(+), 67 deletions(-) diff --git a/@GMS/addons/custom_server/Configs/blck_configs.sqf b/@GMS/addons/custom_server/Configs/blck_configs.sqf index 425baa5..c04e5e0 100644 --- a/@GMS/addons/custom_server/Configs/blck_configs.sqf +++ b/@GMS/addons/custom_server/Configs/blck_configs.sqf @@ -312,6 +312,25 @@ blck_logBlacklistedItems = true; //blck_maximumitempriceinai_loadouts = 1000; // lists of black-listed items to be excluded from dynamic loadouts + + /* + A list of dlcs will be dumped during server start up. + You can comment out those you dont want to exclude + or identify and add others from the list generated when the dynamicConfigs script is run + */ + + blck_blackListedMods = [ + "Kart", + "TANK", + "ORANGE", + "Heli", + "Contact", + "Enoch", + "Orange", + "Jets", + "Mark", + "Expansion" + ]; blck_blacklistedVests = [ //"V_Press_F" ]; diff --git a/@GMS/addons/custom_server/Configs/blck_configs_mil.sqf b/@GMS/addons/custom_server/Configs/blck_configs_mil.sqf index 901029e..b805e0e 100644 --- a/@GMS/addons/custom_server/Configs/blck_configs_mil.sqf +++ b/@GMS/addons/custom_server/Configs/blck_configs_mil.sqf @@ -293,6 +293,19 @@ blck_logblacklisteditems = true; //blck_maximumitempriceinai_loadouts = 1000; // lists of black-listed items to be excluded from dynamic loadouts + + blck_blackListedMods = [ + "Kart", + "TANK", + "ORANGE", + "Heli", + "Contact", + "Enoch", + "Orange", + "Jets", + "Mark", + "Expansion" + ]; blck_blacklistedVests = [ //"V_Press_F" ]; diff --git a/@GMS/addons/custom_server/Configs/blck_dynamicConfigs.sqf b/@GMS/addons/custom_server/Configs/blck_dynamicConfigs.sqf index 2b7e38b..ec1016f 100644 --- a/@GMS/addons/custom_server/Configs/blck_dynamicConfigs.sqf +++ b/@GMS/addons/custom_server/Configs/blck_dynamicConfigs.sqf @@ -54,7 +54,7 @@ _misc = []; _baseClasses = []; _classnameList = []; -//diag_log format["blck_modType = %1",blck_modType]; +diag_log format["blck_modType = %1",blck_modType]; if (toLower(blck_modType) isEqualTo "epoch") then { _classnameList = (missionConfigFile >> "CfgPricing" ) call BIS_fnc_getCfgSubClasses; @@ -63,16 +63,12 @@ if (toLower(blck_modType) isEqualTo "exile") then { _classnameList = (missionConfigFile >> "CfgExileArsenal" ) call BIS_fnc_getCfgSubClasses; }; -//diag_log format["_fnc_dynamicConfigsConfigurator: count _classnameList = %1",count _classnameList]; +private _dlcList = []; +private _ffaa = []; +private _lago = []; +private _cupv = []; +diag_log format["_fnc_dynamicConfigsConfigurator: count _classnameList = %1",count _classnameList]; { -<<<<<<< Updated upstream - private _temp = [_x] call bis_fnc_itemType; - //diag_log _temp; - _itemCategory = _temp select 0; - _itemType = _temp select 1; - _price = blck_maximumItemPriceInAI_Loadouts; - if (toLower(blck_modType) isEqualTo "epoch") then -======= private _configName = ""; switch (true) do { @@ -88,81 +84,102 @@ if (toLower(blck_modType) isEqualTo "exile") then if (_dlc isEqualTo "FFAA" || _dlc isEqualTo "FFAAMOD") then {_ffaa pushBackUnique _x}; if (_dlc isEqualTo "CUP_Vehicles") then {_cupv pushBackUnique _x}; if !(_dlc in blck_blackListedMods) then ->>>>>>> Stashed changes { - _price = getNumber(missionConfigFile >> "CfgPricing" >> _x >> "price"); - }; - if (toLower(blck_modType) isEqualTo "exile") then - { - _price = getNumber(missionConfigFile >> "CfgExileArsenal" >> _x >> "price"); - }; - if (_price < blck_maximumItemPriceInAI_Loadouts && !(["base",_x] call BIS_fnc_inString)) then - { - if (_itemCategory isEqualTo "Weapon") then + private _temp = [_x] call bis_fnc_itemType; + //diag_log _temp; + _itemCategory = _temp select 0; + _itemType = _temp select 1; + _price = blck_maximumItemPriceInAI_Loadouts; + if (toLower(blck_modType) isEqualTo "epoch") then { - switch (_itemType) do - { - case "AssaultRifle": {if !(_x in blck_blacklistedSecondaryWeapons) then {_wpnAR pushBack _x} else {if (blck_logBlacklistedItems) then {diag_log format["Assualt Rifle %1 Excluded: blacklisted Item",_x]}}}; - case "MachineGun": {if !(_x in blck_blacklistedSecondaryWeapons) then {_wpnLMG pushBack _x}else {if (blck_logBlacklistedItems) then {diag_log format["Machine Gun %1 Excluded: blacklisted Item",_x]}}}; - case "SubmachineGun": {if !(_x in blck_blacklistedSecondaryWeapons) then {_wpnSMG pushBack _x}else {if (blck_logBlacklistedItems) then {diag_log format["Submachinegun %1 Excluded: blacklisted Item",_x]}}}; - case "Shotgun": {if !(_x in blck_blacklistedSecondaryWeapons) then {_wpnShotGun pushBack _x}else {if (blck_logBlacklistedItems) then {diag_log format["Shotgun %1 Excluded: blacklisted Item",_x]}}}; - case "Rifle": {if !(_x in blck_blacklistedSecondaryWeapons) then {_wpnAR pushBack _x}else {if (blck_logBlacklistedItems) then {diag_log format["Rifle %1 Excluded: blacklisted Item",_x]}}}; - case "SniperRifle": {if !(_x in blck_blacklistedSecondaryWeapons) then {_wpnSniper pushBack _x}else {if (blck_logBlacklistedItems) then {diag_log format["Sniper Rifle %1 Excluded: blacklisted Item",_x]}}}; - case "Handgun": {if !(_x in blck_blacklistedSecondaryWeapons) then {_wpnHandGun pushBack _x}else {if (blck_logBlacklistedItems) then {diag_log format["Handgun %1 Excluded: blacklisted Item",_x]}}}; - case "Launcher": {if !(_x in blck_blacklistedLaunchersAndSwingWeapons) then {_wpnLauncher pushBack _x}else {if (blck_logBlacklistedItems) then {diag_log format["Launcher %1 Excluded: blacklisted Item",_x]}}}; - case "RocketLauncher": {if !(_x in blck_blacklistedLaunchersAndSwingWeapons) then {_wpnLauncher pushBack _x}else {if (blck_logBlacklistedItems) then {diag_log format["Rocket Launcer %1 Excluded: blacklisted Item",_x]}}}; - case "Throw": {if !(_x in blck_blacklistedItems) then {_wpnThrow pushBack _x}else {if (blck_logBlacklistedItems) then {diag_log format["Throw %1 Excluded: blacklisted Item",_x]}}}; - }; + _price = getNumber(missionConfigFile >> "CfgPricing" >> _x >> "price"); }; - - if (_itemCategory isEqualTo "Item") then + if (toLower(blck_modType) isEqualTo "exile") then { - switch (_itemType) do - { - case "AccessoryMuzzle": {if !(_x in blck_blacklistedAttachments) then {_wpnMuzzles pushBack _x}else {if (blck_logBlacklistedItems) then {diag_log format["Muzzle %1 Excluded: blacklisted Item",_x]}}}; - case "AccessoryPointer": {if !(_x in blck_blacklistedAttachments) then {_wpnPointers pushBack _x}else {if (blck_logBlacklistedItems) then {diag_log format["Pointer %1 Excluded: blacklisted Item",_x]}}}; - case "AccessorySights": {if !(_x in blck_blacklistedOptics) then {_wpnOptics pushBack _x}else {if (blck_logBlacklistedItems) then {diag_log format["Optic %1 Excluded: blacklisted Item",_x]}}}; - case "AccessoryBipod": {if !(_x in blck_blacklistedAttachments) then {_wpnUnderbarrel pushBack _x}else {if (blck_logBlacklistedItems) then {diag_log format["Bipod %1 Excluded: blacklisted Item",_x]}}}; - case "Binocular": {if !(_x in blck_blacklistedItems) then {_misc pushBack _x}else {if (blck_logBlacklistedItems) then {diag_log format["Binocular/Rangefinder/Binocular %1 Excluded: blacklisted Item",_x]}}}; - case "Compass": {if !(_x in blck_blacklistedItems) then {_misc pushBack _x}else {if (blck_logBlacklistedItems) then {diag_log format["Compass %1 Excluded: blacklisted Item",_x]}}}; - case "GPS": {if !(_x in blck_blacklistedItems) then {_misc pushBack _x}else {if (blck_logBlacklistedItems) then {diag_log format["GPS %1 Excluded: blacklisted Item",_x]}}}; - case "NVGoggles": {if !(_x in blck_blacklistedItems) then {_NVG pushBack _x}else {if (blck_logBlacklistedItems) then {diag_log format["NVG %1 Excluded: blacklisted Item",_x]}}}; - }; + _price = getNumber(missionConfigFile >> "CfgExileArsenal" >> _x >> "price"); }; - - - if (_itemCategory isEqualTo "Equipment") then + if (_price < blck_maximumItemPriceInAI_Loadouts && !(["base",_x] call BIS_fnc_inString)) then { - switch (_itemType) do + if (_itemCategory isEqualTo "Weapon") then { - case "Glasses": {if !(_x in blck_blacklistedItems) then {_glasses pushBack _x}else {if (blck_logBlacklistedItems) then {diag_log format["Glasses %1 Excluded: blacklisted Item",_x]}}}; - case "Headgear": {if !(_x in blck_blacklistedHeadgear) then {_headgear pushBack _x}else {if (blck_logBlacklistedItems) then {diag_log format["Headgear %1 Excluded: blacklisted Item",_x]}}}; - case "Vest": {if !(_x in blck_blacklistedVests) then {_vests pushBack _x}else {if (blck_logBlacklistedItems) then {diag_log format["Vest %1 Excluded: blacklisted Item",_x]}}}; - case "Uniform": {if !(_x in blck_blacklistedUniforms) then {_uniforms pushBack _x}else {if (blck_logBlacklistedItems) then {diag_log format["Uniform %1 Excluded: blacklisted Item",_x]}}}; - case "Backpack": {if !(_x in blck_blacklistedBackpacks) then {_backpacks pushBack _x}else {if (blck_logBlacklistedItems) then {diag_log format["Backpack %1 Excluded: blacklisted Item",_x]}}}; + switch (_itemType) do + { + case "AssaultRifle": {if !(_x in blck_blacklistedSecondaryWeapons) then {_wpnAR pushBack _x} else {if (blck_logBlacklistedItems) then {diag_log format["Assualt Rifle %1 Excluded: blacklisted Item",_x]}}}; + case "MachineGun": {if !(_x in blck_blacklistedSecondaryWeapons) then {_wpnLMG pushBack _x}else {if (blck_logBlacklistedItems) then {diag_log format["Machine Gun %1 Excluded: blacklisted Item",_x]}}}; + case "SubmachineGun": {if !(_x in blck_blacklistedSecondaryWeapons) then {_wpnSMG pushBack _x}else {if (blck_logBlacklistedItems) then {diag_log format["Submachinegun %1 Excluded: blacklisted Item",_x]}}}; + case "Shotgun": {if !(_x in blck_blacklistedSecondaryWeapons) then {_wpnShotGun pushBack _x}else {if (blck_logBlacklistedItems) then {diag_log format["Shotgun %1 Excluded: blacklisted Item",_x]}}}; + case "Rifle": {if !(_x in blck_blacklistedSecondaryWeapons) then {_wpnAR pushBack _x}else {if (blck_logBlacklistedItems) then {diag_log format["Rifle %1 Excluded: blacklisted Item",_x]}}}; + case "SniperRifle": {if !(_x in blck_blacklistedSecondaryWeapons) then {_wpnSniper pushBack _x}else {if (blck_logBlacklistedItems) then {diag_log format["Sniper Rifle %1 Excluded: blacklisted Item",_x]}}}; + case "Handgun": {if !(_x in blck_blacklistedSecondaryWeapons) then {_wpnHandGun pushBack _x}else {if (blck_logBlacklistedItems) then {diag_log format["Handgun %1 Excluded: blacklisted Item",_x]}}}; + case "Launcher": {if !(_x in blck_blacklistedLaunchersAndSwingWeapons) then {_wpnLauncher pushBack _x}else {if (blck_logBlacklistedItems) then {diag_log format["Launcher %1 Excluded: blacklisted Item",_x]}}}; + case "RocketLauncher": {if !(_x in blck_blacklistedLaunchersAndSwingWeapons) then {_wpnLauncher pushBack _x}else {if (blck_logBlacklistedItems) then {diag_log format["Rocket Launcer %1 Excluded: blacklisted Item",_x]}}}; + case "Throw": {if !(_x in blck_blacklistedItems) then {_wpnThrow pushBack _x}else {if (blck_logBlacklistedItems) then {diag_log format["Throw %1 Excluded: blacklisted Item",_x]}}}; + }; }; + + if (_itemCategory isEqualTo "Item") then + { + switch (_itemType) do + { + case "AccessoryMuzzle": {if !(_x in blck_blacklistedAttachments) then {_wpnMuzzles pushBack _x}else {if (blck_logBlacklistedItems) then {diag_log format["Muzzle %1 Excluded: blacklisted Item",_x]}}}; + case "AccessoryPointer": {if !(_x in blck_blacklistedAttachments) then {_wpnPointers pushBack _x}else {if (blck_logBlacklistedItems) then {diag_log format["Pointer %1 Excluded: blacklisted Item",_x]}}}; + case "AccessorySights": {if !(_x in blck_blacklistedOptics) then {_wpnOptics pushBack _x}else {if (blck_logBlacklistedItems) then {diag_log format["Optic %1 Excluded: blacklisted Item",_x]}}}; + case "AccessoryBipod": {if !(_x in blck_blacklistedAttachments) then {_wpnUnderbarrel pushBack _x}else {if (blck_logBlacklistedItems) then {diag_log format["Bipod %1 Excluded: blacklisted Item",_x]}}}; + case "Binocular": {if !(_x in blck_blacklistedItems) then {_misc pushBack _x}else {if (blck_logBlacklistedItems) then {diag_log format["Binocular/Rangefinder/Binocular %1 Excluded: blacklisted Item",_x]}}}; + case "Compass": {if !(_x in blck_blacklistedItems) then {_misc pushBack _x}else {if (blck_logBlacklistedItems) then {diag_log format["Compass %1 Excluded: blacklisted Item",_x]}}}; + case "GPS": {if !(_x in blck_blacklistedItems) then {_misc pushBack _x}else {if (blck_logBlacklistedItems) then {diag_log format["GPS %1 Excluded: blacklisted Item",_x]}}}; + case "NVGoggles": {if !(_x in blck_blacklistedItems) then {_NVG pushBack _x}else {if (blck_logBlacklistedItems) then {diag_log format["NVG %1 Excluded: blacklisted Item",_x]}}}; + }; + }; + + + if (_itemCategory isEqualTo "Equipment") then + { + switch (_itemType) do + { + case "Glasses": {if !(_x in blck_blacklistedItems) then {_glasses pushBack _x}else {if (blck_logBlacklistedItems) then {diag_log format["Glasses %1 Excluded: blacklisted Item",_x]}}}; + case "Headgear": {if !(_x in blck_blacklistedHeadgear) then {_headgear pushBack _x}else {if (blck_logBlacklistedItems) then {diag_log format["Headgear %1 Excluded: blacklisted Item",_x]}}}; + case "Vest": {if !(_x in blck_blacklistedVests) then {_vests pushBack _x}else {if (blck_logBlacklistedItems) then {diag_log format["Vest %1 Excluded: blacklisted Item",_x]}}}; + case "Uniform": {if !(_x in blck_blacklistedUniforms) then {_uniforms pushBack _x}else {if (blck_logBlacklistedItems) then {diag_log format["Uniform %1 Excluded: blacklisted Item",_x]}}}; + case "Backpack": {if !(_x in blck_blacklistedBackpacks) then {_backpacks pushBack _x}else {if (blck_logBlacklistedItems) then {diag_log format["Backpack %1 Excluded: blacklisted Item",_x]}}}; + }; + }; + } else { + //if (["base",_x] call BIS_fnc_inString) then {diag_log format["_dynamicConfigs: excluding class %1",_x]}; }; - //} else { - //if (["base",_x] call BIS_fnc_inString) then {diag_log format["_dynamicConfigs: excluding class %1",_x]}; }; } forEach _classnameList; +private _allWep = _wpnAR + _wpnLMG + _wpnSMG + _wpnShotGun + _wpnSniper + _wpnHandGun; +{ + diag_log format["_dlcList %1 = %2",_forEachIndex,_x]; +} forEach _dlcList; +/* + Below are some examples of how you can use information collected to verify that the correct items were included +*/ +{ + diag_log format["_ffaa %1 = %2",_forEachIndex,_x]; +}forEach _ffaa; +{ + diag_log format["_lago %1 = %2",_forEachIndex,_x]; +} forEach _lago; +{ + diag_log format["_cupv %1 = %2",_forEachIndex,_x]; +} forEach _cupv; blck_primaryWeapons = _wpnAR + _wpnLMG + _wpnSMG + _wpnShotGun + _wpnSniper; blck_WeaponList_Blue = blck_primaryWeapons; blck_WeaponList_Red = blck_primaryWeapons; blck_WeaponList_Green = blck_primaryWeapons; blck_WeaponList_Orange = blck_primaryWeapons; -<<<<<<< Updated upstream -======= +/* + here is an example for checking that weapons in the FFAA mod were added +*/ private _absentWep = []; { - if !(_x in blck_primaryWeapons) then {_absentWep pushBackUnique _x}; -} forEach _ffaa; -{ - diag_log format["_absentWep %1 = %2",_forEachIndex,_x]; -} forEach _absentWep; ->>>>>>> Stashed changes + if !(_x in _allWep) then {diag_log format["_absentWep %1 = %2",_forEachIndex,_x];}; +} forEach _ffaa + _lago _cupw; + blck_pistols = _wpnHandGun; blck_Pistols_blue = blck_Pistols; blck_Pistols_red = blck_Pistols; diff --git a/@GMS/addons/custom_server/init/build.sqf b/@GMS/addons/custom_server/init/build.sqf index 582d230..1ac2313 100644 --- a/@GMS/addons/custom_server/init/build.sqf +++ b/@GMS/addons/custom_server/init/build.sqf @@ -1,4 +1,4 @@ -#define blck_buildNumber 238 // Address issues with cleanup of objects +#define blck_buildNumber 239 // Address issues with cleanup of objects #define blck_versionNumber 7.06 -#define blck_buildDate "11-22-20" +#define blck_buildDate "11-23-20"