# of NPCS jk3 can handle -1 reply

Please wait...

Authuran

Queef Richards

50 XP

2nd October 2005

0 Uploads

4,671 Posts

0 Threads

#1 10 years ago

Hey watzup,

I am currently in construction of making a tatooine themed RPG map, which I plan to use NPCs as a major part. What's the max limit of NPCs the engine can hold in a map?




Guest

I didn't make it!

0 XP

 
#2 10 years ago

I don't know but my estimation is about 50.




NAB622

EAT ME!

50 XP

8th October 2005

0 Uploads

6,921 Posts

0 Threads

#3 10 years ago

Mkay, get ready for a lot of informations...

Spoiler: Show

NPCs are counted as entities. The maximum number of entities is 1024. When you go above this number, the game will crash.

However, you need to leave at least 32 entities free for all 32 players to spawn. You also need to leave room for each spawn point, saber clash effects, weapon spawns, item spawns, ammo, func_ entities, target_ entities, and more. (Func_group and Light entities do not count, though. They are compiler-only.)

So the real question should be how many entities to leave free in your map. I would say to leave at least 80, but preferably you should have over 130 free entities if you plan on doing some spawning.

If you want to know how many free ents you have, here's how I do it (I'm sure there's a better way, though)...devmap your map, turn on noclip, bind a key to "npc spawn mutant_rancor" and start spawning. Count how many you can spawn until the game crashes. When it does, that's your number of free entities.

Keep in mind, though...the more entities you add in your map, the harder it will be for lugormodders and makermodders to modify it.

For those of you who love NPC spawning, yes, this DOES mean you can spawn 900+ npcs without crashing the game. Good luck finding a map with few enough entities to do that on, though. There are some, but they are rare and typically not very good.

EDIT: Little tip for ya: if you want to save on target_scriptrunners, you can put a "usescript" key on a trigger instead. It works almost the same, and can save a ton of entities when coupled with some creative scripting.




Tx606

I post to get attention

50 XP

8th May 2007

0 Uploads

76 Posts

0 Threads

#4 10 years ago

NAB, you can also just run a local server on lugormod and do /mapents count o_o.




NAB622

EAT ME!

50 XP

8th October 2005

0 Uploads

6,921 Posts

0 Threads

#5 10 years ago

Thank you, I always wanted to know a better way to do that. XD I imagine there is no universal method aside from rancor spawning, though. :(




UU_BobaFett

JKG Lead coder

50 XP

18th July 2006

0 Uploads

202 Posts

0 Threads

#6 10 years ago

There is one extra complication however, the game can only handle up to 16 UNIQUE npc's at any time, after which the game will crash. (Unique being different kinds of npcs, not multiple of the same)

This limit can be raised by mods, easilly, but be aware of that limit in case the mod you're running did not raise it.




KhyronJinn

Slightly cooler than a n00b

50 XP

26th December 2005

0 Uploads

32 Posts

0 Threads

#7 10 years ago

1. Func_ entities absolutely DO count in the total entity count in the game (and func_doors without targetnames each spawn an additional entity, trigger_door, that also counts in the entity count). 2. I'm not sure there is a limit to how many NPCs total there can be in a map, but I have noticed that after around 14 different types of NPCs lower-end clients start crashing, so I would try to keep to that limit (vehicles included).

Oh, and I don't think /mapents is a command on the lugormod available from JK3files. The latest version can be found at... idk if I'll get in trouble for advertising. E-mail me if I'm right about mapents. [EMAIL="catronix@gmail.com"]catronix@gmail.com[/EMAIL].




Erstok

Anonymous

50 XP

18th September 2008

0 Uploads

255 Posts

0 Threads

#8 10 years ago

NPC spawning like some other features ingame will never work as people always predict. Seen servers crash simply by changing to another base map.

Maybe if your making say an SP map or something sure bots can be a major part but a massive RP themed map needing npcs? Wouldn't players do better. :lookaround:




NAB622

EAT ME!

50 XP

8th October 2005

0 Uploads

6,921 Posts

0 Threads

#9 10 years ago
KhyronJinn;48020251. Func_ entities absolutely DO count in the total entity count in the game

Ya, that's what I said...func_group is the only exception, it gets treated as a mini-worldspawn. I did forget about func_doors without targetnames creating the trigger_door, though.

Lots of fine details, there are...




~*Seto*~

Trapped in the interchet

50 XP

19th October 2007

0 Uploads

334 Posts

0 Threads

#10 10 years ago
NAB622;4802175Lots of fine details, there are...

Yeah, don't even get started with trigger_asteroid_field... lulz.