Setting up Custom Loadout

From Survival Servers
Jump to: navigation, search

Setting up a custom loadout

Before we proceed with setting up custom loadouts. You will want to first head to the following area for the classnames
https://github.com/ravmustang/DayZ_SA_ClassName_Dump *thanks to ravmustang*

1. Bring down the server by hitting stop on the panel
2. Log into your FTP client. (Info here for FTP)
3. Head into the following directory: /mpmissions/dayzOffline.chernarusplus
4. Use Notepad++ to edit the init.c file within the above directory.
  • Look for the following area:
			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 itemTop;
		EntityAI itemEnt;
		ItemBase itemBs;
		float rand;

		itemTop = player.FindAttachmentBySlotName("Body");

		if ( itemTop )
		{
			itemEnt = itemTop.GetInventory().CreateInInventory("Rag");
			if ( Class.CastTo(itemBs, itemEnt ) )
		itemBs.SetQuantity(4);

			SetRandomHealth(itemEnt);

			itemEnt = player.GetInventory().CreateInInventory("MP5K");
			itemBs = ItemBase.Cast(itemEnt);
			
			itemEnt = itemTop.GetInventory().CreateInInventory("RoadFlare");
			SetRandomHealth(itemEnt);

			itemEnt = itemTop.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. From there you will want to grab the new classnames from the link listed at the top of the page. Simply change the

current list out with the new items you wish to have or copy the code line and create a new item to add onto the list.
Do note however that the inventory can only hold so much.

 itemEnt = itemTop.GetInventory().CreateInInventory("Battery9V");
			SetRandomHealth(itemEnt);
6. Once you have made your edits simply save and re upload to the FTP client.
7. Start DayZ Standalone back online and join the server
  • Do note that you will only get these items when starting a fresh character
This page will be updated more as time goes on.