Full Config: Safes
The complete configs/shared/safes.lua for Advanced Housing (sd-housing): safe tiers, combinations, cracking and the safes for sale.
TIP
See the configuration guide for what each file controls. Download this file as a reference, and merge changes with the config shipped in your installed version.
lua
-- Safes: bought in decorate mode (at the head of the Storage furniture) and put anywhere in the house like any piece.
-- Each holds its own things (an ox_inventory stash of its own, apart from the house's stash) and opens with its
-- combination only - the household's keys do not open it. A combination is dialled on the safe itself: its dial turned
-- to each number in turn, the way changed between one number and the next, then its handle pulled - the bolts draw
-- back and the door swings open for everyone round it to see. Whoever may decorate the house sets the combination the
-- first time it is used; the owner can have a locksmith reset a forgotten one.
--
-- Getting into one that is not yours means cracking it open: the tools its tier needs, police on duty, and a long
-- drilling job at it - stage after stage, each ended with a skill check (a failed one overheats the bit: that stage
-- again, and the bit may snap). The safe's own sensor feels the drill at once: the household is told straight away,
-- the house's alarm goes off if it is armed, and the police are called whether or not an alarm is fitted.
return {
Enabled = true,
MaxPerProperty = 2, -- safes one property may have (a garage counts as its own; an admin may put up more)
Numbers = { 3, 5 }, -- how many numbers a combination is (each 0 to 99, as on the dial), at least and at most
WrongCodes = 3, -- wrong combinations in a row before the safe locks itself
Lockout = 600, -- seconds a safe stays locked after that (no combination opens it meanwhile)
Reach = 1.6, -- metres from a safe it is used from
Reset = { Price = 2500, Time = 20000 }, -- the owner's locksmith: a forgotten combination cleared (paid from Properties.Account)
-- Each tier: what it holds, and what cracking it takes. Items: every one is needed (Consumed ones are used up as
-- the job starts); Stages: how many rounds of drilling, each StageTime ms, each ended with the skill check's Rounds
-- (ox_lib difficulties); BitBreak: the chance a failed check snaps the drill (Bit: the item taken, 'drill' when left
-- out); MinPolice: police on duty (Security.Police) before it can be tried; Cooldown: seconds before the same safe
-- can be cracked again.
Tiers = {
home = {
Slots = 15, Weight = 60000,
Crack = {
Items = { 'drill' }, Consumed = {},
Stages = 4, StageTime = 20000, Rounds = { 'medium', 'medium', 'hard' },
BitBreak = 0.2, MinPolice = 0, Cooldown = 3600,
},
},
steel = {
Slots = 25, Weight = 150000,
Crack = {
Items = { 'drill', 'electronickit' }, Consumed = { 'electronickit' },
Stages = 6, StageTime = 25000, Rounds = { 'medium', 'hard', 'hard' },
BitBreak = 0.3, MinPolice = 2, Cooldown = 5400,
},
},
vault = {
Slots = 40, Weight = 400000,
Crack = {
-- (the thermite burns the hinge first; then the drill)
Items = { 'drill', 'thermite' }, Consumed = { 'thermite' },
Stages = 8, StageTime = 30000, Rounds = { 'hard', 'hard', 'hard', 'hard' },
BitBreak = 0.4, MinPolice = 3, Cooldown = 7200,
},
},
},
-- What is for sale: its model, its tier, its name and price. Each is put in the catalogue (shared/decor/catalog.lua);
-- size is its bounding box (x, y, z metres). The sdh_safe_* models are sd-housing's own (tools/safes, streamed by
-- sd-housing-assets): their door, dial, handle and bolts move (shared/decor/safemodels.lua). One of the game's own
-- props can be sold as a safe too - it opens all the same, only nothing on it moves.
Models = {
{ model = 'sdh_safe_home', tier = 'home', label = 'Floor safe', price = 7500, size = { 0.46, 0.48, 0.56 } },
{ model = 'sdh_safe_steel_bk', tier = 'steel', label = 'Steel safe, black', price = 18000, size = { 0.62, 0.63, 1.42 } },
{ model = 'sdh_safe_steel_gd', tier = 'steel', label = 'Steel safe, oxblood and brass', price = 26000, size = { 0.62, 0.63, 1.42 } },
{ model = 'sdh_safe_vault', tier = 'vault', label = 'Vault safe', price = 65000, size = { 0.96, 0.98, 1.80 } },
},
-- The sensor, once someone starts drilling: the police are called after SensorDelay seconds (the household is told
-- at once). False: only an armed alarm calls them.
Sensor = true,
SensorDelay = 10,
Window = 180, -- seconds a safe cracked open stays open to whoever cracked it
}