The Future of NPCs

@smichaels You can search issues by label and there is a NPC label. https://github.com/CleverRaven/Cataclysm-DDA/issues?q=is%3Aopen+is%3Aissue+label%3ANPC

If you want you can further filter those by milestones for the next stable release even https://github.com/CleverRaven/Cataclysm-DDA/issues?q=is%3Aopen+is%3Aissue+label%3ANPC+milestone%3A0.D

I think right now my biggest issue with npcs is how incompetent they are in melee fighting. Early game my combat strategy is usually to start running, hit a zombie, retreat and repeat. Works very well with a fast weapon or the quick trait.

If I have a friendly NPC with me and we have to face a zombie, they’ll usually stop dead in their tracks and start mindlessly hitting it. That leaves me two options: Let the NPC fight it by themselves, or also mindlessly hitting it (and getting hit a lot in the process).

I’m not a coder or into coding, but I think an option in the combat commands to make them behave similarly, as in hitting and retreating, moving while fighting, etc; would not be too difficult to implement, since other creatures such as dogs have similar combat behavior.

That maybe combined with them having the ability to run should probably be the priority, at least in my opinion. Maybe in the future they could be smart enough to try to lead the zombies into nearby furniture or bushes, but I don’t know how practical or efficient that would be.

Edit: Okay, so I noticed that they actually do attack while retreating sometimes, just mostly not and certainly not indoors, from what I’ve seen at least.

1 Like

Do you have anything with reach attacks? You can make a knife spear from scrap metal or steel chunks, and the stuff from tearing down a curtain. It won’t make the NPCs run away, but it will allow you to help, without endangering yourself.

That’s some life changing advice. I didn’t even know about reach attacks, the game doesn’t seem to mention it on the item description, or maybe I just missed it.

Yeah it reads on the item if they can do reach (2 squares), or long reach (3 squares) attacks

As Zalli said, the item description in the inventory will tell you if something can do reach attacks. If you just "e"xamine the item on the ground, the screen may not have enough space to tell you if it can do reach attacks, but if you highlight the item in the inventory and press “Enter”, you’ll get a more detailed report on it, along with a list of actions you can take, some of which may not apply to the item. If it can perform a reach attack, then just wield it and use the “f” key, just like firing a gun, to attempt the attack.

“2 squares away” means a character at square zero, then one empty square, then the zed, and “3 squares away” means two empty squares between a character and the zed.

Personally I’d like to be able to have a horse and a dog as a companion. Find 1. Tame 1. Take care of them via feeding and medical.

Cows for a farm. Tame and let them eat grass on their own and provide food for them when it is frosty outside. Milk them when you makem shag a bull and have random calves XD

Animal breeding and riding would be great. Hows that for positive :slight_smile:

Oh and NPCs should have skills they can use. Like medical backgrounds can hold medical items and ask you or be talked with to heal you.

People with weapons to guard areas. Last time I looked, NPCs were broken and not defending their selves at all and would just be eaten when stood on guard. At least latest exy has the wild ones fighting and pulping.

4 Likes

Apparently NPCs with mutations were added to the game (if I’m reading the changelog right). Has anyone seen anything like this yet? Also, NPC Evolution: How do people feel about this concept?

1 Like

NPC evolution wouldn’t be much harder than zombies, right? If I understand correctly, zombies change by a time scale which affects what generates out of which branch, so couldn’t the NPCs also follow a similar branch system? Some well armed, others low on supplies, etc, all relying on preset spawn tables for each branch.

I wouldn’t mind NPC ‘advancement’. Natural selection puts heavy pressure on everything in the world of CDDA so it makes sense that the longer the game progressed, the more badass people should be around with gear, skills, bionics and mutations. I think they should keep up with the player.

I have no issues with having npc advancement over time, clearly survivors are generally going to either survive and get stronger or die.
I’m not clear on how that’s supposed to make interaction with NPCs significantly better.

In my mind, the idea is to make it so NPCs aren’t as stagnant without player intervention. Since the zombie threat grows worse and worse with every passing season, the remaining humans need to better prep themselves to fight them and survive. Having properly armed NPCs makes it feel like the game world is more alive. Just my opinion.

It’s honestly just weird seeing NPCs over three 90 days seasons in without any weapons whatsoever, but also simultaneously having 9 in Rifles and 13 in Bartering.

I’m not sure if it was mentioned or not but I think NPC bases could be interesting addition. Going into town and it’s strangely empty. You walk around. No loot. Several piles of burned bodies. And somewhere in town you find a fortress of a house with paranoid survivor and his family. That’d be cool.

And vehicles. NPCs on their own deathmobiles. Road battles a la Mad Max.

2 Likes

It would make NPC companions acquired mid to late game after the advancement kicked in more useful. Similarly NPC’s at that stage would have better things to trade with the PC.

could also have general NPC opinions change over time. at first npcs would gain extra fear from mutations and bionics, but over time they start seeing them with respect, as signs of power, because the most important thing to them becomes the ability to survive. and a mutant cyborg has that ability.

also would be nice if you could knock some hostile NPCs out and when they come to they are neutral but with a big fear spike because you just proved you totally could kick their ass. would make Aikido a LOT more compelling have since raising their pain high enough could be a knockout method.

1 Like

@psyxypher That was my PR (I mentioned it above). Mutant NPCs already existed — in the sense that NPCs could get mutations, but they’d never spawn with them. That PR enabled the creation of NPC classes that have mutations, but won’t add anything to your world on its own. You can download the mod from this WIP PR to add NPC classes for each mutation tree, and I think they should show up wandering the world automatically, but I haven’t tested — not sure how custom NPC classes are handled by the NPC spawning system.

I think NPC “evolution” could just be handled by allowing NPCs to gain skills when out of the reality bubble. Maybe you could also simulate them killing enemies and getting new items, somewhat like how Dwarf Fortress does its abstracted history mode. But as Kevin said, that won’t make them much more interesting when you actually meet them… primarily they need better AI and more dynamic dialog options. Maybe even personalities? Right now all NPCs are the same, IIRC. If some were more prone to fear, bravery, etc. it would be more interesting, and maybe that could influence dialog options.

The biggest issue by far is still that NPCs are just stupid, though. A lot of the suggestions here are interesting, but many are rather micro-level — they might produce locally interesting behavior, but the overall trend of NPCs running to their deaths, grenading themselves etc. will probably continue.

One improvement I thought of recently is that the NPC decisionmaking code right now is just a huge bunch of if-else branches. Perhaps we could instead make them have a dynamic list of preferences — eat, sleep, flee, fight, etc — all of which have a “score” associated with them that is affected by their emotions and the environment, and the one with the highest score wins out and determines their behavior. In presence of a strong enemy or dangerous object (grenade?), or if lots of damage was taken in a short time, “flight” would go up rapidly and might become the main priority (“I’m under threat, I should flee”). “Fight” might increase if an NPC has dished out a lot of damage recently (“keep fighting, I’m doing well”). Just a thought for now, but probably this is how other games model AI priorities, I would think.

2 Likes