BaseBuildingSettings.json.
How to use a combination lock in DayZ
1
Find a lock
Combination locks spawn as loot in industrial and farm areas. The 4-dial lock is the safer one.
2
Set the code first
Take the lock in your hands and set your combination before you attach it. Avoid easy codes such as
000, 111 or 123.3
Attach it to the gate
Build the fence gate completely, then attach the lock to the gate.
4
Open it with your code
To open the gate or take the lock off, dial your code on the lock.
How a digital code lock works on modded servers
A code lock mod replaces dialling with a keypad and a code you type in. With DayZ Expansion BaseBuilding the server owner controls it inBaseBuildingSettings.json:
Players set and enter the code with the mod’s own keypad screen in game.
Code lock or combination lock: which should your server use?
How to add a code lock to your server
1
Install the mod
Add DayZ Expansion (BaseBuilding is part of DayZ-Expansion-Bundle) or another code lock mod. See install DayZ Expansion and install mods.
2
Start once
Start the server so the mod writes its settings to
profiles/ExpansionMod/Settings/.3
Change the settings
Stop the server, edit
BaseBuildingSettings.json (for example CodelockAttachMode and CodeLockLength), save and start again.Frequently asked questions
Is there a digital code lock in vanilla DayZ?
No. Vanilla DayZ has 3-dial and 4-dial combination locks. Keypad code locks come from mods.Can I put a combination lock on a tent or crate?
In vanilla DayZ, combination locks go on fence gates. Some code lock mods let you lock tents too, for example withCodelockAttachMode 2 or 3 in Expansion.
How many combinations does a DayZ combination lock have?
1,000 for the 3-dial lock and 10,000 for the 4-dial lock.Can I make locks spawn more often?
Yes. Raisenominal for CombinationLock and CombinationLock4 in types.xml. See types.xml.
Related guides
DayZ server guide
Every DayZ page in one place.
Install DayZ Expansion
BaseBuilding and code locks.
types.xml loot
Change lock spawns.
Party and group mods
Play as a team.
Tested by the FREAKHOSTING team on 30 October 2026 (DayZ stable branch on our Game Panel). Lock details checked against the DayZ wiki and the Expansion BaseBuilding settings on 30 October 2026.
Need Extra Help?
If you encounter any issues, our support team is ready to assist:- Live Chat: Quick assistance via our website.
- Support Ticket: Open a Ticket
- Discord: Join our Community
- Email: support@freakhosting.com
Last Updated: October 2026