Project Zomboid

Project Zomboid

Braven's NPC Framework
 This topic has been pinned, so it's probably important
Braven  [developer] 19 Nov, 2023 @ 12:15am
Suggestions
Write your ideas for new mechanics and changes here! :spiffo:
Please keep in mind there is no guarantee I will implement the idea.
You can commission changes by contacting me on Discord[discord.com]! 💖
Last edited by Braven; 11 Feb, 2024 @ 8:07pm
< >
Showing 1-13 of 13 comments
Darkdeplayer 21 Nov, 2023 @ 6:02am 
add enemys!
Darkdeplayer 24 Nov, 2023 @ 9:44am 
random npc spawning! addon
cort.x 25 Nov, 2023 @ 1:51pm 
Please make a video that explain how to manage this mod cuz I'm not a "coder" and I'm not the only one who doesn't understant any sh!t about it.
Braven  [developer] 25 Nov, 2023 @ 2:29pm 
Originally posted by cort.x:
Please make a video that explain how to manage this mod cuz I'm not a "coder" and I'm not the only one who doesn't understant any sh!t about it.
No offense, but if you don't know how to program at all, then this mod isn't for you. The guide is extremely simple.
slingwebber 26 Nov, 2023 @ 12:07pm 
Hi Braven, I am so glad this mod exists in the first place. Thank you for taking the time to create a guide to understanding the framework. I am a huge fan of your mods and trust your label on anything, especially something like NPCs where there's a growing race of mods to choose from in the workshop. I want to toot the horn of your Rappells mod, for saving my butt on many occasions.

Also, I remember commenting about your character outfit and how cool it was, and was delighted to see you implement it alongside yourself in the game. Do you have Cashapp? Lol.

If I had a real suggestion for NPC's, you should implement an ingame context menu stat/trait modifier.

Superb Survivors has an interesting function where you could play as a spawned NPC, and with trickery (namely the Cheat Menu) you could make Super Guards with max skills, and added traits, ect.
RandomRsvk 27 Nov, 2023 @ 8:13am 
Would be cool to have option to switch with your NPC companion and play as him and your main character will follow you as companion. I can imagine that this idea is crazy and hard to programm, but option to create for example 3 characters during start and switching between them as in State of Dacay would be really interresting. And maybe during playtrough found new survivors and recruit them for your small community (and now im going really to sci-fi, but size of your community would need to be equal to numbers of beds = if not then all characters are stressed with depression, and also if there wil be too much members = too much loud, too much attention = invitation for zombie hordes or raiders to visit your base). Mix of Project Zomboid and State of Decay.
76561199227680499 28 Nov, 2023 @ 3:50pm 
could you add survivor communities like superb? or make that ramdom groups take differents zones of the map as they territories?, that would be awesome!!
Marko 29 Nov, 2023 @ 4:17am 
I think a MyLittleMoodles module to reference would be amazing. I've been trying to study Aiteron's code in their Project Humanoid but I'm not sure how to port over his moodle system to create npc needs. I think NPCs shouldn't just be hunger or thirsty, they should have all the moodles any player can get, in particular exhaustion, temperature and sickness.
Daeca 14 Dec, 2023 @ 9:00am 
Implement a menu system to give them ammo and mags in game, tired of them trying to constantly reload when they got no ammo and no method of passing ammo or mags to either of them.
DG_JEN 15 Dec, 2023 @ 11:52am 
Would it be possible to have line 51 "npcData.isInVehicle = false" check if they are in a vehicle? Also your mods are great thank you hope you have a wonderful day
ore316 25 Jan, 2024 @ 2:45pm 
pre made npcs
howdy 11 Feb, 2024 @ 10:18am 
You should make a discussion with a list of all the mods that use this framework
Cybersomatic 22 Oct, 2024 @ 7:36pm 
So to start, I really appreciate that Braven notices some details about the player's own behaviors and moodles. Their little one-liners, like "Maybe we should have a rest?" aren't really necessary and yet they do so much to make a Singleplayer game less lonely. Have you considered building on behaviors that take into account Braven's environment?

For example, if Braven notices some useful items nearby and has space to carry, Braven could ask the player whether to pick those up? If the player responds with a Thumbs Up emote to affirm, then Braven can help gather loot. Similarly, if the player is picking up many items of a particular category, Braven could ask if this is a preferred category to search for. Verbal feedback or (with a notepad and writing utensil) scribbling down a little list to give the player could serve to report what was found without manually peeking at Braven's inventory.

Some conditions Braven might consider in-depth before trying to do their own thing:
- How long has it been since I last heard or saw a zombie? (Are we safe?)
- Do I have wounds that need tending?
- If the player is injured, can I offer to clean and dress their wounds with what I'm carrying? If it's bad enough, should I just tell them to "Hold still!" and try to patch them up without waiting?
- How long has it been since my last request to the player? (Don't want to bombard them outside of an emergency.)
- How is the player doing? (Should I help them by looking for food? clean water? medicine? ammunition? warm clothes?)
- What loot preferences has the player taught me? (In terms of what type of items to search for and how often to ask. Measured more like a Float or Integer than a Boolean.)
- Am I wielding a weapon that requires maintenance or ammunition?
- Am I wearing damaged clothes/armor? Can I mend/replace them?
- Am I dressed appropriately for the weather?
- Do I need a bath?
- Am I in a saferoom or base? (Can the player teach Braven the boundaries of "home" or safety?)
- Are there player-made structures nearby in need of repair?
- Do I trust the player?

These are all the prompts I can come up with right now for behaviors I'd like to see from Braven. Even without fancy new mechanics, more banter would be welcome. If only one of these sparks your inspiration, it would still make my day.

Lastly, props to your code documentation. It is very clean and gives me warm fuzzies to read. Reminds me of a professional programmer I used to mod with on an old Neverwinter Nights server, many many moons ago. I'm still trying to figure out how to make my own NPC from your framework, but I think that is a limitation of my experience with PZ and Lua, not your guide.

Anyway, cheers!

---Edit, 30 minutes later---
I had a look at BB_MyLittleBraven_Main.lua in the associated mod files, then went back and read the guide again for the framework, and everything suddenly clicked! Thanks!
Last edited by Cybersomatic; 22 Oct, 2024 @ 8:10pm
< >
Showing 1-13 of 13 comments
Per page: 1530 50