The Taunt MOD Tutorial    by Lt Grant

________________________________________

 

This tutorial will explain how to edit the taunt MOD for your own purposes or MODs.  It is fairly simple and won’t take long to figure out.   First, there are a few basic files that you will need.  They are included in the zip file:

 

 

Once you have these basic files, you’re ready to go. 


Step 1:  Getting your sounds ready

 

The first step is to get your sounds ready and formatted.  You can only use up to 12 sounds in the taunt MOD.  JK requires that your sounds must be wav’s and also must be specially formatted.  First select several sounds that you want to use.  If you want to use one’s other than what JK has, here are a few good sites:

 

 

Once you have your sounds together, you will need to format them for JK.  JK cannot play sounds that have been edited and saved with a Windows tool; ie: Sound Recorder.   So, in order to use those sounds, you must use another sound tool.  I suggest  shareware.com.  They  have several free and good sound tools.  I use Awave Audio and Awave Studio.  Next, all you have to do is open your sounds with the program and save them.  Once you have formatted them (what you just did), you’re ready to go.

 

 

Step 2:  Setting up the items.dat

 

Go ahead and open the included items.dat.  Scroll to the bottom and you should see this:

 

goal15                  115             0       1000    0x040

 

taunt                   116             1       1       0x122

         cog=item_taunt.cog

 

hotkeyOffset            150             0       99999   0x000

 

 

# =============== #

# MAX Bins =  199 #

# =============== #

 

The line at the top is not needed for this MOD, I just included it to show you where the taunt goes.  Directly below it is the Taunt item.  The number after the taunt is the bin number.  It tells what the COG what item number to activate.  If your MOD has other items after the taunt, you will have to give them a different number.  The two 1’s after the 116 stand for the min and max.  The first one tells the minimum number of taunts you will always have.  The second tells the maximum taunt you can have.  Don’t change either, unless you intend on making a powerup.  In that case, change the first one to a 0.  But I’m not covering that…  The 0x122 is the flags of the taunt.  0x100 means it is hotkey-able, the 0x20 means its an item in your list, and the 0x2 means you always have it, like a fieldlight.  Change whatever is necessary for your MOD, then close items.dat.

 

Step 3:  Editing your Taunt.cog

\

In this step, we’ll be creating and editing the actual taunt.  First open up the taunt.cog.  It will look like this at the top:

 

# Jedi Knight Cog Script

#

# ITEM_TAUNT.COG

#

# Version 3.0

#

# This cog allows the player to "taunt" another by playing a random sound

# and/or a key (up to 12).  My comments are with the #.  I have

# demonstrated

# in the code a variety of uses.  Some will play just sounds, others .keys

# and others will print a jkstrings.ui line.

#

# Created by [GAD]. 

#

# Remeber to make sure that your .key's and .wav's all match up and are in

# the right place.  Also be sure that you edit the items.dat and the

# jkstrings.ui to make a hotkey.  Also very important: your sounds must be

# formated for Jedi Knight.  If you used Windows' Sound Recorder, they                  # won't

# in Jedi Knight.  You must download or buy an alternate sound program.

#

# Note on the Activated message: Open up your sounds and find the length

# of the each one.  Edit the "Send Pulse" command for each Rval by 

# replacing

# the existing number w/ the length of each sound.

#

# Happy Taunting :)   

# Feel free to use; but include my name: Lt Grant

#

# This Cog is Not supported by LucasArts Entertainment Co

 

This is simply a description of the MOD and some very brief directions.  Scroll down and you will see the symbols section:

 

symbols

 

thing       player

 

vector      randVec                       local

 

# Here are the taunt sounds; replace the names with yours.

sound       taunt1=taunt01.wav                  local

sound       taunt2=taunt02.wav                  local

sound       taunt3=taunt03.wav                  local

sound       taunt4=taunt04.wav                  local

sound       taunt5=taunt05.wav                  local

sound       taunt6=taunt06.wav                  local

sound       taunt7=taunt01.wav                  local

sound       taunt8=taunt02.wav                  local

sound       taunt9=taunt03.wav                  local

sound       taunt10=taunt04.wav                 local

sound       taunt11=taunt05.wav                 local

sound       taunt12=taunt06.wav                 local

 

# Here are the .key's; repalce the names with yours.

keyframe    key1=kyrepel.key                    local

keyframe    key2=kyfpull0.key                   local

keyframe    key3=kygrip0.key                    local

 

