Jump to content

Jedi Academy turned 20 this year! We celebrated in a ton of different ways: mod contest, server event, podcast, etc. Thank you to all who have been a part of this game for the last two decades. Check out the anniversary content!

Read more

Welcome to JKHub

This community is dedicated to the games Star Wars: Jedi Outcast (2002) and Jedi Academy (2003). We host over 3,000 mods created by passionate fans around the world, and thousands of threads of people showcasing their works in progress and asking for assistance. From mods to art to troubleshooting help, we probably have it. If we don't, request or contribute!

Get started

This game turned 20 years old this year, and it is still one of the greatest Star Wars games of all time. If you're new or returning from a long hiatus, here are the basics of getting started with Star Wars Jedi Knight Jedi Academy in 2023.

Read more

NPC and Vehicle Spawn Guide


Note: this is multiplayer-only tutorial!

 

I have heard a lot about people saying that NPCs and Vehicles crash servers.

Let me enlighten you on the art of NPC and Vehicle use in Jedi Academy's multiplayer.

When done correctly nothing bad will happen at all. Professional admins should be able to do this properly.

Vehicles are treated as ridable NPCs by Jedi Academy, so from now I will refer to both of these groups as just NPCs.

 

PART I. OVERCOMING NPC SPAWN LIMITATIONS

Every BSP map has Entities – they are objects such as weapons, items etc.

NPCs are one type of these entities. ALL Entities are:

1. Stored inside a BSP map file and spawned when the map loads on the server.

2. Manually spawned using admin commands.

The server can only handle 1022 entities at any time! Any more entities will cause the server to get a fatal error. Entities from BSP map file that are not spawned on the server (info_null's, misc_model(_static)s, pickups that aren't spawned due to settings… etc) do not count towards this limit as they're not spawned and therefore don't take up slots.

Now how many NPCs can you spawn on a map? It depends how many entities a map already has inside it and how many NPCs someone already spawned before you.

EXAMPLE 1

Let’s say, a map called xnamex.bsp has 1000 entities in it.

What does that mean?

It means server can handle 22 entities more before it crashes.

Now, each UNIQUE NPC takes up one entity slot.

That means if you spawn 100 Jawas server will not crash (but it will lag as hell).

But you can only spawn 22 unique NPCs in our map xnamex.bsp, any more and server will crash.

 

Now some maps come with many entities, such as JediCouncilGCX, fsf (kotor flight school), tendron v2, asteroidH5. Party because they already have many NPCs preloaded with the map.

Spawning NPCs on such maps is not recommended, UNLESS you spawn the SAME NPCs the map already has, since the same NPCs will not take up new entity slot!

 

Here is some clear rules on NPC spawns per map:

JediCouncilGCX: 2-3 new NPCs

AsteroidH5: 1-2 new NPCS

FSF: NO SPAWN of new NPCs allowed

<list will be updated>

 

What to do if you already spawned some NPCs, and now you want to spawn others?

Restart the map!

By reloading the map, server will erase the entities of spawned NPCs, thus allowing you to spawn new NPCs in their place.

EXAMPLE 2

We had a cool RP mission on our map xnamex.bsp, spawned some vehicles and NPCs. Now it is over, and we want to spawn some other NPCs.

First admin does this:

/ammap 0 xnamex

Server reloads the map, erasing manually spawned NPC entities from the memory.

Now new ones can be spawned.

 

USEFUL TIP: If the server was empty and you came to it and want to spawn NPCs, restart the map before doing it, just to be sure. Who knows, maybe someone spawned some NPCs before you and left, and their entities still remain in server’s memory.

Also, if YOU spawned some NPCs, restart server after leaving, just to be sure to clean those entities.

 

PART II. NAMING NPCs

 

NPCs can be named. Each NPC you spawn can either have a unique name, or a group of NPCs can share the same name.

Examples:

/npc spawn bartender johny

/npc spawn stormtrooper squad1

/npc spawn swamptrooper squad2

/npc spawn vehicle atst_vehicle atst1

/npc spawn desann boss1

/npc spawn tavion boss2

 

Why do you need it?

Because you can selectively despawn those NPCs! (In single player you can also use additional commands, which are not available in MP)

Example:

/npc kill johny – kills that poor bartender from example above.

/npc kill squad1 – kills squad one stormtoopers in case we missed some on RP mission

/npc kill boss2 – kills Tavion, maybe we want to respawn her.

/npc kill atst1 – kills atst we spawned.

/npc kill all – kills all NPCs and vehicles on server, including prespawned ones.

 

Why is this useful? During missions too many NPCs can result in server lag. Selectively killing the NPCs you have no use anymore will solve this problem.

DarthValeria likes this

User Feedback

Recommended Comments

There are no comments to display.



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...