Replacing Jaden Korr in Jedi Academy

Introduction

Models and skins. There are so many out there in cyberspace that any player of Jedi Academy (JA) is bound to find something that they want to use with their game. The sea of options is made even bigger by the fact that Jedi Outcast (JO) models can be loaded automatically into JA. This opens a vertiable galaxy of possible characters to choose from. So understandably players may want to be able to run around slicing stormtroopers with characters other than the default Jadens provided by the game. Fortunately, this can be achieved. In this tutorial, we will learn how to take a Jedi Outcast or Academy model/skin and use it to replace Jaden Korr. There are actually a few ways to do this, some more useful than others. But before we get started, you will need the following software:

WinZip: This will enable us to open, alter, and create .pk3 files (same as a .zip file).
Notepad: This is used to alter the various model information files. Any text editor will do.

In this example I will be using a Mace Windu model. Are you all set? Let’s get to it…

Part 1: Extracting the Model

JO and JA models are stored in PK3 file format, which is the same as ZIP, which I am sure you are accustomed to. Because of this, we can use WinZip or any other program that opens .zip files to play around with the .pk3 files. If you want to use a JA model that is used in the game, you can skip this step and go onto Part 5. To extract the model we want to use, we perform the following steps:

Step 1:
Create a directory in your GameData/base folder. You can call it whatever you want. In this example, I call mine mod.

Step 2:
Now open up the model’s .pk3 file in WinZip. You will see a bunch of different files in there. Click Extract.

Step 3:
In the dialog box, set the directory to our newly created mod directory. Make sure “Use folder names” is checked. Click Extract.

This should extract all the files in the .pk3 into the mod directory, along with the proper directory structure. The most important one is the models/players/ directory, because this is the one with the model and textures. So make sure everything extracted properly.

Part 2: Converting JO models for use in JA (JO models only)

Models in JO use a different method than JA for turning on and off parts of the model, or “surfaces”. If the model you are using has surfaces turned off, you will have to make some changes. Otherwise, you can move onto Part 3. In JO, .skin files are used to tell the game where all the textures for the model are located, and .surf files are used to tell the game what parts of the model are to be turned on and off. In JA, all this information is stored in the .skin file.

Step 1:
Look in the models/players/ (e.g. models/player/samuel_l for Mace) directory to see if there is a .surf file for the skin you want to use. For example, if you are using the model_default.skin, check if there is a model_default.surf. If not, go to Part 3.

Step 2:
If you see a .surf file, open it up in Notepad. You will see either lines starting with “surfOn” or “surfOff”, or both. Obviously, surfOff turns parts off, and surfOn turns parts on. In the case of the Mace Wundu model, it has: surfOff "robe torso_robe" This means that the surfaces “robe” and “torso_robe” are to be turned off.

Step 3:
Now we need to put the information from the .surf file into the the .skin file. Open up the .skin file in Notepad. You will see a bunch of lines in the form “entry,path”. For Mace, we have:

head,models/players/samuel_l/head.tga
head_ears,models/players/samuel_l/head.tga
torso,models/players/samuel_l/torso.jpg
r_arm,models/players/samuel_l/torso.jpg
l_arm,models/players/samuel_l/torso.jpg
r_hand,models/players/samuel_l/hands.jpg
l_hand,models/players/samuel_l/hands.jpg
l_leg,models/players/samuel_l/legs.jpg
r_leg,models/players/samuel_l/legs.jpg
hips,models/players/samuel_l/hips.jpg
hips_belt,models/players/samuel_l/hips_belt.jpg
head_eyes_mouth,models/players/samuel_l/mouth.tga
torso_cap_head_off,models/players/stormtrooper/caps.jpg
head_cap_torso_off,models/players/stormtrooper/caps.jpg
torso_cap_hips_off,models/players/stormtrooper/caps.jpg
hips_cap_torso_off,models/players/stormtrooper/caps.jpg
r_leg_cap_hips_off,models/players/stormtrooper/caps.jpg
l_leg_cap_hips_off,models/players/stormtrooper/caps.jpg
r_hand_cap_r_arm_off,models/players/stormtrooper/caps.jpg
l_hand_cap_l_arm_off,models/players/stormtrooper/caps.jpg
r_arm_cap_torso_off,models/players/stormtrooper/caps.jpg
torso_cap_r_arm_off,models/players/stormtrooper/caps.jpg
l_arm_cap_torso_off,models/players/stormtrooper/caps.jpg
torso_cap_l_arm_off,models/players/stormtrooper/caps.jpg
hips_cap_l_leg_off,models/players/stormtrooper/caps.jpg
hips_cap_r_leg_off,models/players/stormtrooper/caps.jpg

As you can see, there are no entries for the robe and torso_robe mentioned in the .surf file, so we have to add them, and indicate that we want these surfaces off. To do this, we add the following lines to the .skin file:

