The Future of NPCs

I like NPCs. I really do. As one person once said: “What is the point of surviving if you are the only person left?” That’s why I want to see more content added onto them.

First is mutant/cyborg NPCs. From what I could gather, Cybernetic Alteration was akin to large-scale gun collecting today. Someone well off could easily buy a few civilian CBMs, and we have several Professions to reflect this. Additionally, I find it hard to believe there aren’t some high-level military cyborgs running around now that the US Government is dead. Additionally, considering there are radioactive hot spots dotting the landscape (along with those Science Labs littered with oh-so-delicious technology that could spell the difference between life and death), there should be other mutants running around the remains of New Englands, right?

Second is Territories and Designated Areas: A Designated Area would allow NPCs to take resources (Healing Items, Water, Food, Ammo, Etc) from this area without you having to baby them. A Territory could be multiple things: A “Don’t Come here” sign, a “Looters will be shot” sign, etc.

Perhaps you could clear out a town, and put down a Totem that designates your area as a settlement. Boom: You suddenly have a town, maybe even with shops that have a thing worth buying (something to use Bartering on, finally!).

Another aspect I’d like to see is “NPC Evolution”. Zombies get more deadly as time goes on. Logic dictates that the remaining survivors should also get stronger as time goes on. As it stands now NPCs make no effort to improve themselves, and an NPC that spawns on Day 1 is just as strong as one that Spawns on Day 113 (first year of Day 3). Wouldn’t it be nice to see those nuts at the Refugee Center one day be armed with Pneumatic Bolt Drivers and kitted in Survivor Suits?

Speaking of the Refugee Center, the Human Factions could use a tune-up too; The Old Guard and Center quest-chains are incomplete/bugged, so there’s no way to see a main base from the Old Guard (probably where all of the remaining scientists are), or find out what’s in the basement of the Center. Also, who else wants to join the Hell’s Raiders and engage in epic cage fights, raid caravans, etc?

NOTE: Highly edited after feedback from Kevin Granade.


If you want this to be productive, you need a more positive intro. As it is you’re just griping about a bunch of NPC bugs until the very end, and most likely you’re just going to get more griping in reply.

Ah, I hadn’t considered that. I was thinking along the lines of “Here’s the issues with NPCs” and “These are ultimately problems that can be overcome”.

Alright, I’ll edit it try and be “Positive”. Not sure if I’m good at that, but I’ll try.

Find someone motivated enough to spent time working on them.

Things I would like to see npc’s able to do.

Feed themselves from a designated stock pile.

Fix their own clothing. Or trade out ripped up clothing for whole clothing from a stockpile.

Help pick up loot in a sensible way.

Bandage themselves from a designated stockpile.

Put up the loot they have scavenged.

Patrol pathing around home base.

A retreat command.

Commands that can be issued to all nearby Npcs.

Simple formations.

Lockable doors and windows to keep npcs out of my base.

Npcs with mutations and bionics, more survivoresque npcs.

1 Like

First for the Designated Locations: I thought of the idea of having the player’s Home Base (and Vehicles) be designated as the player’s “Territory”. How much territory you can have depends on how long you’ve managed to survive. Anyone who takes from your territory or damages your vehicles can be killed guilt-free.

Considering Locked Doors, I once had an NPC break into the radio station I was crashing in by going straight through the window, even though the door was unlocked. Lucky for her I didn’t have Wander Spawns on…

Dwarf Fortress has a similar mechanic, where you can designate areas for Dwarves to frequent during leisure time, for animals to go in, where item stockpiles are, and where Dwarves can go in times of emergency. I think a similar mechanic can be applied for this game.

Also, I edited the first post to be more positive. I think. I’m not good at writing persuasive essays, so I can legitimately not tell if I put in a sufficient amount of “Positive” or not.

It’s less about wording and more about your subject matter.

If you want to focus on future features, there’s no reason to bring up what are obviously bugs, if you want to talk about fixing the bugs, there’s no reason to bring up future features (Also it would go in the garage instead of the drawing board).

Claiming territory is something I do plan on adding. The idea I have for it is that you put up signs or totems and if an NPC sees them they understand to keep out.
leave the bugs alone and just focus on features if you want to focus on features

Alright, rewrote it based on your advice. Thanks for it, I’m not used to getting such clear advice.

Now, a few questions:

Would this also mean supply zones where NPCs can grab medical supplies, food, etc? Also, can these totems be put on Vehicles, because I’ve definitely had problems with NPCs coming into my Deathmobile and stealing my stuff, and I can’t imagine that I’m the only one.

No problem, a big part of my job is technical and business writing, so I have more experience with it than most.

I don’t follow what you mean by supply zones. If the NPCs are friendly, they’ll ignore the totems because they know you’re cool with them, but then the current exclusion zones kick in.
Totems could definitely go on vehicles, imagine it’s a sign with “KEEP OUT” written in blood, or a hulk head on a spear, it’s something that says, “someone who lives here is the kind of person you do not want to fuck with”.

Sorta like how in Dwarf Fortress, you can designate a zone where Dwarves will go to drink, you could designate an area (or tile) where NPCs could pick up items from. For example, you have all your ammo in one pile, and you don’t want to constantly restock their supply. So you tell them they can take from that tile designated your “Ammo Pile”, and they’ll take from that pile even if you’ve asked them not to pick up items. You could even have a zone for medical supplies, drugs, food, etc.

Basically, its a pile of items you could have NPCs pick up stuff from so you don’t have to give them things yourself. That’s how I imagine it working, at least.

