Lockable furniture

Hello,

this is probably a rather old and basic idea (searched the forum, couldn’t really find a thread, though) which simultaneously could be a great benefit to the game:

  • Enable some pieces of furniture (lockers, cupboards, …) lockable with a certain key and unlockable with picklocks and the corresponding key.

So, the player could store items in his locker at the shelter so random NPCs won’t steal it. (Unless NPCs get the ability to use picklocks)
Also, this could allow for some interesting quests, and more ralism.

If this is done, however, I would strongly suggest somehow adding another type of picklock. The current ones are incredubly easy to craft. So regular, makeshift picklocks would fail almost always against decent locks, proper self-constructed ones are medium, and industrially produced picklocks should be the best.

What do you think?

I say great idea.

Hm, perhaps it would make sense to add a “storage” tag to furniture then.
And, of course also a “lockable” tag.
However, for more advanced things, like tables with lockable drawers, we probably need more than that.

This is a good idea that has not been proposed before AFAIK, congratulations.
We can already set flags to make furniture hold items without allowing them to be visible (though you’re assumed to rummage through things when adjacent, so they become visible then).
So all we’d need would be locked and unlocked flags.
More depth to lockpicking is a seperate issue really, but enhancements to it would be welcome.

Safes already work somewhat like this, once cracked, you can close them and open them by using ‘c’ and ‘o’ respectively. I think it just works by converting the furniture between two types.

Yeah, the major issue here is tracking specific keys (key XYZ goes to the third locker from the left in the evac shelter that last survivor started in, which happens to be on the other side of this overmap section), not having furniture be lockable/pickable.

congratulations.

Thanks. :slight_smile:

So, locked and unlocked tags we need.
Is there actually a maximum on what you can store on one “square”? I guess not, but perhaps considering this it could make sense to also add a maximum volume that a certain piece of furniture can store, so you can’t stuff 50 oxygen tanks in your locker. This is a lock-unrelated feature, and pretty low priority imo, though.

Hm, perhaps we don’t need that many keys, as perhaps many people took their keys with them?
If possible, keys for a piece of furniture are only supposed to spawn within the same building, otherwise it would get too confusing. Showing the player in the inventory which key is for which locker is probably not very feasible as I can’t really imagine a way of doing that.
Maybe the player could pick up a “pack” of keys and then, whenever he picks up a new key, it is simply added to the bunch of others. If the player doesn’t have the correct key, but tries to open a locker with his keys it tells him “you don’t have a fitting key”.

Still thinking about this. I’ll sleep over it, for now. Is it somehow possible, to set a link from keys that spawn in a certain building to furniture in the same building? Or is that idea too complicated?

Solution: For each lock spawned give it a serial number. If a key(s) spawns for this locker (should spawn simultaneously with the lock, if ever - unless spawned statically for some specific purpose) give it the same serial.

Then only the key with the correct serial can open the locker, while the game can easily track eveything (apart for the locker/key attribute, only the counter for the serials is tracked constantly)

As for the player inventory, unless you want to go separate keys and show the key’s “bar-code” (aka serial) to the player in the keys locker screen (and show something similar by examining the locker) - this seems like bloat and more micro, you could just simulate it by using snaaty’s suggestion: a ‘magical’ key locker that takes 2 vol in the inventory and has all the keys the player has collected. Then if the player has the correct key the locker opens/locks, else an error message appears.

Player should be able to also build (primitive) locks and keys later on.

This is a swell idea.

JCD, maybe it should be called a keyring, based off the mod for Oblivion. That would make sense, though it might be a little odd for nude characters.

yep, i meant to say keyring but i was thinking about lockers.
Deus Ex had those things 14 years ago :wink:

[quote=“jcd, post:8, topic:7141”]Solution: For each lock spawned give it a serial number. If a key(s) spawns for this locker (should spawn simultaneously with the lock, if ever - unless spawned statically for some specific purpose) give it the same serial.

Then only the key with the correct serial can open the locker, while the game can easily track eveything (apart for the locker/key attribute, only the counter for the serials is tracked constantly)

As for the player inventory, unless you want to go separate keys and show the key’s “bar-code” (aka serial) to the player in the keys locker screen (and show something similar by examining the locker) - this seems like bloat and more micro, you could just simulate it by using snaaty’s suggestion: a ‘magical’ key locker that takes 2 vol in the inventory and has all the keys the player has collected. Then if the player has the correct key the locker opens/locks, else an error message appears.

Player should be able to also build (primitive) locks and keys later on.[/quote]

I´d like cars with this too!
[me=StopSignal]prepares to get hate[/me]

there’s a simple solution for keys, the key would record the coordinates of the thing it unlocks.

