Adding new emotes to Jedi Outcast
Tools Needed:
ModView (
http://www.massassi.net )
JK2 Editing Tools Update (
http://www.massassi.net )
Modified Batch Files (
http://ugg.codealliance.ca/modbat/ )
Pakscape
Visual C++ (Optional)
This tutorial is a little longer because I have to explain the process of compiling. So just hold in there.
When you download the modified .bat files the website will say they are only for Windows 98 but they work with XP, 2000, ME, NT... as well. And sometimes the Raven ones give you problems.
The first thing you need to do is to install the JK2 Editing Tools. This will install the Multiplayer source needed to create a MP mod.
When installed it should create C:\Program Files\LucasArts\Star Wars JK II Jedi Outcast\GameData\code. Go into the code directory and open the folder called game. In that folder there should be a file called g_cmds.c open this file in Notepad or Visual C++.
When it is opened in Notepad do a search (CTRL-F) using "give" with the "" as the search.
Near the end you should find a line that says:
if (!Q_stricmp(cmd, "give"))
{
giveError = qtrue;
}
Under this line add this code:
else if (Q_stricmp(cmd, "hero)
{
giveError = qture;
StandardSetBodyAnim(ent, BOTH_STAND7, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD|SETANIM_FLAG_HOLDLESS);
}
Basically what this does is
if you type
hero into the console. Run the animation code for the curent player.
So the whole thing should look like.
if (!Q_stricmp(cmd, "give"))
{
giveError = qtrue;
}
else if (Q_stricmp(cmd, "hero)
{
giveError = qture;
StandardSetBodyAnim(ent, BOTH_STAND7, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD|SETANIM_FLAG_HOLDLESS);
}
Save the file.
In the Modified Batch .zip file there should be a file called game.bat copy this file into you C:\Program Files\LucasArts\Star Wars JK II Jedi Outcast\GameData\code\game folder. This .bat file should replace the old one. Run the .bat file by clicking on it.
This should pop up a dos prompt and scroll some text for a while.
When the window disappears. There should be a new folder in your code directory called base.
Inside this folder there is another folder called vm. And inside that folder there is a file called Jk2mpgame.qvm.
Create a new folder inside your game directory (C:\Program Files\LucasArts\Star Wars JK II Jedi Outcast\GameData\HeroMod) called HeroMod.
Now open Pakscape. Create a new file. Inside that file, create a new folder called vm. Inside that folder put the jk2mpgame.qvm file. Save the whole file as HeroMod.pk3 and place it into your HeroMod directory.
You’re done the hard stuff.
Run Jedi Outcast. Go to the Mods Setup Menu. Select HeroMod. The game should load again. Create a new game. Once it loads press SHIFT- ~ to bring up the console.
Then type in
bind h hero
press enter.
Now press H and your character should do the hero animation.
Extra Credit:
If you want to add different emotes then you need to get the animation code for the specific animation. And change this line
StandardSetBodyAnim(ent, (
YOURANIMCODE HERE), SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD|SETANIM_FLAG_HOLDLESS);
Some sample animations codes:
BOTH_DODGE_BL (Does a Matrix Style Dodge)
BOTH_ENGAGETAUNT (Does the challange taunt)
BOTH_EXAMINE1 (Makes you fiddle with your weapon)
BOTH_MELEE1 (Does a punch)
------------------
I munch C code for breakfast and have enough room left over for a kernel debugging.
[This message has been edited by Freyr (edited December 14, 2003).]
[This message has been edited by Freyr (edited December 15, 2003).]
Free your mind, use Open Source.