CleverRaven / Cataclysm-DDA

Cataclysm - Dark Days Ahead. A turn-based survival game set in a post-apocalyptic world.
http://cataclysmdda.org
Other
10.32k stars 4.14k forks source link

NPCs have trouble finding good sleeping spots and staying asleep #71865

Closed XygenSS closed 7 months ago

XygenSS commented 7 months ago

Is your feature request related to a problem? Please describe.

Currently managing NPC sleep is more frustrating than it needs to be - different followers go to sleep at different times, and when they do, they seek the nearest seat or bed and go right to sleep. They are constantly awakened by noises, such as walking, stereo, or even other followers saying "Bye" at 15 sound whenever you talk to them. Other times, NPCs even take up your spot in the bed for themselves.

If you want to assign them beds to sleep in, you have to herd them one by one to a desired spot, command them to sleep, and wait for them to lie down. This is so many button presses just to be unbothered during your overnight crafting session.

Solution you would like.

A new zone in the zone manager to define where NPCs will go to sleep. Followers will seek beds and seats within the zone and use them.

It would also be nice if followers automatically crouched while moving about within the sleep zone as to try not to wake eachother up, but this wouldn't be 100% necessary.

NPCs should search a wider area when attempting to go to sleep and choose comfort over proximity if they can. The player can then manage where NPCs go to sleep by simply furnishing the bedroom(s) and making them desirable places to sleep.

Doing it this way instead of zones means that the player shouldn't need to define where their followers should rest every time they have to camp somewhere outside their usual base.

NPCs should also have a memory of recent sleeping spots and prefer to stick to that, or at least avoid taking the player character's bed unless there's no other option.

Describe alternatives you have considered.

No response

Additional context

No response

fairyarmadillo commented 7 months ago

They should also look for the best bed available, even if zones aren't set. Comfort increases healing speed, so it can be pretty important.

RenechCDDA commented 7 months ago

Let's break this issue down into a few points.

Players should define where NPCs sleep - No. Just no. NPCs shouldn't listen to you in this regard, and they should be able to find their own beds. They can already find their own beds, so sleep zones could only ever detract from the intended gameplay.

NPCs do not have a regimented sleep schedule - Neither does the player, and as above it is generally inappropriate to dictate a schedule to a NPC. There is room for suggesting future availability, by telling the NPC something like "I plan to lead a raid into town at 0800 tomorrow, I'd like you to be rested and available then", and the NPC should be capable of carrying that out under their own volition

Things that wake NPCs up - Most of these seem pretty intended (blaring the stereo is of course going to wake people up). The odd one out is the fact speech is always at max volume. NPCs should be capable of using their 'indoor voice' out of combat and this would be relatively simple to implement.

NPCs can sleep in "your" bed - This is completely intended. If you don't have enough sleeping spaces, the solution is to make more. NPCs should not bow to your will and sleep on the floor when a bed is available just because you say so.

Zireael07 commented 7 months ago

@RenechCDDA The problem with your first paragraph is, NPCs bug out often when it comes to sleep.

RenechCDDA commented 7 months ago

Then that should be fixed? You'd have to be more specific in how they "bug out", but presumably you mean they can't find a bed because the search radius is only 6 tiles. It would be much better to simply let them search the entire reality bubble than to task the player with micromanaging.

fairyarmadillo commented 7 months ago
  • No. Just no. NPCs shouldn't listen to you in this regard, and they should be able to find their own beds.

I don't follow your logic. NPCs aren't good at finding their own beds. They can't see for shit in the dark, don't intelligently use flashlights, don't seem to remember where stuff is, and will just settle onto a random piece of furniture, opting for a 2 comfort chair rather than the nice 5 comfort bed you made up for them. The only existing solution to this is to manually shove them toward the appropriate bed. I don't have to do that to my friends IRL.

We allow the player to tell NPCs which car seat is theirs. People have bedrooms IRL. What's the problem?

NPCs can sleep in "your" bed - This is completely intended. If you don't have enough sleeping spaces, the solution is to make more. NPCs should not bow to your will and sleep on the floor when a bed is available just because you say so.

Yeah but they're also human beings, not insects. Humans can make agreements about how to do things.

