Jump to content
  • 0

Default Spawn Loadout


Bandus

Question

Greetings! I have been wanting to change the loadout that players start with when they spawn. I researched this on the Epoch wiki and it is my understanding that the init.sqf in the \Arma 2 Operation Arrowhead\MPMissions\DayZ_Epoch_11.Chernarus folder can be edited to allow for this. The wiki section I found was this one: http://dayzepoch.com/wiki/index.php/Init.sqf#Customize_fresh_spawn_loadout

 

I modified the relevant section in my init.sqf in the \Arma 2 Operation Arrowhead\MPMissions\DayZ_Epoch_11.Chernarus and it now looks like this:

 

// Default gear
DefaultMagazines = ["ItemBandage","ItemPainkiller","8Rnd_9x18_Makarov"]; 
DefaultWeapons = ["ItemFlashlight","ACRE_PRC152","Makarov"]; 
DefaultBackpack = "DZ_Patrol_Pack_EP1"; 
DefaultBackpackWeapon = "";

 

 
However, upon spawning into the game, players instead receive the following: 1x Bandage, 1x Painkiller, 1x Flashlight, 1x Patrol Pack. They do not receive the Makarov, the ammunition for the Makarov, or the ACRE radio. I have confirmed I can manually add these to a player directly into SQL. 
 
I am baffled as to why the other items aren't spawning and I was hoping someone might have some input as to what I am missing. Thanks!
Link to comment
Share on other sites

10 answers to this question

Recommended Posts

  • 0

In an effort to test this theory, I changed the lines in the init.sqf to this:

 

// Default gear
DefaultMagazines = ""; 
DefaultWeapons = ""; 
DefaultBackpack = ""; 
DefaultBackpackWeapon = "";
 
Upon spawning for the first time, characters still receive 1x Bandage, 1x Painkiller, 1x Flashlight, 1x Patrol Pack, just like before. It is almost as if that loadout is being pulled from somewhere else.
 
 
Edit: I completely rebuilt the server from the ground up and decided to use Bungle's custom server pack found here: http://dayzepoch.com/forum/index.php?/topic/431-release-custom-chernarus-server-pack-121/
 
In this server pack, by default, the init.sqf contains the following lines:
 
// Default Loadout Config for New Spawns
DefaultMagazines = ["8Rnd_9x18_Makarov","ItemBandage","ItemBandage","ItemMorphine","ItemPainkiller","ItemWaterbottleUnfilled"];
DefaultWeapons = ["ItemFlashlight","ItemWatch","ItemCompass","Makarov"];
DefaultBackpack = "DZ_Patrol_Pack_EP1";
DefaultBackpackWeapon = "";
 
However, upon spawn/respawn players still continue to receive only 1x Bandage, 1x Painkiller, 1x Flashlight, 1x Patrol Pack. Of course, I am placing no blame on the custom server pack, however, I am starting to wonder if this maybe isn't some type of bug with Epoch itself?
Link to comment
Share on other sites

  • 0

I have continued to work on trying to figure this out without getting any traction unfortunately.

 

Once thing I noticed that is odd, and probably a clue to the problem, is that sometimes when a new player logins in, the SQL database shows the default loadout I intend for them to have. However, the player reports that they only see 1x Bandage, 1x Painkiller, 1x Flashlight, 1x Patrol Pack, in their gear. When the player logs out and SQL refreshes, their inventory in SQL changes to indeed reflect only those 4 items.

 

This is one of the last elements I'm working on to get the server exactly the way we'd like it so I would really appreciate any thoughts or ideas anyone may have. Thank you!

Link to comment
Share on other sites

  • 0

Despite a lot of research and PMs to several folks on the forums that appear experienced with server config, I have still not managed to figure out this issue. I hate bumping my own post, but, I would like to renew my call to anyone who may have an idea of why this isn't working to reply or PM me. I really appreciate it!

Link to comment
Share on other sites

  • 0

i currently have mine set to 

DefaultMagazines = ["ItemBandage","FoodCanFrankBeans","ItemWaterbottleUnfilled","SmokeShellRed","HandRoadFlare"]; 
DefaultWeapons = ["ItemCompass"]; 
DefaultBackpack = ""; 
DefaultBackpackWeapon = "";

with no problems however i do recall when i was hosting with dayz.st it wouldn't work. If this was a problem with them or my mistake i don't know as i moved host shortly after due to lots of problems with them and epoch.

Link to comment
Share on other sites

  • 0

I believe I have resolved this issue at long last. I was reading a post that was related in a way to this, located here: http://dayzepoch.com/forum/index.php?/topic/840-donator-spawn-loadout-without-database-triggers/

 

In my dayz_server.pbo, in the server_playerlogin.sqf file, the spawn setup lines (i.e. _inventory, _backpack, etc.) were not commented out, they were simply blank. However, I believe that was having an affect on the spawn loadout because after commenting these out the default loadout set in init.sqf appears to be working fine. 

 

However, I will point out that Bungle's Custom Server pack nor vanilla Epoch seems to come with these lines commented out by default which means that the settings for default spawn loadout in init.sqf will not work by default. Thank you all for the ideas and thoughts and attempts to help. I appreciate it!

Link to comment
Share on other sites

  • 0

The problem is with the custom pack's admin tools. Here is the easy fix in the init.sqf

///////////////////////////////////////////////////////////////////////////////////////////
// Default Player Monitor
 
 _playerMonitor = [] execVM "\z\addons\dayz_code\system\player_monitor.sqf";  <---- this is good, uncomment this.
 
///////////////////////////////////////////////////////////////////////////////////////////
 
///////////////////////////////////////////////////////////////////////////////////////////
// Admin Tools Player Monitor
 
//_playerMonitor = [] execFSM "admintools\player_monitor.fsm";  <----- this is bad.. comment this out.
 
///////////////////////////////////////////////////////////////////////////////////////////
 
Now it wont ignore your settings like custom loadout.
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
  • Advertisement
  • Discord

×
×
  • Create New...