Setting up Custom Loadout
Setting up a custom loadout
First, get the item class names from this list:
DayZ SA ClassName Dump on GitHub (thanks to ravmustang)
- 1. Stop the server: click STOP on the Game Server page in the Command Center
- 2. Log in with your FTP program (FileZilla). How to connect: FTP Access.
- 3. Open this folder: /mpmissions/dayzOffline.chernarusplus (on Livonia dayzOffline.enoch, on Frostline dayzOffline.sakhal, on Badlands dayzOffline.nasdara)
- 4. Use Notepad++ to edit the init.c file in that folder.
- Find this section:
override void StartingEquipSetup(PlayerBase player, bool clothesChosen)
{
/*
player.RemoveAllItems();
EntityAI item = player.GetInventory().CreateInInventory(topsMissionArray.GetRandomElement());
EntityAI item2 = player.GetInventory().CreateInInventory(pantsArray.GetRandomElement());
EntityAI item3 = player.GetInventory().CreateInInventory(shoesArray.GetRandomElement());
*/
EntityAI itemClothing;
EntityAI itemEnt;
ItemBase itemBs;
float rand;
itemClothing = player.FindAttachmentBySlotName("Body");
if ( itemClothing )
{
itemEnt = itemClothing.GetInventory().CreateInInventory("Rag");
if ( Class.CastTo(itemBs, itemEnt ) )
itemBs.SetQuantity(4);
SetRandomHealth(itemEnt);
itemEnt = player.GetInventory().CreateInInventory("MP5K");
itemBs = ItemBase.Cast(itemEnt);
itemEnt = itemClothing.GetInventory().CreateInInventory("RoadFlare");
SetRandomHealth(itemEnt);
itemEnt = itemClothing.GetInventory().CreateInInventory("CombatKnife");
SetRandomHealth(itemEnt);
itemEnt = player.GetInventory().CreateInInventory("AssaultBag_Green");
itemBs = ItemBase.Cast(itemEnt);
}
rand = Math.RandomFloatInclusive(0.0, 1.0);
if ( rand < 0.25 )
itemEnt = player.GetInventory().CreateInInventory("SodaCan_Cola");
else if ( rand > 0.75 )
itemEnt = player.GetInventory().CreateInInventory("SodaCan_Spite");
else
itemEnt = player.GetInventory().CreateInInventory("SodaCan_Pipsi");
SetRandomHealth(itemEnt);
rand = Math.RandomFloatInclusive(0.0, 1.0);
if ( rand < 0.35 )
itemEnt = player.GetInventory().CreateInInventory("Apple");
else if ( rand > 0.65 )
itemEnt = player.GetInventory().CreateInInventory("Pear");
else
itemEnt = player.GetInventory().CreateInInventory("Plum");
SetRandomHealth(itemEnt);
}
- 5. Take the new class names from the DayZ SA ClassName Dump on GitHub. Swap the
current items for the ones you want, or copy a code line to add a new item to the list.
The inventory can only hold so much.
itemEnt = itemClothing.GetInventory().CreateInInventory("Battery9V");
SetRandomHealth(itemEnt);
- 6. Once you've made your edits, save the file and upload it back over FTP.
- 7. Start the server again and join it in DayZ
- You only get these items on a new character
Rent a DayZ server from Survival Servers with instant setup.