robe,*off
torso_robe,*off

Save the file. Now everything that JA needs to know about the model is the in the .skin file.

Part 4: Creating an NPC file to tell the game about the character

For every character in JA, there is an associated .npc file in assets1.pk3 that gives information about the character. Things such as weapons, saber hilt, force powers, and so on are specified in the entry for the NPC. These entries are in the form

[character name]
{
[parameters value]
}

You can look at some of the .npc files in assets1.pk3 and see what some of them look like. There are many parameters and setting, but the most useful ones are:

playerModel directory in models/players/where the model is (e.g. mace).
saber the saber hilt the character should use (kyle, reborn, reborn_new, desann, jedi, luke, single_1-9, dual_1-?, saberstar2, sabertrident, saberbroad, shadowtrooper, tavion)
saber2 same as above, presumably for those who use two sabers.
sabercolor saber blade colour (red, blue, green, purple, yellow)
rank not sure what this really does. Something to do with followers? (lt, commander, captain, ?)
health character's health points (1-?)
weapon the character's weapon. This can be set multiple times (WP_NONE, WP_SABER, WP_BRYAR_PISTOL, WP_BLASTER, WP_BLASTER_PISTOL, WP_BLASTER_RIFLE, WP_MELEE, WP_DISRUPTOR, WP_ROCKET_LAUNCHER, WP_BOWCASTER, WP_REPEATER, WP_THERMAL, WP_BOT_LASER, WP_NOGHRI_STICK, WP_CONCUSSION, WP_FLECHETTE, WP_TUSKEN_STAFF, WP_TUSKEN_RIFLE)
saberStyle The available saber style for the character. This can be set more than once to give multiple styles (1=blue, 2=yellow, 3=red, 5=Tavion, 4=Desann, 6=dual, 7=staff)
surfOn list of model surfaces to turn on in "" format
surfOff list of model surfaces to turn on in "" format
scale percentage scale of the character (e.g. 75=75% the size of Jaden, 110=10% bigger than Jaden)
yawSpeed How quickly they can turn
walkSpeed How fast they walk
runSpeed How fast they run
FP_HEAL Force Heal level (0-3)
FP_LEVITATION ? (0-3)
FP_SPEED Force Speed level (0-3)
FP_PUSH Force Push level (0-3)
FP_PULL Force Pull level
FP_TELEPATHY Force ? level(0-3)
FP_GRIP Force Grip level 0-3)
FP_LIGHTNING Force Lightning level 0-3)
FP_SABERTHROW Force Saberthrow level (0-3)
FP_RAGE Force Rage level (0-3)
FP_PROTECT Force Protect level (0-3)
FP_ABSORB Force Absorb level (0-3)
FP_DRAIN Force Drain level (0-3)
FP_SEE Force See level (0-3)
FP_SABER_DEFENSE Force Saber Offense level (0-3)
FP_SABER_OFFENSE Force Saber Defense level (0-3)
forcePowerMax maximum Force power (default = 100)
playerTeam whose team the character is on (TEAM_PLAYER, TEAM_ENEMY, TEAM_NEUTRAL, TEAM_FREE)
enemyTeam who the character's enemies are (TEAM_PLAYER, TEAM_ENEMY, TEAM_NEUTRAL, TEAM_FREE))
class default behavior? (CLASS_JAWA, CLASS_KYLE, etc.)
snd character's dialog sounds directory
sndcombat character's combat sounds directory
sndjedi character's jedi sounds directory

Okay, thats most of them. The parameters that you don't set will be left at whatever the values where before switching models. So if we just want the model but everything else left the same, we might have a .npc file that looks like:

MaceWindu
{
playermodel samuel_l
class CLASS_PLAYER
}

We can set as little or as much as we want for the character. Now that we have an idea what to put in the file, let’s set one up:

Step 1:
create a ext_data/npcs/ directory in mods. In that directory, create an normal text file (name it what you want).

Step 2:
Set certain parameters, depending on what you want. For example:

MaceWindu
{
playerModel samuel_l
saber kyle
weapon WP_SABER
saberStyle 1
saberStyle 3
saberStyle 2
FP_HEAL 3
FP_LEVITATION 3
FP_SPEED 3
FP_PUSH 3
FP_PULL 3
FP_TELEPATHY 3
FP_GRIP 0
FP_LIGHTNING 0
FP_SABERTHROW 3
FP_RAGE 0
FP_PROTECT 3
FP_ABSORB 3
FP_DRAIN 0
FP_SEE 3
FP_SABER_DEFENSE 3
FP_SABER_OFFENSE 3
forcePowerMax 200
rank captain
reactions 3
aim 3
move 3
aggression 3
evasion 5
intelligence 3
playerTeam TEAM_PLAYER
enemyTeam TEAM_ENEMY
class CLASS_LUKE
yawSpeed 140
walkSpeed 55
runSpeed 200
// race human
snd kyle
sndcombat kyle
sndjedi kyle
health 200
dismemberProbHead 0
dismemberProbArms 0
dismemberProbLegs 0
dismemberProbHands 0
dismemberProbWaist 0
}