for vehicles it would be a matching id. not sure if you’re joking, but I’ve seriously considered adding that, the main problem is except for trivial cases (key in the car, key in a house whose garage has a car), it’s nearly impossible to find the keys. I would be fine with adding that though so those trivial cases would work, and the other ones would just be useless clutter. overall I wouldn’t mind requiring hotwiring to start cars

[quote=“Kevin Granade, post:12, topic:7141”]there’s a simple solution for keys, the key would record the coordinates of the thing it unlocks.

for vehicles it would be a matching id. not sure if you’re joking, but I’ve seriously considered adding that, the main problem is except for trivial cases (key in the car, key in a house whose garage has a car), it’s nearly impossible to find the keys. I would be fine with adding that though so those trivial cases would work, and the other ones would just be useless clutter. overall I wouldn’t mind requiring hotwiring to start cars[/quote]

That is a really good idea!
We need more houses with garages.
Drivers inside the car spawning with keys.
Dropped keys.
Keys with no use.
KEYSSS

Seriously, it´s a good idea, Kevin.

Yeah, jcds idea seems like a very reasonable aproach to me.
Also I strongly support the idea of not showing the player the “key-serial”.
Perhaps keys could be engraved or sorted?

You can already carve words and the like into equipment with a knife. Although Elbereth doesn’t seem to work.
To give basic differentiation, could we use the artifact system to make the keys have randomly generated characteristics? Say, “Red steel key” or “Green plastic key” so that way you can sort of memorize what each does.
Also, I misread that as “Perhaps keys could be engraved or snorted” and that’s just hardcore.

[quote=“Snaaty, post:14, topic:7141”]Yeah, jcds idea seems like a very reasonable aproach to me.
Also I strongly support the idea of not showing the player the “key-serial”.
Perhaps keys could be engraved or sorted?[/quote]

[quote=“Kevin Granade, post:12, topic:7141”]there’s a simple solution for keys, the key would record the coordinates of the thing it unlocks.

for vehicles it would be a matching id. not sure if you’re joking, but I’ve seriously considered adding that, the main problem is except for trivial cases (key in the car, key in a house whose garage has a car), it’s nearly impossible to find the keys. I would be fine with adding that though so those trivial cases would work, and the other ones would just be useless clutter. overall I wouldn’t mind requiring hotwiring to start cars[/quote]

Kevins approach for non-movable containers is better, since its less variables to track and less work to do. Especially since its more realistic to not show in the key info on what it unlocks. It should be! He’s a dev :smiley:

If this also gets expanded, we could also have password locks for terminals, where instead of just hacking we could enter the password if we find it somewhere.
Eg. in a lab somwhere we find a ‘barracks password’ note…
Although for this it will be hard to tell the player what password goes where.
Unless the pwd note is electronic, and by hooking it to a pda, it shows in the map the correct location.

you generally wouldn’t be examining individual keys, you’d have a pile of keys that take up one inventory entry.
each key would know which thing it unlocks, but it won’t tell you. we’d track if you know what a given key unlocks, but again that wouldn’t be noted on they key itself. If for example a NPC gives you a key and says what it unlocks, it’d be marked as known.

When opening something that requires a key, it’d first check if you have a key you know opens it, if so it’d just use it, taking a minimal amout of moves. if you don’t know what key opens it, you’d try every unknown key you have until you run out or find one that does open it, if you find a match we mark the key known.

How about an RFID style system? You would be required to find/craft an RFID card and programmer. Use the programmer on the furniture and your card will open it from then on? Would be minimal inventory space and only certain furniture items would be lockable.

I wouldn’t see much of a problem finding the keys. Figuring out which lock they go to… That’s where the fun comes in :slight_smile:
For vehicles, perhaps making the key (a)ctivatable, setting off the vehicles alarm could be an option.

If it tracks the coords of the locked item and we grab the item and move it what happens will it update the coords so the key still works?.

This was one of my reasons for the RFID idea. Each RFID card would have a unique(?) serial number. Using the programmer would ask the player to select an RFID card, then select a piece of furniture ( much like the deconstruct function ask’s for a direction ). The programmer would then assign the furniture the serial number from the RFID card. When (e)xamining the locked furniture, the system would check the furnitures serial number against the serial number of each held RFID card. If an RFID card with matching serial is held in inventory, continue the (e)xamine function, otherwise display a message. ( “None of your RFID cards open the lock.” )

(?): Probably should allow duplicate RFID card serials. Perhaps once NPCs are able to claim ownership of furniture/vehicles/buildings we could design an RFID Card Duplicator that would allow one to attempt to copy an NPCs held RFID card. ( Must be within range of RFID signal )