scheveO
-
Posts
8 -
Joined
-
Last visited
Content Type
Profiles
Forums
Articles
Posts posted by scheveO
-
-
hallo suppe.
already thnx alot for helping. and sorry that i might be a big idiot in this.
i have quick remake for what i whas trying to do. hope you can see bit on what i whas trying to do.
in this case it whas spawning some times 4 sattle charges on 1 spot or 3 granades and a settlecharge.
and for what i want for example i want have at max 1 sattlecharge on a change of 1% for the assignet building type.
and now it whas spawning more of sattle charges and grenades than weapons.
lootspawner
// Lootspawner setup and control script
// Author: Na_Palm (BIS forums)
// credit to: Ed! (404Forums) and [GoT] JoSchaap (GoT2DayZ.nl) for initial script
//-------------------------------------------------------------------------------------
if (!isServer) exitwith {};
private["_buildingname","_chfullfuel","_chperSpot","_class","_dbgloopTime","_dbgloopTimeplU","_dbgTime","_dbgTurns","_dbgTurnsplU","_endloop","_genZadjust","_hndl","_item","_nearLootdist","_pos","_posAdjustZ","_posAdjustZlist","_poscount","_posIdxlist","_posnew","_posOrg","_posViable","_randomweapontestint","_spawnradius","_spInterval","_testpos","_tmpBuild","_tmpPoslist","_tmpTstPlace","_z"];
//-------------------------------------------------------------------------------------
//Switch
swDebugLS = false; //Debug messages on/off
swSpZadjust = false; //needed for ArmA 2 and older Maps/Buildings -> true
//-------------------------------------------------------------------------------------
//Variables
//local
_spawnradius = 150; //Radius (in meter) around players to spawn loot
_spInterval = 1800; //Time (in sec.) to pass before an building spawns new loot
_chfullfuel = 35; //Chance (in %) of a spawned fuelcan to be full instead of empty
_genZadjust = -0.1; //High adjustment (in engine units) thats generally added to every spawnpoint
_tmpTstPlace = [14730, 16276, -0.01]; //Coord's, in [x,y,z] of a preferably flat and unocupied piece of land
_chperSpot = 100; //Chance (in %) if a spot gets loot. Will be considered before 'spawnClassChance_list'
//"spawnClassChance_list" array of [class, %weapon, %magazine, %ICV, %backpack, %object]
// class : same classname as used in "Buildingstoloot_list"
// %weapon : % chance to spawn a weapon on spot
// %magazine : % chance to spawn magazines on spot
// %ICV : % chance to spawn item/cloth/vests on spot
// %backpack : % chance to spawn a backpack on spot
// %object : % chance to spawn an world object on spot
//-------------- A VALUE OF '-1' RESULTS IN NO LOOT FOR THIS CLASS AND TYPE ----------------
spawnClassChance_list = [
[0, 13, 21, 24, 18, 22, 5], // civil
[1, 22, 36, 28, 26, 18, 1], // military
[2, 10, 21, 28, 26, 36, 1], // industrial
[3, 12, 36, 36, -1, -1, 5] // research
];
//"exclcontainer_list" single array of container classnames to NOT to delete if filled
exclcontainer_list = [
"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"
];
//-------------------------------------------------------------------------------------
//DONT change these, will be filled in MAIN -------------------------------------------
spawnBuilding_list = [];
Buildingpositions_list = [];
LSusedclass_list = ["GroundWeaponHolder"];
//DONT change these, will be filled in MAIN -------------------------------------------
//-------------------------------------------------------------------------------------
//-------------------------------------------------------------------------------------
//Buildings that can spawn loot go in this list
#include "LSlootBuildings.sqf"
//Loot goes in these lists
#include "LSlootLists.sqf"
//-------------------------------------------------------------------------------------
//function only runs once on beginning of mission, not really needs a compile
//fill spawnBuilding_list with buildingnames only
getListBuildingnames = {
{
spawnBuilding_list set [count spawnBuilding_list, (_x select 0)];
//diag_log format["-- LOOTSPAWNER DEBUG add to spawnBuilding_list: %1 ", (_x select 0)];
}forEach Buildingstoloot_list;
};
//-------------------------------------------------------------------------------------
//function only runs once on beginning of mission, not really needs a compile
//get list of all Lootspawner generatable 'Worldobjects'
getUsedclasses = {
for "_class" from 0 to ((count lootworldObject_list) - 1) do {
for "_item" from 0 to ((count ((lootworldObject_list select _class) select 1)) - 1) do {
if !((((lootworldObject_list select _class) select 1) select _item) in LSusedclass_list) then {
LSusedclass_list set [count LSusedclass_list, (((lootworldObject_list select _class) select 1) select _item)];
};
sleep 0.001;
};
sleep 0.001;
};
};
//-------------------------------------------------------------------------------------
//function only runs once on beginning of mission, not really needs a compile
//fill Buildingpositions_list with [_buildingname, [_posIdxlist], [_posAdjustZlist]]
getListBuildingPositionjunction = {
_tmpTstPlace = _this select 0;
_randomweapontestint = 0.01; //Sets the highintervals in which weaponpositions are tested. (Lower = slower, but more accurate. Higher = faster, but less accurate.)
_nearLootdist = 0.5;
{
_buildingname = _x;
_tmpBuild = _buildingname createVehicleLocal _tmpTstPlace;
//check if the creation was successful
if (isNil {_tmpBuild}) then {
diag_log format["--!!ERROR!! LOOTSPAWNER in Buildingstoloot_list: %1 no viable object !!ERROR!!--", _buildingname];
} else {
//get spawnpositions from building
_poscount = 0;
_posAdjustZlist = [];
_posIdxlist = [];
_tmpPoslist = [];
_endloop = false;
while {!_endloop} do {
if((((_tmpBuild buildingPos _poscount) select 0) != 0) && (((_tmpBuild buildingPos _poscount) select 1) != 0)) then {
//counter loot piling
_pos = _tmpBuild buildingPos _poscount;
_posOrg = _pos;
_posViable = false;
if (_poscount != 0) then {
{
if ((_pos distance _x) > _nearLootdist) exitWith {
_posViable = true;
};
}forEach _tmpPoslist;
} else {
_posViable = true;
};
_tmpPoslist set [count _tmpPoslist, _pos];
//get Z adjustment for position
if (_posViable) then {
_posIdxlist set [count _posIdxlist, _poscount];
_posAdjustZ = 0;
if (swSpZadjust) then {
if(_pos select 2 < 0) then {
_pos = [_pos select 0, _pos select 1, 1];
};
_z = 0;
_posnew = _pos;
_testpos = true;
while {_testpos} do
{
if((!lineIntersects[ATLtoASL(_pos), ATLtoASL([_pos select 0, _pos select 1, (_pos select 2) - (_randomweapontestint * _z)])]) && (!terrainIntersect[(_pos), ([_pos select 0, _pos select 1, (_pos select 2) - (_randomweapontestint * _z)])]) && (_pos select 2 > 0)) then {
_posnew = [_pos select 0, _pos select 1, (_pos select 2) - (_randomweapontestint * _z)];
_z = _z + 1;
} else {
_testpos = false;
};
};
_posnew = [_posnew select 0, _posnew select 1, (_posnew select 2) + 0.05];
_posAdjustZ = (_posOrg select 2) - (_posnew select 2);
// diag_log format["-- LOOTSPAWNER DEBUG adjusted %1 times", _z];
_posAdjustZlist set [count _posAdjustZlist, _posAdjustZ];
} else {
_posAdjustZlist set [count _posAdjustZlist, _posAdjustZ];
};
};
_poscount = _poscount + 1;
} else {
_endloop = true;
};
};
//save final position Index & adjustments to list
if (_poscount != 0) then {
//diag_log format["-- LOOTSPAWNER DEBUG add to Buildingpositions_list: v%1v v%2v v%3v added", _buildingname, _posIdxlist, _posAdjustZlist];
Buildingpositions_list set [count Buildingpositions_list, [_buildingname, _posIdxlist, _posAdjustZlist]];
} else {
diag_log format["-- !!LOOTSPAWNER WARNING!! in Buildingstoloot_list: %1 has no building positions --", _buildingname];
Buildingpositions_list set [count Buildingpositions_list, [_buildingname, [0], [0]]];
};
};
deleteVehicle _tmpBuild;
}forEach spawnBuilding_list;
};
//-------------------------------------------------------------------------------------
// MAIN
//-------------------------------------------------------------------------------------
diag_log format["-- LOOTSPAWNER initialise ------------------------"];
if ((count Buildingstoloot_list) == 0) then {
diag_log format["--!!ERROR!! LOOTSPAWNER Buildingstoloot_list in lootBuildings.sqf MUST have one entry at least !!ERROR!!--"];
diag_log format["-- LOOTSPAWNER disabled --"];
} else {
_dbgTime = time;
_hndl = [] spawn getListBuildingnames;
waitUntil{scriptDone _hndl};
diag_log format["-- LOOTSPAWNER spawnBuilding_list ready, d: %1s", (time - _dbgTime)];
_dbgTime = time;
_hndl = [_tmpTstPlace] spawn getListBuildingPositionjunction;
waitUntil{scriptDone _hndl};
diag_log format["-- LOOTSPAWNER Buildingpositions_list ready, d: %1s", (time - _dbgTime)];
_dbgTime = time;
_hndl = [] spawn getUsedclasses;
waitUntil{scriptDone _hndl};
diag_log format["-- LOOTSPAWNER LSusedclass_list ready, d: %1s", (time - _dbgTime)];
//run loot deleter continously
null = _spInterval spawn LSdeleter;
diag_log format["-- LOOTSPAWNER LSDer started..."];
if (swDebugLS) then {
dbgTime = time;
dbgTurns = 0;
dbgTurnsplU = 0;
dbgloopTime = 0;
dbgloopTimeplU = 0;
};
diag_log format["-- LOOTSPAWNER ready and waiting for players -----"];
//go into mainloop till mission ends
while {true} do {
_playersalive = false;
{
if (swDebugLS) then {
dbgTimeplU = time;
};
//is Player online and alive?
if ((isPlayer _x) && (alive _x)) then {
_playersalive = true;
//jogging has 4.16..., sprinting has 5.5... so if player velocity is < 6 spawn loot
//works for players in vehicles too
if (((velocity _x) distance [0,0,0]) < 6) then {
//if ((vehicle _x isKindOf "Land") || (vehicle _x isKindOf "Ship")) then {
_posPlayer = getPos _x;
//get list of viable buildings around player
_BaP_list = nearestObjects [_posPlayer, spawnBuilding_list, _spawnradius];
if ((count _BaP_list) > 0) then {
//give to spawn function
_hndl = [_BaP_list, _spInterval, _chfullfuel, _genZadjust, _chperSpot] spawn fn_getBuildingstospawnLoot;
waitUntil{scriptDone _hndl};
};
};
};
sleep 0.001;
if (swDebugLS) then {
dbgloopTimeplU = dbgloopTimeplU + (time - dbgTimeplU);
dbgTurnsplU = dbgTurnsplU + 1;
};
}forEach playableUnits;
if (swDebugLS) then {
dbgloopTime = dbgloopTime + dbgloopTimeplU;
dbgloopTimeplU = 0;
dbgTurns = dbgTurns + 1;
//every 30 sec. give stats out
if ((time - dbgTime) > 30) then {
if (dbgTurnsplU > 0) then {
diag_log format["-- DEBUG LOOTSPAWNER MAIN turns (spawned): %1(%2), duration: %3sec, average: %4sec.",dbgTurns ,dbgTurnsplU , dbgloopTime, (dbgloopTime / dbgTurnsplU)];
} else {
diag_log format["-- DEBUG LOOTSPAWNER MAIN waiting for players"];
};
dbgTime = time;
dbgTurns = 0;
dbgTurnsplU = 0;
dbgloopTime = 0;
};
};
//if no players online wait a bit
if (!_playersalive) then {
sleep 2;
};
};
};lslootlist
// 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
//-1-hand guns
lootWeapon_list = [
[ 0, [ // CIVIL
"hgun_ACPC2_F",
"hgun_P07_F",
"hgun_PDW2000_F",
"hgun_Rook40_F"
]],[ 1, [ // MILITARY
"hgun_ACPC2_snds_F",
"hgun_P07_snds_F",
"hgun_PDW2000_F",
"hgun_Rook40_snds_F"
]],[ 2, [ // INDUSTRIAL
]],[ 3, [ // RESEARCH
]]];
//-2-rifles
lootWeapon_list = [
[ 0, [ // CIVIL
"arifle_MK20C_F",
"arifle_MK20_F",
"arifle_TRG20_F",
"arifle_TRG21_F",
"SMG_01_F", // Vermin .45 ACP
"SMG_02_F" // Sting 9mm
//"arifle_SDAR_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",
"LMG_Mk200_F",
"LMG_Zafir_F",
"Rangefinder",
"SMG_01_F", // Vermin .45 ACP
"SMG_02_F" // Sting 9mm
]],[ 2, [ // INDUSTRIAL
"arifle_Katiba_C_F",
"arifle_Mk20C_F",
"arifle_Mk20_F",
"arifle_MXC_F",
"arifle_SDAR_F",
"arifle_TRG20_F",
"arifle_TRG21_F",
"SMG_01_F", // Vermin .45 ACP
"SMG_02_F" // Sting 9mm
]],[ 3, [ // RESEARCH
"arifle_Katiba_GL_F",
"arifle_MXC_F",
"arifle_MXM_F",
"arifle_MX_GL_F"
]]];
//-3-snipers
lootWeapon_list = [
[ 0, [ // CIVIL
"arifle_MK20C_F",
"arifle_MK20_F",
"arifle_TRG20_F",
"arifle_TRG21_F",
"Binocular",
"hgun_ACPC2_F",
"hgun_P07_F",
"hgun_PDW2000_F",
"hgun_Rook40_F",
"SMG_01_F", // Vermin .45 ACP
"SMG_02_F", // Sting 9mm
"srifle_EBR_F"
//"arifle_SDAR_F",
]],[ 1, [ // MILITARY
"srifle_EBR_F",
"srifle_GM6_F",
"srifle_LRR_F"
]],[ 2, [ // INDUSTRIAL
]],[ 3, [ // RESEARCH
"srifle_GM6_F",
"srifle_LRR_F"
]]];
//-4-ammo
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
"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",
"30Rnd_65x39_caseless_green",
"30Rnd_65x39_caseless_green_mag_Tracer",
"30Rnd_65x39_caseless_mag",
"30Rnd_65x39_caseless_mag_Tracer",
"30Rnd_9x21_Mag"
]],[ 3, [ // RESEARCH
"30Rnd_556x45_Stanag",
"30Rnd_556x45_Stanag",
"30Rnd_65x39_caseless_green",
"30Rnd_65x39_caseless_green",
"5Rnd_127x108_Mag",
"7Rnd_408_Mag"
]]];
//-5-chemlights
lootMagazine_list = [
[ 0, [ // CIVIL
"Chemlight_blue",
"Chemlight_green",
"Chemlight_red",
"Chemlight_yellow"
]],[ 1, [ // MILITARY
"Chemlight_blue",
"Chemlight_green",
"Chemlight_red",
"Chemlight_yellow"
]],[ 2, [ // INDUSTRIAL
"Chemlight_blue",
"Chemlight_green",
"Chemlight_red",
"Chemlight_yellow"
]],[ 3, [ // RESEARCH
"Chemlight_blue",
"Chemlight_green",
"Chemlight_red",
"Chemlight_yellow"
]]];
//-6-explosives
lootMagazine_list = [
[ 0, [ // CIVIL
"HandGrenade"
]],[ 1, [ // MILITARY
"APERSBoundingMine_Range_Mag",
"APERSMine_Range_Mag",
"APERSTripMine_Wire_Mag",
"ATMine_Range_Mag",
"ClaymoreDirectionalMine_Remote_Mag",
"NLAW_F"
]],[ 2, [ // INDUSTRIAL
"APERSBoundingMine_Range_Mag",
"APERSMine_Range_Mag",
"APERSTripMine_Wire_Mag",
"ATMine_Range_Mag",
"SatchelCharge_Remote_Mag"
]],[ 3, [ // RESEARCH
"SatchelCharge_Remote_Mag"
]]];lslootbuildings
// Lootspawner junction list for buildings to classes
// Author: Na_Palm (BIS forums)
//-------------------------------------------------------------------------------------
//"Buildingstoloot_list" array of [buildingname, class]
// buildingname: building class name (in editor debug console use "typeof BIS_fnc_camera_target"
// to monitor and then copy/paste or any other method you know...)
// class: 0-civil, 1-military, ... (add more as you wish)
//
//!!!EVERY building must have only ONE entry here AND been in ONE class!!!
//-------------------------------------------------------------------------------------
Buildingstoloot_list = [
//["Land_Addon_01_V1_dam_F", 0], //not viable
//["Land_Airport_center_F", 0], //no positions
//["Land_cargo_addon01_V1_F", 0], //no positions
//["Land_cargo_addon01_V2_F", 0], //no positions
//["Land_cargo_addon02_V2_F", 0], //no positions
//["Land_Castle_01_tower_F", 0], //no positions
//["Land_Communication_anchor_F", 0], //no positions
//["Land_Communication_F", 0], //no positions
//["Land_dp_smallFactory_F", 0], //no positions
//["Land_dp_smallTank_F", 0], //no positions
//["Land_Factory_Hopper_F", 0], //no positions
//["Land_Garage_V1_dam_F", 0], //not viable
//["Land_ReservoirTank_Airport_F", 0], //no positions
//["Land_ReservoirTower_F", 2], //no positions
//["Land_Shed_Big_F", 0], //no positions
//["Land_Shed_Small_F", 0], //no positions
//["Land_TBox_F", 0], //no positions
//["Land_TTowerBig_1_F", 2], //no positions
//["Land_TTowerBig_2_F", 2], //no positions
["Land_Airport_left_F", 0],
["Land_Airport_right_F", 0],
["Land_Airport_Tower_dam_F", 2],
["Land_Airport_Tower_F", 2],
["Land_cargo_house_slum_F", 0],
["Land_Cargo_House_V1_F", 1],
["Land_Cargo_House_V2_F", 1],
["Land_Cargo_House_V3_F", 1],
["Land_Cargo_HQ_V1_F", 1],
["Land_Cargo_HQ_V2_F", 1],
["Land_Cargo_HQ_V3_F", 1],
["Land_Cargo_Patrol_V1_F", 1],
["Land_Cargo_Patrol_V2_F", 1],
["Land_Cargo_Patrol_V3_F", 1],
["Land_Cargo_Tower_V1_F", 1],
["Land_Cargo_Tower_V3_F", 1],
["Land_CarService_F", 2],
["Land_Chapel_Small_V1_F", 0],
["Land_Chapel_Small_V2_F", 0],
["Land_Chapel_V1_F", 0],
["Land_Chapel_V2_F", 0],
["Land_Crane_F", 0],
["Land_dp_bigTank_F", 2],
["Land_dp_mainFactory_F", 2],
["Land_d_Stone_Shed_V1_F", 0],
["Land_d_Windmill01_F", 0],
["Land_FuelStation_Build_F", 0],
["Land_FuelStation_Shed_F", 0],
["Land_Hangar_F", 2],
["Land_Hospital_main_F", 0],
["Land_Hospital_side1_F", 0],
["Land_Hospital_side2_F", 0],
["Land_i_Addon_02_V1_F", 0],
["Land_i_Addon_03mid_V1_F", 0],
["Land_i_Addon_03_V1_F", 0],
["Land_i_Addon_04_V1_F", 0],
["Land_i_Barracks_V1_F", 2],
["Land_i_Barracks_V2_F", 1],
["Land_i_Garage_V1_F", 0],
["Land_i_Garage_V2_F", 0],
["Land_i_House_Big_01_V1_dam_F", 0],
["Land_i_House_Big_01_V1_F", 0],
["Land_i_House_Big_01_V2_F", 0],
["Land_i_House_Big_01_V3_F", 0],
["Land_i_House_Big_02_V1_dam_F", 0],
["Land_i_House_Big_02_V1_F", 0],
["Land_i_House_Big_02_V2_F", 0],
["Land_i_House_Big_02_V3_F", 0],
["Land_i_House_Small_01_V1_dam_F", 0],
["Land_i_House_Small_01_V1_F", 0],
["Land_i_House_Small_01_V2_dam_F", 0],
["Land_i_House_Small_01_V2_F", 0],
["Land_i_House_Small_01_V3_F", 0],
["Land_i_House_Small_02_V1_dam_F", 0],
["Land_i_House_Small_02_V1_F", 0],
["Land_i_House_Small_02_V2_F", 0],
["Land_i_House_Small_02_V3_F", 0],
["Land_i_House_Small_03_V1_dam_F", 0],
["Land_i_House_Small_03_V1_F", 0],
["Land_i_Shed_Ind_F", 2],
["Land_i_Shop_01_V1_dam_F", 0],
["Land_i_Shop_01_V1_F", 0],
["Land_i_Shop_01_V2_F", 0],
["Land_i_Shop_01_V3_F", 0],
["Land_i_Shop_02_V1_dam_F", 0],
["Land_i_Shop_02_V1_F", 0],
["Land_i_Shop_02_V2_F", 0],
["Land_i_Shop_02_V3_F", 0],
["Land_i_Stone_HouseBig_V1_dam_F", 0],
["Land_i_Stone_HouseBig_V1_F", 0],
["Land_i_Stone_HouseBig_V2_F", 0],
["Land_i_Stone_HouseBig_V3_F", 0],
["Land_i_Stone_HouseSmall_V1_dam_F", 0],
["Land_i_Stone_HouseSmall_V1_F", 0],
["Land_i_Stone_HouseSmall_V2_F", 0],
["Land_i_Stone_HouseSmall_V3_F", 0],
["Land_i_Stone_Shed_V1_dam_F", 0],
["Land_i_Stone_Shed_V1_F", 0],
["Land_i_Stone_Shed_V2_F", 0],
["Land_i_Stone_Shed_V3_F", 0],
["Land_i_Windmill01_F", 0],
["Land_LightHouse_F", 0],
["Land_Lighthouse_small_F", 0],
["Land_Metal_Shed_F", 2],
["Land_MilOffices_V1_F", 1],
["Land_Offices_01_V1_F", 0],
["Land_Radar_F", 2],
["Land_Research_house_V1_F", 3],
["Land_Research_HQ_F", 3],
["Land_Slum_House01_F", 0],
["Land_Slum_House02_F", 0],
["Land_Slum_House03_F", 0],
["Land_spp_Tower_F", 2],
["Land_Unfinished_Building_01_F", 2],
["Land_Unfinished_Building_02_F", 2],
["Land_u_Addon_01_V1_F", 0],
["Land_u_Addon_02_V1_F", 0],
["Land_u_Barracks_V2_F", 1],
["Land_u_House_Big_01_V1_F", 0],
["Land_u_House_Big_02_V1_F", 0],
["Land_u_House_Small_01_V1_dam_F", 0],
["Land_u_House_Small_01_V1_F", 0],
["Land_u_House_Small_02_V1_dam_F", 0],
["Land_u_House_Small_02_V1_F", 0],
["Land_u_Shed_Ind_F", 2],
["Land_u_Shop_01_V1_F", 0],
["Land_u_Shop_02_V1_F", 0],
["Land_WIP_F", 2]
]; -
i want to seperate some parts of loots.
like i want that settle charges spawn realy realy rare and like grenades bit more common.
and like sniper rifles whil spawn realy rare in civil buildings and some rifles bit more common and some just common.
i thought to add more seperate lists but it figures already bit out it whas only spawning grenades and settlecharges hehe.
-
is it posible to add another list.
like you add explosives in the list?
so it whil be some like this.
//"spawnClassChance_list" array of [class, %weapon, %magazine, %ICV, %backpack, %object]
// class : same classname as used in "Buildingstoloot_list"
// %weapon : % chance to spawn a weapon on spot
// %magazine : % chance to spawn magazines on spot
// %ICV : % chance to spawn item/cloth/vests on spot
// %backpack : % chance to spawn a backpack on spot
// %object : % chance to spawn an world object on spot// %explosives : % chance to spawn an world object on spot
//-------------- A VALUE OF '-1' RESULTS IN NO LOOT FOR THIS CLASS AND TYPE ----------------
spawnClassChance_list = [
[0, 13, 21, 24, 18, 22, 29], // civil
[1, 22, 36, 28, 26, 18, 29], // military
[2, 10, 21, 28, 26, 36, 29], // industrial
[3, 12, 36, 36, -1, -1, 29] // research
]; -
wel we have try that already with the lootspawner but it wont work perfectly.
and when i removet some from that list we ending up by getting good as no spawns any more.
its not realy clear on how and what to do for us
-
hallo.
i have try many times and it looks like its ending up with nearly no loot spawns any more lol.
i hope if there is some one wanne help implenting a good loot spawn script and some small other ones.
like player status bars etc.
we arre not that highly skillet scripters.
already thnx alot.
-
hey suppe.
could you meby help us with inplenting this script.
i have try many times to change bit or reduce the some loot spawns. like rock granades and stuf like that.
it results now in that there is barly nothing spawning any more or its like 10 guns in every building.
we arrent that skillet in that coding yet.
already thnx
-
hallo.
i have searcht bit arround sorry if i dint do good anough meby.
but i want to block that a player name whil apear when you point or aim that direction.
also to disable that its directly markt on the map.
we see now pretty much a player vichle on map etc.
thnx
scheve
[Release] Lootspawner, configurable building loot system
in Scripts
Posted
so its posible to ad another line in it?
like explosives or some