Skip to content

"Spin the Box" creating non whitelisted item #142

@FalcoGer

Description

@FalcoGer

I have set up a whitelist for items and set things to whitelist only. Yet the spin the box thing creates non-whitelisted items.

grafik

/**
*  editMe
*
*  Defines all global config for the mission
*
*  Domain: Client, Server
**/

/* Attacker Waves */

// List_Bandits, List_ParaBandits, List_OPFOR, List_INDEP, List_NATO, List_Viper
HOSTILE_LEVEL_1 = List_Bandits;  // Wave 0 >
HOSTILE_LEVEL_2 = List_OPFOR;    // Wave 5 >
HOSTILE_LEVEL_3 = List_Viper;    // Wave 10 >
HOSTILE_ARMED_CARS = List_Armour;//expects vehicles
HOSTILE_ARMOUR = List_ArmedCars; //expects vehicles

HOSTILE_MULTIPLIER = ("HOSTILE_MULTIPLIER" call BIS_fnc_getParamValue);  // How many hostiles per wave (waveCount x HOSTILE_MULTIPLIER)
HOSTILE_TEAM_MULTIPLIER = ("HOSTILE_TEAM_MULTIPLIER" call BIS_fnc_getParamValue) / 100;   // How many extra units are added per player
PISTOL_HOSTILES = ("PISTOL_HOSTILES" call BIS_fnc_getParamValue);  //What wave enemies stop only using pistols

/* LOCATION LIST OPTIONS */
// List_AllCities - for any random City
// List_SpecificPoint - will start the mission on the "Specific Bulwark Pos" marker (move with mission editor). Location must meet BULWARK_LANDRATIO and LOOT_HOUSE_DENSITY, BULWARK_MINSIZE, etc requirements
// List_LocationMarkers - for a location selected randomly from the Bulwark Zones in editor (Currently broken)
// *IMPORTANT* If you get an error using List_SpecificPoint it means that there isn't a building that qualifies. Turning down the "Minimum spawn room size" parameter might help.
BULWARK_LOCATIONS = List_AllCities;

BULWARK_RADIUS = ("BULWARK_RADIUS" call BIS_fnc_getParamValue);
BULWARK_MINSIZE = ("BULWARK_MINSIZE" call BIS_fnc_getParamValue);   // Spawn room must be bigger than x square metres
BULWARK_LANDRATIO = ("BULWARK_LANDRATIO" call BIS_fnc_getParamValue);
LOOT_HOUSE_DENSITY = ("LOOT_HOUSE_DENSITY" call BIS_fnc_getParamValue);

PLAYER_STARTWEAPON = if ("PLAYER_STARTWEAPON" call BIS_fnc_getParamValue == 1) then {true} else {false};
PLAYER_STARTMAP    = if ("PLAYER_STARTMAP" call BIS_fnc_getParamValue == 1) then {true} else {false};
PLAYER_STARTNVG    = if ("PLAYER_STARTNVG" call BIS_fnc_getParamValue == 1) then {true} else {false};

/* Respawn */
RESPAWN_TIME = ("RESPAWN_TIME" call BIS_fnc_getParamValue);
RESPAWN_TICKETS = ("RESPAWN_TICKETS" call BIS_fnc_getParamValue);

/* Loot Blacklist */
LOOT_BLACKLIST = [
    "O_Static_Designator_02_weapon_F", // If players find and place CSAT UAVs they count as hostile units and round will not progress
    "O_UAV_06_backpack_F",
    "O_UAV_06_medical_backpack_F",
    "O_UAV_01_backpack_F",
    "B_IR_Grenade",
    "O_IR_Grenade",
    "I_IR_Grenade",
	"Item_rhsusf_100Rnd_762x51_m82_blank", 
	"Item_rhs_mag_20Rnd_556x45_M200_Stanag", 
	"Item_rhs_mag_30Rnd_556x45_M200_Stanag", 
	"Item_rhsusf_50Rnd_762x51_m82_blank"
];

