Hello DayZ Standalone staff;
I have recently been playing DayZ Standalone and got killed due to a group of dupers. So I started thinking of an anti-duplication method and I came up with these results:
I have managed to solve my own duplication method in the code by creating a list with one-hundred 'player inventories' using a randomly generated item list containing a weapon with an attachment. I then proceeded to attach a unique identifier (serial number) to each weapon:
(i.e ["AUG" , "Silencer”, "1"] OR ["SVD" , "Scope" , "2"]).
This then means that each weapon is numbered uniquely; without any overlaps of serial numbers. Therefore in my code; at the end of the printed list; under the title 'After Dupe' we can see that a weapon which is randomly generated is then added to this list (final printed line). This simulates the same concept where a player would duplicate a weapon and transferred to another player, meaning that its unique serial number is stored two times in the database (there is a discrepancy). Therefore the server will then pick-up the duplicated weapons and do necessary actions; i.e removing both or removing the newest added (duplicated item).
For example; a player duplicates his weapon and let’s say that the weapon in DayZ’s database looks similar to this:
[ “MP5” , “Silencer, Red-dot sight, Fore grip”, “28/30” , ”5292”]
with each variable referring to:-
[“Gun type”, “Attachments”, “Ammunition inside weapon”, “Unique serial number”]
Therefore because the weapon is duplicated; two of the same weapons are on the database at the same time. Hence their unique serial number appears twice. Where the server will find these duplications and do necessary actions to remove the discrepancy.
External modifications of the code (scripts / hacks) are not covered by this method; as changing the variable ‘itemNumber’ outside of the current list will create a discrepancy; bypassing the first method. This is solved using a simple prevention ‘if’ statement to filter out these variables (i.e if unique item number > the amount of items in the database).
I have used this algorithm in one of my projects in year eleven and I have never had any bugs or unexplained glitches happening because of it.
From a loyal DayZ franchise fan,