Having trouble with custom skins

[Z.C] Blackman

New Member
Hello,

Me and my clan have recently started our own private server running on Bliss. We quickly started looking around for mods to enhance the DayZ experience and bumped into Rmod. We have succesfully unlocked and added custom vehicles to our server (which was pretty straightforward) and have added custom skins. However, we have run into a couple of roadblocks. Because my scripting/coding skills are very limited I cannot get around some troubles and I was wondering if someone here has the knowledge and time to help me out. I have already searched the tunngle forums extensively for DIY solutions but cannot for the life of me get them to work.

I'll clarify a bit about what we wish to achieve. We're running an RP (roleplaying) server which limits KoS (killing on sight). However, this does seriously limit effective clanplay and most of all clanwars. What we wish to add is first of all custom skins for newspawns to get rid of the generic 'survivor' skins DayZ has by default. This to enhance roleplaying and immersion.
Second, we want to enable 'special' skins for clans (i.e. military skins) to make it easier to identify enemy clans and have KoS enabled in case of clanwars. This to minimize the possibility of 'innocent' players getting killed in the middle of clanwars. This would require me to set skins to player GUID's.

To summarize:
- random custom skins for newspawns
- military skins for clans
- setting skins to GUID

The problems I've run into are as follows. I have gotten the random newspawn skins to work, but they keep spawning with default ARMA2 loadouts (compass, gps, etc...) and sometimes with/without backpacks. The inventory shows the default DayZ backpack however. I wish to remove this but couldn't find a clear answer as to how or got advice that I, with my limited knowledge, was unable to understand.
Second problem I ran into was that certain skins wouldn't load while, according to Rmod, they should be unlocked. These skins include the FR skins (US special forces/soldier skins like FR_Cooper, FR_Ohara).
A third problem is that apparently some skins mess with the ability to get into vehicles. We suddenly found ourselves unable to load into a helicopter with more than 2/3 people (sometimes this would work when we entered it in a certain order, then the next moment it wouldn't).

This last problem is not that much of an issue since we are debating whether we really want choppers ingame or only limit these to the two-seater Littlebirds. However the first two roadblocks we bumped into we really consider a must-have for our server.

Summary:
- getting rid of ARMA2 loadouts on custom skins
- backpacks not working (properly)
- certain skins not working regardless of unbanned status by Rmod
- vehicle passenger limitations forced by custom skins

If certain skins simply cannot work with backpacks this would simply be a limitation we'll have to live with and use skins that can. At the very least we want to enable skins for (the bigger) clans. If anyone is able to help me out this would be grately appreciated.

Final word of warning: I am a scripting/coding noob so you'll have to be gentle with me and don't spam me with pro-tips and lingo ;)
 
Hello,

I and others can certainly help you with this, but I must admit I have no clue how rMod works. I would do it through code instead.

- getting rid of ARMA2 loadouts on custom skins

This I would do by inheriting the classes and overwriting the load out values , it sounds complicated, but its not too much work.

- backpacks not working (properly)

Easy - we can this while we do the above.

- certain skins not working regardless of unbanned status by Rmod

Not a clue, I do the unbanning in dayz_anim/config.cpp (which is perhaps the same as rMod)


- vehicle passenger limitations forced by custom skins

This is likely to be related to the models themselves and there is not a lot you can do there. Arma 2 is a bit sexist and near on all the woman can't drive or hold a gun (the model does not have the needed animations and other stuff). Its also the same for some civilian classes. To get round this you just need to choose a set that can support vehicle entering, driving, backpack carrying and crawling and vaulting. Not that hard, you can just use the editor to find the ones that do.

Only thing with doing it this way is you would need to release your own signed PBO files to everyone who plays on your server, again not hard to do, but requires all players to download your files and have them set in the launch options. So you're effectively releasing your own mod.

For the GUID's this is difficult, perhaps someone else can think of a way, but as far as I know you can't tap them much outside of battleye.

One other point. I would prefer that we keep it to this thread, so its there for others to use and learn from. Although I can share skype with you for debugging and chatting too.
 
Hey man,

First of all thanks for offering your help! Keeping it to this thread is fine with me. I've seen alot of people having trouble with adding custom skins, helping them out in this way seems like a good idea.

Second, let's get started!

How about we get started with adding custom skins for newspawns. I'm thinking I should uninstall the Rmod and just add them through the database manually.
 
Adding Custom Skin for respawn
Open your Dayz_server.pbo / Compile / playerlogin.sqf

