OBJECTIVES TUTORIAL
AUTHOR: KENGO
DATE: 07/02/02
A lot of credit for this tutorial goes to Emon, whose tutorials on creating new NPCs by altering the npcs.cfg file was what started me up experimenting with it myself, and gave a lot of info on what you could do.
Also a lot of credit to
Darth Arth, whose use of the npcs.cfg file in Challenge in Jedi Valley was very useful reference material.
First of all, open up the assets0 pk3 file in the base folder of Jedi Knight 2. Set path in alphabetical order, then look for the extension 'ext_data'' in the path section. Then look for the npcs.cfg file. Extract it to the desktop, a folder called 'ext_data' will appear on the desktop, and the file npcs.cfg will be in the folder. You can open the folder using notepad. Below is a screenshot of what you should see. Click the screenshot for a larger image, it shows the part of the cfg file which explains what many of the attributes do.
The explanation in the file provides much of the info you'll need. Lets go to Stormtrooper and Stormtrooper2. Apply the same changes to both. Increase their health from 30 to say 200. Increase their aim, aggression and intelligence to 5 (the highest level for these attributes).  Also, add in the line:

customSkin       red

For both of them, just below the
playermodel line. The easiest way to do this is to copy and paste the customskin line from one of the reborn, then change 'boss' or whatever the second part is to 'red'. You can use both red or blue custom skins for NPCs.

Now go to
save as in notepad, and type npcs.cfg and change file type from txt to All files. Go to save and you should be asked if you want to overwrite. Click yes. You've now succesfully altered the npcs.cfg file.

Now copy the
ext_data folder, with the npcs.cfg inside, to the SPMod folder.

Now create a test map with some basic blaster wielding stormtroopers in. Save the map, compile it then copy the BSP of it from
base/maps to maps in the SPMod folder.

Now copy all the folders from the
SPMod folder, including of course the ext_data folder, across to the SPMod pk3, and save it.

Now load JK2, load
SPMod from the mod menu, then load the map. The stromtroopers should be red, much better shots, more aggressive and intelligent, and much harder to kill.
You can now experiement with altering other NPC characteristics. One important possibility is creating new NPC types. This isn't fully fledged making a new NPC, but it is a good intermediary step that is easier to get working.
Open up the npc.cfg file in the SPMod folder. Copy and paste the attribues of
Lando onto the npc.cfg file, just below the original Lando. Change the name at the top from Lando to Lando2. Now give Lando2 the extra line

Customskin      blue

You can also alter his attributes a little if you want.

Also, change the entries for
snd, sndcombat, sndextra and sndjedi from lando to luke.

Copy the

Now create another test map in Radiant. Put in two
Lando NPCs. Now for one, go to the entity screen (press n) and enter:
Key:
NPC_Type
Value:
Lando2

Include a few stormtroopers as well. Save and compile the map, then copy the BSP of the map from base/maps to the maps folder in the SPMod folder.

Now copy all the folders from the
SPMod folder, including of course the ext_data folder, across to the SPMod pk3, and save it.

Now load JK2, load SPMod from the mod menu, then load the map.

There should be a normal
Lando, and also a Lando in blue team colours. Also, the blue Lando should sound like Luke. The stormtroopers should still be red, as you used the  npcs.cfg file from before and then added Lando2.

Using
NPC Types gives you a lot of creative options, you can have red or blue skins, which effectively trbels the number of skins you can use. You can also have NPCs with the same models and skins, but differing attributes. Try experimenting and see what you can do by altering the npcs.cfg and creating new NPC_Types.
1