Мод Better Vanilla CodeLock для DayZ (дейз). Установлен на 1 серверах RiseOfServers. Ниже: серверы с модом и описание Workshop.
Better Vanilla CodeLock
Better Vanilla CodeLock is a DayZ 1.30 addon that improves the vanilla Digital Code Lock without replacing it.
It keeps the same vanilla item, model, keypad, PIN system, and general behavior while giving server owners additional configuration options and quality-of-life features.
This mod does not add a separate custom CodeLock item.
Main Features
[]Optional 9V battery requirement
[]Configurable battery drain
[]Battery protection while locked
[]Automatic door locking
[]Auto-lock after server restart
[]Owner PIN bypass
[]Remembered access for players who successfully enter the PIN
[]CodeLock actions available while the door is closed
[]Automatic server config creation
[]Automatic live config reload
[]Config backups
[]Automatic JSON migration
[]Admin commands
[]Safe config fallback
Battery Settings
By default, the vanilla Digital Code Lock works without a 9V battery installed.
The keypad still powers and lights normally as if a full battery were installed.
Server owners can change this behavior through the JSON configuration.
Available options include:
[]Require or remove the 9V battery requirement
[]Enable or disable battery drain
[]Configure how quickly the battery drains
[]Set the minimum battery charge required for the lock to operate
[]Prevent the CodeLock from draining an attached battery
[]Prevent players from removing the battery while the lock is locked
This means you can completely remove the battery requirement or keep a setup closer to vanilla DayZ.
Auto-Lock
Better Vanilla CodeLock can automatically lock a door or gate after it finishes closing.
The default delay is:
3 Seconds
The delay is configurable.
If the door is opened again before the timer finishes, the pending Auto-Lock is cancelled.
This prevents the lock from triggering while the player is still actively using the door.
Restart Auto-Lock
After a server restart, a configured Digital Code Lock attached to a closed door can automatically return to its locked state.
Loose CodeLocks are ignored.
For example:
A CodeLock sitting inside a crate, vehicle, storage container, or player inventory will not suddenly become locked because of this system.
The feature only applies to locks attached to supported doors and gates.
Use the CodeLock While the Door Is Closed
Better Vanilla CodeLock improves how the vanilla interactions behave while the protected door is closed.
Depending on the current lock state, you can still scroll to actions such as:
[]Set Code
[]Lock
[]Enter Code
[]Unlock
When the door is available to open, Open remains the primary interaction.
This makes managing the CodeLock much easier without having to put the door into awkward states just to access the keypad.
Owner Bypass
The first player who successfully sets the PIN becomes the owner of that Digital Code Lock.
Ownership is stored using the player's:
Steam64 ID
It does not use the player's character name.
When Owner Bypass is enabled, the owner can unlock their CodeLock without repeatedly entering the PIN.
Owner information survives server restarts.
Enter the Code Once
Better Vanilla CodeLock can remember players who have already successfully entered the correct PIN.
A player who enters the correct code once becomes authorized for that specific lock.
After that, they can unlock the same CodeLock without reopening the keypad every time.
This authorization:
[]Is tied to the player's Steam64 ID
[]Is tied to that specific CodeLock
[]Survives server restarts
[]Does not make the player the owner
The original player who set the PIN remains the owner.
If the CodeLock is wiped/reset and its stored data is removed, the remembered access list is cleared as well.
Automatic Server Configuration
The server automatically creates the configuration folder and settings file.
profiles/Better_Vanilla_Codelock/Settings.json
You do not need to manually create the file.
The mod loads the configuration automatically when the server starts.
Live Config Reload
Normal settings changes do not require a server restart.
Edit:
profiles/Better_Vanilla_Codelock/Settings.json
Save the file and Better Vanilla CodeLock automatically detects the change and loads the new settings after a few seconds.
The JSON uses normal:
true
false
values for enabled and disabled settings.
Admin Commands
Admins are configured using their Steam64 IDs.
Available commands include:
/bvc help
/bvc reload
/bvc config
/bvc help
Displays available Better Vanilla CodeLock admin commands.
/bvc reload
Manually reloads the JSON configuration.
Normally this is not required because the config automatically reloads after being saved.
/bvc config
Displays the currently active Better Vanilla CodeLock configuration status.
Admin permissions are checked server-side.
Safe Config Reloading
A bad JSON edit should not break every Digital Code Lock on your server.
When a new configuration is detected:
[]The new JSON is read
[]The settings are validated
[]Valid settings are applied
[]Invalid JSON is rejected
[*]The previous working configuration remains active
If the JSON contains an error, the server continues using the last valid configuration.
Fix the file and save it again, and the mod can automatically reload it.
Automatic JSON Migration
Better Vanilla CodeLock uses a versioned configuration system.
Future updates can add new JSON options without forcing server owners to delete their existing configuration.
The migration system can:
[]Detect an older ConfigVersion
[]Back up the existing config
[]Preserve customized server settings
[]Add newly introduced options
[]Apply defaults only to settings that did not previously exist
[]Update the ConfigVersion automatically
Config Backups
Configuration backups are stored inside:
profiles/Better_Vanilla_Codelock/Backups/
This provides a recovery point when configs are migrated or changed.
Logging
Configuration activity and errors are stored in:
profiles/Better_Vanilla_Codelock/Logs/Config.log
The log can include:
[]Config creation
[]Server startup loading
[]Automatic reloads
[]Manual reloads
[]Config migrations
[]Backups
[]Validation warnings
[]JSON parsing errors
PIN numbers are never written to the log.
Example Configuration
{
"ConfigVersion": 1,
"Config": {
"AutoReloadEnabled": true,
"AutoReloadCheckSeconds": 5,
"CreateBackupBeforeReload": true,
"MaximumBackups": 10
},
"Battery": {
"RequireBattery": false,
"BatteryDrainEnabled": false,
"BatteryDrainPerMinute": 0.5,
"MinimumBatteryPercent": 1.0,
"KeepBatteryCharged": true,
"PreventRemovalWhileLocked": true
},
"AutoLock": {
"Enabled": true,
"DelaySeconds": 3.0,
"RelockAfterServerRestart": true
},
"OwnerBypass": {
"Enabled": true
}
}
Why Better Vanilla CodeLock?
The purpose of this mod is not to replace DayZ's new Digital Code Lock with another custom locking system.
It improves the lock that is already in the game.
Same Item.
Same Model.
Same Keypad.
Same PIN System.
Better functionality.
No Repacking Without Permission
Repacking, redistributing, modifying, re-uploading, or including Better Vanilla CodeLock inside another mod or server pack is NOT permitted without prior permission.
Do not upload this mod, its PBOs, scripts, or any modified version of it to the Steam Workshop or another distribution platform.
If you would like permission to repack or use Better Vanilla CodeLock inside another package, contact me through Discord first.