Code:
if (!_isNew) then {
        //RETURNING CHARACTER         
        _inventory =    _primary select 4;
        _backpack =    _primary select 5;
        _survival =            _primary select 6;
        _model =                _primary select 7;
        _hiveVer =              _primary select 8;
       
        if (!(_model in ["SurvivorW2_DZ","GUE_Soldier_2","Survivor3_DZ","Sniper1_DZ","GUE_Soldier_2","FR_R","GUE_Soldier_CO","USMC_Soldier_Officer","GUE_Soldier_MG,GUE_Commander","Soldier1_DZ","Camo1_DZ","Bandit1_DZ","Rocket_DZ"])) then {
        _model = ["Survivor2_DZ","GUE_Soldier_2","FR_R","GUE_Soldier_CO","USMC_Soldier_Officer","GUE_Soldier_MG","GUE_Commander"] select floor random 7;
        };
       
} else {
        _model =                _primary select 3;
        _hiveVer =              _primary select 4;
        if (isNil "_model") then {
                _model = "Survivor2_DZ";
        } else {
                if (_model == "") then {
                        _model = "Survivor2_DZ";
                };

Go to
if (!(_model in - And add your models.
For example "GUE_Soldier_2","FR_R","GUE_Soldier_CO","USMC_Soldier_Officer","GUE_Soldier_MG,GUE_Commander"
My added models/skin

No add your models for respawn
["Survivor2_DZ" - "skin1", "skin2", etc.
If its done change the number select floor random 7; <-- i have added 7 models
so my floor random number is 7

Now save your file, put it back into the Compile folder.
Upload and restart your server.
So all new or fresh spawned player get a custom skin.

You have to use the rmod! Thats importend!!
Some of the skins can repair vehicles or something else.
They starts with random stuff, gps,compass etc.
 
Sorry for the late reply, you have one step missing, You need to inherit the base class and then overwrite with the dayz player attributes.

So in dayz_weapons/config.cpp you will find the current model classes:


class Survivor2_DZ : Soldier_Crew_PMC{
displayName = $STR_CHAR_1;
side = TWest;
weapons[] = {"Throw", "Put"};
magazines[] = {};
model = "\dayz\characters\man_survivor";
respawnWeapons[] = {"Throw", "Put"};
respawnMagazines[] = {};
weaponSlots = 1+4+ 12*256+ 2*4096+2+ 8*16 + 12*131072;
canHideBodies = true;
};


Create a new one of these using your arma model:

class GUE_Commander_DZ : GUE_Commander {
displayName = "My New Model";
side = TWest;
weapons[] = {"Throw", "Put"};
magazines[] = {};
model = "\dayz\characters\man_survivor";
respawnWeapons[] = {"Throw", "Put"};
respawnMagazines[] = {};
weaponSlots = 1 + 4 + 12*256 + 2*4096 + 2 + 8*16 + 12*131072;
canHideBodies = true;
};

Now replace the changes that xmoondockx outlined, but instead of having the original arma names, have your new class defination, so 'GUE_Commander_DZ' instead of 'GUE_Commander'.
 
Sorry for the late reply, you have one step missing, You need to inherit the base class and then overwrite with the dayz player attributes.

So in dayz_weapons/config.cpp you will find the current model classes:





Create a new one of these using your arma model:



Now replace the changes that xmoondockx outlined, but instead of having the original arma names, have your new class defination, so 'GUE_Commander_DZ' instead of 'GUE_Commander'.

I have everything working up until this point. Does this have to go in the dayz_weapons/config.cpp? Or can you insert it into the server package (dayz_server.pbo) somewhere? I'd like to keep this server-side only if possible.

Thanks in advance!
 
Sorry for the late reply, you have one step missing, You need to inherit the base class and then overwrite with the dayz player attributes.

So in dayz_weapons/config.cpp you will find the current model classes:





Create a new one of these using your arma model:



Now replace the changes that xmoondockx outlined, but instead of having the original arma names, have your new class defination, so 'GUE_Commander_DZ' instead of 'GUE_Commander'.


OK I'm kind of stumped, I have no config.cpp file in my dayz_weapons.pbo. I've unpacked it, but all there is are the following:
-anim (folder)
-models (folder)
-sounds (folder)
-textures (folder)
-$PBOPREFIX$ (file)
-config (.bin file <- how do I open this? notepad++ can open it but it's mostly a bunch of jumbled 'nul' code.
-stringtable (xml document)
-texHeaders (.bin file)

Also, if I start editing the dayZ files shouldn't I sign a copy of it and have the client download it as well? If so, after figuring out where my config.cpp file is and editing it, how do I go about this?
 
I've unpacked the bin file and added the classes. I couldn't get Rapify to work so I'm using eliteness instead. However when I check the file for syntax errors I get the following message: Line 41 rap: missing inheritence class(es)

Apparently there's something wrong with my code however it all looks fine (example below), should I just ignore this?

example (line 41 is where class GUE_Commander_DZ is located):

Code:
    class GUE_Commander_DZ : GUE_Commander {
        displayName = "My New Model";
        side = TWest;
        weapons[] = {"Throw", "Put"};
        magazines[] = {};
        model = "\dayz\characters\man_survivor";
        respawnWeapons[] = {"Throw", "Put"};
        respawnMagazines[] = {};
        weaponSlots = 1 + 4 + 12*256 + 2*4096 + 2 + 8*16 + 12*131072;
        canHideBodies = 1;
    };
 
    class GUE_Soldier_1_DZ : GUE_Soldier_1 {
        displayName = "My New Model";
        side = TWest;
        weapons[] = {"Throw", "Put"};
        magazines[] = {};
        model = "\dayz\characters\man_survivor";
        respawnWeapons[] = {"Throw", "Put"};
        respawnMagazines[] = {};
        weaponSlots = 1 + 4 + 12*256 + 2*4096 + 2 + 8*16 + 12*131072;
        canHideBodies = 1;
    };

Besides that, I can't seem to fully pack all the files into a bin file. I got it to work once but I compared it to the original in notepad++ and alot of code seemed to be missing, the file was much smaller.

Does this have something to do with the syntax error I'm getting, that it doesn't fully pack because it encounters an error and stops the process from there?
 
some files will be packed in a .bin and the .bin must be packed in a pbo

the error, to help we need to see the complete source becouse the issue cna be una missing braket that isnt included in the quoted fragment of code
 
I've unpacked the bin file and added the classes. I couldn't get Rapify to work so I'm using eliteness instead. However when I check the file for syntax errors I get the following message: Line 41 rap: missing inheritence class(es)

Apparently there's something wrong with my code however it all looks fine (example below), should I just ignore this?

example (line 41 is where class GUE_Commander_DZ is located):

Code:
    class GUE_Commander_DZ : GUE_Commander {
        displayName = "My New Model";
        side = TWest;
        weapons[] = {"Throw", "Put"};
        magazines[] = {};
        model = "\dayz\characters\man_survivor";
        respawnWeapons[] = {"Throw", "Put"};
        respawnMagazines[] = {};
        weaponSlots = 1 + 4 + 12*256 + 2*4096 + 2 + 8*16 + 12*131072;
        canHideBodies = 1;
    };
 
    class GUE_Soldier_1_DZ : GUE_Soldier_1 {
        displayName = "My New Model";
        side = TWest;
        weapons[] = {"Throw", "Put"};
        magazines[] = {};
        model = "\dayz\characters\man_survivor";
        respawnWeapons[] = {"Throw", "Put"};
        respawnMagazines[] = {};
        weaponSlots = 1 + 4 + 12*256 + 2*4096 + 2 + 8*16 + 12*131072;
        canHideBodies = 1;
    };

Besides that, I can't seem to fully pack all the files into a bin file. I got it to work once but I compared it to the original in notepad++ and alot of code seemed to be missing, the file was much smaller.

Does this have something to do with the syntax error I'm getting, that it doesn't fully pack because it encounters an error and stops the process from there?

This should be east to resolve, use these:

Code:
        class GUE_Commander;
        class GUE_Soldier_1;
 
        class GUE_Commander_DZ : GUE_Commander {
        displayName = "My New Model";
        side = TWest;
        weapons[] = {"Throw", "Put"};
        magazines[] = {};
        // model = "\dayz\characters\man_survivor";
        respawnWeapons[] = {"Throw", "Put"};
        respawnMagazines[] = {};
        weaponSlots = 1 + 4 + 12*256 + 2*4096 + 2 + 8*16 + 12*131072;
        canHideBodies = 1;
    };
 
    class GUE_Soldier_1_DZ : GUE_Soldier_1 {
        displayName = "My New Model";
        side = TWest;
        weapons[] = {"Throw", "Put"};
        magazines[] = {};
        // model = "\dayz\characters\man_survivor";
        respawnWeapons[] = {"Throw", "Put"};
        respawnMagazines[] = {};
        weaponSlots = 1 + 4 + 12*256 + 2*4096 + 2 + 8*16 + 12*131072;
        canHideBodies = 1;
    };
 
This seems to have worked shinkicker thank you! I'm going to add the other classes to see if they work as well.

EDIT: No errors so far.

Ok now that this has been sorted and I can start adding the classes/models I want. Now does this setup already get rid of the tools these models spawn with or does that have to be settled elsewhere?

Also, a question I asked previously that hasn't been answered yet; should I not get a signed file as well, since I changed code inside dayZ itself that I'll have to distribute to my players as well?
 
Now does this setup already get rid of the tools these models spawn with or does that have to be settled elsewhere?

This code does remove the default loadout for the models.

I'm still curious if this can be done server-side within dayz_server.pbo or in the mission file so that my users don't have to download a special DayZ client package just for my server.
 
Technically you can allow unsigned mods at the server level, but it's not smart for a public server. You will need to download the BI toolset from here. It contains the tools and instructions you'll need to sign a pbo.

ETA: You need the key creation tool from here.

This is also useful.
 
Well nothing seems to have changed. As newspawn you do spawn in with the custom skins but they still have all the gear (compass, map, radio, etc...). Any ideas?

EDIT: Doesn't seem to have worked at all actually. The inventory sizes I inserted through the custom classes don't seem to register, it still takes whatever is default for ARMA2
 
Back
Top