Having trouble with custom skins

try this:

side = 1;
weapons[] = {"Throw","Put"};
backpack = "";
magazines[] = {};
respawnWeapons[] = {"Throw","Put"};
respawnMagazines[] = {};
weaponSlots = "1+4+ 12*256+ 2*4096+2+ 8*16 + 12*131072";
canHideBodies = 1;
 
You need to have the new entries in your database for the players;

GUE_Commander_DZ
GUE_Soldier_1_DZ
 
I somehow doubt this is it. This is simply a list of player ID's which shows what people have in their inventory, what kind of skin they have, where they are on the map, etc. I've messed around in this before by adding some stuff to people's inventory.
 
OK - take this a step further.

How do we create these new custom skins so they become packable objects and can be inserted into loot tables?

By unpacking DAYZ, you can see how the lootable skins are created. But for the life of me, inserting some new ones calling my new skins just isn't working.

Does anyone have the steps, from front to end, of what you would need to do... say... using the example of the GUE_Soldier_1 shown in the thread above? How would you create a new lootable skin drop using that new skin definition?

Thanks
 
Actually I still want to know how I can get rid of the tools spawning with the skins. I understand that I can get rid of the tools via the 'survivor' tab in the database but that would mean I'd have to manually get rid of the items every time someone spawns anew.
 
Oh - that part's not so bad Blackman. Rather then using a skin unlocked by @rMod (for instance)... you create a cross-reference to it using a different class name.

(As found in dayz_code.pbo >> cfgVehicles.hpp)

