Justice, the awesome NPC system

5 fps moment is soon:tm: LOL! im gonna put this to my game!

Build 4

Only a small update because I have been meaning to do it for a while.

  • You can now configure a name generator function in the config.

Download it from the main post. Historical builds are available under History .

1 Like

Build 5

(two builds in one day! wow!)

  • Bugfix where hair is cloned regardless of if it is actually cloneable.
  • Changed the special ‘do not give accessory/hair’ operator from nil to -1.

Download it from the main post. Historical builds are available under History .

1 Like

Looks great! Can’t wait for the R15 release!

I haven’t looked at this yet, but is there a mechanic where only certain NPCs can go to certain areas?

They’ll only enter the areas marked as pathfindable meaning you can restrict/allow access to areas simply by tagging them.

I mean like is there a way to make it so certain NPCs only go to certain pathfindable areas? Like 1 NPC can only go to places on 1/2 of the map, and 1 can only go to places on the other side.

Unfortunately that’s not a feature at the minute, I’ll message Lewis about it so we can get it raised as a Feature Request. Thanks for the suggestion :smiley:

Ya, you wouldn’t want for example citizens walking into the VIP area.

Definitely an interesting suggestion. Now I just have to work out the best way of doing it. Different tags for areas seems to be the best course of action here (and then having certain NPCs be tagged with something else). So, for example:

  • Area A is tagged pathfindable_a or pathfindable[a] (not sure how I want to format it yet)
  • Area B is tagged pathfindable
  • NPC A is tagged pathfinding_a or pathfinding[a]
  • NPC B has no tags

NPC A can walk in Area A and Area B, but NPC B can only walk in Area B.

There seems to be an issue with build 5 (I haven’t tested the other builds yet) There are no errors in output but all the Npcs stand around and do nothing, I’m not a great scripter so I cant figure out what happened however i could just be missing something really dumb…


Images :

Standing around

issue

Output

noerrors

I also tagged the baseplate

Looks like this will be a useful resource for my zombie NPCs, bookmarking for future use.

How did you tag the baseplate? They should be able to pathfind on it.

I used the tag editior (same one you had linked) and tagged it with pathfindable.

Is there a way for NPC’s to hold gear?
Not sure this is something possible.

I can’t seem to replicate your issue. Can you send me a place file?

With modification, yes, though they can’t do anything with it.

WOW, i fell in love with this already :smiley: ! btw do the npcs respawn when they die?

Tested it a bit, but this doesn’t work. Also, is there any way to have multiple spawn points for NPCs?

Ah, that’s out of date. I need to update that bit in the post at some point. The spawnpoint is set in the configuration as origin, just pass it a CFrame.

I’m going to do a rebuild of this at some point that changes a lot of things around and possibly get R15/Rthro working (woo!) so I’ll be sure to add your multiple spawnpoints idea to that list.

1 Like

Wow, this is pretty old here…
Anyways, I’ve been trying to use this system for my new game and for some reason the NPCs dont move around. It reaches the max dawdling time (when i debugged it) but yet never does anything.

Heres a screenshot of all the NPCs just standing. (I made it print “max dawdling” when the time is reached)


Other than that, this system seems pretty stable but then again it doesn’t seem that I know how this works for R15 npcs. (if that is the issue im so so sorry)

1 Like