Within each NPC file is vital info that the game uses to give a spawned model it's attributes. Info such as the model, weapon, weapon model, force powers, sounds, and health.
The first thing you need to do is open up assets1.pk3 (it will be in your base folder) with PakScape, WinZip, or some other archiving software. Navigate to the ext_data folder, then open the npcs folder. You will see a lot of files here. We will use a very typical one - jedi.npc. Extract this file to your computer and open it with Notepad.
Inside you will see a bunch of columns of text.
Jedi { playerModel jedi saber single_2 saberColor yellow weapon WP_SABER saberStyle 1 saberStyle 3 saberStyle 2 FP_HEAL 1 FP_LEVITATION 2 FP_SPEED 2 FP_PUSH 2 FP_PULL 1 FP_TELEPATHY 1 FP_GRIP 0 FP_LIGHTNING 0 FP_RAGE 0 FP_PROTECT 1 FP_ABSORB 1 FP_DRAIN 0 FP_SEE 1 FP_SABERTHROW 2 FP_SABER_DEFENSE 3 FP_SABER_OFFENSE 3 forceRegenRate 150 forcePowerMax 90 rank lt reactions 3 aim 3 move 3 aggression 3 evasion 2 intelligence 3 playerTeam TEAM_PLAYER enemyTeam TEAM_ENEMY class CLASS_JEDI yawSpeed 140 walkSpeed 55 runSpeed 200 snd jedi1 sndcombat jedi1 sndjedi jedi1 health 200 dismemberProbHead 0 dismemberProbArms 5 dismemberProbLegs 0 dismemberProbHands 10 dismemberProbWaist 0 }
If you look at it and try to figure it out, it will make a lot of sense. The column on the left is the attribute and the right is the value. A lot of this you can leave out if you wish, and all lines which are not included will revert to default values. We will begin to construct a basic NPC file by using the information here and replacing what we want.
Let's say you want to make a new NPC that is a Dark Jedi that uses a blaster pistol instead of a lightsaber. We just need to edit the corresponding attributes to meet our needs. The first step is always to change the name of the NPC at the top. This is important or else your file will overwrite the default Jedi NPC. Let's name it DarkJedi. Now, since he won't have a lightsaber, you can delete the lines that pertain only to sabers. So highlight and delete the lines saber, sabercolor, and all 3 saberstyle lines.
Then we change his weapon to the blaster pistol. So go to the line weapon WP_SABER and make it weapon WP_BLASTER_PISTOL. So your NPC should look like this so far:
DarkJedi { playerModel jedi weapon WP_BLASTER_PISTOL FP_HEAL 1 FP_LEVITATION 2 FP_SPEED 2 FP_PUSH 2 FP_PULL 1 FP_TELEPATHY 1 FP_GRIP 0 FP_LIGHTNING 0 FP_RAGE 0 FP_PROTECT 1 FP_ABSORB 1 FP_DRAIN 0 FP_SEE 1 FP_SABERTHROW 2 FP_SABER_DEFENSE 3 FP_SABER_OFFENSE 3 forceRegenRate 150 forcePowerMax 90 rank lt reactions 3 aim 3 move 3 aggression 3 evasion 2 intelligence 3 playerTeam TEAM_PLAYER enemyTeam TEAM_ENEMY class CLASS_JEDI yawSpeed 140 walkSpeed 55 runSpeed 200 snd jedi1 sndcombat jedi1 sndjedi jedi1 health 200 dismemberProbHead 0 dismemberProbArms 5 dismemberProbLegs 0 dismemberProbHands 10 dismemberProbWaist 0 }
Great, so we gave him a pistol. Since he's a Dark Jedi, he should probably be an enemy. This is determined by the lines playerTeam and enemyTeam. To make the NPC friendly and follow you in-game, leave it how it is, with TEAM_PLAYER as the playerTeam and TEAM_ENEMY as the enemyTeam. To make the NPC an enemy that attacks you, flip those two. Other teams are FREE and NEUTRAL. The FREE team attacks anyone on sight, regardless of what team they are. An example of a TEAM_FREE NPC is the tusken raider. The NEUTRAL team doesn't attack anyone. Examples of this are Jawas or Ugnaughts.
Now, you can change the class if you'd like. Classes are hardcoded in the game with a bunch of special behaviors and attributes that can't be changed in an NPC file. You can read more about classes and what each of them do here. One thing they don't do, is determine the team, so if you keep this Dark Jedi's class set to CLASS_JEDI, he will still be an enemy.
Your NPC should now look like this:
DarkJedi { playerModel jedi weapon WP_BLASTER_PISTOL FP_HEAL 1 FP_LEVITATION 2 FP_SPEED 2 FP_PUSH 2 FP_PULL 1 FP_TELEPATHY 1 FP_GRIP 0 FP_LIGHTNING 0 FP_RAGE 0 FP_PROTECT 1 FP_ABSORB 1 FP_DRAIN 0 FP_SEE 1 FP_SABERTHROW 2 FP_SABER_DEFENSE 3 FP_SABER_OFFENSE 3 forceRegenRate 150 forcePowerMax 90 rank lt reactions 3 aim 3 move 3 aggression 3 evasion 2 intelligence 3 playerTeam TEAM_ENEMY enemyTeam TEAM_PLAYER class CLASS_JEDI yawSpeed 140 walkSpeed 55 runSpeed 200 snd jedi1 sndcombat jedi1 sndjedi jedi1 health 200 dismemberProbHead 0 dismemberProbArms 5 dismemberProbLegs 0 dismemberProbHands 10 dismemberProbWaist 0 }
There are many other attributes that you can change as well. Most are self explanatory. Changing the model involves using the name of the folder of the model you want. So if you wanted your Dark Jedi to be a Reborn model instead of a Jedi model, simply change jedi to reborn. If you want a certain skin of that model, use the line customSkin and then the name of the .skin file you want that is located in the model's folder. So if you wanted the blue reborn, it would look like this:
DarkJedi { playerModel reborn customSkin blue
Changing the sounds is similar. It must match the name of the folder in the sound folder in assets0.pk3.
The default value of the attributes such as reactions, aim, move, aggression, evasion, and intelligence is 3. So if you have it at 3, you can delete it. Maximum is 5. The dismember properties are out 10. Force and saber powers are out 3 (sometimes 4). Default value of those are 0.
Make sure to have the brackets before { and after } the NPC. Look at my examples and look at the default ones as reference. Especially for adding multiple NPC's to one file.
That's pretty much it!
Now we need to pack these text files up. To do this we need to add some new folders. Make a folder called ext_data, and in that folder make a folder called npcs. This is where we will put our .npc file. Make sure you save it as .npc! If you save it as anything else, like a .txt, it will not work. After that, either zip it up and change the extension or use PakSkape to make it a .pk3 and place it in your base folder.
Now go test it! Go into single player and turn cheats on with helpusobi 1, then type npc spawn darkjedi (or whatever you named it).
Tutorial based on the one on JK3Files.com.
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 accountSign in
Already have an account? Sign in here.
Sign In Now