Jump to content

Skins not working. Never have worked. losing Char ID.


kano5003

Recommended Posts

Hey Guys, Obviously skins have been very glitchy on the epoch Linux side of things. has anyone managed to find how to fix it? Basically for the people abit curious someone will wear a gille suit its fine, the next person will go to put a gille suit on and get a no character ID and need to be killed as nothing gets saved to the hive. If anyone has any info on this it would be greatly appreciated. Thanks



KaNo5003.

Link to comment
Share on other sites

It happens on windows too.

Ahk, Good to know this! How do people wor around it? Alot of people on windows have skins enabled and are working great. I mean about 80% of our skins are broken and about 80% of the time get no character ID. Temporarily is there a way to disable skins? Maybe still buy from trader just not wear them? Thanks

KaNo5003.

Link to comment
Share on other sites

Hmm very interesting, i wonder if that is the thing that breaks this. If so, you just made fixing it that much easier.

 

I've been working on this issue tonight trying to get it sorted.

 

===

 

Okay so i did not test these properly (only had myself as a tester), but try these.

 

[code REMOVED]

Link to comment
Share on other sites

Hmm very interesting, i wonder if that is the thing that breaks this. If so, you just made fixing it that much easier.

 

I've been working on this issue tonight trying to get it sorted.

 

===

 

Okay so i did not test these properly (only had myself as a tester), but try these.

 

player_wearClothes.sqf

/*
    _item spawn player_wearClothes;
    Added Female skin changes - DayZ Epoch - vbawol
*/

private ["_item","_onLadder","_hasclothesitem","_config","_text","_myModel","_itemNew","_currentSex","_newSex","_model","_playerNear"];

if(DZE_ActionInProgress) exitWith { cutText [(localize "str_epoch_player_83") , "PLAIN DOWN"] };

DZE_ActionInProgress = true;

_item             = _this;
call gear_ui_init;

