Project Zomboid

Project Zomboid

PZNS NPC Framework
 This topic has been pinned, so it's probably important
{5LINE}Cows with Guns  [developer] 11 Jul, 2023 @ 3:13pm
HELP WANTED!
https://github.com/shadowhunter100/PZNS#readme

Currently the Framework needs a lot more work...
  • UI Window for inspecting NPCs.
  • UI Window for group management (currently it is all done via context menu).
  • Main Menu Options or Sandbox Options (Debug Mode Toggle and key bindings).
  • More NPC Actions
  • More NPC Orders
  • More NPC Jobs
  • Preset Speech texts for NPCs (Low priority)
  • UI Window for inventory transfers (mostly done, but needs more testing and polish).
  • Resolving more issues as they become known... (too much unknown at this point).


Please note that my help requests are unpaid and follows all TIS guidelines on modding.

I am also not taking any commissions at this moment.

But should a 3rd party commission for additional help to this project, I would welcome that.

https://discord.gg/SReMnbV4V7

Current Priority: Populating the Sandbox World.
Yeah, this is what I want to do next, everything else is meh. See details below.
If you're complaining about what I'm doing/not doing, stop. :KnowYourLot:
Start doing something to help or ask constructive questions. :happyio:

Populating the Sandbox World
I am looking at making generating random neutral/friendly NPCs and spawning them in the game world next.
Personally, I don't want NPCs spawning in the middle of the woods, preferably at least in a campsite or restricted to buildings and/or rooms only (and not in any of the player group zones)... with user-selected frequency (Hourly, Daily) and defined phases..

For example, most NPCs spawn can/will spawn on day 1 say at 10%, by day 3, the spawn rate is reduced by half to <= 5%, and down to <= 1% by day 7. With a chance that some NPCs are already infected to match the PZ lore of the Knox virus. (70%, 35%, 5% respectively, as an example).

Once that is done, I can turn my attention towards figuring out how to handle damage dealing for hostile NPCs.
Funny enough, that by default, players cannot damage NPCs... So I decided to bring some code from SS/SSC over to experiment with. Hence any expectations of raiders and any interactions with hostiles NPCs are on hold until that can be sorted out.

If we are going for more complicated stuff... we'll see how I feel as time goes on..

NPC Actions, Jobs, and Orders
Bahaha, I need a break from IS Time-base-actions and action queue, that shi* was incredibly complicated and tedious to work with.
For now NPCs can attack and wash themselves (albeit without moving to the water source first...). With a semi-working "Undertaker" Job to pile corpses at a set square (this needs more work, because currently it's set to 1 square rather than the entire selected zone).
If people want farmers, builders, and more complicated actions/jobs/orders... they can either do it themselves or commission another person to contribute to the framework.

Better NPC Management UI
UI code is pain, UI code is hell. :cozycastondeath:
If there's anyone out there who knows how to work with TIS Window Panels and frames to create rows of in-group NPCs and columns for accessing inventory, health info, skills, etc., please consider helping me out. :KneelingBow:
Otherwise, the contextmenu based stuff is what this mod will be having for a while.

Data Management
From what I can tell, the framework is mostly in place for managing NPCs... At least given what I know and can do on my own.
For now, I intend to focus on populating the game world via random spawning next.
Hopefully more than 10+ active NPCs can exist on the same screen without issues (or at least with less issues than SS/SSC).
Last edited by {5LINE}Cows with Guns; 23 Jul, 2023 @ 11:59pm
< >
Showing 1-7 of 7 comments
BRAVEHEART 12 Jul, 2023 @ 1:02pm 
:O
{5LINE}Cows with Guns  [developer] 24 Jul, 2023 @ 12:01am 
Bump to the top with for the priority update.
Last edited by {5LINE}Cows with Guns; 24 Jul, 2023 @ 12:01am
DextorGe 20 Aug, 2023 @ 2:06pm 
Damn, it's so inspiring! I'm gonna learn Lua to help you. I have some experience in code writing as a frontend developer, i hope it will be not so hard to learn Lua after JS.

So for now, maybe I can help you without Lua knowledge or smth?
{5LINE}Cows with Guns  [developer] 20 Aug, 2023 @ 6:02pm 
Originally posted by DextorGe:
Damn, it's so inspiring! I'm gonna learn Lua to help you. I have some experience in code writing as a frontend developer, i hope it will be not so hard to learn Lua after JS.

So for now, maybe I can help you without Lua knowledge or smth?

Take your time, learn to create an NPC first (With or without the framework). It isn't easy and why I am asking for help.

If you want to to help without coding... well I don't know what to say, because I've been outta a job for 6+ months now and need to re-evaluate life priorities. :cozycastondeath:
DextorGe 21 Aug, 2023 @ 9:00am 
Originally posted by {5LINE}Cows with Guns:
Originally posted by DextorGe:
Damn, it's so inspiring! I'm gonna learn Lua to help you. I have some experience in code writing as a frontend developer, i hope it will be not so hard to learn Lua after JS.

So for now, maybe I can help you without Lua knowledge or smth?

Take your time, learn to create an NPC first (With or without the framework). It isn't easy and why I am asking for help.

If you want to to help without coding... well I don't know what to say, because I've been outta a job for 6+ months now and need to re-evaluate life priorities. :cozycastondeath:


Allright, i'll create NPC
Cotton 21 Aug, 2023 @ 12:34pm 
I will also attempt to learn lua so i can help you, i support and appreciate everything you do for this community
{5LINE}Cows with Guns  [developer] 24 Aug, 2023 @ 2:51pm 
Originally posted by Nils:
I will also attempt to learn lua so i can help you, i support and appreciate everything you do for this community
IMO, you shouldn't learn lua for the sake of 1 game; I'd encourage you to look at programming languages with broader appeal.

Whatever lessons you take from learning to code/program should be transferable/applicable to other things you may be doing.

I had the time because I am unemployed, now I got some life decisions and priorities to make. :cozycastondeath:
< >
Showing 1-7 of 7 comments
Per page: 1530 50