Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upHostile NPCs have free access to your vehicles #19439
Comments
illi-kun
added
<Suggestion / Discussion>
Vehicles
labels
Nov 24, 2016
This comment has been minimized.
This comment has been minimized.
|
Player-locked safes and doors would be useful as well. |
This comment has been minimized.
This comment has been minimized.
saneman226
commented
Nov 26, 2016
•
|
Just use a security system. I have no idea if they are implemented to stop other npcs when the player installs them rather than mapgen. If the security system doesn't do this then I believe it should be added to work like this. |
This comment has been minimized.
This comment has been minimized.
|
I had a security system at the time. They don't lock doors on vehicles (which is why you never need to lockpick open cars doors). |
This comment has been minimized.
This comment has been minimized.
saneman226
commented
Nov 27, 2016
|
I am surprised that the security does functionally nothing when installed by the player. Perhaps this could be an easy-pass to get this issue fixed? As for the locking doors, we could have a craftable key and lock that is able to be attached to any door. |
mugling
added
NPC / Factions
and removed
Vehicles
labels
Nov 27, 2016
This comment has been minimized.
This comment has been minimized.
|
YES THIS SUCKS |
kevingranade
added
<Enhancement / Feature>
and removed
<Suggestion / Discussion>
labels
May 17, 2017
This comment has been minimized.
This comment has been minimized.
|
Player-locked doors would be amazing it would solve so many problems I have been having with NPCs. Is anyone currently working on this? I have some C++ experience so if I can figure out how to follow this code I would be more than happy to give it a shot |
This comment has been minimized.
This comment has been minimized.
|
@angoddu, give it a try, we all will be appreciated if you could implement this. |
This comment has been minimized.
This comment has been minimized.
|
I'll give it a shot. haven't used C++ in a year or two. I usually have to code in java for work |
This comment has been minimized.
This comment has been minimized.
|
Closed by #22144. |
Night-Pryanik
closed this
Feb 24, 2018
This comment has been minimized.
This comment has been minimized.
|
I cannot avoid NPCs stealing stuff from my doors and seats this way, even if they are outside, can i? |
This comment has been minimized.
This comment has been minimized.
|
No, you can't. You have to put your stuff in a lockable and locked container to prevent stealing it. |
This comment has been minimized.
This comment has been minimized.
|
Then the issue is still there, as it talks about the vehicle access being unhindered by doors. |
Night-Pryanik
reopened this
Feb 24, 2018
This comment has been minimized.
This comment has been minimized.
|
Lockable doors should be very similar in implementation to lockable containers. |
This comment has been minimized.
This comment has been minimized.
|
So it looks to me like there's two separate but related issues: in src/pathfinding.cpp:327-358 in map::route, non-friendly NPCs can open car doors and then move to seats to pick up stuff. Since seats can't be locked, you can't stop that from happening. Fundamentally, I don't think either of those are really hard changes. But they're tricky enough that I don't want to try implementing them unless the mods think that is a good approach to take. |
This comment has been minimized.
This comment has been minimized.
That would great and solve a lot of issues. Too bad there is no way for now to add flags to furniture or terrain during runtime. |
This comment has been minimized.
This comment has been minimized.
|
Please consider if this is worth the effort considering the npc will just bash a window instead. Basically, it's working as intended, because the npc can be presumed to be roughly as resourceful as the player, and therefore capable of breaking into the players car if they like. |
This comment has been minimized.
This comment has been minimized.
|
At a minimum, having an NPC start bashing on my (hopefully reinforced) windows takes some time and makes noise, which means I have more time to get close to the NPC and engage them in conversation. Alternately, if the NPC encounters PLAYER_LOCKED on a vehicle, he might decide not to get stuff from inside it at all. My initial idea for setting PLAYER_LOCKED was PC remembers the vehicle location and has turned on or off the engine. I didn't initially propose it because I figured you thought it would be too easy, but honestly, PLAYER_LOCKED should be something easy to set. And once PLAYER_LOCKED is set, the PC doesn't have to break in anymore because PLAYER_LOCKED has no effect on the PC and their allies. Oops, I should note that in the original proposal. |
This comment has been minimized.
This comment has been minimized.
If you think it's worth the effort, feel free to implement locking and bashing.
How does a NPC tell a player locked vehicle from a vehicle locked by the original (presumably dead) owner? Also, why would they care?
You need to be more specific about this, the original door lock is inoperable (no key), so what is the player replacing it with? |
This comment has been minimized.
This comment has been minimized.
|
Proposal v2: New vehicle part: (player) security system, requires the same thing as adding a security system does normally and is now the only option for a PC to install a security system. (player) security system never spawns on vehicles, it can only be installed by the PC. Adds PLAYER_OWNED to all vehicle tiles (same as the vehicle tag) and PLAYER_LOCKED flags to doors and hatches. Non-friendly NPCs can't steal stuff from closed PLAYER_LOCKED doors or hatches or open them from the outside, but can still bash the vehicle. The (player) security system represent the mechanically and electrically adept PC rekeying the locks on the car and creating new ones as needed. I think this addresses the concern from the playbase (we want a way to prevent non-hostile NPCs from stealing from our vehicles after they give us a mission but before we move away from them) while still addressing Kevin's concerns about realistic behavior of NPCs. And it makes security systems useful in a sensible way. Stretch proposals: Double stretch goals: NPC warning signs, so bandits and hostile NPCs can declare their own territory which the PC is free to ignore. |
mlangsdorf
added this to To do
in Extended Vehicle Tune-Up
Sep 4, 2018
This comment has been minimized.
This comment has been minimized.
|
Has adding the ability to lock car doors been suggested already? |
This comment has been minimized.
This comment has been minimized.
|
Yes. |
This comment has been minimized.
This comment has been minimized.
|
I have an idea that might be useful: add a property of some sort to the security system item, like an "owner tag", that is set to some random value that is NOT the player's name when the vehicle is initialized. When the player installs a security system into a vehicle, or hacks an existing security system, the new security system's "owner tag" is the name or ID of the player, which means that the player has access. Granting access to friendly NPCs is a more difficult question, but I'm wondering if that could be integrated into another idea I had: creating wearable IFF transmitters for each of the NPCs, so that player-owned turrets wouldn't shoot them (#22801). Maybe the IFF transmitters could also serve as car keys for each of the vehicles "owned" by the player, or at the very least, the same kind of "I'm with the player character!" verification protocol could maybe be reused with some modifications. |
This comment has been minimized.
This comment has been minimized.
|
Alternately, null owner tag when vehicle is initialized, and check if tag exists and is player's tag... less spurious data to keep. |
This comment has been minimized.
This comment has been minimized.
|
That's true. It wouldn't really matter whether the deceased owner of an abandoned vehicle is described as Fgsfds or a blank string. |
This comment has been minimized.
This comment has been minimized.
|
IFF transmitters and receivers are a bit out of scope for player craftability. |
This comment has been minimized.
This comment has been minimized.
|
Hmm. Fair. Maybe that should be restricted to car keys. (Also, I still feel that the problem of turrets shooting friendly NPCs should have some work-around -- unless turrets are explicitly being balanced against by the fact that they force you to be a solo act, which is reasonable for gameplay purposes, if unintuitive.) |
Regularitee commentedNov 24, 2016
•
edited
Recently did one of the storyline missions involving hunting down bandits, and found to my surprise they could just walk up, open the door to my APC, and go inside. Unlike zombie mobs they don't have to bash their way in.
Seems like a bug if all the armor in the world can be thwarted by doorhandle technology.