Jump to content
  • 0

Modular Building PlayerUID instead of CharacterID


adrianna

Question

Isnt it better to use in the table object_data the PlayerUID to identify the owner instead of the characterID?

 

Building a Wall with charID 4533 then i die, new charID is 6521 so im not longer the owner of the wall.

Epoch Team should change the actual CharacterID to PlayerUID and then add a new row like ObjectInfo to store informations like the code of a safe or lockboxes.

 

Its also better for a cleanup of mySQL.

 

 

Sorry, english isnt my first language.

Link to comment
Share on other sites

12 answers to this question

Recommended Posts

  • 0
 } else {_tmpbuilt setVariable ["CharacterID",dayz_playerUID,true];


// fire?
if(_tmpbuilt isKindOf "Land_Fire_DZ") then {
_tmpbuilt spawn player_fireMonitor;
} else {
PVDZE_obj_Publish = [dayz_playerUID,_tmpbuilt,[_dir,_location],_classname];
publicVariableServer "PVDZE_obj_Publish";
};
};

Replace dayz_characterID with dayz_playerUID (make sure you only do this in the right places)

Link to comment
Share on other sites

  • 0

The easiest way to achieve the same effect is by adding a trigger into the mysql database which updates the characterid column when a player died/logged back in again. This trigger is somewhere on this forum, not sure where anymore :P

 

Anyway,

 

Firstly, i'm not sure why it's all bound to characterID. If epoch development has legit reasons for this (e.g. security) then i think you should just leave it as it is. But, as i have never found a clear answer on this i'm therefore not certain. I did have it working without playerID's that contain letters (i had no access to the hivext.dll to be able to make it work for every player, so the below explanation is only partially confirmed to be working) And again, no idea on security issues or whatsoever so i'm not advising you to play with this. If you don't have access to the hivext.dll then there is NO chance for any player with letters in their playerid to build ANYTHING!!

 

In theory this should work:

 

1. The datatype of the characterID column in the database is set on INT, it should be set on VARCHAR for this to work because there are playerid's with letters in them (INT only allows nummeric, VARCHAR allows any character.)

 

2. You will need to edit every file where it writes CharacterID bound objects to the database. Like Randomness said, all these calls need to be changed from dayz_characterID to dayz_playerUID to make it write the playerID to the database.

 

3. All database writes go through the hivext.dll, where the values are checked on what the (in this case the playerid) contains. For objects (characterid) it checks if it only contains numbers (int setting in the database). This check should also allow letters, to be able to write every playerID possible to the database. And this last step would be crucial to get it to work for every player. But i have no clue yet on how to change this correctly as i never had access to the hivext.dll.

 

 

I'm very curious on the reason why it is not written as playerID by default. Maybe it's giving conflicts with other values that are being stored in the characterID column?.

 

So why not make an extra column specifically for the playerID? That way even safes, locked vehicles etc. are registered on who build/bought them. It would enable a lot more maintenance options, but on the other hand it will also make the database bigger.

Link to comment
Share on other sites

  • 0

I think I read somewhere that the ID is changed when you die so dieing counts for something. 

 

Yes, but it is REALLY fun when you are building your base, in the middle of it, and you fall off trying to place items with the clumsy interface. Hey look, when I run back from the coast I get to tear down my plot poles and replace them for NO REASON. 

Link to comment
Share on other sites

  • 0

If you want death to mean something, then make dead bodies disappear after 5 / 10 minutes of death, that would motivate enough to survive, or not bring important stuff. I mean other than dying to PvP or zeds, most deaths are caused by walking over rocks, crawling over modular floors, that kind of stuff, which is more of a double In Your Face by the game if you ask me :)

Link to comment
Share on other sites

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...