[REQUEST] Custom Loadouts

It would be cool (and an elegant solution) if you could set the start loadout for all players by changing the default values of the Inventory and Backpack columns in the Character_DATA table in the database.
 
i was just going to suggest a Database side edit for this setting the Deafaults in character data upon a new character writing to the DB no idea how u would make this automatic tho
 
Here is a working example for modifying the initial loadout and backpack for all players.
1. Unpack @Server_DayZ.../AddOns/dayz_server.pbo
2. Open compile/server_playerLogin.sqf with an text editor.
3. Replace following lines (84-90)
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;
with
Code:
_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;
4. Modify _inventory and _backpack to your needs. The format is the same as in the database fields of character_data.
5. Save the file and pack the folder back to dayz_server.pbo.

Notice: On my test server my character's backpack was still displayed as Patrol Pack. I had to drop it on the ground to change it into the ALICE Pack. This is probably a bug in the client code of DayZ (I used Lingor Skaro).

---

I also implementing the feature that I suggested in my previous post (use default database values). But it requires a change in the HiveExt.dll. I will open a pull request as soon as I am able to compile and test my modified HiveExt.dll.
 
I try this method, but it's not working for me :( f**k
Maybe instance loadout not in dayz_server?
 
Strange, i'm edit dayz_server.pbo, change crashspawn, start loadout, but nothing changes and all data load by default. Lite server loads the data from there at all?
 
This only broke my server. do you delete everything in the first box, or just paste over from "_randomSpot=true" down? i tried both, and server would not start. Now i'm running a namalsk server, and this was in my @bliss --> addons folder. used nfo editor to edit the file and pbo manager to unpack/pack. Any other way to make custom starter gear?
 
Here is a working example for modifying the initial loadout and backpack for all players.
1. Unpack @Server_DayZ.../AddOns/dayz_server.pbo
2. Open compile/server_playerLogin.sqf with an text editor.
3. Replace following lines (84-90)
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;
with
Code:
_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;
4. Modify _inventory and _backpack to your needs. The format is the same as in the database fields of character_data.
5. Save the file and pack the folder back to dayz_server.pbo.

Notice: On my test server my character's backpack was still displayed as Patrol Pack. I had to drop it on the ground to change it into the ALICE Pack. This is probably a bug in the client code of DayZ (I used Lingor Skaro).

---

I also implementing the feature that I suggested in my previous post (use default database values). But it requires a change in the HiveExt.dll. I will open a pull request as soon as I am able to compile and test my modified HiveExt.dll.


It works!!!

Thanks
 
For me work too, I compile it from reality pack, easy to edit unpacked files)
I'm not delete old dayz_code.pbo, just rename, and server loading all pbo in dir - loot bags and etc ))
 
This only broke my server. do you delete everything in the first box, or just paste over from "_randomSpot=true" down? i tried both, and server would not start. Now i'm running a namalsk server, and this was in my @bliss --> addons folder. used nfo editor to edit the file and pbo manager to unpack/pack.

The first code box is the code that you should find and replace with the code of the second box.

Any other way to make custom starter gear?
No.

As Slim mentioned you don't necessarily have to pack the changed files as PBO (step 5 in my previous post). But make sure to rename/move/delete dayz_server.pbo then. Because ottherwise it will load the unchanged files from the dayz_server.pbo.
 
Is it still in development? Would be very nice to have it as feature?

As I wrote in an earlier post, I did the necessary modifications. But currently I'm not in the position to roll it out. Every version of DayZ, that the Lite server supports, need to change some lines of code to make it work. Stapo should contact me if he is interested in doing this.

So for now you should instead modify you mission file to your needs, as described above. To be able to keep your modified mission up-to-date easily, you should use Git. (https://help.github.com/articles/fork-a-repo may be a good start)
 
You have the codechanges for DayZ+ maybe?
Stapo write him :D
On Reality its possible too. They handled it with an sql entry in db to change that. Would be nix to see it on
Lite DayZ too :)
 
That's the only thing stopping me from switching to this.. Would also like to know if Custom Loadouts are still being worked on?
 
That's the only thing stopping me from switching to this.. Would also like to know if Custom Loadouts are still being worked on?

Aye!! Looking to move hosts tomorrow and I need a new/better Hive as DayZCC is not pleasing me currently. this is also one thing stopping me form moving over
 
Aye!! Looking to move hosts tomorrow and I need a new/better Hive as DayZCC is not pleasing me currently. this is also one thing stopping me form moving over
Same here, been running nothing but DayzCC for almost a year, though now that the development stopped it's time to move on. Recently I've had some issues that may or may not have been caused by bugs in dayzcc, but I'm hoping that this will be more stable granted it's simple.
Tired of stuff breaking, especially when it's causing GT drops from top 10 :(
 
Here is a working example for modifying the initial loadout and backpack for all players.
1. Unpack @Server_DayZ.../AddOns/dayz_server.pbo
2. Open compile/server_playerLogin.sqf with an text editor.
3. Replace following lines (84-90)
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;
with
Code:
_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;
4. Modify _inventory and _backpack to your needs. The format is the same as in the database fields of character_data.
5. Save the file and pack the folder back to dayz_server.pbo.

Notice: On my test server my character's backpack was still displayed as Patrol Pack. I had to drop it on the ground to change it into the ALICE Pack. This is probably a bug in the client code of DayZ (I used Lingor Skaro).

---

I also implementing the feature that I suggested in my previous post (use default database values). But it requires a change in the HiveExt.dll. I will open a pull request as soon as I am able to compile and test my modified HiveExt.dll.


Got this somewhat working. seems to merge the default kit and my custom settings together ....
 
just an idea, cant you modify the server_playerLogin.sqf that it checks the player UIDs?

so if uid = xxx then give this starting loadout, else give standard stuff

or maybe even read UIDs from a table in DB?

my first attempt (im not really a good programmer :S)

Code:
    if(_playerID == ">>>YOURPLAYERIDHERE<<<") then {
    _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;
   
    } else {
   
    //Record initial inventory
    _config = (configFile >> "CfgSurvival" >> "Inventory" >> "Default");
    _mags = getArray (_config >> "magazines");
    _wpns = getArray (_config >> "weapons");
    _bcpk = getText (_config >> "backpack");
    _randomSpot = true;
   
    //Wait for HIVE to be free
    _key = format["CHILD:203:%1:%2:%3:",_charID,[_wpns,_mags],[_bcpk,[],[]]];
    _key call server_hiveWrite;
    };

but it works .. for 1 player ID :D:D
 
Back
Top