Project Zomboid

Project Zomboid

[B42/B41] Bandits NPC (v2)
NBA youngboy 26 Oct, 2024 @ 11:02am
NPC Behaviour Improvements
Fantastic work on the NPC AI so far :) as a modder of other games this is quite impressive as I am aware how difficult NPC behaviours and AI can be.

However, some aspects of the NPC behaviour could do with some improvements, and there are some easy things you could do to make NPC gameplay even better.

#1
Strongly recommend disabling friendly NPCs until they're more polished, easier to control, and you have a better idea of what you want them to do. Right now they're more of an annoyance and anything, and it just feels like all they do is bug out and get in your way. Players seem to be disabling all friendly AIs because they're so unpleasant to deal with.

IMO, the following issues should be addressed before a proper release:
- When they spawn, they rush to your location, tearing down any base fortifications in their way and potentially trailing zombies with them. Consider rather giving them the "wanderer" AI so that the player can voluntarily recruit them after running into them.
- Their melee attack is unexpectedly weak against zombies (perhaps an issue with all bandits), and will often get killed by one lone zombie
- Difficult to control them, and they try to follow your player at too close a distance. The "Leave me" option seems to not work reliably. Accidentally hitting them (because they got in the way) causes them to retaliate
- Late-game friendly NPCs are like walking lootboxes - it's far too easy to kill them as they arrive and steal their assault rifles and mags.
- They don't have much purpose or personality yet

#2
- If you restart your game/server, they always revert back to normal zombies that will attack you and kill you. This is a major bug that affects gameplay quite negatively (especially for friendly guard NPCs). Would it be possible to fix this (even just by making them despawn?)

#3
Consider the balancing effects of items NPCs spawn with. It's far too easy to acquire powerful guns, ammo, equipment and clothing from NPCs dying, especially after late-game bandits arrive (Clan 7+). IMO, bandits should spawn with much less and more randomized gear - not the same powerful loadout every time.

I've also seen bandits often spawn with duplicate melee weapons (usually machetes and hunting knives) sometimes.

#4
Polish bandit houses. Some problems with them:
- Bandits and mattresses seem to spawn once in every room in the house. This means that large houses with many rooms can result in dozens of bandits/mattresses spawning. I once stepped in large house and immediately got rushed by 20+ bandits. It would be better if max 5 bandits to spawn in a bandit house.
- Bandit container loot can be very unbalanced because of how it can potentially spawn in every container in the house. If a large house has many containers (e.g. a bandit base inside a warehouse), dozens of food item stacks will spawn in most containers, which is very unbalanced.