Ability to lock vehicle doors?

I was surprised when an NPC paid me a little visit while I was sleeping in my armored car, opened the car door and then helped himself to whatever he wanted right under my sleeping body. This doesn’t seem exactly right - why can’t I lock the car door? In fact, I don’t recall ever coming across ANY locked car doors, so I’m assuming it just isn’t a thing yet.

It would add to immersion too. Imagine having to jimmy open a locked car door and risking setting of the car alarm, alerting the horde.

This is one of those details we need for good interaction with random NPCs, yea.
For the, “sleeping in the car” case, the question is what’s a good ui, do we make it manual, or just assume you lock doors any time you close them from the inside? I’m leaning toward making it automatic, mostly since the number of moves to do it would be tiny, and theres little to no reason to leave them unlocked.

It gets a little involved to handle locking car doors from the outside, generally we assume you break into cars and hotwire them, so you don’t have a key. To handle this we’d need a system for tracking keys (Not hard) and a system for placing keys on the map (tricky, I don’t have a good solution). If your character is good at lockpicking, you might want to lock car doors after closingbthem from the outside as well, but we can’t assume that’s safe to do, so it’s need to be manual or configurable.

how about no keys spawn but most cars are unlocked because the driver just didn’t bother locking with the apocalypse happening around them. some that could be are cars in garages, and military vehicles(trained to lock the door even if satan himself shows up) or any other kind of vehicle that obviously was parked rather then ditched. meaning MOST cars you don’t need to break into. next you can fabricate a key to your car, it does not look like a normal key because it’s lock is one of your own design, i mean by the time you are bothering to fabricate one you are probably building a vehicle of your own design, and like a cash card it’s only 0.01 L

One painful thing about locked cars would be door windows.

When you break into a house, you bash a window and it breaks into a frame.
With a car, the door has a lot of “state” with it and it can’t just transform easily.
And if we want sensible NPC interactions, we can’t expect them to just want to bash the whole door down, but only bash down the window and open the door through the window frame.

Getting in the car is not the problem, most if not all cars currently spawn with their doors unlocked. The problem is locking them once you’ve taken possession.
What you seem to be suggesting is replacing the door lock entirely, which is possible, but leaves people with no way to craft advanced car parts with no way to do it at all.

hmmm… how about it’s a [m]end option? any car that needs to be hotwired because it is missing keys also has all the doors on the vehicle spawn with the fault “missing key”?

AFAIK that’s relatively advanced locksmithing, so while it’s doable, its not a solution.

yes but it only matters on cars that do have that fault. any car that does ‘have the keys’ would be under your complete control the moment you start the engine once. besides, you can say it encourages finding a different vehicle to use for long term. if i could lock doors but not on that one i would use it up quick and find a new one. like say, use it to kill a hulk in center city so i can explore the nearby buildings relatively safely but ditch it now that it’s frame has been shattered from hulk impact and get one that works better. finding the a car that has everything you need working properly has always been a small early game struggle. besides, it only really matters in places that have NPCs spawning since zombies don’t try to open unlocked doors anyway.

double post but wanted to mention, it doesn’t matter how advanced locksmithing it is IRL, if they have the skill to remove the door and just install a new one then they should be able to change the lock on it.

I don’t know where you get the idea that a noticeable number of cars would spawn with keys in them, that would be vanishingly rare.
There’s a difference between installing a lock and making a lock. Making one is much more difficult.

At least most of the ones found running should have them, and a noticeable number of the ones with no gas (left running until they are out) should be expected to have them, too…

here’s a thought, automatic locks, when the car moves above a certain speed say 5-10mph the doors lock on their own but can be overridden by the controls, while engine off and stationary for a few turns they get flagged to lock next time they shut.

also, key fobs and key chains with the typical remote and proximity locks, could even be a biometric keychain CBM which could allow you to track more than one vehicle at a time provided you have the keys stored in it’s memory.