RenechCDDA commented 7 months ago

I don't follow your logic. NPCs aren't good at finding their own beds.

Then we should fix that.

don't intelligently use flashlights,

Then we should fix that.

will just settle onto a random piece of furniture, opting for a 2 comfort chair rather than the nice 5 comfort bed you made up for them

Then we should fix that.

We allow the player to tell NPCs which car seat is theirs. People have bedrooms IRL. What's the problem?

Yeah but they're also human beings, not insects. Humans can make agreements about how to do things.

From the earlier discussion on Discord, quoting myself: "You promised to take care of them, they are following you for that, there should be friction when you are unable to do so. If you say "Nah screw you guys, get out of my bed" there would be a revolt.

Now there could absolutely be room for a scenario where the power imbalance is such that your followers are desperate enough to allow you privileges like getting all the good food, and always having a comfy bed to yourself. But the player having total control over where NPCs sleep, in all scenarios? That is not the way."

fairyarmadillo commented 7 months ago

From the earlier discussion on Discord, quoting myself: "You promised to take care of them, they are following you for that, there should be friction when you are unable to do so. If you say "Nah screw you guys, get out of my bed" there would be a revolt.

I still don't follow. We each have our own bed. They are all equally good. In such a scenario, people IRL almost always claim one bed and use it exclusively. Beds are seen as a personal thing.

If I invited someone over and they tried to sleep in my bed instead of the guest bed, that would be weird. If I went camping with somebody and they tried to go into my tent, that would be alarming.

Now there could absolutely be room for a scenario where the power imbalance is such that your followers are desperate enough to allow you privileges like getting all the good food, and always having a comfy bed to yourself. But the player having total control over where NPCs sleep, in all scenarios? That is not the way."

You seem to be talking about a situation where the player forcing npcs to sleep on the floor while they take the only bed. That isn't what's being discussed as far as I can tell. I want to give my guys their own nice beds.

Power also isn't the only reason someone might give up a sleeping spot. If John is seriously ill or injured, Jane might want to let him have the better sleeping spot, knowing it will help him survive, which is probably something she cares about.

RenechCDDA commented 7 months ago

Zones would not accomplish either of those, as zones are tied to factions at best. If you wanted a character to consider a sleeping spot as "theirs", it needs to be serialized as part of the character*. Similarly if they are faced with allocating scarce resources, they should be doing that automatically(as they do with reloading) - the player should not have to tell them "No you idiots stop laying the wounded on the floor!". They should be able to do that automatically, without player intervention. Player intervention is only desirable in cases where there is ambiguity or a decision needs to be made (since the player is nominally the leader of the faction).

*Technically I guess you could do the opposite and serialize character references into the zone data but please don't do that

??? you seem to be talking about a situation where the player forcing npcs to sleep on the floor while they take the only bed. That isn't what's being discussed as far as I can tell.

You are bereft of some context, the author of #72004 was pretty explicit in the mentioned discord conversation about shoving NPCs onto the floor because they don't want to make enough beds.

fairyarmadillo commented 7 months ago

I see! Thanks for clarifying.

Norwaivhi commented 7 months ago

You are bereft of some context, the author of #72004 was pretty explicit in the mentioned discord conversation about shoving NPCs onto the floor because they don't want to make enough beds.

Please do not try to interpret my words and portray me as a monster here. I haven't explicitly said that I'm doing that. There are twice the beds as followers in my camp if that means anything.

I can see myself dragging the NPC out of bed if the need arises. In the end, it does not matter what I do and what happens to the NPCs if there are no NPCs to exist because I’m not playing a game.

The point of the zones is to be a temporary patch to the system that is not yet fleshed out enough. And it appears from the initial reaction some players are supporting that. When the NPCs will get good enough, the feature could be removed, as many others were.

RenechCDDA commented 7 months ago

The point of the zones is to be a temporary patch to the system that is not yet fleshed out enough. And it appears from the initial reaction some players are supporting that. When the NPCs will get good enough, the feature could be removed, as many others were.

What is not 'good enough'?

You'll notice I've already opened one PR for this, I can open others.

Norwaivhi commented 7 months ago

What is not 'good enough'?