Sure, either that or the inverse, where you mark furniture that you don’t want them to mess with.

Personally, I’d like NPCs with more long term and short term goals. Right now they’re just meat shields with no personality.


Oh, huh, this is a coincidence. As it happens, I literally just now submitted a PR that lays down a framework for creating mutation groups with trait distributions/collections that can be used in NPC class definitions — so modders can define NPC classes with clusters of mutations. This would make it easy to make NPCs throughout the world occasionally be (for instance) cat-people, or insect-people, or genetically unstable radioactive horrors, etc. etc. — which I think fulfills what @psyxypher was talking about with regards to other mutants running around. The framework is all there, although I still need to design some new NPC classes that use it. If anyone is interested you can take a look here; it’s reminiscent of the way item_groups work now.

I thought it was quite fun implementing all this, actually, and I learned a lot while doing so. In fact, I would be interested in trying to improve NPCs further, particularly making them smarter companions than they are now… not exactly sure what I want to try doing next, I was thinking of making NPCs able to use at least a limited number of bionics, although I don’t know how big a task that would be yet since I haven’t looked at that part of the code.


A flaw in their pathfinding will make it so if you’re in a section of a lab where the rooms are set up in a 3x3 array and one NPC is blocking the doorway, another NPC will attempt to walk through any of the other doors…even if the room in question has a Turret in it. It’s kinda funny the first few times, then it just gets sad.

I bring this up because this isn’t a bug, It’s a Feature, because of how NPC Pathfinding works. I’d suggests giving NPCs a “Run on Sight” list, as in “If you see these critters, stay away from them!” Would save a lot of deaths from Turrets…

This is exactly what I was talking about. Thank you.

Glad to be of service, heh heh. I think maybe a better (and orthogonal) solution for that pathing issue is to let NPCs push each other aside — just like the player can do now – when the only thing blocking their path is another NPC. I think this would not be hard to do. IIRC the way the NPC update_path function works right now, it has a boolean flag that basically tells the pathfinder algorithm to also consider paths that can be made by smashing through breakable terrain. I bet it wouldn’t be difficult to add another flag for “include paths that are passable except for a player/NPC in the way.” Then the NPC could just push other characters aside while walking.

Of course, this might lead to another problem, since if we let NPCs push players, your buddy might accidentally push you into a lava flow or garbage chute or something. We could exclude pushing players completely or check if a tile is dangerous (don’t know how simple that is) before displacing the player.

I do like the idea of run on sight, although I don’t have a concrete idea of how that would be implemented in a non-annoying way. Right now, NPCs that are told not to engage in combat with a given enemy will just sit there and take a beating from it. I know there’s a command to “only attack enemies that you can kill easily”, so maybe we could use that functionality to let an NPC determine which foes he can’t kill easily, and then avoid them. I think NPCs right now just try to stay within some set distance of the player at all costs, but we could adjust their planning so that they will try to do so but also weight other factors, like fear of strong enemies. That might produce an effect where the player charges into a group of strong zombies but the companion NPC decides he’s too weak to fight them and decides to hang back outside their LOS, then begins following when the player is far from the zombies again.

EDIT: Ooh, just had another idea for the mutant NPCs. I added an option on NPC class templates in the same PR that lets you make an NPC undergo an arbitrary number of rounds of mutations when created, so in literally one line of JSON you can create an NPC who’s already mutated down any mutation line you desire:

        "type" : "npc_class",
        "id": "NC_RAPTOR_MUTANT"
        ... more fields here ...
        "//": "10 rounds of raptor mutations, lol"
        "mutation_rounds" : [
            [ "MUTCAT_RAPTOR", { "constant" : 10 } ]

I think the place to start is defining NPC behaviors according to some broad personality archtypes. “Crazy” NPC’s can default to mad max behaviour. Paranoid NPC’s set up and guard a perimeter. Leaders try to recruit others.

Interacting with NPC’s should be as much about the psychological health system as anything else. People emotions should be pretty important in this kind of scenario (keeping people calm rather then trigger happy, jocular rather then high as the clouds etc), and you could set up a chatting system fairly easily if you use a degree of abstraction.

This thread delves into it, i think it’s still applicable to catacylsm. Basically use descriptions like “he humbly tells you how he built this murder truck, drawling his words” rather then trying to write realistic speech.

While it’s a minor point, I’d just like to note that currently, most mutations have an “ugliness” rating, that affects your relations with normal humans. Now, this gets a bit wonky when it’s possible for other NPCs you meet to have mutations that are just as hideous or even largely identical. It’s a bit questionable for a raptor mutant to be terrified of you because of all your hideous raptor mutations. Basically what I’m saying is that there might need to be some changes made to the existing mutation ugliness system.

From what I’ve been told, some NPCs are “Mutant Lovers”, and don’t care about the Visibility rating granted by mutations, while others don’t care about the ugliness rating granted by any traits/mutations.

what about a “similarity” rating? in other words, if you have ugly or pretty or anything it checks which category you and the NPC have the most mutations in (same way it checks for threshold eligibility?) and if your top level mutations are the same then you get a bonus to relations with them. so you, a post-threshold raptor mutant would talk to another NPC that has raptor as their primary mutation list and you get a bonus to how they feel about you.

I must say, there are quite a few good ideas here, and it’s my understanding that NPCs’ behavior hasn’t substantially changed in a while. I have a nearly month-long winter break coming up and I’d be glad to spend some of it working on revamping NPCs to the best of my ability, if people would be interested.

Is there anywhere with a complete list of the current issues with NPCs? I could start a thread or a meta-issue on Github to get some input.