/* Whitelist modes */
/* 0 = Off */
/* 1 = Only Whitelist Items will spawn as loot */
/* 2 = Whitelist items get added to existing loot (increases the chance of loot spawning */
LOOT_WHITELIST_MODE = 1;

/* Loot Whitelists */
/* Fill with classname arrays: ["example_item_1", "example_item_2"] */
/* To use Whitelisting there MUST be at least one applicaple item in each LOOT_WHITELIST array*/
LOOT_WHITELIST_WEAPON = [
	// assault rifles
	"Item_rhs_weap_mk18", 
	"Item_rhs_weap_hk416d145", 
	"Item_rhs_weap_hk416d10", 
	"Item_rhs_weap_m4", 
	"Item_rhs_weap_m4a1_blockII_bk", 
	// assault rifles w grenade launcher
	"Item_rhs_weap_mk18_m320", 
	"Item_rhs_weap_hk416d145_m320", 
	"Item_rhs_weap_hk416d10_m320", 
	"Item_rhs_weap_m4_m320", 
	"Item_rhs_weap_m4a1_m320", 
	// scar-h
	"Item_rhs_weap_mk17_LB", 
	"Item_rhs_weap_mk17_CQC", 
	"Item_rhs_weap_mk17_STD", 
	// machine guns
	"Item_rhs_weap_m240B", 
	"Item_rhs_weap_m240G", 
	"Item_rhs_weap_m249", 
	// pistols
	"Item_rhsusf_weap_glock17g4", 
	"Item_rhsusf_weap_m9", 
	// DMR
	"Item_rhs_weap_m14_rail", 
	"Item_rhs_weap_m16a4", 
	"Item_rhs_weap_sr25",
	// launchers
	"Item_rhs_weap_M136", 
	"Item_rhs_weap_maaws"
];
LOOT_WHITELIST_APPAREL = [
	"Headgear_H_MilCap_mcamo",
	"Headgear_H_Booniehat_mcamo",
	"Headgear_H_Bandanna_mcamo",
	"Headgear_H_HelmetB_sand",
	"Headgear_H_HelmetSpecB_paint2",
	"Headgear_H_HelmetB_light_sand",
	"Item_U_B_CombatUniform_mcam",
	"Item_U_B_CombatUniform_mcam_vest",
	"Vest_V_PlateCarrierGL_mtp",
	"Vest_V_PlateCarrierSpec_mtp",
	"Item_rhsusf_spcs_ucp",
	"Item_U_B_GhillieSuit"
];
LOOT_WHITELIST_ITEM = [
	// ace medical
	"ACE_fieldDressingItem", 
	"ACE_elasticBandageItem", 
	"ACE_packingBandageItem", 
	"ACE_quikClotItem", 
	"ACE_epinephrineItem", 
	"ACE_bloodIVItem", 
	"ACE_adenosineItem", 
	"ACE_morphineItem", 
	"ACE_personalAidKitItem", 
	"ACE_salineIVItem", 
	"ACE_splintItem", 
	"ACE_surgicalKitItem", 
	"ACE_tourniquetItem", 
	"ACE_plasmaIVItem", 
	// items
	"Item_NVGogglesB_gry_F", 
	"ACE_Item_MX2A", 
	// misc
	"Item_ToolKit", 
	// weapon attachments
	// accessories
	"Item_rhsusf_acc_anpeq15side", 
	"Item_acc_flashlight_pistol", 
	// grips & bipods
	"Item_rhsusf_acc_grip1", 
	"Item_rhsusf_acc_harris_swivel", 
	"Item_rhsusf_acc_m14_bipod", 
	"Item_rhsusf_acc_grip4_bipod", 
	// optics
	"Item_rhsusf_acc_mrds", 
	"Item_optic_DMS", 
	"Item_optic_LRPS", 
	"Item_optic_MRCO", 
	"Item_rhsusf_acc_ACOG_RMR", 
	// supressors
	"Item_rhsusf_acc_rotex5_tan", 
	"Item_muzzle_snds_M",
	// magazines
	// scar magazines
	"Item_rhs_mag_20Rnd_SCAR_762x51_m80_ball", 
	"Item_rhs_mag_20Rnd_SCAR_762x51_m61_ap", 
	// 5.56 stanag magazines
	"Item_rhs_mag_30Rnd_556x45_M855A1_Stanag", 
	"Item_rhs_mag_30Rnd_556x45_M855A1_Stanag_Tracer_Red",
	// m249 magazines
	"Item_rhsusf_100Rnd_556x45_M995_soft_pouch", 
	"Item_rhsusf_100Rnd_556x45_M855_mixed_soft_pouch_coyote", 
	// m240 magazines
	"Item_rhsusf_100Rnd_762x51_m61_ap", 
	"Item_rhsusf_100Rnd_762x51_m62_tracer", 
	// dmr magazines
	"Item_rhsusf_20Rnd_762x51_SR25_m993_Mag", 
	"Item_rhsusf_20Rnd_762x51_SR25_m62_Mag", 
	"Item_rhsusf_20Rnd_762x51_SR25_m118_special_Mag", 
	"Item_rhsusf_20Rnd_762x51_m62_Mag", 
	"Item_rhsusf_20Rnd_762x51_m993_Mag",
	// pistol magazines
	"Item_rhsusf_mag_15Rnd_9x19_FMJ", 
	"Item_rhsusf_mag_15Rnd_9x19_JHP", 
	"Item_rhsusf_mag_17Rnd_9x19_FMJ", 
	"Item_rhsusf_mag_17Rnd_9x19_JHP", 
	// launcher magazines
	"Item_rhs_mag_maaws_HE", 
	"Item_rhs_mag_maaws_HEAT", 
	"Item_rhs_mag_maaws_HEDP"
];
LOOT_WHITELIST_EXPLOSIVE = [
	"Item_rhs_mag_m67", 
	"Item_rhsusf_m112_mag", 
	"Item_rhsusf_m112x4_mag", 
	"Item_rhs_mag_m18_green", 
	"Item_rhs_mag_m18_purple", 
	"Item_rhs_mag_m18_red", 
	"Item_rhs_mag_m18_yellow", 
	"Item_rhs_mag_m713_Red", 
	"Item_rhs_mag_m714_White", 
	"Item_rhs_mag_m715_Green", 
	"Item_rhs_mag_m716_yellow", 
	"rhssaf_magazine_rhssaf_mag_brd_m83_white", 
	"Item_rhs_mag_M441_HE",
	"SLAMDirectionalMine_Wire_Mag"
];
LOOT_WHITELIST_STORAGE = [
	"B_AssaultPack_mcamo",
	"B_Carryall_mcamo",
	"B_FieldPack_cbr",
	"B_Kitbag_mcamo",
	"B_TacticalPack_mcamo",
	"B_AssaultPack_Kerry"
];

