Setting up Custom Loadout: Difference between revisions
Jump to navigation
Jump to search
[wiki:wiki-operator] Add the Badlands mission folder, dayzOffline.nasdara (Ryan yes 10/27) |
[wiki:wiki-operator] Reworded to the house writing rules; facts that were wrong today corrected (approved by Ryan, Nov 17) |
||
| Line 2: | Line 2: | ||
== Setting up a custom loadout == | == Setting up a custom loadout == | ||
First, get the item class names from this list: <br> | |||
[https://github.com/ravmustang/DayZ_SA_ClassName_Dump DayZ SA ClassName Dump on GitHub] ''(thanks to ravmustang)'' | [https://github.com/ravmustang/DayZ_SA_ClassName_Dump DayZ SA ClassName Dump on GitHub] ''(thanks to ravmustang)'' | ||
:1. | :1. Stop the server: click STOP on the Game Server page in the Command Center | ||
:2. Log | :2. Log in with your FTP program (FileZilla). How to connect: [[FTP Access|FTP Access]]. | ||
:3. | :3. Open this folder: /mpmissions/dayzOffline.chernarusplus (on Livonia dayzOffline.enoch, on Frostline dayzOffline.sakhal, on Badlands dayzOffline.nasdara) | ||
:4. Use [https://notepad-plus-plus.org/downloads/ Notepad++] to edit the init.c file | :4. Use [https://notepad-plus-plus.org/downloads/ Notepad++] to edit the init.c file in that folder. | ||
::::* | ::::*Find this section: | ||
<pre> override void StartingEquipSetup(PlayerBase player, bool clothesChosen) | <pre> override void StartingEquipSetup(PlayerBase player, bool clothesChosen) | ||
{ | { | ||
| Line 69: | Line 69: | ||
</pre> | </pre> | ||
:5. | :5. Take the new class names from the DayZ SA ClassName Dump on GitHub. Swap the <br> | ||
current | current items for the ones you want, or copy a code line to add a new item to the list. <br> | ||
The inventory can only hold so much. | |||
<pre> itemEnt = itemClothing.GetInventory().CreateInInventory("Battery9V"); | <pre> itemEnt = itemClothing.GetInventory().CreateInInventory("Battery9V"); | ||
| Line 77: | Line 77: | ||
</pre> | </pre> | ||
:6. Once you | :6. Once you've made your edits, save the file and upload it back over FTP. | ||
:7. Start | :7. Start the server again and join it in DayZ | ||
::::* | ::::*You only get these items on a new character | ||
[https://www.survivalservers.com/services/game_servers/dayz/ Rent a DayZ server] from Survival Servers with instant setup. | |||
Latest revision as of 09:05, 17 November 2026
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.