The game uses all the settings we provide, and for whatever we don’t it uses whatever the game setting was at the time. If you want to go through the game as intended with just a different model, I recommend just doing the basic version. If you want to go through with different force setting and so on, this is where you can set what you want.

Step 3:
Save the file, and manually change the file extention to .npc. Now the game will know all about the character.

Step 4 (optional):
If you want the model to show up in cutscenes, we need to tell the game to do that. We do this by replacing the Player NPC entry to point to our new model. The easiest way to do this is to add the following to the end of your above .npc file:

Player
{
playermodel
class CLASS_PLAYER
}

So for Mace, the whole .npc file might look like:

MaceWindu
{
playermodel samuel_l
class CLASS_PLAYER
}

Player
{
playermodel
class CLASS_PLAYER
}

Save the file again. Everything is ready to be used, but we still have to put it all in a neat little package.

Part 5: Creating a new .pk3

Now that we have edited what we want, we need to gather everything together. The easiest way is to create a zip file and then just change the extention to .pk3. So to do that:

Step 1:
Start up WinZip and go to our mod directory. Under "Folders" click Recursive Folders. This includes the directory information the game will need.

Step 2:
Then select "models" (without going into that directory), and click Add with Wildcards. This will put all the necessary files into the .zip file. To confirm, make sure the model and texture files are there, with models/players/ / listed under “path”. Also make sure that the .npc file is there with ext_data/npcs/ as the path.

Step 3:
Finally, change the extention of our .zip file to .pk3. This can be done by manually renaming the file.

Step 4:
Move this .pk3 file into the GameData/base directory. The game loads every file with a .pk3 extention in alphabetical order. So make sure the name of your .pk3 comes after assets3.pk3. For example, mace.pk3.

Everything is now set where it should be. Now to load it in the game…

Part 5: Loading the model into Jedi Academy

There are several ways to tell the game to load our model and replace Jaden. I will cover two of them here, and you can decide what you want to use. But they are all pretty straight forward. So start up the game…

Option 1:
This is the way I do it, because I think it is the cleanest. Start a new game. Don’t worry about creating a character. You can select a hilt though (but this will be replaced if you specified a hilt in the NPC entry for your model). The first cutscene you should see your lovely model, because the game got it from the Player NPC entry. When the cutscene finishes and the game starts, you will see whatever Jaden was specified with the customization screen. That’s okay. Bring down the console (SHIFT ~) to get the command prompt. At the prompt enter the following command:

playermodel
e.g. playermodel macewindu

This will replace Jaden with our new model, and update any settings we have specified in our NPC entry. Save the game and off you go playing as the new model. Another cool thing is that you can also use this command to spawn an NPC version of the character. This can be done with the command:

npc spawn

I’ll leave you to play around with this. But if you want to create new NPC that you can spawn, either to fight or have as allies, you can use the steps of this tutorial to do it. Once you’ve done that, you can just use the above command to spawn them.

Option 2:
Another way to do it is to use the playermodel command to specify the actual model to use instead of the NPC. The model name is what directory the model is in (models/players/). You can do this in the console as follows:

playermodel [model name] model_default model_default model_default

e.g playermodel samuel_l model_default model_default model_default

The extra model_default I will be talking about in the next tutorial about how to add models to the character custimization menu. But for now, don’t worry about it. This should load the model up fine as well. The reason why I don’t like this option as much is two fold. First, it ignores the NPC entry, so if you had settings specified in there, they will be ignored, and you will have to set them another way (but there are ways). Second, if you go back to the character custimization screen when you start a new game, you will see another species option which has an unnamed, untextured model there. This really bugs me, but it may not bug you. There is one big advantage for all you people who don’t like all this editing. To use the second option you don’t need to do create an .npc file, and if you didn’t edit the model, you don’t even need to extract the original .pk3. Just put the original .pk3 into the GameData/base directory, go into the game, and use the above command.

Closing

Well I hope this tutorial has helped you replace Jaden with a model you like. It takes a little effort, but it is a lot of fun when you are done. I plan on doing two more tutorials, the next being How to Add Character Classes, which will explain how to add more options in the character custimization screen. Following that I will talk about How to Add Lightsaber Hilts to Singleplayer. So stay tuned.

If you have any questions or comments, feel free to send me an email at maroger@sympatico.ca.

Thanks for reading,
Prime

Acknowledgements

A big shout out to everyone who has helped me learn how to edit Jedi Outcast and Jedi Academy over at Lucasforums. You guys have helped me solve many annoying problems, and I really appreciate all your hard work.