[How-To] Customize the Starting Gear/Loadout (no custom dayz_code req.)

quote="Jrb, post: 40742, member: 1784"]Hey guys, I'm having a problem with this. Just testing a few things (added a M240 as a startup weapon), but it doesn't want to work. I feel like I may not be making the array correctly:

Code:
//Variables
_inventory =    [["ItemMap","ItemMatchbox","M240_DZ"],["Skin_Camo1_DZ","100Rnd_M240","100Rnd_M240"]];
_backpack =    [];
_items =        [];
_magazines =    [];
_weapons =        [];
_medicalStats =    [];
_survival =        [0,0,0];
_tent =            [];
_state =        [];
_direction =    0;
_model =        "";
_newUnit =        objNull;
_botActive = false;

It will let me spawn with the M240 (sometimes), but not the ammo. Any ideas?[/quote]


TRY coding it a bit different.

Code:
_inventory = [];
_backpack = [];
_items = [];
_magazines = [["Skin_Camo1_DZ","100Rnd_762x51_M240","100Rnd_762x51_M240"]];
_weapons = [["ItemMap","ItemMatchbox","M240_DZ"]];
_medicalStats = [];
_survival = [0,0,0];
_tent = [];
_state = [];
_direction = 0;
_model = "";
_newUnit = objNull;
_botActive = false;



Also, note that your ammo isn't what it should be (i don't think). The M240 ammo is 100Rnd_762x51_M240, not 100Rnd_M240 (normally).
 
Hey can you put up a list of the item names such as
ItemMap","ItemMatchbox","M240_DZ" and so on and so forth
 
Hey i put this line in

//Variables
_inventory = [];
_backpack = [];
_items = [];
_magazines = [];
_weapons= [["ItemMap","ItemMatchbox"]];
_medicalStats = [];
_survival = [0,0,0];
_tent = [];
_state = [];
_direction = 0;
_model = "";
_newUnit = objNull;
_botActive = false;

and when i go to start it up to check it i get this
Data file to short
'C:\Users\ReaperKiller\Desktop\dayz-private-server\@hive\Addons\day
z-server.pbo',Expected 1649508090 B, got 69125 B
Any suggestions to what i'm doing wrong and what I screwed up?
 
I did the same but in the
//Variables
_inventory = [["ItemMap]];
_backpack = [];
_items = [];
_magazines = [];
_weapons = [];
_medicalStats = [];
_survival = [0,0,0];
_tent = [];
_state = [];
_direction = 0;
_model = "";
_newUnit = objNull;
_botActive = false;
and I get the same thing me and soham r working on the same thing on the same computer and nothing can u pls help out
 
Stichguy - you're missing the ending " in your line

Code:
_inventory = [["ItemMap]];

SoHam - I believe tthe syntax should look like this - I think you had too many brackets.

Code:
_weapons= ["ItemMap","ItemMatchbox"];

Another attempt might look like this.


Code:
_weapons[] = {"ItemMap","ItemMatchbox"};

but I could be wrong... I'm basing it off what can be found in the dayz_code.pbo / config.cpp file.
 
Working example:

_inventory =[["FN_FAL","Binocular","ItemGPS","ItemToolbox","ItemWatch"],["20Rnd_762x51_FNFAL","ItemBandage"]];
_backpack = ["DZ_Backpack_EP1",[[],[]],[["FoodCanSardines","ItemPainkiller","ItemSodaCoke"],[1,1,1]]];
 
ok so i got the server started finally and here is the code i put in but i dont spawn with it
[];
_backpack = [];
_items = ["ItemHatchet"];
_magazines = [];
_weapons = ["M4A1_AIM_SD_camo"];
_medicalStats = [];
_survival = [0,0,0];
 
ok so i got the server started finally and here is the code i put in but dont spawn with it
[];
_backpack = [];
_items = ["ItemHatchet"];
_magazines = [];
_weapons = ["M4A1_AIM_SD_camo"];
_medicalStats = [];
_survival = [0,0,0];

Look at my example. you need to change inventory not items and weapons.
 
I tried that to still no dice.
_inventory = ["M4A1_AIM_SD_camo","Binocular","ItemGPS","ItemToolbox","ItemWatch"];
_backpack = [];
_items = [];
 
Its not the same. I have 2 brackets inside the first bracket. You only have one. Try my example and then change the items.
 
Ok I fixed it. Now I feel like a dumbass lol. But next thing to tackle is adding a backpack to it.
 
I am not having any luck with this edit.

Code:
_inventory =[["FN_FAL","Binocular","ItemGPS","ItemToolbox","ItemWatch"],["20Rnd_762x51_FNFAL","ItemBandage"]];
_backpack = ["DZ_Backpack_EP1",[[],[]],[["FoodCanSardines","ItemPainkiller","ItemSodaCoke"],[1,1,1]]];
 
i think you can do that bey adding the playeruid to the sqf file.
playerUID = this select x; (where x is the arrayposition with the playerid. Sont know it.)
And then :
if playerUID = 12345678 then.. . But you need some research to do this.
 
Here's how I accomplished changing the (global) starting loadout:

1) I extracted dayz_server.pbo (located in \DayzFolder\@hive\Addons) using PBOView to a separate folder and edited the file compile\server_playerLogin.SQF

2) The working loadout I've got located at or around line 27 just under the "\\Variables" comment:

Code:
_inventory =    [["ItemFlashlight","ItemHatchet","ItemKnife","ItemCompass","ItemToolbox","ItemMatchbox","ItemMap"],["FoodCanBakedBeans","ItemSodaPepsi","ItemBandage","ItemPainkiller"]];
_backpack =    ["DZ_Patrol_Pack_EP1",[[],[]],[["FoodCanPasta","ItemAntibiotic","ItemSodaCoke"],[1,1,1]]];

These are the only two lines I've modified. I use the DayZ Loadout Generator to generate the code necessary for insertion per item.

Once completed, I re-packed this server_playerLogin.sqf back into a newly-created dayz_server.pbo and then placed it back in the original \dayzfolder\@hive\addons folder.

Hope this helps,

B
 
Can someone help me out please we're trying to sort out custom load outs with no luck if someone could take a look and maybe rewrite it so it may work ill be very happy
Code:
// Statistics
_inventory        = [["Colt1911","ItemHatchet","ItemGPS","ItemMap","ItemCompass"],["ItemSodaPepsi","FoodCanBakedBeans","ItemBandage","ItemBandage","ItemBandage","7Rnd_45ACP_1911","7Rnd_45ACP_1911","ItemPainkiller","ItemAntibiotic"]];
_backpack        = [["DZ_Assault_Pack_EP1"]];
_items            = [];
_magazines        = [];
_weapons        = [];
_medicalStats    = [];
_survival        = [0,0,0];
_tent            = [];
_state            = [];
_direction        = 0;
_model            = "";
_newUnit        = objNull;
_botActive        = false;
 
Im curious as to where my control panel tool writes too. My server host gives us a tool with drop down bars to select custom loadout for players but it is very limited in its selection. Id like to find where it writes too and edit that. When I open the compile/server_playerLogin.sqf the _inventory line is blanks, so it's not writing to this folder.
 
I don't believe this is working for 1.8 anymore.

They seem to have a random selection of loot which is pulled in from somewhere, hopefully I can work it out, but so far its abnormally hard to find.
 
Back
Top