NPCs can be convinced to join forces with you. They will do their best to follow you around and attack nearby zombies.
NPCs can also use guns now. However, if they’re standing too close to their target to use a ranged weapon, they will switch to a melee weapon.
You can rob NPCs by shooting at them and then holding them up with your gun. When scared, NPCs will throw their hands in the air and give you their money (be careful though, because nearby NPCs will come to your victim’s defense, and/or your victim will attack once you take what they have).
Here are some .gif animations to show the new features!
This week I’ve been working on getting a wider variety of NPCs into the game world. The main type players will come across are “generic” NPCs (shown in the last post). Those are the ones that can offer general information/help/etc.
Other types will be hostile NPCs, NPCs who only want to trade (and who will carry special goods), depressed NPCs, crazy NPCs, etc.
Here’s an example of an encounter with a depressed NPC:
This week I worked on NPCs (non-playable characters). They are basically the other survivors in the city.
NPC AI is based on zombie AI. It runs in a modular behavioral hierarchy. Right now NPCs can perform many different actions. They can wander, give the player attention, attack the player, attack zombies, flee, talk, etc.
If they’re near the player, they can shout phrases in small, floating speech bubbles. These phrases can be greetings, cries for help, taunts, etc.
You can initiate a full chat with an NPC, by walking close to it and pressing the chat icon that pops up in the top right of the screen. In these full chats you can respond to what the NPC says and essentially have a little conversation with them. Certain responses you give will trigger a positive reaction in the NPC, other responses will trigger a negative one. You can also ask the NPC to follow you, or trade with you. If you anger the NPC too much while talking to him, he will attack you.
NPCs will also attack you if you purposely attack them, and if nearby NPCs see this altercation, they will gang up attack you as well.
The full NPC chat system is based on a dialog tree editor that I wrote, which uses Helium for its schematic view. Here is a scaled-down image of a complex dialog tree created for generic NPCs found outside of the sewers:
The blue boxes are branch nodes that are seed-locked to each NPC, so NPCs will “respond” to a player’s dialog choice predictable at that point in the tree. The rest of the branches are chosen at random to keep conversations unique. Green lines represent conversational choices that trigger a positive reaction in the NPC. Red lines represent negative reactions. If you insult/threaten an NPC too much during a conversation, he will attack you.