You said enough about how currently NPCs are completely "blind" and have no real opinion/reaction, being puppets to put it short, and how that should not be the case, that NPCs should be "alive". In my eyes, the vision majorly differs from the current state, and while fixing screaming, use of flashlights, sleeping and so on would be nice, it is just a fix and not a step to the state you described.

What I'm saying is that right now zones do fit in, and would work nicely with your PR, and other possible PRs you noted.

If NPCs were reactive\responsive, had an opinion\ goals\ motivation, or whatever else, that would've been a completely different case where I would be trying to enforce some sort of tyranny, true.

If you do have something in mind and some clear vision of how NPCs should be - I'd be happy to hear it, work on the new approach, try to provide some form and amount of help.

Lastly, I think the aspect of camps is the fact that you manage them. You are already in charge of the resources, population, activities, and may I say - zones! Sleep zone is nothing more than just another tool to set preferred spaces to rest.

RenechCDDA commented 7 months ago

I don't know how many ways I need to say this, but whether or not you believe NPCs are good right now is irrelevant. We want them to be good. We want them to be able to make simple decisions themselves. Explicitly taking the decision-making away from them and giving it to the player is not making them any better. It is explicitly making them worse, because you took the decision away from them. You have made no attempt to improve their decision making. It is a step away from what is wanted or good.

XygenSS commented 7 months ago

It would be much better to simply let them search the entire reality bubble than to task the player with micromanaging.

The whole reality bubble, closest faction camp, whatever it is, the main issue here is that more often than not NPCs will crash on a stool next to your crafting spot and not actually get any rest unless you herd them. If expanding the search radius means they can find their own beds far away (if the player makes them a desirable sleeping spot) then the issue would be solved without the need of manually defined zones. Comfort should definitely take priority over proximity, that would let players indirectly control where NPCs sleep by just furnishing the appropriate bedroom (more immersive, yay)

NPCs having a memory of recent/preferred sleeping spots and sticking to them might help avoid the problem of them taking your bed, but wouldn't be necessary if that problem is deemed a non-issue

esotericist commented 7 months ago

to have someone with slightly more seniority chime in, i back everything renech is saying here.

kevingranade commented 7 months ago

Stepping back a bit. This is something that happens a TON in software development in general not just in games. You've brought up a totally valid issue about problems npcs and players encounter with regard to utilizing sleeping resources. And that is something that does need fixing and that we do intend to fix.

The ONLY issue is that sleeping zones is not an acceptable workaround to the problem.

There's potential here for there to be a system that makes NPCs drastically smarter acting in a lot of ways, and making living with them a lot more interesting, but having the player micromanage them shuts all that down.

Think about what you're going to do if you visit somewhere with a group and you reach a hotel or something. People tend to claim beds right away because they know they're going to need it eventually and deciding right before sleep sucks.

Even short of claiming a bed, NPCs should be low-key looking for somewhere to sleep all the time and keeping a list of options in mind, then when it's time to sleep they have at least a list of options to try instead of settling for a terrible sleeping spot. Optionally, there could be some kind of claim system where npcs and the player prefer to sleep in the same place repeatedly so everyone just settles into a routine over time.

XygenSS commented 7 months ago

Edited main body of issue to reflect a proposed solution

Zireael07 commented 7 months ago

about shoving NPCs onto the floor because they don't want to make enough beds.

Tbh in a post-apoc situation it makes perfect sense that some people would sleep on the floor (though with a karimata/sleeping bag)

Think of a sleep room at a convention

adamkad1 commented 4 months ago

Let's break this issue down into a few points.

Players should define where NPCs sleep - No. Just no. NPCs shouldn't listen to you in this regard, and they should be able to find their own beds. They can already find their own beds, so sleep zones could only ever detract from the intended gameplay.

It's your camp and they accepted you as a leader. It makes sense they would accept you telling them where to sleep as long as it makes sense. Like a proper bed? Fine. Floor or something? They will probably tell you to f off. Or accept it and hate you more Heck one could organize their camp as military camp, pretty sure in those they tell you where you get to sleep and you don't get a say in it. Im reinforcing that NPCs should definatelly accept you telling them where to sleep depending on your relations and how proper of a bed the assigned place is. Cant assume everyone is turbo anti authority