/* Loot Spawn */
LOOT_WEAPON_POOL    = List_AllWeapons - LOOT_BLACKLIST;    // Classnames of Loot items as an array
LOOT_APPAREL_POOL   = List_AllClothes + List_Vests - LOOT_BLACKLIST;
LOOT_ITEM_POOL      = List_Optics + List_Items - LOOT_BLACKLIST;
LOOT_EXPLOSIVE_POOL = List_Mines + List_Grenades + List_Charges - LOOT_BLACKLIST;
LOOT_STORAGE_POOL   = List_Backpacks - LOOT_BLACKLIST;

/* Random Loot */
LOOT_HOUSE_DISTRIBUTION = ("LOOT_HOUSE_DISTRIBUTION" call BIS_fnc_getParamValue);  // Every *th house will spwan loot.
LOOT_ROOM_DISTRIBUTION = ("LOOT_ROOM_DISTRIBUTION" call BIS_fnc_getParamValue);   // Every *th position, within that house will spawn loot.
LOOT_DISTRIBUTION_OFFSET = 0; // Offset the position by this number.
LOOT_SUPPLYDROP = ("LOOT_SUPPLYDROP" call BIS_fnc_getParamValue) / 100;        // Radius of supply drop
PARATROOP_COUNT = ("PARATROOP_COUNT" call BIS_fnc_getParamValue);
PARATROOP_CLASS = List_NATO;
DEFECTOR_CLASS = List_NATO;

