Jump to content
  • 0

Default Loadouts for Epoch 1.0.6.2


Cyrus

Question

I found this on another forum, but seeing as I am truly dedicated to this one, I thought I'd share what i have found concerning the question I see a lot of people ask regarding default loadouts for everyone, including respawns and new players to the server. Its customizable with current 1.0.6.2 class IDs.

Unpack dayz_server.pbo and navigate to the compiles folder. Open the file named server_playerlogin.sqf. Find the follow block of code :

_config = (configFile >> "CfgSurvival" >> "Inventory" >> "Default");
_mags = getArray (_config >> "magazines");
_wpns = getArray (_config >> "weapons");
_bcpk = getText (_config >> "backpack");
_randomSpot = true;
_key = format["CHILD:203:%1:%2:%3:",_charID,[_wpns,_mags],[_bcpk,[],[]]];
_key call server_hiveWrite;

and comment this out by adding /* */ to the top and bottom of this code block. Like this 

/*
_config = (configFile >> "CfgSurvival" >> "Inventory" >> "Default");
_mags = getArray (_config >> "magazines");
_wpns = getArray (_config >> "weapons");
_bcpk = getText (_config >> "backpack");
_randomSpot = true;
_key = format["CHILD:203:%1:%2:%3:",_charID,[_wpns,_mags],[_bcpk,[],[]]];
_key call server_hiveWrite;
*/

Then directly underneath this paste the following and configure to your liking. I have tried this and it works.  To understand the logic, it is pointless to add a custom sqf in the mission folder, whether it be inside the init.sqf or a "exeVM" or a "call" method pointing to another custom sqf file seeing as the init is processed before server_playerlogin.sqf. 

_randomSpot = true;
 
_inventory = [["ItemFlashlight","ItemMap","ItemGPS","NVGoggles","AK_74"],["ItemBandage","ItemPainkiller","30Rnd_545x39_AK"]];
_backpack = ["DZ_ALICE_Pack_EP1",[],[]];
_key = format["CHILD:203:%1:%2:%3:",_charID,_inventory,_backpack];
_key call server_hiveWrite;

Here is a list of most of the class ID's currently being used. Not all of them are there, but for this purpose you will find it more than adequate.

https://forums.dayz.com/topic/137361-dayz-chernarus-class-ids/ 

Finally we can now lay this beast to rest. Hope this will help many solve their default loadouts. I can recommend <ESSV3>  by @ebayShopperif you need more than a single loadout for all spawns.

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

Why not just change it in the init where the devs have so conveniently placed it?

// Uncomment the lines below to change the default loadout
DefaultMagazines = ["ItemBandage","ItemBandage","ItemBandage","ItemBandage","ItemPainkiller","ItemMorphine","ItemBloodbag","15Rnd_9x19_M9","15Rnd_9x19_M9","15Rnd_9x19_M9","15Rnd_9x19_M9"];
DefaultWeapons = ["ItemMap","ItemFlashlight","ItemCompass","ItemWatch","ItemToolbox","ItemRadio","ItemHatchet","M9_DZ"];
DefaultBackpack = "DZ_ALICE_Pack_EP1";
DefaultBackpackItems = []; // Can include both weapons and magazines i.e. ["PDW_DZ","30Rnd_9x19_UZI"];

 

Link to comment
Share on other sites

  • 0
6 minutes ago, kingpapawawa said:

Why not just change it in the init where the devs have so conveniently placed it?


// Uncomment the lines below to change the default loadout
DefaultMagazines = ["ItemBandage","ItemBandage","ItemBandage","ItemBandage","ItemPainkiller","ItemMorphine","ItemBloodbag","15Rnd_9x19_M9","15Rnd_9x19_M9","15Rnd_9x19_M9","15Rnd_9x19_M9"];
DefaultWeapons = ["ItemMap","ItemFlashlight","ItemCompass","ItemWatch","ItemToolbox","ItemRadio","ItemHatchet","M9_DZ"];
DefaultBackpack = "DZ_ALICE_Pack_EP1";
DefaultBackpackItems = []; // Can include both weapons and magazines i.e. ["PDW_DZ","30Rnd_9x19_UZI"];

 

I have tried that. For me that method doesnt work. nor calling a custom sqf

Link to comment
Share on other sites

  • 0

well it probably doesn't work because your server_playerLogin file is missing lines of code essential to the variables actually doing anything. Please ensure your server is properly updated to 1.0.6.2 by comparing files between those in the server pack and your dayz_server.pbo (Notepad++ has an excellent compare plugin).

You can see the code required highlighted here: https://github.com/EpochModTeam/DayZ-Epoch/blob/eaaedf21c057cb183d169c133fc49e156b61f2bc/SQF/dayz_server/compile/server_playerLogin.sqf#L119-L129

Link to comment
Share on other sites

  • 0

I have the same problem.  I compared the plug in and it is exactly the same and, no matter what i do, the player alwas respawn (when die) with road flares, some ceral mix, water, a PM, 2 magazines, 1 bandage and nothing more (no map... nothing at all)

I used both solution... somewhere, some code is overwriting what I write. ...

(So far... everything is working: spawn selection, marks, missions, ai... perfect.... only this is what I am missing)

Link to comment
Share on other sites

  • 0

Ok... found what I was doing wrong considering ESS

I was doing the default loadout in the init from my mpmission folders but... I never thought in the Spawn selection.

So... I let the default loadout (considering disconnections) and I modify the config from the folder spawn. I still didnt changed other character but the main survivor.

Lets see if it work.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Discord

×
×
  • Create New...