Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
I got it working
Yeah you need to do removeWeapon in player_switchmodel.sqf and player_monitor.fsm, both i copyed to my mission.pbo and it works great(player_monitor for removing items on login/relog)
"dayzGearSave = false;" \n
"_inventory call player_gearSet;" \n
"player removeWeapon ""ItemRadio"";" \n
"player removeWeapon ""ItemMap"";" \n
"player removeWeapon ""ItemCompass"";" \n
"player removeWeapon ""ItemWatch"";" \n
"player removeWeapon ""ItemGPS"";" \n
"player removeWeapon ""NVGoggles"";" \n
"player removeWeapon ""APSI"";" \n
"player removeWeapon ""mut_heart"";" \n
//Clear New Character
{_newUnit removeMagazine _x;} forEach magazines _newUnit;
removeAllWeapons _newUnit;
_newUnit removeWeapon "ItemRadio";
_newUnit removeWeapon "ItemMap";
_newUnit removeWeapon "ItemCompass";
_newUnit removeWeapon "ItemWatch";
_newUnit removeWeapon "ItemGPS";
_newUnit removeWeapon "NVGoggles";
_newUnit removeWeapon "APSI";
_newUnit removeWeapon "mut_heart";
Sure, sharing is caring
player_monitor.fsm:
Search for these lines
Before these lines insert this:Code:"dayzGearSave = false;" \n "_inventory call player_gearSet;" \n
Code:"player removeWeapon ""ItemRadio"";" \n "player removeWeapon ""ItemMap"";" \n "player removeWeapon ""ItemCompass"";" \n "player removeWeapon ""ItemWatch"";" \n "player removeWeapon ""ItemGPS"";" \n "player removeWeapon ""NVGoggles"";" \n "player removeWeapon ""APSI"";" \n "player removeWeapon ""mut_heart"";" \n
In player_switchModel.sqf search for these lines
Code://Clear New Character {_newUnit removeMagazine _x;} forEach magazines _newUnit; removeAllWeapons _newUnit;
After these lines insert this:
Code:_newUnit removeWeapon "ItemRadio"; _newUnit removeWeapon "ItemMap"; _newUnit removeWeapon "ItemCompass"; _newUnit removeWeapon "ItemWatch"; _newUnit removeWeapon "ItemGPS"; _newUnit removeWeapon "NVGoggles"; _newUnit removeWeapon "APSI"; _newUnit removeWeapon "mut_heart";
removeAllWeapons _newUnit; doesnt remove Toolbelt-Items, so we have to delete all items manually... as i said, it doesnt matter what you delete or if the unit spawns with these items, just make sure that the new model spawns without anything before it gets the loadout.
addOns[]=
{
"chernarus",
"ca_modules_animals",
"dayz_code",
"dayz_weapons",
"dayz_equip",
"dayz_vehicles",
"cacharacters_pmc",
"ca_modules_functions",
"CA_CommunityConfigurationProject_E_Editor_AddedAllWeaponSlotsInfantryVariants"
};
addOnsAuto[]=
{
"dayz_weapons",
"ca_modules_functions",
"chernarus",
"CA_CommunityConfigurationProject_E_Editor_AddedAllWeaponSlotsInfantryVariants"
};
CDF_Commander_AllWeaponSlots
CDF_Soldier_Light_AllWeaponSlots
CDF_Soldier_Medic_AllWeaponSlots
CZ_Soldier_DES_AllWeaponSlots_EP1
CZ_Soldier_Light_DES_AllWeaponSlots_EP1
CZ_Soldier_Office_DES_AllWeaponSlots_EP1
CZ_Soldier_medik_DES_AllWeaponSlots_EP1
GER_Soldier_Medic_AllWeaponSlots_EP1
GUE_Villager3_AllWeaponSlots
GUE_Villager4_AllWeaponSlots
GUE_Woodlander1_AllWeaponSlots
GUE_Woodlander2_AllWeaponSlots
GUE_Woodlander3_AllWeaponSlots
GUE_Worker2_AllWeaponSlots
Herrera_AllWeaponSlots
Herrera_Light_AllWeaponSlots
Ins_Bardak_AllWeaponSlots
Ins_Commander_AllWeaponSlots
Ins_Lopotev_AllWeaponSlots
Ins_Soldier_Medic_AllWeaponSlots
Ins_Soldier_Pilot_AllWeaponSlots
Ins_Villager3_AllWeaponSlots
Ins_Villager4_AllWeaponSlots
Ins_Woodlander1_AllWeaponSlots
Ins_Woodlander2_AllWeaponSlots
Ins_Woodlander3_AllWeaponSlots
Ins_Worker2_AllWeaponSlots
RU_Commander_AllWeaponSlots
RU_Soldier_Light_AllWeaponSlots
RU_Soldier_Medic_AllWeaponSlots
Soldier_Crew_AllWeaponSlots_PMC
Soldier_Medic_AllWeaponSlots_PMC
TK_Soldier_Medic_AllWeaponSlots_EP1
USMC_Soldier_Crew_AllWeaponSlots
USMC_Soldier_Light_AllWeaponSlots
USMC_Soldier_Medic_AllWeaponSlots
USMC_Soldier_Officer_AllWeaponSlots
US_Pilot_Light_AllWeaponSlots_EP1
US_Soldier_Crew_AllWeaponSlots_EP1
US_Soldier_Light_AllWeaponSlots_EP1
US_Soldier_Medic_AllWeaponSlots_EP1
US_Soldier_Officer_AllWeaponSlots_EP1
I found more skins to use with the beta patch "exploit"
There is a "allweaponsSlots" class inside ( communityconfigurationproject_e\Editor_AddedAllWeaponSlotsInfantryVariants )
First I had to add entries in the addons on the mission.sqm (to get rid of an error popup at login):
Code:addOns[]= { "chernarus", "ca_modules_animals", "dayz_code", "dayz_weapons", "dayz_equip", "dayz_vehicles", "cacharacters_pmc", "ca_modules_functions", "CA_CommunityConfigurationProject_E_Editor_AddedAllWeaponSlotsInfantryVariants" }; addOnsAuto[]= { "dayz_weapons", "ca_modules_functions", "chernarus", "CA_CommunityConfigurationProject_E_Editor_AddedAllWeaponSlotsInfantryVariants" };
After that I could use the following list of skins:
Not all of them will show the backpack ( like sniper skin). But all seems functional with all slots availableCode:CDF_Commander_AllWeaponSlots CDF_Soldier_Light_AllWeaponSlots CDF_Soldier_Medic_AllWeaponSlots CZ_Soldier_DES_AllWeaponSlots_EP1 CZ_Soldier_Light_DES_AllWeaponSlots_EP1 CZ_Soldier_Office_DES_AllWeaponSlots_EP1 CZ_Soldier_medik_DES_AllWeaponSlots_EP1 GER_Soldier_Medic_AllWeaponSlots_EP1 GUE_Villager3_AllWeaponSlots GUE_Villager4_AllWeaponSlots GUE_Woodlander1_AllWeaponSlots GUE_Woodlander2_AllWeaponSlots GUE_Woodlander3_AllWeaponSlots GUE_Worker2_AllWeaponSlots Herrera_AllWeaponSlots Herrera_Light_AllWeaponSlots Ins_Bardak_AllWeaponSlots Ins_Commander_AllWeaponSlots Ins_Lopotev_AllWeaponSlots Ins_Soldier_Medic_AllWeaponSlots Ins_Soldier_Pilot_AllWeaponSlots Ins_Villager3_AllWeaponSlots Ins_Villager4_AllWeaponSlots Ins_Woodlander1_AllWeaponSlots Ins_Woodlander2_AllWeaponSlots Ins_Woodlander3_AllWeaponSlots Ins_Worker2_AllWeaponSlots RU_Commander_AllWeaponSlots RU_Soldier_Light_AllWeaponSlots RU_Soldier_Medic_AllWeaponSlots Soldier_Crew_AllWeaponSlots_PMC Soldier_Medic_AllWeaponSlots_PMC TK_Soldier_Medic_AllWeaponSlots_EP1 USMC_Soldier_Crew_AllWeaponSlots USMC_Soldier_Light_AllWeaponSlots USMC_Soldier_Medic_AllWeaponSlots USMC_Soldier_Officer_AllWeaponSlots US_Pilot_Light_AllWeaponSlots_EP1 US_Soldier_Crew_AllWeaponSlots_EP1 US_Soldier_Light_AllWeaponSlots_EP1 US_Soldier_Medic_AllWeaponSlots_EP1 US_Soldier_Officer_AllWeaponSlots_EP1
I have only tested it briefly on my test server, so let me know if it also works for you guys..
Thanks fellas. This worked beautifully. I followed King2k's steps and I have custom models without limited inventories and backpacks
Haven't actually tested that yet. Best of luck finding a fix man.Are you having problems with players not able to enter vehicles together? For example, some skins can't be a vehcile with eachother like:
CZ_Soldier_DES_AllWeaponSlots_EP1
Ins_Lopotev
TK_INS_Soldier_EP1
and many more, wondering if anyone had found a fix for this. I noticed in: dayz_code/init/variables.sqf there is an AllPlayers and AllPlayersVehicles, with a list of skins. Though it appears adding the new skins to this list doesn't seem to allow them to ride in vechicles together.
AllPlayersVehicles = ["Soldier_Crew_PMC","Survivor2_DZ","Survivor1_DZ","Survivor3_DZ","Bandit1_DZ","Sniper1_DZ","Camo1_DZ","Soldier1_DZ","Rocket_DZ","US_Soldier_EP1","Ins_Lopotev","Ins_Soldier_1","RU_Soldier_Base","GUE_Soldier_Base","CDF_Soldier_Base","CDF_Soldier_Militia","MVD_Soldier_Base","RUS_Soldier_Base","TK_INS_Soldier_EP1","AllVehicles"];
Can anyone suggest a fix for this?
Are you having problems with players not able to enter vehicles together? For example, some skins can't be a vehcile with eachother like:
CZ_Soldier_DES_AllWeaponSlots_EP1
Ins_Lopotev
TK_INS_Soldier_EP1
and many more, wondering if anyone had found a fix for this. I noticed in: dayz_code/init/variables.sqf there is an AllPlayers and AllPlayersVehicles, with a list of skins. Though it appears adding the new skins to this list doesn't seem to allow them to ride in vechicles together.
AllPlayersVehicles = ["Soldier_Crew_PMC","Survivor2_DZ","Survivor1_DZ","Survivor3_DZ","Bandit1_DZ","Sniper1_DZ","Camo1_DZ","Soldier1_DZ","Rocket_DZ","US_Soldier_EP1","Ins_Lopotev","Ins_Soldier_1","RU_Soldier_Base","GUE_Soldier_Base","CDF_Soldier_Base","CDF_Soldier_Militia","MVD_Soldier_Base","RUS_Soldier_Base","TK_INS_Soldier_EP1","AllVehicles"];
Can anyone suggest a fix for this?
//Model Variables
Bandit1_DZ ="Bandit1_DZ";
BanditW1_DZ ="BanditW1_DZ";
Survivor1_DZ ="Survivor2_DZ";
Survivor2_DZ ="Survivor2_DZ";
SurvivorW2_DZ = "SurvivorW2_DZ";
Sniper1_DZ ="Sniper1_DZ";
Camo1_DZ ="Camo1_DZ";
Soldier1_DZ ="Soldier1_DZ";
Rocket_DZ ="Rocket_DZ";
Ins_Soldier_Base ="Ins_Soldier_Base";
RU_Soldier_Base = "RU_Soldier_Base";
GUE_Soldier_Base = "GUE_Soldier_Base";
CDF_Soldier_Base = "CDF_Soldier_Base";
MVD_Soldier_Base = "MVD_Soldier_Base";
RUS_Soldier_Base = "RUS_Soldier_Base";
AllPlayers = ["Soldier_Crew_PMC","Sniper1_DZ","Camo1_DZ","Soldier1_DZ","Rocket_DZ","Ins_Soldier_Base","RU_Soldier_Base","GUE_Soldier_Base","CDF_Soldier_Base","MVD_Soldier_Base","RUS_Soldier_Base"];
AllPlayersVehicles = ["Soldier_Crew_PMC","Sniper1_DZ","Camo1_DZ","Soldier1_DZ","Rocket_DZ","Ins_Soldier_Base","RU_Soldier_Base","GUE_Soldier_Base","CDF_Soldier_Base","MVD_Soldier_Base","RUS_Soldier_Base","AllVehicles"];
if (_playerID == "000000") then {
_model = "Rocket_DZ";
};
if (_playerID == "0000000") then {
_model = "Rocket_DZ";
};
if (_playerID == "0000000") then {
_model = "Rocket_DZ";
};
if (!(_model in ["SurvivorW2_DZ","Survivor2_DZ","Survivor3_DZ","Sniper1_DZ","Soldier1_DZ","Camo1_DZ","Bandit1_DZ","Rocket_DZ"])) then {
_model = "Survivor2_DZ";
};
private["_itemType","_iPos","_indexLootSpawn","_iArray","_iItem","_iClass","_item","_qty","_max","_tQty","_arrayLootSpawn","_canType","_holderItem"];
// [_itemType,_weights]
_iItem = _this select 0;
_iClass = _this select 1;
_iPos = _this select 2;
_radius = _this select 3;
_holderItem = _iItem;
switch (_iItem) do {
case "Skin_Sniper1_DZ": { _holderItem = ["Skin_Soldier1_DZ","Skin_Sniper1_DZ","Skin_Rocket_DZ","Skin_Camo1_DZ","Skin_Sniper1_DZ"] call BIS_fnc_selectRandom };
case "ItemSodaMdew": { _holderItem = ["Skin_Soldier1_DZ","Skin_Sniper1_DZ","Skin_Rocket_DZ","Skin_Camo1_DZ","Skin_Sniper1_DZ"] call BIS_fnc_selectRandom };
case "ItemTankTrap": { _holderItem = ["Skin_Soldier1_DZ","Skin_Sniper1_DZ","Skin_Rocket_DZ","Skin_Camo1_DZ","Skin_Sniper1_DZ"] call BIS_fnc_selectRandom };
case "ItemSandbag": { _holderItem = ["Skin_Soldier1_DZ","Skin_Sniper1_DZ","Skin_Rocket_DZ","Skin_Camo1_DZ","Skin_Sniper1_DZ"] call BIS_fnc_selectRandom };
default {};
};
_iItem = _holderItem;
switch (_iClass) do {
default {
//Item is food, add random quantity of cans along with an item (if exists)
_item = createVehicle ["WeaponHolder", _iPos, [], _radius, "CAN_COLLIDE"];
_itemTypes = [] + ((getArray (configFile >> "cfgLoot" >> _iClass)) select 0);
_index = dayz_CLBase find _iClass;
_weights = dayz_CLChances select _index;
_cntWeights = count _weights;
_qty = 0;
_max = ceil(random 2) + 1;
while {_qty < _max} do {
_tQty = round(random 1) + 1;
_index = floor(random _cntWeights);
_index = _weights select _index;
_canType = _itemTypes select _index;
_item addMagazineCargoGlobal [_canType,_tQty];
_qty = _qty + _tQty;
};
if (_iItem != "") then {
_item addWeaponCargoGlobal [_iItem,1];
};
};
case "weapon": {
//Item is a weapon, add it and a random quantity of magazines
_item = createVehicle ["WeaponHolder", _iPos, [], _radius, "CAN_COLLIDE"];
_item addWeaponCargoGlobal [_iItem,1];
_mags = [] + getArray (configFile >> "cfgWeapons" >> _iItem >> "magazines");
if ((count _mags) > 0) then {
if (_mags select 0 == "Quiver") then { _mags set [0, "WoodenArrow"] }; // Prevent spawning a Quiver
_item addMagazineCargoGlobal [(_mags select 0), (round(random 2))];
};
};
case "magazine": {
//Item is one magazine
_item = createVehicle ["WeaponHolder", _iPos, [], _radius, "CAN_COLLIDE"];
_item addMagazineCargoGlobal [_iItem,1];
};
case "object": {
//Item is one magazine
_item = createVehicle [_iItem, _iPos, [], _radius, "CAN_COLLIDE"];
};
};
// timestamp for later clearing
_dateNow = (DateToNumber date);
_item setVariable ["looted",_dateNow,true];
if ((count _iPos) > 2) then {
_item setPosATL _iPos;
};
This is what I am doing, hoping to test if it works in-world, but nothing is spawning and I get no error message from my server log, so I believed I have setup everything according to the guide, what could be the problem ? Could it be the spawn_loost.sqf ?
Code:private["_itemType","_iPos","_indexLootSpawn","_iArray","_iItem","_iClass","_item","_qty","_max","_tQty","_arrayLootSpawn","_canType","_holderItem"]; // [_itemType,_weights] _iItem = _this select 0; _iClass = _this select 1; _iPos = _this select 2; _radius = _this select 3; _holderItem = _iItem; switch (_iItem) do { case "Skin_Sniper1_DZ": { _holderItem = ["Skin_Soldier1_DZ","Skin_Sniper1_DZ","Skin_Rocket_DZ","Skin_Camo1_DZ","Skin_Sniper1_DZ"] call BIS_fnc_selectRandom }; case "ItemSodaMdew": { _holderItem = ["Skin_Soldier1_DZ","Skin_Sniper1_DZ","Skin_Rocket_DZ","Skin_Camo1_DZ","Skin_Sniper1_DZ"] call BIS_fnc_selectRandom }; case "ItemTankTrap": { _holderItem = ["Skin_Soldier1_DZ","Skin_Sniper1_DZ","Skin_Rocket_DZ","Skin_Camo1_DZ","Skin_Sniper1_DZ"] call BIS_fnc_selectRandom }; case "ItemSandbag": { _holderItem = ["Skin_Soldier1_DZ","Skin_Sniper1_DZ","Skin_Rocket_DZ","Skin_Camo1_DZ","Skin_Sniper1_DZ"] call BIS_fnc_selectRandom }; default {}; }; _iItem = _holderItem; switch (_iClass) do { default { //Item is food, add random quantity of cans along with an item (if exists) _item = createVehicle ["WeaponHolder", _iPos, [], _radius, "CAN_COLLIDE"]; _itemTypes = [] + ((getArray (configFile >> "cfgLoot" >> _iClass)) select 0); _index = dayz_CLBase find _iClass; _weights = dayz_CLChances select _index; _cntWeights = count _weights; _qty = 0; _max = ceil(random 2) + 1; while {_qty < _max} do { _tQty = round(random 1) + 1; _index = floor(random _cntWeights); _index = _weights select _index; _canType = _itemTypes select _index; _item addMagazineCargoGlobal [_canType,_tQty]; _qty = _qty + _tQty; }; if (_iItem != "") then { _item addWeaponCargoGlobal [_iItem,1]; }; }; case "weapon": { //Item is a weapon, add it and a random quantity of magazines _item = createVehicle ["WeaponHolder", _iPos, [], _radius, "CAN_COLLIDE"]; _item addWeaponCargoGlobal [_iItem,1]; _mags = [] + getArray (configFile >> "cfgWeapons" >> _iItem >> "magazines"); if ((count _mags) > 0) then { if (_mags select 0 == "Quiver") then { _mags set [0, "WoodenArrow"] }; // Prevent spawning a Quiver _item addMagazineCargoGlobal [(_mags select 0), (round(random 2))]; }; }; case "magazine": { //Item is one magazine _item = createVehicle ["WeaponHolder", _iPos, [], _radius, "CAN_COLLIDE"]; _item addMagazineCargoGlobal [_iItem,1]; }; case "object": { //Item is one magazine _item = createVehicle [_iItem, _iPos, [], _radius, "CAN_COLLIDE"]; }; }; // timestamp for later clearing _dateNow = (DateToNumber date); _item setVariable ["looted",_dateNow,true]; if ((count _iPos) > 2) then { _item setPosATL _iPos; };
EDIT - Will try to work on it by myself alittle more.
FIXED: it's more of a problem with the compiler for spawn script, its working now, though I have no time to test the full capability but i saw 1 ghillie suit at a petrol station so it seems to be working, at least for me.
class TK_INS_Soldier_EP1;
class TK_INS_Soldier_EP1: TK_INS_Soldier_EP1 {
displayName = "Bandit";
side = 1;
weapons[] = {"Throw","Put"};
backpack = "";
magazines[] = {};
respawnWeapons[] = {"Throw","Put"};
respawnMagazines[] = {};
weaponSlots = "1 + 4 + 12* 256 + 2* 4096 + 2 + 8* 16 + 12*131072";
canHideBodies = 1;
};
Hmm the variables.sqf didn't seem to effect people being able to get into vehicles with each other. Unless I did it wrong, I added all my models in as you had posted above.
I was looking through everything in the dayz_code pbo and found that the CfgVehicles.hpp has all the skins listed so I added one of the ones I'm having issues with:
Code:class TK_INS_Soldier_EP1; class TK_INS_Soldier_EP1: TK_INS_Soldier_EP1 { displayName = "Bandit"; side = 1; weapons[] = {"Throw","Put"}; backpack = ""; magazines[] = {}; respawnWeapons[] = {"Throw","Put"}; respawnMagazines[] = {}; weaponSlots = "1 + 4 + 12* 256 + 2* 4096 + 2 + 8* 16 + 12*131072"; canHideBodies = 1; };
However I can't seem to find a way to include the file. Any suggestions? I tried going into the mission pbo and added:
#include "fixes\CfgVehicles.hpp" to the top of the description.ext file but the server got stuck on waiting for host. Any input would be greatly appreciated.