_onLadder =    (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
if (_onLadder) exitWith {DZE_ActionInProgress = false; cutText [(localize "str_player_21") , "PLAIN DOWN"]};

_hasclothesitem     = _this in magazines player;
_config             = configFile >> "CfgMagazines";
_text                 = getText (_config >> _item >> "displayName");

if (!_hasclothesitem) exitWith { DZE_ActionInProgress = false; cutText [format[(localize "str_player_31"),_text,"wear"] , "PLAIN DOWN"]};

if (vehicle player != player) exitWith { DZE_ActionInProgress = false; cutText [(localize "str_epoch_player_85"), "PLAIN DOWN"]};

if ("CSGAS" in (magazines player)) exitWith { DZE_ActionInProgress = false; cutText [(localize "STR_EPOCH_ACTIONS_10"), "PLAIN DOWN"] };

_myModel             = (typeOf player);
_itemNew             = "Skin_" + _myModel;

diag_log ("Debug Clothes: Model In: " + str(_itemNew) + " Out: " + str(_item));

if ( (isClass(_config >> _itemNew)) ) then {
    if ( (isClass(_config >> _item)) ) then {
        
        _currentSex = getText (configFile >> "CfgSurvival" >> "Skins" >> _itemNew >> "sex");
        _newSex = getText (configFile >> "CfgSurvival" >> "Skins" >> _item >> "sex");

        if(_currentSex == _newSex) then {
            // Get model name from config
            _model = getText (configFile >> "CfgSurvival" >> "Skins" >> _item >> "playerModel");
            if (_model != _myModel) then {
                if(([player,_item] call BIS_fnc_invRemove) == 1) then {
                    player addMagazine _itemNew;
                    [dayz_playerUID,dayz_characterID,_model] call player_humanityMorph;
                };
            };
            
        } else {
            cutText [(localize "str_epoch_player_86"), "PLAIN DOWN"];
        };
    };
};

DZE_ActionInProgress = false;

 

player_humanityMorph.sqf

private ["_updates","_playerUID","_charID","_humanity","_worldspace","_model","_friendlies","_fractures","_old","_medical","_zombieKills","_headShots","_humanKills","_banditKills","_tagList"];

_playerUID     = _this select 0;
_charID     = _this select 1;
_model         = _this select 2;

if (typeof player == _model) exitWith {
    [nil,nil,rTitleText,format["You already wear the %1 skin",_model], "PLAIN",10] call RE;
};

_old = player;
player allowDamage false;

player removeEventHandler ["FiredNear",eh_player_killed];
player removeEventHandler ["HandleDamage",mydamage_eh1];
player removeEventHandler ["Killed",mydamage_eh3];
player removeEventHandler ["Fired",mydamage_eh2];

_updates = player getVariable["updatePlayer",[false,false,false,false,false]];
_updates set [0,true];

player setVariable["updatePlayer",_updates,true];
dayz_unsaved = true;

//Logout
_humanity        = player getVariable["humanity",0];
_medical         = player call player_sumMedical;
_worldspace     = [round(direction player),getPosATL player];
_zombieKills     = player getVariable ["zombieKills",0];
_headShots         = player getVariable ["headShots",0];
_humanKills     = player getVariable ["humanKills",0];
_banditKills     = player getVariable ["banditKills",0];
_friendlies        = player getVariable ["friendlies",[]];
_tagList        = player getVariable ["tagList",[]];

//Switch
    [_model] call player_switchModel;

//set medical values
if (count _medical > 0) then {
    player setVariable["USEC_isDead",(_medical select 0),true];
    player setVariable["NORRN_unconscious", (_medical select 1), true];
    player setVariable["USEC_infected",(_medical select 2),true];
    player setVariable["USEC_injured",(_medical select 3),true];
    player setVariable["USEC_inPain",(_medical select 4),true];
    player setVariable["USEC_isCardiac",(_medical select 5),true];
    player setVariable["USEC_lowBlood",(_medical select 6),true];
    player setVariable["USEC_BloodQty",(_medical select 7),true];
    player setVariable["unconsciousTime",(_medical select 10),true];
    
    //Add Wounds
    {
        player setVariable[_x,true,true];
        usecBleed = [player,_x,0];
        publicVariable "usecBleed";
    } count (_medical select 8);
    
    //Add fractures
    _fractures = (_medical select 9);
    [player,"legs", (_fractures select 0)] call object_setHit;
    [player,"hands", (_fractures select 1)] call object_setHit;
} else {
    //Reset Fractures
    player setVariable ["hit_legs",0,true];
    player setVariable ["hit_hands",0,true];
    player setVariable ["USEC_injured",false,true];
    player setVariable ["USEC_inPain",false,true];    
};


//General Stats
player setVariable["humanity",_humanity,true];
player setVariable["zombieKills",_zombieKills,true];
player setVariable["headShots",_headShots,true];
player setVariable["humanKills",_humanKills,true];
player setVariable["banditKills",_banditKills,true];
player setVariable["CharacterID",_charID,true];
player setVariable["worldspace",_worldspace,true];
player setVariable["friendlies",_friendlies,true];
player setVariable["tagList",_tagList,true];

call dayz_resetSelfActions;

eh_player_killed = player addeventhandler ["FiredNear",{_this call player_weaponFiredNear;} ];

[player] call fnc_usec_damageHandle;
player allowDamage true;

player addWeapon "Loot";
player addWeapon "Flare";

_wpnType = primaryWeapon player;
_ismelee = (gettext (configFile >> "CfgWeapons" >> _wpnType >> "melee"));

if (_ismelee == "true") then {
        call dayz_meleeMagazineCheck;
};

PVDZE_plr_Save = [player,[],true,true];
publicVariableServer "PVDZE_plr_Save";

sleep 0.1;

if (!isNull _old) then {
    // this should not be needed as player is deleted in player_switchModel?
    diag_log(format["DEBUG: Something went wrong, humanitymorph removed old model %1",_old]);
    deleteVehicle _old;
};

 

player_switchModel.sqf

private ["_weapons","_backpackWpn","_backpackMag","_currentWpn","_isWeapon","_backpackWpnTypes","_backpackWpnQtys","_countr","_class","_position","_dir","_currentAnim","_tagSetting","_playerUID","_countMags","_magazines","_primweapon","_secweapon","_newBackpackType","_muzzles","_oldUnit","_group","_newUnit","_wpnType","_ismelee"];

if (gear_done) then {disableUserInput true;};

_class                  = _this;
_position               = getPosATL player;
_dir                    = getDir player;
_currentAnim            = animationState player;
_tagSetting             = player getVariable["DZE_display_name",false];
_playerUID                 = getPlayerUID player;
_weapons                = weapons player;
_countMags                 = call player_countMagazines;
_magazines                 = _countMags select 0;
 
if ((_playerUID == dayz_playerUID) && (count _magazines == 0) && (count (magazines player) > 0 )) exitWith {cutText [(localize "str_epoch_player_17"), "PLAIN DOWN"]};
 
_primweapon             = primaryWeapon player;
_secweapon              = secondaryWeapon player;
 
if(!(_primweapon in _weapons) && _primweapon != "") then {
    _weapons set [(count _weapons), _primweapon];
};
 
if(!(_secweapon in _weapons) && _secweapon != "") then {
    _weapons set [(count _weapons), _secweapon];
};
 
//BackUp Backpack
dayz_myBackpack = unitBackpack player;
_newBackpackType = (typeOf dayz_myBackpack);
if(_newBackpackType != "") then {
    _backpackWpn = getWeaponCargo unitBackpack player;
    _backpackMag = _countMags select 1;
};
 
//Get Muzzle
_currentWpn = currentWeapon player;
_muzzles = getArray(configFile >> "cfgWeapons" >> _currentWpn >> "muzzles");
if (count _muzzles > 1) then {
    _currentWpn = currentMuzzle player;
};
 
//Secure Player for Transformation
player setPosATL dayz_spawnPos;
 
//BackUp Player Object
_oldUnit = player;
 
/**********************************/
//DONT USE player AFTER THIS POINT//
/**********************************/
 
//Create New Character
_group          = createGroup west;
_newUnit        = _group createUnit [_class,dayz_spawnPos,[],0,"NONE"];
 
_newUnit        setPosATL _position;
_newUnit        setDir _dir;
 
//Clear New Character
{
    _newUnit removeMagazine _x;
} count  magazines _newUnit;

removeAllWeapons _newUnit;
 
//Equip New Charactar
{
        if (typeName _x == "ARRAY") then {
        
            if ((count _x) > 0) then {
                _newUnit addMagazine [(_x select 0), (_x select 1)];
            };
            
        } else {
            _newUnit addMagazine _x;
        };
        
} foreach _magazines;
 
{
        _newUnit addWeapon _x;
} foreach _weapons;
 
//Check && Compare it
if(str(_weapons) != str(weapons _newUnit)) then {
    //Get Differecnce
    {
        _weapons = _weapons - [_x];
    } foreach (weapons _newUnit);
   
    //Add the Missing
    {
        _newUnit addWeapon _x;
    } foreach _weapons;
};
 
if(_primweapon !=  (primaryWeapon _newUnit)) then {
        _newUnit addWeapon _primweapon;        
};
if (_primweapon == "MeleeCrowbar") then {
        _newUnit addMagazine 'crowbar_swing';
};
if (_primweapon == "MeleeSledge") then {
        _newUnit addMagazine 'sledge_swing';
};
if (_primweapon == "MeleeHatchet_DZE") then {
        _newUnit addMagazine 'Hatchet_Swing';
};
if (_primweapon == "MeleeMachete") then {
        _newUnit addMagazine 'Machete_swing';
};
if (_primweapon == "MeleeFishingPole") then {
        _newUnit addMagazine 'Fishing_Swing';
};
if(_secweapon != (secondaryWeapon _newUnit) && _secweapon != "") then {
        _newUnit addWeapon _secweapon;         
};

_switchUnit = {
    addSwitchableUnit _newUnit;
    setPlayable _newUnit;
    selectPlayer _newUnit;
    removeAllWeapons _oldUnit;
    {
        _oldUnit removeMagazine _x;
    } foreach magazines _oldUnit;
    
    deleteVehicle _oldUnit;
    
    if(_currentWpn != "") then {
        _newUnit selectWeapon _currentWpn;
    };
};

//Add && Fill BackPack
if (!isNil "_newBackpackType") then {
    if (_newBackpackType != "") then {

        _newUnit addBackpack _newBackpackType;
        dayz_myBackpack = unitBackpack _newUnit;
        
        //Weapons
        _backpackWpnTypes = [];
        _backpackWpnQtys = [];
        
        if (count _backpackWpn > 0) then {
            _backpackWpnTypes = _backpackWpn select 0;
            _backpackWpnQtys = _backpackWpn select 1;
        };
                
        [] call _switchUnit;
                
        if (gear_done) then {sleep 0.001;};
        ["1"] call gearDialog_create;
        if (gear_done) then {sleep 0.001;};
        
        //magazines
        _countr = 0;
        {
            if ((typeName _x) != "STRING") then {
                _isWeapon = (isClass(configFile >> "CfgWeapons" >> (_x select 0)));
            } else {
                _isWeapon = (isClass(configFile >> "CfgWeapons" >> _x));
            };
            
            if (!_isWeapon) then {
                _countr = (1 + _countr);
                if ((typeName _x) != "STRING") then {
                    (unitBackpack player) addMagazineCargoGlobal [(_x select 0), 1];
                    _idc = (4999 + _countr);
                    _idc setIDCAmmoCount (_x select 1);
                } else {
                    (unitBackpack player) addMagazineCargoGlobal [_x, 1];
                };
            };
        } foreach _backpackMag;
        
        (findDisplay 106) closeDisplay 0;
        
        if (gear_done) then {
            sleep 0.001;
            disableUserInput false;
        };
        
        _countr = 0;
        {
            (unitBackpack player) addWeaponCargoGlobal [_x,(_backpackWpnQtys select _countr)];
            _countr = (1 + _countr);
        } foreach _backpackWpnTypes;
        
    } else {
        [] call _switchUnit;
    };
} else {
    [] call _switchUnit;
};

[objNull, player, rSwitchMove,_currentAnim] call RE;

player disableConversation true;

if (_tagSetting) then {
    DZE_ForceNameTags = true;
};

_wpnType = primaryWeapon player;
_ismelee = (gettext (configFile >> "CfgWeapons" >> _wpnType >> "melee"));

if (_ismelee == "true") then {
    call dayz_meleeMagazineCheck;
};
 
{player reveal _x} count (nearestObjects [getPosATL player, dayz_reveal, 50]);

Thanks for this F3cuk, ill have a look at this tonight! Did you have any luck with your skins working? Thanks just dying to know haha.

KaNo5003.

Link to comment
Share on other sites

Hey,

All of these files can be found in the @Dayz_Epoch\dayz_code.pbo. Skins on our server have always worked. They just seem to create issues while (live) switching. I've seen some servers requiring relog to counter this.

 

--

 

I've been working some more on this issue though. I'll update on progress.

Link to comment
Share on other sites

Hey,

All of these files can be found in the @Dayz_Epoch\dayz_code.pbo. Skins on our server have always worked. They just seem to create issues while (live) switching. I've seen some servers requiring relog to counter this.

 

--

 

I've been working some more on this issue though. I'll update on progress.

 

 

Sorry again to pester do I put these sqf files in the folder compiles? Or just in the main directory as you specified? Thanks again for all your help

KaNo55003.

 

Link to comment
Share on other sites

Hi KaNo5003,

No we are running a Windows server, but these files should be the same if you are running the latest epoch.

 

--

 

Yeah it was kind of a long shot. Still working on fixing this. Please keep up with the

Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...