Code:
    class BAF_Soldier_W;
    class Soldier1_DZ: BAF_Soldier_W {
        displayName = "Soldier";
        side = 1;
        weapons[] = {"Throw","Put"};
        backpack = "";
        magazines[] = {};
        respawnWeapons[] = {"Throw","Put"};
        respawnMagazines[] = {};
        weaponSlots = "1    +    4    + 12*        256    + 2*    4096    +    2    + 8*    16  + 12*131072";
        canHideBodies = 1;
    };
  • So - you're calling up the class BAF_Soldier_W
  • You're then assigning that class a new class name of Soldier1_DZ
  • You'll note, the weapons / backpack / magazines / respawn gear is all basically BLANK.
  • I'm NOT entirely sure what the weaponslots line gives you - and every skin has the same exact slot definition. I'd just leave it cause "if it ain't broke don't fix it".
  • canHideBodies=1 - I believe this is so when someone hides your body, wearing this skin, it will go into the ground? (But not confirmed if that's the case).
  • In your loot drop tables / or Bliss database / or beginning loadouts - you'd assign the player starting model to Soldier1_DZ (rather then the default of Survivor2_DZ).

Hope that helps somebody anyway.
 
hey guys i need some help i recently added the Arma2 models to my server. but every time you login it gives you a random model what have i done wrong here is teh code from my server player login thingy
Code:
private["_botActive","_int","_newModel","_doLoop","_wait","_hiveVer","_isHiveOk","_playerID","_playerObj","_randomSpot","_publishTo","_primary","_secondary","_key","_result","_charID","_playerObj","_playerName","_finished","_spawnPos","_spawnDir","_items","_counter","_magazines","_weapons","_group","_backpack","_worldspace","_direction","_newUnit","_score","_position","_isNew","_inventory","_backpack","_medical","_survival","_stats","_state"];
//Set Variables
 
diag_log ("STARTING LOGIN: " + str(_this));
 
_playerID = _this select 0;
_playerObj = _this select 1;
_playerName = name _playerObj;
_worldspace = [];
 
if (_playerName == '__SERVER__' || _playerID == '' || local player) exitWith {};
 
if (count _this > 2) then {
    dayz_players = dayz_players - [_this select 2];
};
 
//Variables
_inventory =    [];
_backpack =    [];
_items =        [];
_magazines =    [];
_weapons =        [];
_medicalStats =    [];
_survival =        [0,0,0];
_tent =            [];
_state =        [];
_direction =    0;
_model =        "";
_newUnit =        objNull;
_botActive = false;
 
if (_playerID == "") then {
    _playerID = getPlayerUID _playerObj;
};
 
if ((_playerID == "") or (isNil "_playerID")) exitWith {
    diag_log ("LOGIN FAILED: Player [" + _playerName + "] has no login ID");
};
 
//??? endLoadingScreen;
diag_log ("LOGIN ATTEMPT: " + str(_playerID) + " " + _playerName);
 
//Do Connection Attempt
_doLoop = 0;
while {_doLoop < 5} do {
    _key = format["CHILD:101:%1:%2:%3:",_playerID,dayZ_instance,_playerName];
    _primary = _key call server_hiveReadWrite;
    if (count _primary > 0) then {
        if ((_primary select 0) != "ERROR") then {
            _doLoop = 9;
        };
    };
    _doLoop = _doLoop + 1;
};
 
if (isNull _playerObj or !isPlayer _playerObj) exitWith {
    diag_log ("LOGIN RESULT: Exiting, player object null: " + str(_playerObj));
};
 
if ((_primary select 0) == "ERROR") exitWith {   
    diag_log format ["LOGIN RESULT: Exiting, failed to load _primary: %1 for player: %2 ",_primary,_playerID];
};
 
//Process request
_newPlayer =    _primary select 1;
_isNew =        count _primary < 6; //_result select 1;
_charID =        _primary select 2;
_randomSpot = false;
 
//diag_log ("LOGIN RESULT: " + str(_primary));
 
/* PROCESS */
_hiveVer = 0;
 
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 == "") then {
                _key = format["CHILD:999:select replace(cl.`inventory`, '""', '""""') inventory, replace(cl.`backpack`, '""', '""""') backpack, replace(coalesce(cl.`model`, 'Survivor2_DZ'), '""', '""""') model from `cust_loadout` cl join `cust_loadout_profile` clp on clp.`cust_loadout_id` = cl.`id` where clp.`unique_id` = '?':[%1]:",str(_playerID)];
                _data = "HiveEXT" callExtension _key;
 
                //Process result
                _result = call compile format ["%1", _data];
                _status = _result select 0;
 
                if (_status == "CustomStreamStart") then {
                        if ((_result select 1) > 0) then {
                                _data = "HiveEXT" callExtension _key;
                                _result = call compile format ["%1", _data];
                                _inventory = call compile (_result select 0);
                                _backpack = call compile (_result select 1);
                                _model = call compile (_result select 2);
                        };
                };
        };
    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";
        };
    };
 
    //Record initial inventory
    _config = (configFile >> "CfgSurvival" >> "Inventory" >> "Default");
    _mags = getArray (_config >> "magazines");
    _wpns = getArray (_config >> "weapons");
    _bcpk = getText (_config >> "backpack");
    _randomSpot = true;
   
    //Wait for HIVE to be free
    _key = format["CHILD:203:%1:%2:%3:",_charID,[_wpns,_mags],[_bcpk,[],[]]];
    _key call server_hiveWrite;
   
};
diag_log ("LOGIN LOADED: " + str(_playerObj) + " Type: " + (typeOf _playerObj));
 
_isHiveOk = false;    //EDITED
if (_hiveVer >= dayz_hiveVersionNo) then {
    _isHiveOk = true;
};
//diag_log ("SERVER RESULT: " + str("X") + " " + str(dayz_hiveVersionNo));
 
//Server publishes variable to clients and WAITS
//_playerObj setVariable ["publish",[_charID,_inventory,_backpack,_survival,_isNew,dayz_versionNo,_model,_isHiveOk,_newPlayer],true];
 
dayzPlayerLogin = [_charID,_inventory,_backpack,_survival,_isNew,dayz_versionNo,_model,_isHiveOk,_newPlayer];
(owner _playerObj) publicVariableClient "dayzPlayerLogin";
 
Omenrai - your problem is the end of this statement.

Code:
   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;

In standard dayz, this code is more like this.

Code:
    if (!(_model in ["SurvivorW2_DZ","Survivor2_DZ","Sniper1_DZ","Soldier1_DZ","Camo1_DZ","BanditW1_DZ","Bandit1_DZ","SurvivorW2_DZ"])) then {
        _model = "Survivor2_DZ";
    };

So you can see, your if statement isn't defaulting the clothing to "Survivor2_DZ", it's actually randomly rolling a choice within the 7 models selected - That's actually kind of cool code, but more useful for a Wasteland kind of server then a standard DayZ server.
 
the code i posted does work on a regular dayz server if you like the original by all means use it.... thank you for the help
 
Does anyone know of a way to lock players with a cirtain model? i ask because i am admin of an RP server and to have to keep resetting after they die to regive their skin is becoming a job unt itself ?
 
Does anyone know of a way to lock players with a cirtain model? i ask because i am admin of an RP server and to have to keep resetting after they die to regive their skin is becoming a job unt itself ?


Make 'em a Custom loadout? when ever they die they spawn with your selected skin for them,
 
ok im kinda new to this how ad where would i look for this area to edit ? is this in the mission.pbo
or server.pbo?
 
Back
Top