Jump to content
  • 0

Sometimes character stops updating after skin change


f3cuk

Question

Since updating to 1051 several people have been complaining that sometimes their character seemed to go back in time after they had logged in. Untill today I couldn't pinpoint what was happening but now i think i found it. Sometimes when a player changes skin, his or her character stops updating from that point on. Resulting in progress loss when they logout and log back in, even simply going in and out the lobby will "reset" their character to the state they were in just before they changed clothes.

 

One user even reported that he died » ragequit » after logging back in a few hours later, was alive and had most of his gear back. He asked me if i did a rollback on the database, which we did not. It did not make sense to me but now i'm figuring he had probably just changed skins before and got reset to that.
 

Could anyone confirm this issue? Or did i mess it up all by myself :P

Link to comment
Share on other sites

Recommended Posts

  • 0

Ok in my tiredness this morning I seemed to have missed a step.

 

I went and redid all the original instructions.

 

Inventory state is now correctly persisting through a relog so there is no roll back, but you do log in next to a dead version of yourself and can dupe all the gear from it.

 

I then tried removing

 

private["_charidchanged","_charID"];

 

from player_switchModel.sqf as suggested and it now seems to work perfectly. I'll keep playing around on my test server to make sure before making it live.

 

All I need to do now is figure out a way to make Group Manager work. The required changes as below don't work with the new player_switchModel.sqf.

 

In player_switchModel.sqf:

Find this: _oldUnit = player;
Add below: _oldGroup = group player;

Find this: selectPlayer _newUnit;
Add below: if ((count units _oldGroup > 1) && (!isNil "PVDZE_plr_LoginRecord")) then {[player] join _oldGroup;}; 
 

Edit: Still having the corpse issue. When logging in near where I changed clothes I still see the 'old character'. I'll PM you with my server and mission PBO's so you can have a look. I've gone over it quite a few times now but I don't think I've missed anything.

 

Link to comment
Share on other sites

  • 0
  On 8/21/2014 at 5:56 AM, Anarior said:

Ok in my tiredness this morning I seemed to have missed a step.

 

I went and redid all the original instructions.

 

Inventory state is now correctly persisting through a relog so there is no roll back, but you do log in next to a dead version of yourself and can dupe all the gear from it.

 

I then tried removing

 

private["_charidchanged","_charID"];

 

from player_switchModel.sqf as suggested and it now seems to work perfectly. I'll keep playing around on my test server to make sure before making it live.

 

All I need to do now is figure out a way to make Group Manager work. The required changes as below don't work with the new player_switchModel.sqf.

 

In player_switchModel.sqf:

Find this: _oldUnit = player;
Add below: _oldGroup = group player;

Find this: selectPlayer _newUnit;
Add below: if ((count units _oldGroup > 1) && (!isNil "PVDZE_plr_LoginRecord")) then {[player] join _oldGroup;}; 
 

Edit: Still having the corpse issue. When logging in near where I changed clothes I still see the 'old character'. I'll PM you with my server and mission PBO's so you can have a look. I've gone over it quite a few times now but I don't think I've missed anything.

 

Hmm the corpse issue seems like something easily fixable. Only read this part properly today, will look into the files you send.

Link to comment
Share on other sites

  • 0

Other then it working fine for me not really. I don't know why it isn't working for others.

 

These are my latest player_switchModel.sqf and player_humanityMorph.sqf

 

player_switchModel.sqf

  Reveal hidden contents

 

player_humanityMorph.sqf

  Reveal hidden contents

Link to comment
Share on other sites

  • 0

I firmly believe this bug has chance of happening when the server tries to update a player during him switching clothes. I changed two things on our server, the first one is making sure that a player is never without a characterID and the second one is preventing a player from being updated whilst changing clothes. After a few weeks of testing i can safely say this has completely resolved the issue for us and even made performance a little better (which has to do with rewriting some stuff inside the switchmodel).

Link to comment
Share on other sites

  • 0
  On 9/7/2014 at 11:47 PM, f3cuk said:

I firmly believe this bug has chance of happening when the server tries to update a player during him switching clothes. I changed two things on our server, the first one is making sure that a player is never without a characterID and the second one is preventing a player from being updated whilst changing clothes. After a few weeks of testing i can safely say this has completely resolved the issue for us and even made performance a little better (which has to do with rewriting some stuff inside the switchmodel).

 

 

  On 9/8/2014 at 12:07 PM, cen said:

