Epoch icon indicating copy to clipboard operation
Epoch copied to clipboard

Virtual Keys Tracking

Open Vampurica opened this issue 7 years ago • 6 comments

This is a master issue to track the transfer from "lock times" to "virtual" keys.

The goal is to have the players have keys on them that are not inventory items that they use to lock and unlock vehicles much like they did in DayZ: Epoch. This should be designed secure enough to prevent hackers from unlocking vehicles easily.

To do this the server will generate a "secret" when a vehicle becomes keyed for the first time and save it to the database with the vehicle. The "salt" will be a randomly generated string that is generated serverside-only every server restart. Using the classname, secret, and salt, the server will be able to create a hash that then can be compared, and will be unique to that exact vehicle for that server restart.

The MD5 algorithm is as follows: ("classname" + "secret") --> MD5 --> ("first hash" + "salt") --> MD5

The Dynamic Menu will serve to Take and Give keys, listing a maximum amount of keys for the player to choose from. Currently the Dynamic Menu will allow a listing of 20 unique vehicle keys. It allows for an unlimited amount of duplicates to those keys. A player can hold more than 20 unique keys, but the menu will not display them.

Legacy "group" locked vehicle DB entries will be converted on first unlock, giving the key to the unlocker before purging the group lock from the database.

Vehicle Keys will be able to be carried by players, stored in vehicles, or stored in any buildables that have an inventory. If the vehicle is locked then the player will not be able to interact with the keys on the object.

Players "keyring" is stored in a variable on the player that only the server is allowed to adjust. Example Keyring Params: [ [ ["class_name_Taru","$SECRET$","COLOR"],["class_name_eBike","$SECRET$","COLOR"] ],[ 1,3 ] ]

To Do List:

  • [x] Mass code to add Key Functionality, while being secure, and converting legacy.
  • [x] Dynamic Menu icons for keys. One "keyring" icon, and 20 different colored "key" icons.
  • [x] Add key icons.
  • [x] Debug mass code and key functionality to verify it is working.
  • [ ] Method to signify to a player that a container has virtual keys in it. (Temp Key Item)
  • [ ] Functionality to create keys for unkeyed (dynamic spawn) vehicles. (Keymakers Kit)
  • [ ] Code to allow admins to create keys for vehicles from the antihack.

Will be updated as requirements change and idea is fleshed out into practice.

Vampurica avatar Jun 20 '17 14:06 Vampurica

Still awaiting a Dialog for this.

Vampurica avatar Apr 21 '18 15:04 Vampurica

Thought about it today on how to implement this using the DynaMenu instead and I think it can be done. I intend to work on it tomorrow.

Vampurica avatar Apr 22 '18 04:04 Vampurica

Updated to reflect current To-Do List.

Vampurica avatar Apr 24 '18 00:04 Vampurica

keyButtons.zip

Made the required button icons for this task.

Vampurica avatar Apr 24 '18 02:04 Vampurica

Still need some icons. Will work on them. In the meantime created a demo video of the current WIP.

https://www.youtube.com/watch?v=L7yC_zNwbZY

Vampurica avatar Apr 25 '18 07:04 Vampurica

Added the rest of the required key icons to the zip above. Need to have them added to Epoch.

Vampurica avatar Apr 25 '18 20:04 Vampurica