/* Points */
SCORE_KILL = ("SCORE_KILL" call BIS_fnc_getParamValue);                 // Base Points for a kill
SCORE_HIT = ("SCORE_HIT" call BIS_fnc_getParamValue);                   // Every Bullet hit that doesn't result in a kill
SCORE_DAMAGE_BASE = ("SCORE_DAMAGE_BASE" call BIS_fnc_getParamValue);   // Extra points awarded for damage. 100% = SCORE_DAMAGE_BASE. 50% = SCORE_DAMAGE_BASE/2
SCORE_RANDOMBOX = 950;  // Cost to spin the box

/*Point multipliers of SCORE_KILL for different waves */
HOSTILE_LEVEL_1_POINT_SCORE = 0.75;
HOSTILE_LEVEL_2_POINT_SCORE = 1;
HOSTILE_LEVEL_3_POINT_SCORE = 1.50;
HOSTILE_CAR_POINT_SCORE = 2;
HOSTILE_ARMOUR_POINT_SCORE = 4;

/* Comment out or delete the below support items to prevent the player from buying them */

BULWARK_SUPPORTITEMS = [
    [800,  "Recon UAV",             "reconUAV"],
    [1680, "Emergency Teleport",   "telePlode"],
    [1950, "Paratroopers",          "paraDrop"],
    [3850, "Missile CAS",          "airStrike"],
    [4220, "Mine Cluster Shell",   "mineField"],
    [4690, "Rage Stimpack",         "ragePack"],
    [5930, "Mind Control Gas",    "mindConGas"],
    [6666, "ARMAKART TM",           "armaKart"],
    [7500, "Predator Drone",    "droneControl"]
];

/* Objects the Player can buy */

/* Radius prevents hostiles walking through objects */

