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

Discussion in 'General Discussion' started by Guidez, Mar 19, 2013.

  1. McKeighan

    McKeighan Well-Known Member

    Joined:
    Jan 8, 2013
    Messages:
    103
    Likes Received:
    6
    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).
     
  2. SoHam

    SoHam New Member

    Joined:
    Jun 2, 2013
    Messages:
    12
    Likes Received:
    0
    Hey can you put up a list of the item names such as
    ItemMap","ItemMatchbox","M240_DZ" and so on and so forth
     
  3. SoHam

    SoHam New Member

    Joined:
    Jun 2, 2013
    Messages:
    12
    Likes Received:
    0
    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?
     
  4. stichguy

    stichguy New Member

    Joined:
    Jun 4, 2013
    Messages:
    1
    Likes Received:
    0
    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
     
  5. McKeighan

    McKeighan Well-Known Member

    Joined:
    Jan 8, 2013
    Messages:
    103
    Likes Received:
    6
    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.
     
  6. NeverUsedID

    NeverUsedID Well-Known Member

    Joined:
    Apr 27, 2013
    Messages:
    160
    Likes Received:
    16
    Working example:

    _inventory =[["FN_FAL","Binocular","ItemGPS","ItemToolbox","ItemWatch"],["20Rnd_762x51_FNFAL","ItemBandage"]];
    _backpack = ["DZ_Backpack_EP1",[[],[]],[["FoodCanSardines","ItemPainkiller","ItemSodaCoke"],[1,1,1]]];
     
  7. SoHam

    SoHam New Member

    Joined:
    Jun 2, 2013
    Messages:
    12
    Likes Received:
    0
    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];
     
  8. NeverUsedID

    NeverUsedID Well-Known Member

    Joined:
    Apr 27, 2013
    Messages:
    160
    Likes Received:
    16
    Look at my example. you need to change inventory not items and weapons.
     
  9. SoHam

    SoHam New Member

    Joined:
    Jun 2, 2013
    Messages:
    12
    Likes Received:
    0
    I tried that to still no dice.
    _inventory = ["M4A1_AIM_SD_camo","Binocular","ItemGPS","ItemToolbox","ItemWatch"];
    _backpack = [];
    _items = [];
     
  10. NeverUsedID

    NeverUsedID Well-Known Member

    Joined:
    Apr 27, 2013
    Messages:
    160
    Likes Received:
    16
    Its not the same. I have 2 brackets inside the first bracket. You only have one. Try my example and then change the items.
     
  11. SoHam

    SoHam New Member

    Joined:
    Jun 2, 2013
    Messages:
    12
    Likes Received:
    0
    Ok I fixed it. Now I feel like a dumbass lol. But next thing to tackle is adding a backpack to it.
     
  12. driztan

    driztan New Member

    Joined:
    Jul 18, 2013
    Messages:
    1
    Likes Received:
    0
    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]]];
     
  13. Festa_PWR

    Festa_PWR New Member

    Joined:
    Jun 11, 2013
    Messages:
    3
    Likes Received:
    0
    I`m struggling with this too. Is this confirmed working with 1.7.7.1?
     
  14. NeverUsedID

    NeverUsedID Well-Known Member

    Joined:
    Apr 27, 2013
    Messages:
    160
    Likes Received:
    16
    Please post your complete inventory Part from the sqf file.
     
  15. leemo

    leemo New Member

    Joined:
    Jun 7, 2013
    Messages:
    22
    Likes Received:
    2
    Is there anyway of assigning these to a players UID?
     
  16. NeverUsedID

    NeverUsedID Well-Known Member

    Joined:
    Apr 27, 2013
    Messages:
    160
    Likes Received:
    16
    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.
     
  17. BDC

    BDC Well-Known Member

    Joined:
    Aug 7, 2013
    Messages:
    60
    Likes Received:
    28
    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
     
  18. gazukdevil

    gazukdevil New Member

    Joined:
    Sep 16, 2013
    Messages:
    1
    Likes Received:
    0
    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;
     
  19. DangerRuss

    DangerRuss OpenDayZ Rockstar!

    Joined:
    Jul 10, 2013
    Messages:
    1,220
    Likes Received:
    67
    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.
     
  20. shinkicker

    shinkicker Administrator Staff Member

    Joined:
    Oct 18, 2012
    Messages:
    741
    Likes Received:
    198
    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.
     

Share This Page