So... you going to post it? :)

 

good job. and yes, please we want it too :)

Link to comment
Share on other sites

  • 0
  On 9/8/2014 at 12:17 PM, mgm said:

good job. and yes, please we want it too :)

 

lol.

 

Haven't i told this alot of times already? ^^

//BackUp Player Object
_oldUnit = player;
_cId = player getVariable["CharacterID",0]; // or : _oldUnit getVariable["CharacterID",0]; 

/**********************************/
//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;

_newUnit setVariable ["CharacterID",_cId,true];

That CharacterId is added, and is the only thing u need to change of default epoch code.

 

A second issue can be that your DAYZ GROUP MANAGEMENT makes your friendly array <NULL>

 

solve that with this in your init.sqf somewhere with the other configs:

DZE_FriendlySaving = false;
Link to comment
Share on other sites

  • 0
  On 9/8/2014 at 12:44 PM, Zupa said:

 

lol.

 

Haven't i told this alot of times already? ^^

//BackUp Player Object
_oldUnit = player;
_cId = player getVariable["CharacterID",0]; // or : _oldUnit getVariable["CharacterID",0]; 

/**********************************/
//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;

_newUnit setVariable ["CharacterID",_cId,true];

That CharacterId is added, and is the only thing u need to change of default epoch code.

 

A second issue can be that your DAYZ GROUP MANAGEMENT makes your friendly array <NULL>

 

solve that with this in your init.sqf somewhere with the other configs:

DZE_FriendlySaving = false;

 

 

Zupa,

 

Thanks for responding. Did you give the fix (quoted above) to f3cuk too - are you sure he's talking about the same fix?

 

Also can you please elaborate on this fix you posted:

1. Is this (what you posted above) the only fix needed?

2. Or do we need to have the same files what f3cuk posted above in post #86 () and add your small fix on top of that?

3. Also sorry but not experienced is tackling this particular issue. Where do we add this code you posted exactly?

 

I'm aware there's an issue that needs to be fixed by I'm still running default Epoch 1.0.5.1 files - I did not change anything on this issue (yet).

Link to comment
Share on other sites

  • 0

The problems seems to be that characterId doesnt get transferred.

 

So the only thing you need to do, is set the characterId when the new guy gets created. , And quickly reading his code, it's the same issues.

 

But setting it there should fix the issue.

 

So you only need a custom "player_switchmodel.sqf" ( is already in single currency 2.0). look for the following code

//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;

change that with

//BackUp Player Object
_oldUnit = player;
_cId = player getVariable["CharacterID",0]; // or : _oldUnit getVariable["CharacterID",0]; 

/**********************************/
//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;

_newUnit setVariable ["CharacterID",_cId,true];
Link to comment
Share on other sites

  • 0

2nd question is, DOES everyone has the SAME errors, it's possible some poeple jsut have another issue somewhere, and then ofcourse this doesnt fix your issue completely.

 

Posting rpt/log can clearify issies.

 

If it says cannot sync, characterid missiing, that this is it

Link to comment
Share on other sites

  • 0
  On 9/8/2014 at 1:34 PM, Zupa said:

 

The problems seems to be that characterId doesnt get transferred.

 

So the only thing you need to do, is set the characterId when the new guy gets created. , And quickly reading his code, it's the same issues.

 

But setting it there should fix the issue.

 

So you only need a custom "player_switchmodel.sqf" ( is already in single currency 2.0). look for the following code

//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;

change that with

//BackUp Player Object
_oldUnit = player;
_cId = player getVariable["CharacterID",0]; // or : _oldUnit getVariable["CharacterID",0]; 

/**********************************/
//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;

_newUnit setVariable ["CharacterID",_cId,true];

 

 

  On 9/8/2014 at 1:35 PM, Zupa said:

2nd question is, DOES everyone has the SAME errors, it's possible some poeple jsut have another issue somewhere, and then ofcourse this doesnt fix your issue completely.

 

Posting rpt/log can clearify issies.

 

If it says cannot sync, characterid missiing, that this is it

 

 

Excellent! We definitely have cannot sync so hopefully this will solve our problems. Can't wait to get home and put this up. Cheers!

Link to comment
Share on other sites

  • 0