message     activated

message     pulse

message     selected

 

The first section is the ‘sounds’ section.  Here is where you will identify your own sounds.  Replace the name of each taunt with the name of your own sounds (see Step 1).  Note: you can only have 12 sounds or less.  If you have less than 12 sounds, repeat some.  Next is the ‘key’s’ section.  I have 3 keys in mine, but you can add more.  I would suggest using quick keys that don’t last very long (see Tips Section for why).  Once you have all your keys and sounds ready, move on.  The next section you will see is the code:

 

code

 

activated:

   player = GetSourceRef();

{

rval = Rand();

 

      if(rval < 0.08)

      {

        PlayKey(GetLocalPlayerThing(), key1, 2, 32);

        sound = PlaySoundThing(taunt1, player, 1, -1, -1, 0x10080);

        SetInvActivated(player, 116, 1);

        SetPulse(1.63);

      }

else

      if(rval < 0.16)

      {

        PlayKey(GetLocalPlayerThing(), key2, 2, 32);

        sound = PlaySoundThing(taunt2, player, 1, -1, -1, 0x10080);

        SetInvActivated(player, 116, 1);

        SetPulse(1.17);

      }

    

The activated message tells the taunt to play a random sound (rval = Rand ( )) and then identifies random numbers ( if(rval < 0.16).  DO NOT edit the numbers, it will only mess up your taunt.  Inside each number is a series of commands.  The first command tells that taunt to play a key.  If you don’t want a key played with that sound, then cut out that line.  The next line tells it to play a sound.  After that is the line that activates the taunt and displays the BM ( the taunt icon) in your upper right-hand corner.  And finally, the last line sets a pulse, telling it how long to last.  First, if necessary, change the key name (key1, key2, etc) and/or the sound name (taunt1, taunt2, etc) to whatever is needed.  Don’t change the name to what the sound or key actually is, but to what it is identified as in the symbols section.  Then, if you changed the ll6 to a different number in the items.dat, change the 116 in the next line to whatever.  Finally, is the SetPulse message.  This is important.  First, open up your sound that corresponds to ‘Taunt1’.  Find out how long the sound is and replace whatever number is in the SetPulse message to the length of the sound.  Do this for all sounds, making sure that they correspond to the right name.  Once you have edited all of the command lines, close the COG.

 

Step 4:Adding a HotKey

 

Once you are done with the cog, open up jkstrings.ui.  Scroll down until you see a list of items and keys like this:

 

   "ACTIVATE6"       0 "Force Blinding"

   "ACTIVATE7"       0 "Force Absorb"

   "ACTIVATE8"       0 "Force Protection"

   "ACTIVATE9"       0 "Force Throw"

   "ACTIVATE10"      0 "Force Grip"

   "ACTIVATE11"      0 "Force Lightning"

   "ACTIVATE12"      0 "Force Destruction"

   "ACTIVATE13"      0 "Force Deadlysight"

   "ACTIVATE14"      0 "Bacta Tank"

   "ACTIVATE15"      0 "IR Goggles"

   "ACTIVATE16"      0 "Field Light"

   "ACTIVATE17"      0 "Taunt Item"

 

 

   ### ACTIVATExx bins up to ACTIVATE31 are available for user defined Hotkeys.

   ### In items.dat, the script for the 'xx'th item with the hotkey flag 0x100 will be bound.

   

This section defines hotkeys.  The very last one should be the taunt item.  Rename taunt item to whatever you want.  That’s all!!

 

 

Section 5:  Tips

 

When editing your taunt mod, there are several things to keep in mind:

 

·        Keep your sounds short.  In multiplayer, long sounds can slowdown gameplay.

·        Keep your keys short also.  If you choose to use keys, playing a long one can lower your saber and keep you defensless.

·        YOU AND YOUR FELLOW PLAYER MUST ALL HAVE THE SAME SOUND IN MULTIPLAYER.  If you don’t all have them, you won’t hear your opponents’ sounds during game play.

·         YOUR SOUNDS MUST BE JK FORMATTED.  If they aren’t, you will hear a clikcking sound instead.

 

 

That’s all!  If you are really stuck, you can e-mail me at mailto:ltgrant5@juno.com.  If you would like to use my Taunt in your own MOD, e-mail me.  I’ll always let you, but just ask first.  THANKS.

 

Copyrights
 Jedi Knight, Copyright, LucasArts Entertainment Company LLC. All rights reserved.