Inkko
Valued Member!
I finally got this working the other day after staying up all night. I'm fairly sure I've tested it all and gotten it to work, the only bugs i can seem to find are switching from survivor to hero and then hero to survivor or vice-versa for bandits. It doesn't seem to want to switch from hero/bandit to survivor unless you die. I haven't tested getting a humanity morph and then dying then trying to see if i can get back to survivor but I felt like it wouldn't be that bad to go ahead and share what I've done. I feel like its still in testing but it seems to be working pretty well so far on 1.7.7.1.
The files you will need to do it are in your mission, server, and your dayz_code pbo. All files will end up in the mission pbo you just need to pull some files from dayz_code (mainly due to .st not allowing access to dayz_code).
Unpack your mission and server pbo.
In your server pbo go into the compile folder and open server_playerlogin.sqf for editing.
look for the line containing:
This portion is where you will add skins that will be usable. I added all the skins that are unbanned in 1.7.7.1 so my results looked like this (some skins ended up not working):
After this step we will now modify the skins that survivors will spawn with. It is the line right under the previous line we just edited that should say:
You can pick which skins you would like survivors to be able to spawn with and add them in like this:
Make sure to test each skin you will use, not all skins will allow back packs, I went through and checked all the ones I used. If you use different skins then I used make sure to change the 'select floor random #' to however many skins you chose. After this step you are done with the server pbo and I have hopefully not completely confused you. You should keep this file open for reference. On to the next step where it gets even more confusing.
Unpack you dayz_code and you will need to take out the compiles.sqf (init folder), player_spawn_2.sqf (system), and player_wearClothes.sqf (actions folder). Place those 3 files in the root of your mission folder (I don't like making fixes folders I like it all in one folder so you can adjust and make folders if needed). After this step you are done with the dayz_code pbo and can exit out of it. Now all thats left is the mission pbo and the remaining files to edit.
Now we are in the mission folder. Open up your init.sqf and look for:
change this to:
or if you are putting it in a folder make the correct adjustments. Then you are done with the init.sqf. Next open up compiles.sqf and look for these two lines to make changes to (they are nott next to eachother:
for each of those lines change them to look like this (unless using a fixes folder):
You are now done with the compiles.sqf. Next we will open player_wearClothes.sqf. This is where it will get even more confusing.
We will be changing this portion of code:
We will be adding the new survivor skins we added in to be able to change to their respective bandit/hero skins I believe this part is only for if there are skin parcels that you can use but I believed I should do it just incase it effected anything. After completing mine it looked like this (using server_playerlogin.sqf as a reference):
Above I added a case for each skin, and then created the 2 randomized skins for each humanity morph. You can switch up the skins however you like as long as its repetitive for what bandits and heros will change to.
The files you will need to do it are in your mission, server, and your dayz_code pbo. All files will end up in the mission pbo you just need to pull some files from dayz_code (mainly due to .st not allowing access to dayz_code).
Unpack your mission and server pbo.
In your server pbo go into the compile folder and open server_playerlogin.sqf for editing.
look for the line containing:
Code:
if (!(_model in ["SurvivorW2_DZ","Survivor2_DZ","Sniper1_DZ","Soldier1_DZ","Camo1_DZ","BanditW1_DZ","Bandit1_DZ","Survivor3_DZ"])) then {
This portion is where you will add skins that will be usable. I added all the skins that are unbanned in 1.7.7.1 so my results looked like this (some skins ended up not working):
Code:
if (!(_model in ["SurvivorW2_DZ","Survivor2_DZ","Sniper1_DZ","Soldier1_DZ","Camo1_DZ","BanditW1_DZ","Bandit1_DZ","Survivor3_DZ","Ins_Soldier_1","CDF_Soldier","CDF_Soldier_Militia","CDF_Soldier_AR","Citizen3","Worker1","Villager1","TK_CIV_Takistani01_EP1","TK_CIV_Takistani05_EP1","TK_INS_Soldier_EP1","CZ_Soldier_DES_EP1","US_Soldier_EP1","GER_Soldier_EP1","BAF_Soldier_MTP","BAF_Soldier_DDPM","BAF_Soldier_L_MTP","BAF_Soldier_L_DDPM","BAF_Soldier_Officer_MTP","BAF_Soldier_Officer_DDPM","BAF_Soldier_Sniper_MTP","BAF_Soldier_SniperH_MTP","BAF_Soldier_SniperN_MTP","Soldier_Crew_PMC"])) then {
After this step we will now modify the skins that survivors will spawn with. It is the line right under the previous line we just edited that should say:
Code:
_model = "Survivor2_DZ";
You can pick which skins you would like survivors to be able to spawn with and add them in like this:
Code:
_model = ["CZ_Soldier_DES_EP1","US_Soldier_EP1","GER_Soldier_EP1","BAF_Soldier_MTP","BAF_Soldier_DDPM","BAF_Soldier_L_MTP","BAF_Soldier_L_DDPM","Survivor2_DZ"] select floor random 8;
Make sure to test each skin you will use, not all skins will allow back packs, I went through and checked all the ones I used. If you use different skins then I used make sure to change the 'select floor random #' to however many skins you chose. After this step you are done with the server pbo and I have hopefully not completely confused you. You should keep this file open for reference. On to the next step where it gets even more confusing.
Unpack you dayz_code and you will need to take out the compiles.sqf (init folder), player_spawn_2.sqf (system), and player_wearClothes.sqf (actions folder). Place those 3 files in the root of your mission folder (I don't like making fixes folders I like it all in one folder so you can adjust and make folders if needed). After this step you are done with the dayz_code pbo and can exit out of it. Now all thats left is the mission pbo and the remaining files to edit.
Now we are in the mission folder. Open up your init.sqf and look for:
Code:
call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\compiles.sqf";
change this to:
Code:
call compile preprocessFileLineNumbers "compiles.sqf";
or if you are putting it in a folder make the correct adjustments. Then you are done with the init.sqf. Next open up compiles.sqf and look for these two lines to make changes to (they are nott next to eachother:
Code:
player_wearClothes = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_wearClothes.sqf";
player_spawn_2 = compile preprocessFileLineNumbers "player_spawn_2.sqf";
for each of those lines change them to look like this (unless using a fixes folder):
Code:
player_wearClothes = compile preprocessFileLineNumbers "player_wearClothes.sqf";
player_spawn_2 = compile preprocessFileLineNumbers "player_spawn_2.sqf";
You are now done with the compiles.sqf. Next we will open player_wearClothes.sqf. This is where it will get even more confusing.
We will be changing this portion of code:
Code:
switch (_item) do {
case "Skin_Sniper1_DZ": {
_model = "Sniper1_DZ";
};
case "Skin_Camo1_DZ": {
_model = "Camo1_DZ";
};
case "Skin_Soldier1_DZ": {
_model = "Soldier1_DZ";
};
case "Skin_Survivor2_DZ": {
_model = "Survivor2_DZ";
if (_isBandit) then {
_model = "Bandit1_DZ";
};
if (_isHero) then {
_model = "Survivor3_DZ";
};
};
};
We will be adding the new survivor skins we added in to be able to change to their respective bandit/hero skins I believe this part is only for if there are skin parcels that you can use but I believed I should do it just incase it effected anything. After completing mine it looked like this (using server_playerlogin.sqf as a reference):
Code:
switch (_item) do {
case "Skin_Sniper1_DZ": {
_model = "Sniper1_DZ";
};
case "Skin_Camo1_DZ": {
_model = "Camo1_DZ";
};
case "Skin_Soldier1_DZ": {
_model = "Soldier1_DZ";
};
case "Skin_Survivor2_DZ": {
_model = "Survivor2_DZ";
if (_isBandit) then {
_model = ["Bandit1_DZ","TK_INS_Soldier_EP1"] select floor random 2;
};
if (_isHero) then {
_model = ["Survivor3_DZ","BAF_Soldier_Officer_MTP"] select floor random 2;
};
};
case "CZ_Soldier_DES_EP1": {
_model = "CZ_Soldier_DES_EP1";
if (_isBandit) then {
_model = ["Bandit1_DZ","TK_INS_Soldier_EP1"] select floor random 2;
};
if (_isHero) then {
_model = ["Survivor3_DZ","BAF_Soldier_Officer_MTP"] select floor random 2;
};
};
case "US_Soldier_EP1": {
_model = "US_Soldier_EP1";
if (_isBandit) then {
_model = ["Bandit1_DZ","TK_INS_Soldier_EP1"] select floor random 2;
};
if (_isHero) then {
_model = ["Survivor3_DZ","BAF_Soldier_Officer_MTP"] select floor random 2;
};
};
case "GER_Soldier_EP1": {
_model = "GER_Soldier_EP1";
if (_isBandit) then {
_model = ["Bandit1_DZ","TK_INS_Soldier_EP1"] select floor random 2;
};
if (_isHero) then {
_model = ["Survivor3_DZ","BAF_Soldier_Officer_MTP"] select floor random 2;
};
};
case "BAF_Soldier_MTP": {
_model = "BAF_Soldier_MTP";
if (_isBandit) then {
_model = ["Bandit1_DZ","TK_INS_Soldier_EP1"] select floor random 2;
};
if (_isHero) then {
_model = ["Survivor3_DZ","BAF_Soldier_Officer_MTP"] select floor random 2;
};
};
case "BAF_Soldier_DDPM": {
_model = "BAF_Soldier_DDPM";
if (_isBandit) then {
_model = ["Bandit1_DZ","TK_INS_Soldier_EP1"] select floor random 2;
};
if (_isHero) then {
_model = ["Survivor3_DZ","BAF_Soldier_Officer_MTP"] select floor random 2;
};
};
case "BAF_Soldier_L_MTP": {
_model = "BAF_Soldier_L_MTP";
if (_isBandit) then {
_model = ["Bandit1_DZ","TK_INS_Soldier_EP1"] select floor random 2;
};
if (_isHero) then {
_model = ["Survivor3_DZ","BAF_Soldier_Officer_MTP"] select floor random 2;
};
};
case "BAF_Soldier_L_DDPM": {
_model = "BAF_Soldier_L_DDPM";
if (_isBandit) then {
_model = ["Bandit1_DZ","TK_INS_Soldier_EP1"] select floor random 2;
};
if (_isHero) then {
_model = ["Survivor3_DZ","BAF_Soldier_Officer_MTP"] select floor random 2;
};
};
};
Above I added a case for each skin, and then created the 2 randomized skins for each humanity morph. You can switch up the skins however you like as long as its repetitive for what bandits and heros will change to.