Zupa's fix addresses the out of sync issue (which is also patched in the files i supplied earlier), but i don't think it keeps the backpack from sometimes being emptied or the script from hanging, the only thing that seems to counter that is prevent the player from updating altogether whilst changing clothes. On top of that i did some code changes which seemingly are less error-prone.

The clarify, Zupa's proposed fix was already in the files i posted earlier.

I'll post a decent howto tonight.

Link to comment
Share on other sites

  • 0
  On 9/8/2014 at 1:48 PM, f3cuk said:

Zupa's fix addresses the out of sync issue (which is also patched in the files i supplied earlier), but i don't think it keeps the backpack from sometimes being emptied or the script from hanging, the only thing that seems to counter that is prevent the player from updating altogether whilst changing clothes. On top of that i did some code changes which seemingly are less error-prone.

The clarify, Zupa's proposed fix was already in the files i posted earlier.

I'll post a decent howto tonight.

 

Awesome! Looking forward to it.

Link to comment
Share on other sites

  • 0
  On 8/27/2014 at 5:15 PM, f3cuk said:

Other then it working fine for me not really. I don't know why it isn't working for others.

 

These are my latest player_switchModel.sqf and player_humanityMorph.sqf

 

player_switchModel.sqf

  Reveal hidden contents

 

player_humanityMorph.sqf

  Reveal hidden contents

 

I also tried applying these along with the files you posted previously. Doesn't seem to work for me. Just get stuck in the loading screen. I tried stripping the code down a little and took out parts that I thought weren't supposed to be there, but that didn't help. Your player_switchModel.sqf is just so drastically different from the original one from DayZ_Epoch. So I took the original files and only applied the inTransit method to it along with Zupa's posted CharacterUID fix. I can now finally join the game and I get no RPT errors at first glance. So I'ma run this through on my public server and see how it goes.

Link to comment
Share on other sites

  • 0
  On 9/8/2014 at 2:36 PM, Rocu said:

I also tried applying these along with the files you posted previously. Doesn't seem to work for me. Just get stuck in the loading screen. I tried stripping the code down a little and took out parts that I thought weren't supposed to be there, but that didn't help. Your player_switchModel.sqf is just so drastically different from the original one from DayZ_Epoch. So I took the original files and only applied the inTransit method to it along with Zupa's posted CharacterUID fix. I can now finally join the game and I get no RPT errors at first glance. So I'ma run this through on my public server and see how it goes.

 

Yeah the current fix i posted is overly complicated, but there is no part you should leave out. I'll do a new - more simple - one tonight. It only involves changing 4 files (player_wearclothes.sqf, player_humanitymorph and player_switchmodel.sqf and server_playersync.sqf). I'll use the default 1051 files as a reference.

Link to comment
Share on other sites

  • 0
  On 9/8/2014 at 2:48 PM, f3cuk said:

Yeah the current fix i posted is overly complicated, but there is no part you should leave out. I'll do a new - more simple - one tonight. It only involves changing 4 files (player_wearclothes.sqf, player_humanitymorph and player_switchmodel.sqf and server_playersync.sqf). I'll use the default 1051 files as a reference.

 

Okay looking forward to that. Meanwhile I noticed I got undefined variable error for _inTransit in server_playerSync.sqf. Did you define it somewhere else as well? I added a isNil check for it, that cleared the error for now.

Link to comment
Share on other sites

  • 0

Just noticed that the inTransit method is blocking the sync quite often:

19:04:13 "NOTICE: Cannot update ROCU[], player is in transit"
19:04:13 "NOTICE: Cannot update ROCU[], player is in transit"
19:04:43 "NOTICE: Cannot update ROCU[], player is in transit"
19:04:53 "NOTICE: Cannot update ROCU[], player is in transit"
19:04:59 "NOTICE: Cannot update ROCU[], player is in transit"
19:05:09 "NOTICE: Cannot update ROCU[], player is in transit"
19:05:28 "NOTICE: Cannot update ROCU[], player is in transit"

In this current session I haven't changed my skin or anything like that. Just logged in and walked around a little. 

Isn't it supposed to cancel sync only when the system is trying to sync at the exact moment when you're in the middle of changing models?

Link to comment
Share on other sites

  • 0

server_playerSync.sqf

  Reveal hidden contents

 

player_switchModel.sqf

  Reveal hidden contents

 

player_humanityMorph.sqf

  Reveal hidden contents

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...