/*  Price - Display Name - Class Name - Rotation When Bought - Object Radius (meters) *prevents AI glitching through object and triggers suicide bombers - Has AI true/false (for objects with AI like autonomous turrests) */
BULWARK_BUILDITEMS = [
	// misc
    [85,   "Flat Triangle (1m)",   		"Land_DomeDebris_01_hex_green_F",  180, 1.5, false],
	[50,   "Portable Light",       		"Land_PortableLight_double_F",     180,   1, false],
	[200,  "Hallogen Lamp",        		"Land_LampHalogen_F",               90,   1, false],
	[100,  "Ladder",               		"Land_PierLadder_F",                 0,   1, false],
    [300,  "Storage box small",    		"Box_NATO_Support_F",                0,   1, false],
	[600,  "Storage box large",    		"Box_NATO_AmmoVeh_F",                0,   1, false],
	// tank trap
	[25,   "Tank Trap",					"Land_CzechHedgehog_01_new_F",		 0,   1, false],
	[50,   "Dragons Teeth",				"Land_DragonsTeeth_01_4x2_new_F",	 0,  12, false],
	// junk tier
	[15,   "Long Plank (4m)",      		"Land_Plank_01_4m_F",                0,   4, false],
    [25,   "Long Plank (8m)",      		"Land_Plank_01_8m_F",                0,   8, false],
    [50,   "Junk Barricade (Short)",	"Land_Barricade_01_4m_F",            0,   4, false],
	[100,  "Junk Barricade (Long)",		"Land_Barricade_01_10m_F",           0,  10, false],
	// sandbag tier
    [50,   "Sandbag Wall (Short)", 		"Land_BagFence_Short_F",   			 0, 1.5, false],
	[50,   "Sandbag Wall (Round)", 		"Land_BagFence_Round_F",   		   180, 1.5, false],
	[75,   "Sandbag Wall (Long)", 		"Land_BagFence_Long_F",   			 0,   2, false],
	[60,   "Sandbag Barricade (Half)",  "Land_SandbagBarricade_01_half_F",   0,   2, false],
	[100,  "Sandbag Barricade (Hole)",  "Land_SandbagBarricade_01_hole_F",   0,   2, false],
    [100,  "Sandbag Barricade (Full)",  "Land_SandbagBarricade_01_F",        0,   2, false],
	[350,  "Sandbag Bunker (Small)",	"Land_BagBunker_Small_F",			 0,   6, false],
	[1000, "Sandbag Bunker (Big)",		"Land_BagBunker_Large_F",		 	 0,  14, false],
	// concrete tier
	[250,  "Long Concrete Barricade",   "Land_CncBarrierMedium4_F",          0,   8, false],
    [150,  "Concrete Shelter",     		"Land_CncShelter_F",                 0, 1.5, false],
    [350,  "Tall Concrete Wall",   		"Land_Mil_WallBig_4m_F",             0,   2, false],
    // ramps & blocks & building
	[75,   "Small Ramp (1m)",      		"Land_Obstacle_Ramp_F",            180, 1.5, false],
    [400,  "Large Ramp (Shallow)", 		"Land_RampConcrete_F",             180,  10, false],
	[400,  "Large Ramp (Steep)", 		"Land_RampConcreteHigh_F",         180,  10, false],
	[400,  "Concrete Platform",    		"BlockConcrete_F",                   0,  10, false],
	[950,  "Stairs",               		"Land_GH_Stairs_F",                180,   4, false],
	// h-barrier tier
	[120,  "H Barrier (x1)",       		"Land_HBarrier_1_F",                 0, 1.5, false],
    [300,  "H Barrier (x3)",       		"Land_HBarrier_3_F",                 0, 3.5, false],
	[480,  "H Barrier (x5)",       		"Land_HBarrier_5_F",                 0, 5.5, false],
	[600,  "H Barrier Big (x4)",       	"Land_HBarrier_Big_F",               0,  10, false],
    [800,  "H Barrier Wall (Short)",	"Land_HBarrierWall4_F",              0, 4.5, false],
	[950,  "H Barrier Wall (Long)",	    "Land_HBarrierWall6_F",              0, 6.5, false],
	[1200, "H Barrier Bunkertower",    	"Land_BagBunker_Tower_F",            0,  10, false],
	[650,  "H Barrier Watchtower",	   	"Land_HBarrierTower_F",              0,  10, false],
	// cargo tier
	[6000, "Guard Tower (Small)",   	"Land_Cargo_Patrol_V3_F",            0,  10, false],
	[12000, "Guard Tower (Large)",      "Land_Cargo_Tower_V3_F",			 0,  16, false],
	// pillbox tier
	[4500, "Pillbox (Hex)",        		"Land_PillboxBunker_01_hex_F",      90,  10, false],
	[5000, "Pillbox (Rectangular)",		"Land_PillboxBunker_01_rectangle_F",90,  10, false],
	[8000, "Large Pillbox",				"Land_PillboxBunker_01_big_F", 	   180,  16, false],
	// bunker
	[200,  "Bunker Block (x1)",    		"Land_Bunker_01_blocks_1_F",       180,   2, false],
    [500,  "Bunker Block (x3)",    		"Land_Bunker_01_blocks_3_F",       180,   6, false],
	[3000, "Bunker Small",	    		"Land_Bunker_01_small_F",          180,  10, false],
	[4000, "Bunker Tall",	    		"Land_Bunker_01_tall_F",           180,  10, false],
	[8000, "Bunker Big",	    		"Land_Bunker_01_big_F",            180,  17, false],
    // defenses
    [1000, "Static HMG",           		"B_HMG_01_high_F",                   0,   1, false],
    [2000, "Autonomous HMG",       		"B_HMG_01_A_F",                    180, 3.5,  true]
];

/* Time of Day*/
DAY_TIME_FROM = ("DAY_TIME_FROM" call BIS_fnc_getParamValue);
DAY_TIME_TO = ("DAY_TIME_TO" call BIS_fnc_getParamValue);

// Check for sneaky inverted configuration. FROM should always be before TO.
if (DAY_TIME_FROM > DAY_TIME_TO) then {
    DAY_TIME_FROM = DAY_TIME_TO - 2;
};

/* Starter MediKits */
BULWARK_MEDIKITS = ("BULWARK_MEDIKIT" call BIS_fnc_getParamValue);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions