Jump to content

[Release] Lootspawner, configurable building loot system


Suppe

Recommended Posts

it was in an old LSpawnScript.

I will try your example.

 

Downloaded from this thread, i made no changes and used this LSlootlists.sqf:

 

// Lootspawner junction lists for classes to spawn-/lootable items


// Author: Na_Palm (BIS forums)
// Bornholm edition by GBR Suppe
//-------------------------------------------------------------------------------------
//here place Weapons an usable items (ex.: Binocular, ...)
//used with addWeaponCargoGlobal
//"lootWeapon_list" array of [class, [weaponlist]]
// class : 0-civil, 1-military, ... (add more as you wish)
// weaponlist : list of weapon class names
lootWeapon_list = [
[ 0, [ // CIVIL

]],[ 1, [ // MILITARY
//Markmans DLC Machine
"MMG_01_hex_F",
"MMG_01_tan_F",
"MMG_02_camo_F",
"MMG_02_black_F",
"MMG_02_sand_F",
//Marksman DLC sniper rifles
"srifle_DMR_02_F",
"srifle_DMR_02_camo_F",
"srifle_DMR_02_sniper_F",
"srifle_DMR_03_F",
"srifle_DMR_03_khaki_F",
"srifle_DMR_03_tan_F",
"srifle_DMR_03_multicam_F",
"srifle_DMR_03_woodland_F",
"srifle_DMR_03_spotter_F",
"srifle_DMR_04_Tan_F",
"srifle_DMR_05_blk_F",
"srifle_DMR_05_hex_F",
"srifle_DMR_05_tan_f",
"srifle_DMR_06_camo_F",
"srifle_DMR_06_olive_F",
//marksman DLC End
"arifle_Katiba_C_F",
"arifle_Katiba_F",
"arifle_Katiba_GL_F",
"arifle_Mk20C_F",
"arifle_Mk20_F",
"arifle_Mk20_GL_F",
"arifle_MXC_F",
//MAS Addon Sniper
"srifle_mas_m107",
"srifle_mas_svd",
"srifle_mas_ksvk",
"srifle_mas_vss",
//MAS Addon Rifles
"arifle_mas_m4",
"arifle_mas_m4_gl",
"arifle_mas_mk17_gl",
"arifle_mas_g3",
"arifle_mas_m14",
"srifle_mas_hk417",
"hgun_mas_mp7_F",
"arifle_mas_ak_74m",
"arifle_mas_ak_74m_gl",
//MAS Addon Maschinegun
"LMG_mas_Mk48_F",
"LMG_mas_rpk_F",
//MAS Addon Weapons End
"arifle_MXM_F",
"arifle_MX_F",
"arifle_MX_GL_F",
"arifle_MX_SW_F",
"arifle_SDAR_F",
"arifle_TRG20_F",
"arifle_TRG21_F",
"arifle_TRG21_GL_F",
"hgun_ACPC2_snds_F",
"hgun_P07_snds_F",
"hgun_PDW2000_F",
"hgun_Rook40_snds_F",
"LMG_Mk200_F",
"LMG_Zafir_F",
"srifle_EBR_F",
"srifle_GM6_F",
"srifle_LRR_F",
// Marksman DLC sniper rifles
"srifle_DMR_02_F",
"srifle_DMR_02_camo_F",
"srifle_DMR_02_sniper_F",
"srifle_DMR_03_F",
"srifle_DMR_03_khaki_F",
"srifle_DMR_03_tan_F",
"srifle_DMR_03_multicam_F",
"srifle_DMR_03_woodland_F",
"srifle_DMR_03_spotter_F",
"srifle_DMR_04_Tan_F",
"srifle_DMR_05_blk_F",
"srifle_DMR_05_hex_F",
"srifle_DMR_05_tan_f",
"srifle_DMR_06_camo_F",
"srifle_DMR_06_olive_F",
//marksman DLC End
"arifle_Katiba_C_F",
"arifle_Mk20C_F",
"arifle_Mk20_F",
"arifle_MXC_F",
"arifle_SDAR_F",
"arifle_TRG20_F",
"arifle_TRG21_F",
// MAS Sniper
"srifle_mas_m107",
"srifle_mas_svd",
"srifle_mas_ksvk",
"srifle_mas_vss"
// MAS Sniper End
]],[ 2, [ // Industrial

]],[ 3, [ // RESEARCH

]]];

//-------------------------------------------------------------------------------------
//here place magazines, weaponattachments and bodyitems(ex.: ItemGPS, ItemMap, Medikit, FirstAidKit, Binoculars, ...)
//used with addMagazineCargoGlobal
//"lootMagazine_list" array of [class, [magazinelist]]
// class : 0-civil, 1-military, ... (add more as you wish)
// magazinelist: list of magazine class names
lootMagazine_list = [
[ 0, [ // CIVIL

]],[ 1, [ // MILITARY
//Marksman DLC Ammo
"10Rnd_338_Mag",
"10Rnd_127x54_Mag",
"150Rnd_93x64_Mag",
"10Rnd_93x64_DMR_05_Mag",
//Marksman DLC End
"100Rnd_65x39_caseless_mag",
"100Rnd_65x39_caseless_mag_Tracer",
"150Rnd_762x51_Box",
"150Rnd_762x51_Box_Tracer",
"16Rnd_9x21_Mag",
"200Rnd_65x39_cased_Box",
"200Rnd_65x39_cased_Box_Tracer",
"20Rnd_556x45_UW_mag",
"20Rnd_762x51_Mag",
"30Rnd_45ACP_Mag_SMG_01",
"30Rnd_556x45_Stanag",
"30Rnd_556x45_Stanag_Tracer_Green",
"30Rnd_556x45_Stanag_Tracer_Red",
"30Rnd_556x45_Stanag_Tracer_Yellow",
"30Rnd_65x39_caseless_green",
"30Rnd_65x39_caseless_green_mag_Tracer",
"30Rnd_65x39_caseless_mag",
"30Rnd_65x39_caseless_mag_Tracer",
"30Rnd_9x21_Mag",
"5Rnd_127x108_Mag",
// MAS MAGZ
"20Rnd_mas_762x51_Stanag",
"5Rnd_mas_127x99_Stanag",
"40Rnd_mas_46x30_Mag",
"100Rnd_mas_762x51_Stanag",
"30Rnd_mas_545x39_mag",
"1Rnd_HE_Grenade_shell",
"1Rnd_Smoke_Grenade_shell",
"100Rnd_mas_545x39_mag",
"5Rnd_mas_127x108_mag",
"20Rnd_mas_9x39_mag",
"10Rnd_mas_762x54_mag",
// MAS MAGZ END
"7Rnd_408_Mag",
"9Rnd_45ACP_Mag",
// MAS Addon Ammo
// MAS Addon Ammo End
//Marksman DLC
"10Rnd_338_Mag",
"10Rnd_127x54_Mag",
"150Rnd_93x64_Mag",
"10Rnd_93x64_DMR_05_Mag",
//Marksman DLC End
"20Rnd_556x45_UW_mag",
"30Rnd_45ACP_Mag_SMG_01",
"30Rnd_556x45_Stanag",
"30Rnd_556x45_Stanag_Tracer_Green",
"30Rnd_556x45_Stanag_Tracer_Red",
"30Rnd_556x45_Stanag_Tracer_Yellow",
"ItemCorrugated",
"EnergyPack",
"CinderBlocks",
"MortarBucket",
"30Rnd_65x39_caseless_green",
"30Rnd_65x39_caseless_green_mag_Tracer",
"30Rnd_65x39_caseless_mag",
"30Rnd_65x39_caseless_mag_Tracer",
"30Rnd_9x21_Mag"
]],[ 2, [ // INDUSTRIAL

]],[ 3, [ // RESEARCH
//
]]];

//-------------------------------------------------------------------------------------
//here place hats, glasses, clothes, uniforms, vests
//used with addItemCargoGlobal
//"lootItem_list" array of [class, [itemlist]]
// class : 0-civil, 1-military, ... (add more as you wish)
// itemlist : list of item class names
lootItem_list = [
[ 0, [ // CIVIL

]],[ 1, [ // MILITARY

]],[ 2, [ // INDUSTRIAL

]],[ 3, [ // RESEARCH

]]];

//-------------------------------------------------------------------------------------
//here place backpacks, parachutes and packed drones/stationary
//used with addBackpackCargoGlobal
//"lootBackpack_list" array of [class, [backpacklist]]
// class : 0-civil, 1-military, ... (add more as you wish)
// backpacklist: list of backpack class names
lootBackpack_list = [
[ 0, [ // CIVIL

]],[ 1, [ // MILITARY

]],[ 2, [ // INDUSTRIAL

]],[ 3, [ // RESEARCH

]]];

//-------------------------------------------------------------------------------------
//here place any other objects(ex.: Land_Basket_F, Box_East_Wps_F, Land_Can_V3_F, ...)
//used with createVehicle directly
//"lootworldObject_list" array of [class, [objectlist]]
// class : 0-civil, 1-military, ... (add more as you wish)
// objectlist : list of worldobject class names
lootworldObject_list = [
[ 0, [ // CIVIL

]],[ 1, [ // MILITARY

]],[ 2, [ // INDUSTRIAL

]],[ 3, [ // RESEARCH

]]];

 

Error Messages:

_lootholder setdir (random>


21:02:54 Error Undefined variable in expression: _loot
21:02:54 File loot_addon\LSpawner\fn_LSgetBuildingstospawnLoot.sqf, line 94
21:02:54 Error in expression _lootholder addMagazineCargoGlobal [_loot, 1];
};
_lootholder setdir (random>
21:02:54 Error position: <_loot, 1];
};
_lootholder setdir (random>
21:02:54 Error Undefined variable in expression: _loot
21:02:54 File loot_addon\LSpawner\fn_LSgetBuildingstospawnLoot.sqf, line 94
21:02:54 Error in expression _lootholder addItemCargoGlobal [_loot, 1];
_lootholder setdir (random 36>
21:02:54 Error position: <_loot, 1];
_lootholder setdir (random 36>
21:02:54 Error Undefined variable in expression: _loot
21:02:54 File loot_addon\LSpawner\fn_LSgetBuildingstospawnLoot.sqf, line 104
21:02:55 Error in expression _lootholder addMagazineCargoGlobal [_loot, 1];
};
_lootholder setdir (random>
21:02:55 Error position: <_loot, 1];
};
_lootholder setdir (random>
21:02:55 Error Undefined variable in expression: _loot
21:02:55 File loot_addon\LSpawner\fn_LSgetBuildingstospawnLoot.sqf, line 94
21:02:55 Error in expression _lootholder addMagazineCargoGlobal [_loot, 1] ;);
 

...

and so on

 

);
 

Link to comment
Share on other sites

So what I understand of this loot system that if the item is in the list it has a equal chance of spawning. So if add just these five for example:

 

"30Rnd_556x45_Stanag",

"5Rnd_127x108_APDS_Mag",

"5Rnd_rollins_mag",

"6Rnd_45ACP_Cylinder",

"200Rnd_556x45_M249"

 

they will have 20% of spawning.

But does anybody know if you can add the same item more then once. As I want the "5Rnd_127x108_APDS_Mag" to be a rare drop. So If I did this instead.

 

"30Rnd_556x45_Stanag",

"30Rnd_556x45_Stanag",

"30Rnd_556x45_Stanag",

"5Rnd_127x108_APDS_Mag",

"5Rnd_rollins_mag",

"5Rnd_rollins_mag",

"5Rnd_rollins_mag",

"6Rnd_45ACP_Cylinder",

"6Rnd_45ACP_Cylinder",

"6Rnd_45ACP_Cylinder",

"200Rnd_556x45_M249",

"200Rnd_556x45_M249",

"200Rnd_556x45_M249"

 

The "5Rnd_127x108_APDS_Mag" will almost have 8% of spawning instead of 20%. Will this work?

Link to comment
Share on other sites

ello suppe , ur addon will be very usefull in 1.46(coz epoch_pelican, epoch_locker and etc crush client) and i have small suggestion : for test i add to spawn standart arma conatainers but mb u help with easy way to fill it (if i add custon classes to loot.h nothing happens)
 

lootworldObject_list = [
[ 0, [							// CIVIL
/*"Bed_EPOCH",
"Couch_EPOCH",
"ChairRed_EPOCH",
"Chair_EPOCH",
"cooker_epoch"*/
]],[ 1, [						// MILITARY
"Box_East_Ammo_F", "Box_East_AmmoOrd_F", "Box_East_AmmoVeh_F", "Box_East_Grenades_F", "Box_East_Support_F",
"Box_East_Wps_F", "Box_East_WpsLaunch_F", "Box_East_WpsSpecial_F",
"Box_IND_Ammo_F", "Box_IND_AmmoOrd_F", "Box_IND_AmmoVeh_F", "Box_IND_Grenades_F", "Box_IND_Support_F",
"Box_IND_Wps_F", "Box_IND_WpsLaunch_F", "Box_IND_WpsSpecial_F",
"Box_NATO_Ammo_F", "Box_NATO_AmmoOrd_F", "Box_NATO_AmmoVeh_F", "Box_NATO_Grenades_F", "Box_NATO_Support_F",
"Box_NATO_Wps_F", "Box_NATO_WpsLaunch_F", "Box_NATO_WpsSpecial_F"
]],[ 2, [						// INDUSTRIAL
/*"Filing_EPOCH",
"Tarp_EPOCH",
"Shelf_EPOCH"*/
]],[ 3, ["Box_NATO_Grenades_F"
						// RESEARCH
]]];

sorry about english) but i think u understand me)

Link to comment
Share on other sites

Just like other people in this thread, I am also getting this error:

20:23:04 Error in expression <em_id", "honey_epoch", true];
};

if (({_x == _loot} count exclcontainer_list) > 0) th>
20:23:04   Error position: <_loot} count exclcontainer_list) > 0) th>
20:23:04   Error Undefined variable in expression: _loot
20:23:04 File loot_addon\LSpawner\fn_LSgetBuildingstospawnLoot.sqf, line 146

I've gone into fn_LSgetBuildingstospawnLoot.sqf. Originally the first line of the above error referenced the previously mentioned "VehicleRepair" so I changed it to "honey_epoch" because I know that's a valid item classname but I still got the error. This is the code from fn_LSgetBuildingstospawnLoot.sqf where the error originates. Again, I changed VehicleRepair to epoch_honey:

										if(_loot == "Land_Suitcase_F") then {
											_lootholder setVariable["mf_item_id", "honey_epoch", true];
										};
										//if container clear its cargo
										if (({_x == _loot} count exclcontainer_list) > 0) then {
											clearWeaponCargoGlobal _lootholder;
											clearMagazineCargoGlobal _lootholder;
											clearBackpackCargoGlobal _lootholder;
											clearItemCargoGlobal _lootholder;
										};

I've gone over my LSlootLists.sqf and found no errors but I will post it here in case someone else sees something wrong:

 

//	Lootspawner junction lists for classes to spawn-/lootable items
//	Author: Na_Palm (BIS forums)
//-------------------------------------------------------------------------------------
//here place Weapons an usable items (ex.: Binocular, ...)
//used with addWeaponCargoGlobal
//"lootWeapon_list" array of [class, [weaponlist]]
//								class		: 0-civil, 1-military, ... (add more as you wish)
//								weaponlist	: list of weapon class names
lootWeapon_list = [
[ 0, [							// CIVIL
"arifle_MK20C_F",
"arifle_MK20_F",
"arifle_TRG20_F",
"arifle_TRG21_F",
"Binocular",					//counts as weapon
"hgun_ACPC2_F",
"hgun_P07_F",
"hgun_PDW2000_F",
"hgun_Rook40_F",
"SMG_01_F",
"SMG_02_F",
"srifle_EBR_F"
]],[ 1, [						// MILITARY
"arifle_Katiba_C_F",
"arifle_Katiba_F",
"arifle_Katiba_GL_F",
"arifle_Mk20C_F",
"arifle_Mk20_F",
"arifle_Mk20_GL_F",
"arifle_MXC_F",
"arifle_MXM_F",
"arifle_MX_F",
"arifle_MX_GL_F",
"arifle_MX_SW_F",
"arifle_SDAR_F",
"arifle_TRG20_F",
"arifle_TRG21_F",
"arifle_TRG21_GL_F",
"Binocular",
"hgun_ACPC2_snds_F",
"hgun_P07_snds_F",
"hgun_PDW2000_F",
"hgun_Rook40_snds_F",
"LMG_Mk200_F",
"LMG_Zafir_F",
"Rangefinder",
"SMG_01_F",
"SMG_02_F",
"srifle_EBR_F",
"srifle_GM6_F",
"srifle_LRR_F"
]],[ 2, [
"ChainSaw",
"Hatchet",
"MultiGun",
"MeleeSledge"
]],[ 3, [						// RESEARCH
]]];

//-------------------------------------------------------------------------------------
//here place magazines, weaponattachments and bodyitems(ex.: ItemGPS, ItemMap, Medikit, FirstAidKit, Binoculars, ...)
//used with addMagazineCargoGlobal
//"lootMagazine_list" array of [class, [magazinelist]]
//								class		: 0-civil, 1-military, ... (add more as you wish)
//								magazinelist: list of magazine class names
lootMagazine_list = [
[ 0, [							// CIVIL
"16Rnd_9x21_Mag",
"20Rnd_556x45_UW_mag",
"20Rnd_762x51_Mag",
"30Rnd_45ACP_Mag_SMG_01",
"30Rnd_556x45_Stanag",
"30Rnd_9x21_Mag",
"9Rnd_45ACP_Mag"
]],[ 1, [						// MILITARY
"100Rnd_65x39_caseless_mag",
"100Rnd_65x39_caseless_mag_Tracer",
"150Rnd_762x51_Box",
"150Rnd_762x51_Box_Tracer",
"16Rnd_9x21_Mag",
"1Rnd_HE_Grenade_shell",
"1Rnd_SmokeBlue_Grenade_shell",
"1Rnd_SmokeGreen_Grenade_shell",
"1Rnd_SmokeOrange_Grenade_shell",
"1Rnd_SmokePurple_Grenade_shell",
"1Rnd_SmokeRed_Grenade_shell",
"1Rnd_SmokeYellow_Grenade_shell",
"1Rnd_Smoke_Grenade_shell",
"200Rnd_65x39_cased_Box",
"200Rnd_65x39_cased_Box_Tracer",
"20Rnd_556x45_UW_mag",
"20Rnd_762x51_Mag",
"30Rnd_45ACP_Mag_SMG_01",
"30Rnd_556x45_Stanag",
"30Rnd_556x45_Stanag_Tracer_Green",
"30Rnd_556x45_Stanag_Tracer_Red",
"30Rnd_556x45_Stanag_Tracer_Yellow",
"30Rnd_65x39_caseless_green",
"30Rnd_65x39_caseless_green_mag_Tracer",
"30Rnd_65x39_caseless_mag",
"30Rnd_65x39_caseless_mag_Tracer",
"30Rnd_9x21_Mag",
"3Rnd_HE_Grenade_shell",
"3Rnd_SmokeBlue_Grenade_shell",
"3Rnd_SmokeGreen_Grenade_shell",
"3Rnd_SmokeOrange_Grenade_shell",
"3Rnd_SmokePurple_Grenade_shell",
"3Rnd_SmokeRed_Grenade_shell",
"3Rnd_SmokeYellow_Grenade_shell",
"3Rnd_Smoke_Grenade_shell",
"5Rnd_127x108_Mag",
"7Rnd_408_Mag",
"9Rnd_45ACP_Mag"
]],[ 2, [						// INDUSTRIAL
]],[ 3, [						// RESEARCH
//"clasname"		//<----Make sure last line has NO COMMA AT THE END
]]];

//-------------------------------------------------------------------------------------
//here place hats, glasses, clothes, uniforms, vests
//used with addItemCargoGlobal
//"lootItem_list" array of [class, [itemlist]]
//								class		: 0-civil, 1-military, ... (add more as you wish)
//								itemlist	: list of item class names
lootItem_list = [
[ 0, [							// CIVIL
"FoodBioMeat",
"FoodMeeps",
"FoodSnooter",
"FoodWalkNSons",
"sardines_epoch",
"meatballs_epoch",
"scam_epoch",
"sweetcorn_epoch",
"honey_epoch",
"ItemSeaBass",
"WhiskeyNoodle",
"ItemSodaOrangeSherbet",
"ItemSodaPurple",
"ItemSodaMocha",
"ItemSodaBurst",
"ItemSodaRbull",
"Pelt_EPOCH",
"jerrycan_epoch",
"FAK",
"Binocular",
"EpochRadio0",
"U_C_Poor_1",
"ItemKiloHemp",
"SnakeCarcass_EPOCH",
"RabbitCarcass_EPOCH",
"ChickenCarcass_EPOCH",
"GoatCarcass_EPOCH",
"SheepCarcass_EPOCH",
"ItemGPS",
"ItemWatch",
"Binocular",
"HeatPack"
]],[ 1, [						// MILITARY
"FoodBioMeat",
"FoodMeeps",
"FoodSnooter",
"FoodWalkNSons",
"sardines_epoch",
"meatballs_epoch",
"scam_epoch",
"sweetcorn_epoch",
"honey_epoch",
"ItemSeaBass",
"WhiskeyNoodle",
"ItemSodaOrangeSherbet",
"ItemSodaPurple",
"ItemSodaMocha",
"ItemSodaBurst",
"ItemSodaRbull",
"jerrycan_epoch",
"FAK",
"Binocular",
"EpochRadio0",
"CircuitParts",
"ItemScraps",
"ItemGPS",
"Rangefinder",
"optic_SOS",
"ItemCompass",
"VehicleRepair",
"ItemWatch",
"NVG_EPOCH",
"HeatPack",
"Towelette",
"FAK"
]],[ 2, [						// INDUSTRIAL
"FoodBioMeat",
"FoodMeeps",
"FoodSnooter",
"FoodWalkNSons",
"sardines_epoch",
"meatballs_epoch",
"scam_epoch",
"sweetcorn_epoch",
"honey_epoch",
"ItemSeaBass",
"WhiskeyNoodle",
"ItemSodaOrangeSherbet",
"ItemSodaPurple",
"ItemSodaMocha",
"ItemSodaBurst",
"ItemSodaRbull",
"jerrycan_epoch",
"FAK",
"Towelette",
"Binocular",
"EpochRadio0",
"CinderBlocks",
"ItemCorrugated",
"ItemCorrugatedLg",
"KitStudWall",
"KitWoodFloor",
"KitWoodStairs",
"KitWoodRamp",
"KitFirePlace",
"KitTiPi",
"KitShelf",
"KitFoundation",
"JackKit",
"KitPlotPole",
"KitCinderWall",
"MortarBucket",
"VehicleRepairLg",
"VehicleRepair",
"ItemMixOil",
"ItemScraps",
"EnergyPack",
"EnergyPackLg"
]],[ 3, [						// RESEARCH
"FoodBioMeat",
"FoodMeeps",
"FoodSnooter",
"FoodWalkNSons",
"sardines_epoch",
"meatballs_epoch",
"scam_epoch",
"sweetcorn_epoch",
"honey_epoch",
"WhiskeyNoodle",
"ItemSodaOrangeSherbet",
"ItemSodaPurple",
"ItemSodaMocha",
"ItemSodaBurst",
"ItemSodaRbull",
"Heal_EPOCH",
"Defib_EPOCH",
"ItemLockbox",
"ItemDocument",
"lighter_epoch"
]]];

//-------------------------------------------------------------------------------------
//here place backpacks, parachutes and packed drones/stationary
//used with addBackpackCargoGlobal
//"lootBackpack_list" array of [class, [backpacklist]]
//								class		: 0-civil, 1-military, ... (add more as you wish)
//								backpacklist: list of backpack class names
lootBackpack_list = [
[ 0, [							// CIVIL
"B_AssaultPack_cbr",
"B_AssaultPack_dgtl",
"B_AssaultPack_khk",
"B_AssaultPack_mcamo",
"B_AssaultPack_ocamo",
"B_AssaultPack_rgr",
"B_AssaultPack_sgg"
]],[ 1, [						// MILITARY
"B_Carryall_cbr",
"B_Carryall_khk",
"B_Carryall_mcamo",
"B_Carryall_ocamo",
"B_Carryall_oli",
"B_Carryall_oucamo",
"B_FieldPack_blk",
"B_FieldPack_cbr",
"B_FieldPack_khk",
"B_FieldPack_ocamo",
"B_FieldPack_oli",
"B_FieldPack_oucamo"
]],[ 2, [						// INDUSTRIAL
"B_Kitbag_cbr",
"B_Kitbag_mcamo",
"B_Kitbag_rgr",
"B_Kitbag_sgg",
"B_TacticalPack_blk",
"B_TacticalPack_mcamo",
"B_TacticalPack_ocamo",
"B_TacticalPack_oli",
"B_TacticalPack_rgr",
"smallbackpack_red_epoch",
"smallbackpack_green_epoch",
"smallbackpack_teal_epoch",
"smallbackpack_pink_epoch"
]],[ 3, [						// RESEARCH
]]];

//-------------------------------------------------------------------------------------
//here place any other objects(ex.: Land_Basket_F, Box_East_Wps_F, Land_Can_V3_F, ...)
//used with createVehicle directly
//"lootworldObject_list" array of [class, [objectlist]]
//								class		: 0-civil, 1-military, ... (add more as you wish)
//								objectlist	: list of worldobject class names
lootworldObject_list = [
[ 0, [							// CIVIL
]],[ 1, [						// MILITARY
]],[ 2, [						// INDUSTRIAL
]],[ 3, [						// RESEARCH
]]];
 

Link to comment
Share on other sites

Just like other people in this thread, I am also getting this error:


20:23:04 Error in expression <em_id", "honey_epoch", true];
};

if (({_x == _loot} count exclcontainer_list) > 0) th>
20:23:04   Error position: <_loot} count exclcontainer_list) > 0) th>
20:23:04   Error Undefined variable in expression: _loot
20:23:04 File loot_addon\LSpawner\fn_LSgetBuildingstospawnLoot.sqf, line 146
I've gone into fn_LSgetBuildingstospawnLoot.sqf. Originally the first line of the above error referenced the previously mentioned "VehicleRepair" so I changed it to "honey_epoch" because I know that's a valid item classname but I still got the error. This is the code from fn_LSgetBuildingstospawnLoot.sqf where the error originates. Again, I changed VehicleRepair to epoch_honey:


										if(_loot == "Land_Suitcase_F") then {
											_lootholder setVariable["mf_item_id", "honey_epoch", true];
										};
										//if container clear its cargo
										if (({_x == _loot} count exclcontainer_list) > 0) then {
											clearWeaponCargoGlobal _lootholder;
											clearMagazineCargoGlobal _lootholder;
											clearBackpackCargoGlobal _lootholder;
											clearItemCargoGlobal _lootholder;
										};
I've gone over my LSlootLists.sqf and found no errors but I will post it here in case someone else sees something wrong:

 


//	Lootspawner junction lists for classes to spawn-/lootable items
//	Author: Na_Palm (BIS forums)
//-------------------------------------------------------------------------------------
//here place Weapons an usable items (ex.: Binocular, ...)
//used with addWeaponCargoGlobal
//"lootWeapon_list" array of [class, [weaponlist]]
//								class		: 0-civil, 1-military, ... (add more as you wish)
//								weaponlist	: list of weapon class names
lootWeapon_list = [
[ 0, [							// CIVIL
"arifle_MK20C_F",
"arifle_MK20_F",
"arifle_TRG20_F",
"arifle_TRG21_F",
"Binocular",					//counts as weapon
"hgun_ACPC2_F",
"hgun_P07_F",
"hgun_PDW2000_F",
"hgun_Rook40_F",
"SMG_01_F",
"SMG_02_F",
"srifle_EBR_F"
]],[ 1, [						// MILITARY
"arifle_Katiba_C_F",
"arifle_Katiba_F",
"arifle_Katiba_GL_F",
"arifle_Mk20C_F",
"arifle_Mk20_F",
"arifle_Mk20_GL_F",
"arifle_MXC_F",
"arifle_MXM_F",
"arifle_MX_F",
"arifle_MX_GL_F",
"arifle_MX_SW_F",
"arifle_SDAR_F",
"arifle_TRG20_F",
"arifle_TRG21_F",
"arifle_TRG21_GL_F",
"Binocular",
"hgun_ACPC2_snds_F",
"hgun_P07_snds_F",
"hgun_PDW2000_F",
"hgun_Rook40_snds_F",
"LMG_Mk200_F",
"LMG_Zafir_F",
"Rangefinder",
"SMG_01_F",
"SMG_02_F",
"srifle_EBR_F",
"srifle_GM6_F",
"srifle_LRR_F"
]],[ 2, [
"ChainSaw",
"Hatchet",
"MultiGun",
"MeleeSledge"
]],[ 3, [						// RESEARCH
]]];

//-------------------------------------------------------------------------------------
//here place magazines, weaponattachments and bodyitems(ex.: ItemGPS, ItemMap, Medikit, FirstAidKit, Binoculars, ...)
//used with addMagazineCargoGlobal
//"lootMagazine_list" array of [class, [magazinelist]]
//								class		: 0-civil, 1-military, ... (add more as you wish)
//								magazinelist: list of magazine class names
lootMagazine_list = [
[ 0, [							// CIVIL
"16Rnd_9x21_Mag",
"20Rnd_556x45_UW_mag",
"20Rnd_762x51_Mag",
"30Rnd_45ACP_Mag_SMG_01",
"30Rnd_556x45_Stanag",
"30Rnd_9x21_Mag",
"9Rnd_45ACP_Mag"
]],[ 1, [						// MILITARY
"100Rnd_65x39_caseless_mag",
"100Rnd_65x39_caseless_mag_Tracer",
"150Rnd_762x51_Box",
"150Rnd_762x51_Box_Tracer",
"16Rnd_9x21_Mag",
"1Rnd_HE_Grenade_shell",
"1Rnd_SmokeBlue_Grenade_shell",
"1Rnd_SmokeGreen_Grenade_shell",
"1Rnd_SmokeOrange_Grenade_shell",
"1Rnd_SmokePurple_Grenade_shell",
"1Rnd_SmokeRed_Grenade_shell",
"1Rnd_SmokeYellow_Grenade_shell",
"1Rnd_Smoke_Grenade_shell",
"200Rnd_65x39_cased_Box",
"200Rnd_65x39_cased_Box_Tracer",
"20Rnd_556x45_UW_mag",
"20Rnd_762x51_Mag",
"30Rnd_45ACP_Mag_SMG_01",
"30Rnd_556x45_Stanag",
"30Rnd_556x45_Stanag_Tracer_Green",
"30Rnd_556x45_Stanag_Tracer_Red",
"30Rnd_556x45_Stanag_Tracer_Yellow",
"30Rnd_65x39_caseless_green",
"30Rnd_65x39_caseless_green_mag_Tracer",
"30Rnd_65x39_caseless_mag",
"30Rnd_65x39_caseless_mag_Tracer",
"30Rnd_9x21_Mag",
"3Rnd_HE_Grenade_shell",
"3Rnd_SmokeBlue_Grenade_shell",
"3Rnd_SmokeGreen_Grenade_shell",
"3Rnd_SmokeOrange_Grenade_shell",
"3Rnd_SmokePurple_Grenade_shell",
"3Rnd_SmokeRed_Grenade_shell",
"3Rnd_SmokeYellow_Grenade_shell",
"3Rnd_Smoke_Grenade_shell",
"5Rnd_127x108_Mag",
"7Rnd_408_Mag",
"9Rnd_45ACP_Mag"
]],[ 2, [						// INDUSTRIAL
]],[ 3, [						// RESEARCH
//"clasname"		//<----Make sure last line has NO COMMA AT THE END
]]];

//-------------------------------------------------------------------------------------
//here place hats, glasses, clothes, uniforms, vests
//used with addItemCargoGlobal
//"lootItem_list" array of [class, [itemlist]]
//								class		: 0-civil, 1-military, ... (add more as you wish)
//								itemlist	: list of item class names
lootItem_list = [
[ 0, [							// CIVIL
"FoodBioMeat",
"FoodMeeps",
"FoodSnooter",
"FoodWalkNSons",
"sardines_epoch",
"meatballs_epoch",
"scam_epoch",
"sweetcorn_epoch",
"honey_epoch",
"ItemSeaBass",
"WhiskeyNoodle",
"ItemSodaOrangeSherbet",
"ItemSodaPurple",
"ItemSodaMocha",
"ItemSodaBurst",
"ItemSodaRbull",
"Pelt_EPOCH",
"jerrycan_epoch",
"FAK",
"Binocular",
"EpochRadio0",
"U_C_Poor_1",
"ItemKiloHemp",
"SnakeCarcass_EPOCH",
"RabbitCarcass_EPOCH",
"ChickenCarcass_EPOCH",
"GoatCarcass_EPOCH",
"SheepCarcass_EPOCH",
"ItemGPS",
"ItemWatch",
"Binocular",
"HeatPack"
]],[ 1, [						// MILITARY
"FoodBioMeat",
"FoodMeeps",
"FoodSnooter",
"FoodWalkNSons",
"sardines_epoch",
"meatballs_epoch",
"scam_epoch",
"sweetcorn_epoch",
"honey_epoch",
"ItemSeaBass",
"WhiskeyNoodle",
"ItemSodaOrangeSherbet",
"ItemSodaPurple",
"ItemSodaMocha",
"ItemSodaBurst",
"ItemSodaRbull",
"jerrycan_epoch",
"FAK",
"Binocular",
"EpochRadio0",
"CircuitParts",
"ItemScraps",
"ItemGPS",
"Rangefinder",
"optic_SOS",
"ItemCompass",
"VehicleRepair",
"ItemWatch",
"NVG_EPOCH",
"HeatPack",
"Towelette",
"FAK"
]],[ 2, [						// INDUSTRIAL
"FoodBioMeat",
"FoodMeeps",
"FoodSnooter",
"FoodWalkNSons",
"sardines_epoch",
"meatballs_epoch",
"scam_epoch",
"sweetcorn_epoch",
"honey_epoch",
"ItemSeaBass",
"WhiskeyNoodle",
"ItemSodaOrangeSherbet",
"ItemSodaPurple",
"ItemSodaMocha",
"ItemSodaBurst",
"ItemSodaRbull",
"jerrycan_epoch",
"FAK",
"Towelette",
"Binocular",
"EpochRadio0",
"CinderBlocks",
"ItemCorrugated",
"ItemCorrugatedLg",
"KitStudWall",
"KitWoodFloor",
"KitWoodStairs",
"KitWoodRamp",
"KitFirePlace",
"KitTiPi",
"KitShelf",
"KitFoundation",
"JackKit",
"KitPlotPole",
"KitCinderWall",
"MortarBucket",
"VehicleRepairLg",
"VehicleRepair",
"ItemMixOil",
"ItemScraps",
"EnergyPack",
"EnergyPackLg"
]],[ 3, [						// RESEARCH
"FoodBioMeat",
"FoodMeeps",
"FoodSnooter",
"FoodWalkNSons",
"sardines_epoch",
"meatballs_epoch",
"scam_epoch",
"sweetcorn_epoch",
"honey_epoch",
"WhiskeyNoodle",
"ItemSodaOrangeSherbet",
"ItemSodaPurple",
"ItemSodaMocha",
"ItemSodaBurst",
"ItemSodaRbull",
"Heal_EPOCH",
"Defib_EPOCH",
"ItemLockbox",
"ItemDocument",
"lighter_epoch"
]]];

//-------------------------------------------------------------------------------------
//here place backpacks, parachutes and packed drones/stationary
//used with addBackpackCargoGlobal
//"lootBackpack_list" array of [class, [backpacklist]]
//								class		: 0-civil, 1-military, ... (add more as you wish)
//								backpacklist: list of backpack class names
lootBackpack_list = [
[ 0, [							// CIVIL
"B_AssaultPack_cbr",
"B_AssaultPack_dgtl",
"B_AssaultPack_khk",
"B_AssaultPack_mcamo",
"B_AssaultPack_ocamo",
"B_AssaultPack_rgr",
"B_AssaultPack_sgg"
]],[ 1, [						// MILITARY
"B_Carryall_cbr",
"B_Carryall_khk",
"B_Carryall_mcamo",
"B_Carryall_ocamo",
"B_Carryall_oli",
"B_Carryall_oucamo",
"B_FieldPack_blk",
"B_FieldPack_cbr",
"B_FieldPack_khk",
"B_FieldPack_ocamo",
"B_FieldPack_oli",
"B_FieldPack_oucamo"
]],[ 2, [						// INDUSTRIAL
"B_Kitbag_cbr",
"B_Kitbag_mcamo",
"B_Kitbag_rgr",
"B_Kitbag_sgg",
"B_TacticalPack_blk",
"B_TacticalPack_mcamo",
"B_TacticalPack_ocamo",
"B_TacticalPack_oli",
"B_TacticalPack_rgr",
"smallbackpack_red_epoch",
"smallbackpack_green_epoch",
"smallbackpack_teal_epoch",
"smallbackpack_pink_epoch"
]],[ 3, [						// RESEARCH
]]];

//-------------------------------------------------------------------------------------
//here place any other objects(ex.: Land_Basket_F, Box_East_Wps_F, Land_Can_V3_F, ...)
//used with createVehicle directly
//"lootworldObject_list" array of [class, [objectlist]]
//								class		: 0-civil, 1-military, ... (add more as you wish)
//								objectlist	: list of worldobject class names
lootworldObject_list = [
[ 0, [							// CIVIL
]],[ 1, [						// MILITARY
]],[ 2, [						// INDUSTRIAL
]],[ 3, [						// RESEARCH
]]];
 

Hey Zed,

This error is the same error I even got back in October last year.

Its a scripting problem that no one has ever, as far as I know, released a fix to the public.

Not sure if anybody got it done or not.

However there is a little thing out there and since someone likes to pick apart others servers and take more than they are suppose to or takes without permission.

A couple of PM's sent

Link to comment
Share on other sites

For me the script does not work all the time. No idea why. I have barley other scripts installed and launched with init.sqf. Your script is in epochhive and thats ist.

For some reason sometimes loot is there when server is just restarted. The most of the time nothing will spawn on ground.

 

Anybody got an idea? Would be appreciated very much.

 

Thank you

Link to comment
Share on other sites

Hey i get the same errors in RTP any new information ?

23:26:51 Error Undefined variable in expression: _loot


