So I have been getting a lot of help from here with setting up my server, so I figured I would start making Tutorials on what I have learned.
As follows are the instructions to change the starting gear from the default "bandage/painkiller/flashlight" to what ever you want, and how to set up custom gear for different users based on their UIDs. This is not completely my work, some came from Axeman and AsianKid.
Original Post
Setting Up the Default Load-out (no custom loadouts)
To start, this is tested on 1.0.2.4-5, and uses variables that Epoch Devs added to the Server Code.
DefaultMagazines = [];
DefaultWeapons = [];
DefaultBackpack = "";
DefaultMagazines is for any item you place in your primary(food, ammo, parts, money) or secondary(bandages, clips, m203 rounds) inventory.
DefaultWeapons is for any guns/rifles or kit(hatchet, map, Bbnoculars, NVGs) items.
DefaultBackpack is as it would sound, the pack you start out with.
You will also see DefaultBackpackWeapon = ""; in my loadout script, I assume it adds items to your back pack, but I don't know its limitations, if I can use guns and ammo.
Inserting it into your code is easy. Open the init.sqf in your mission folder or mission.pbo.
At about line 20 of a stock Epoch init.sqf file you will find this:
// DayZ Epoch config
spawnShoremode = 1; // Default = 1 (on shore)
spawnArea= 1500; // Default = 1500
MaxHeliCrashes= 5; // Default = 5
MaxVehicleLimit = 300; // Default = 50
MaxDynamicDebris = 500; // Default = 100
dayz_MapArea = 14000; // Default = 10000
dayz_maxLocalZombies = 30; // Default = 30
Below this, add the following:
//Default Loadout
DefaultMagazines = ["ItemBandage","ItemBandage","17Rnd_9x19_glock17","17Rnd_9x19_glock17","ItemMorphine","ItemPainkiller","ItemWaterbottleBoiled","FoodSteakCooked"];
DefaultWeapons = ["glock17_EP1","ItemFlashlight","ItemHatchet"];
DefaultBackpack = "DZ_Patrol_Pack_EP1";
DefaultBackpackWeapon = "";
Here I have configured the default load-out to be a G17 and 2 clips, 2 bandages, one Morphine, Painkillers, Clean Water, Cooked Steak, a Flashlight and Hatchet. You can change the variables your self to what would be best for your server, including removing everything so players don't even get the stock dayz load-out.
Custom Load-Outs (includes default load-out)
But, you want even more controls, like load-outs for donators or admins. Thats easy, instead of the above we are going to put all the settings in a loadout.sqf and save that to a "Scripts" folder in our mission folder or mission.pbo.
First, create a new folder in the Mission folder or PBO named Scripts.
Then Create a new text document in that folder called "loadout.sqf", is will warn you that you are changing the file type, thats ok.
Copy this code into your new lodout.sqf:
//Default Loadout
DefaultMagazines = ["ItemBandage","ItemBandage","17Rnd_9x19_glock17","17Rnd_9x19_glock17","ItemMorphine","ItemPainkiller","ItemWaterbottleBoiled","FoodSteakCooked"];
DefaultWeapons = ["glock17_EP1","ItemFlashlight","ItemHatchet"];
DefaultBackpack = "DZ_Patrol_Pack_EP1";
DefaultBackpackWeapon = "";
//Admin Loadout
if ((getPlayerUID player) in ["12345678","98765432"]) then { //Admins: Nobody, Somebody
DefaultMagazines = ["ItemBandage","ItemBandage","ItemBandage","ItemBandage","17Rnd_9x19_glock17","17Rnd_9x19_glock17","ItemMorphine","ItemPainkiller","ItemBloodbag","ItemWaterbottleBoiled","ItemWaterbottleBoiled","FoodSteakCooked","20Rnd_B_AA12_74Slug","20Rnd_B_AA12_Pellets","20Rnd_B_AA12_Pellets","ItemGoldBar10oz"];
DefaultWeapons = ["glock17_EP1","AA12_PMC","Binocular_Vector","NVGoggles","ItemMap","ItemCompass","ItemGPS","ItemWatch","ItemKnife","Itemtoolbox","ItemCrowbar","Itemetool","ItemHatchet"];
DefaultBackpack = "DZ_LargeGunBag_EP1";
DefaultBackpackWeapon = "";
};
//Moderator Loadout
if ((getPlayerUID player) in ["14725836"]) then { //Moderators: ThatOtherGuy
DefaultMagazines = ["ItemBandage","ItemBandage","ItemBandage","ItemBandage","17Rnd_9x19_glock17","17Rnd_9x19_glock17","ItemMorphine","ItemPainkiller","ItemBloodbag","ItemWaterbottleBoiled","ItemWaterbottleBoiled","FoodSteakCooked","8Rnd_B_Saiga12_Pellets","8Rnd_B_Saiga12_Pellets","8Rnd_B_Saiga12_74Slug","ItemGoldBar10oz"];
DefaultWeapons = ["glock17_EP1","Saiga12K","Binocular_Vector","NVGoggles","ItemMap","Itemtoolbox"];
DefaultBackpack = "DZ_Backpack_EP1";
DefaultBackpackWeapon = "";
};
//Pro-Donator Loadout
if ((getPlayerUID player) in ["96385274"]) then { //Pro-Donators: MoneyBags
DefaultMagazines = ["ItemBandage","ItemBandage","ItemBandage","ItemBandage","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","ItemMorphine","ItemPainkiller","ItemBloodbag","ItemWaterbottleBoiled","ItemWaterbottleBoiled","FoodSteakCooked","8Rnd_B_Beneli_Pellets","8Rnd_B_Beneli_Pellets","8Rnd_B_Beneli_74Slug","ItemGoldBar10oz"];
DefaultWeapons = ["M9SD","Remington870_lamp","Binocular","ItemMap","ItemCompass","ItemFlashlightRed","ItemKnife","ItemMatchbox","ItemHatchet"];
DefaultBackpack = "DZ_GunBag_EP1";
DefaultBackpackWeapon = "";
};
//Donator Loadout
if ((getPlayerUID player) in ["456789123"]) then { //Donators: Nobody
DefaultMagazines = ["ItemBandage","ItemBandage","ItemBandage","ItemBandage","ItemMorphine","ItemPainkiller","ItemGoldBar","15Rnd_W1866_Slug","15Rnd_W1866_Slug"];
DefaultWeapons = ["glock17_EP1","Winchester1866","ItemMap","ItemFlashlightRed","ItemHatchet"];
DefaultBackpack = "DZ_ALICE_Pack_EP1";
DefaultBackpackWeapon = "";
};
Hit save then start looking it over. Here we set the default loadout, then we check to see if the player is anyone we know from admins to donators, and set their loadout outs accordingly.
You will need the Players UID you can ask them for it, or if they have been on your server and you have database access then you can find it under "player_data".
In the code put their UID in the same place you see the seven or eight number groupings surrounded by parenthesis " and seperated by commas , if you are setting more than one user for that group. I also write their names at the end of the line in the order that they are placed so I can go back and remember them later.
You can edit the different load-outs for each User Group and add more by copying one group and changing the UIDs.
Safe the file and Open your init.sqf in your mission folder or mission.pbo. Fine the following lines:
if (!isDedicated) then {
//Conduct map operations
0 fadeSound 0;
waitUntil {!isNil "dayz_loadScreenMsg"};
dayz_loadScreenMsg = (localize "STR_AUTHENTICATING");
//Run the player monitor
_id = player addEventHandler ["Respawn", {_id = [] spawn player_death;}];
_playerMonitor = [] execVM "\z\addons\dayz_code\system\player_monitor.sqf";
_void = [] execVM "R3F_Realism\R3F_Realism_Init.sqf";
//Lights
//[0,0,true,true,true,58,280,600,[0.698, 0.556, 0.419],"Generator_DZ",0.1] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf";
};
Above "//Run the player monitor" add the following:
//Custom Loadouts
[] ExecVM "Scripts\loadout.sqf";
Now we have called the load-out script, and the world is a better place. Save your work, upload your files, and start your server to test out the scripts. Remember, you have to re-spawn for it to work.
UPDATE
So with each update the epoch devs are giving us server admins more varibles to call and edit in our init.sqf. My hope is they will add a varible to set the default skin when you load in. (logic must be applied when users select between a Male and Female character. Either it ignores females, or it allows for a array to be set: ["Male_Skin","Female_Skin"])
Further, I would like to make it easyier to set up items in these arrays, but as with everything, it becomes hard. I myself had to visit no less that 5 diffrent sorces to find all the "Item IDs" for diffrent items. But, my current data base is pretty current, with most of the non-OP items listed. Here is a link of the items you can buy and sell on my server all listed by their "ItemID" and organised in a way thats easy to read.
As for posts 8-13, I can give no reasoning why the script is failing for them. I my self have broken it many times by forgetting a comma between UIDs, but this only leads to players not getting their custom loadouts, I have not experianced any server issues or stalls from this edit, and I will be the first to admit I dont always know what I'm doing and I am always breaking my server with something.
Ghost of Chernarus
A map pack specifically made for Epoch
Hello guys and girls.
I'd like to preview the Chernarus Overhaul I am working on - a collection of map packs focusing on Epoch's Core zones.
Features:
Better protection at Trader Cities
Immersive, some pretty eccentric structures
Fully modular - each spot is a seperate sqf
Hours of optimization work to reduce file size and increase performance
Two projects of Fortresses ready for NPCs - one small, one excessively large (approx. 2x2 kilometers of platforms in the ocean)
Alternative versions of the maps coming in the future to offer options and variants: No fuelpump in Klen / No Zombies / Less Objects / More entrances etc.
More alternative versions tailored to your personal wishes, just post em here =)
Current Progress:
PDF Readme / Screenshots / Map Locations: http://www.charlatan.at/DayZ/GOC.pdf
FAQ:
OMG I get an Error Message about "missing content" for "aif1_buildings" or "pook_h13"
Don't worry, that didn't do any harm. Standard Epoch includes these two files, but they are not used on Chernarus so the Mod does not find them.
The Readme file included in the download has instructions on page 2 how to remove the error message !
You can play without any problems despite getting the error message, btw.
How do I install this?
I suggest using the server.pbo, the Readme file has installation instructions !
Do I need to change/add the traders manually?
No, the traders and their market stalls all remain unchanged.
Does the Castle in Klen disappear?
No, it will all be normal ingame. The Castle is simply not visible in the editor, thus missing on my screenshots.
Permissions/Credits:
As long as players enjoy them, feel free to edit / modify my maps however you like. Just don't claim them as your own work ;)
Without the Epoch Mod, I wouldn't have worked on these map upgrades for Chernarus, so most credit goes to the Epoch Team!
well, just putting the changed file in the mission PBO won't do a thing. the clients will download it but not use it unless it's somehow linked to the init.sqf in your mission.PBO.
here's a quick howto:
1: go into your mission folder.
2: create a folder called scripts if it doesnt exists yet.
3: put your own version of local_eventKill.sqf in the scripts folder
4: create a file called compiles.sqf inside the scripts folder and put the following in it:
local_eventKill = compile preprocessFileLineNumbers "scripts\local_eventKill.sqf"; //Generated when something is killed
5: save the file
6: open init.sqf in your mission folder
7: look for:
progressLoadingScreen 1.0;
8: insert under this line:
call compile preprocessFileLineNumbers "scripts\compiles.sqf"; //Compile custom compiles
9: save the file.
10: done
What this does is overwrite the local_eventKill attribute difined in the dayz epoch client files (dayz_code/init/compiles.sqf) to now point to the file in your mission folder.