23:26:51 File loot_addon\LSpawner\fn_LSgetBuildingstospawnLoot.sqf, line 83
23:26:51 Error in expression _lootholder addItemCargoGlobal [_loot, 1];
_lootholder setdir (random 36>
23:26:51 Error position: <_loot, 1];
_lootholder setdir (random 36>
23:26:51 Error Undefined variable in expression: _loot
23:26:51 File loot_addon\LSpawner\fn_LSgetBuildingstospawnLoot.sqf, line 104
23:26:51 Error in expression _lootholder addBackpackCargoGlobal [_loot, 1];
_lootholder setdir (random 36>
23:26:51 Error position: <_loot, 1];
_lootholder setdir (random 36>
23:26:51 Error Undefined variable in expression: _loot
23:26:51 File loot_addon\LSpawner\fn_LSgetBuildingstospawnLoot.sqf, line 113
23:26:51 Error in expression _lootholder addBackpackCargoGlobal [_loot, 1];
_lootholder setdir (random 36>
23:26:51 Error position: <_loot, 1];
_lootholder setdir (random 36>
23:26:51 Error Undefined variable in expression: _loot
23:26:51 File loot_addon\LSpawner\fn_LSgetBuildingstospawnLoot.sqf, line 113
23:26:51 Error in expression _lootholder addBackpackCargoGlobal [_loot, 1];
_lootholder setdir (random 36>
23:26:51 Error position: <_loot, 1];
_lootholder setdir (random 36>
23:26:51 Error Undefined variable in expression: _loot
23:26:51 File loot_addon\LSpawner\fn_LSgetBuildingstospawnLoot.sqf, line 113
23:26:52 Error in expression _lootholder addWeaponCargoGlobal [_loot, 1];
_lootholder setdir (random 36>
23:26:52 Error position: <_loot, 1];
_lootholder setdir (random 36>
23:26:52 Error Undefined variable in expression: _loot
23:26:52 File loot_addon\LSpawner\fn_LSgetBuildingstospawnLoot.sqf, line 83
23:26:52 Error in expression _lootholder addItemCargoGlobal [_loot, 1];
_lootholder setdir (random 36>
23:26:52 Error position: <_loot, 1];
_lootholder setdir (random 36>
23:26:52 Error Undefined variable in expression: _loot
23:26:52 File loot_addon\LSpawner\fn_LSgetBuildingstospawnLoot.sqf, line 104
23:26:52 Error in expression _lootholder addBackpackCargoGlobal [_loot, 1];
_lootholder setdir (random 36>
23:26:52 Error position: <_loot, 1];
_lootholder setdir (random 36>
23:26:52 Error Undefined variable in expression: _loot
23:26:52 File loot_addon\LSpawner\fn_LSgetBuildingstospawnLoot.sqf, line 113
23:26:52 Error in expression _lootholder addWeaponCargoGlobal [_loot, 1];
_lootholder setdir (random 36>
23:26:52 Error position: <_loot, 1];
_lootholder setdir (random 36>
23:26:52 Error Undefined variable in expression: _loot
23:26:52 File loot_addon\LSpawner\fn_LSgetBuildingstospawnLoot.sqf, line 83
23:26:52 Error in expression _lootholder addItemCargoGlobal [_loot, 1];
_lootholder setdir (random 36>
23:26:52 Error position: <_loot, 1];
_lootholder setdir (random 36>
23:26:52 Error Undefined variable in expression: _loot
23:26:52 File loot_addon\LSpawner\fn_LSgetBuildingstospawnLoot.sqf, line 104
23:26:52 Error in expression _lootholder addMagazineCargoGlobal [_loot, 1];
};
_lootholder setdir (random>
23:26:52 Error position: <_loot, 1];
};
_lootholder setdir (random>
23:26:52 Error Undefined variable in expression: _loot
23:26:52 File loot_addon\LSpawner\fn_LSgetBuildingstospawnLoot.sqf, line 94
23:26:52 Error in expression _lootholder addMagazineCargoGlobal [_loot, 1];
};
_lootholder setdir (random>
23:26:52 Error position: <_loot, 1];
};
_lootholder setdir (random>
23:26:52 Error Undefined variable in expression: _loot
23:26:52 File loot_addon\LSpawner\fn_LSgetBuildingstospawnLoot.sqf, line 94

Link to comment
Share on other sites

  • 2 weeks later...

phantera are normaly the same like cherno....

 

if not and they have special building classnames, then use the a3 3d editor here in the forum, just mark the buildings and press ctrl + c and ctrl + v to paste it in.... do this with every building, than press esc and "copy cfg to clipbord"

 

open the text editor and press ctrl + v

 

so u get every name in 3 minutes....

Link to comment
Share on other sites

  • 2 weeks later...

Hello everyone,  

 

I am a new Arma 3 epoch server owner,  and I am trying my best to learn how all the configurations work.     For the people in the know on this forum you are worth your weight in gold,   as all the questions I have ever had the need to come and research,   I have found answers via searches on the forums here.   (I dont like posting a question if the same question already exists else where - Use the search tools people!!)

 

I am now at a stage where I would like to increase the loot on the server,  and loot locations (currently I can go into any town and out of looking though 20 buildings,  maybe 2 will actually have something in it.   So... that's not good. 

 

I have downloaded the OP 'Loot Spawner Loot System' and have spent the last 48 hours trying to make it work.   This morning I have to admit defeat.     I was wondering if anyone could take a look at my 'Loot_Addon.PBO' file,  and tell me the error of my ways.     I know you have said that you have created this system so that lazy people do not copy other peoples settings,   but as I have had a go at trying to make this work,  and you will see (should you accept the file) that I have indeed tried,  within the files... 

 

Here is a link to my PBO file https://goo.gl/eXdX19

 

I appreciate any and all help 

Link to comment
Share on other sites

For me the script does not work all the time. No idea why. I have barley other scripts installed and launched with init.sqf. Your script is in epochhive and thats ist.

For some reason sometimes loot is there when server is just restarted. The most of the time nothing will spawn on ground.

 

Anybody got an idea? Would be appreciated very much.

 

Thank you

This is my problem, maybe help you

If I remove indestructible PBO, lootspawner work OK.

Link to comment
Share on other sites

I read the whole thread but couldn't find where the floating loot solution is, if there is one.

 

I am trying to get this to work on a Panthera map and i had to add a few buildings i wanted to get loot from.

 

Loot spawns but it's in the air.

Link to comment
Share on other sites

Kronky the last time I read through this thread there was no solution. If you look it may be only a couple buildings that do that. To solve that remove them from your building list. If you solve this issue though be great to see it. Spent a day trying with a friend.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
×
×
  • Create New...