----------------------------------------
STAR WARS JEDI KNIGHT II: JEDI OUTCAST
WRITING SCRIPTS
----------------------------------------
Writen by Daniel Leet
email:
[email protected]
May 17, 2002
I. Explanation
II. Making A Script
III. Advanced Scripts
IV. Other Commands That Can Be Used In Scripts
V. Other Stuff (version, copyright)
More to come -- a lot more....
I.EXPLANATION
-------------
First of all, your probably wondering what a script is,
or does. A script is a .cfg file that you can execute
from within the game. For example, say you wanted to run
seven different commands quickly every time you started
the game. Well instaed of having to waste all that time
and energy, because wasting energy sucks, you can just
write a script and then bind it to a key.
Here's an example script:
//start of script
helpusobi 1
give all
setforceall 3
sabercolor red
victory
//end of script
when you run this script, it will give you everything,
max out your force powers, turn your light saber red,
and make kyle do his victory dance.
By the way, the two slashes "//" are for adding a
comment in your code. The game wont run anything on
that line followed by the slashes.
In order for the game to run the script the file has to
have the file extension cfg (name of script.cfg), and it
to be in the right place. You would have to put the file
in: install directory\GameData\base. For me, the full
directory was:
D:\Program Files\LucasArts\Star Wars JK II Jedi Outcast\
GameData\base
II.MAKING A SCRIPT
------------------
Open a new text and copy the sample script in it. After
you save it, rename the file to "sample.cfg"
Then move the file into nstall directory\GameData\base.
Now start the game. Once your in, press Shift + ~ to
access the console. Type "exec sample.cfg"
Now you should have everything, your force powers maxed,
a red saber, and of course, the victory dance.
Theres still more. Go back into the console and type:
"bind h exec sample.cfg"
Now when you hit h, it will execute the script.
III.MORE ADVANCED SCRIPTS
-------------------------
There are two functions you should know about before you
start writing advanced scripts, echo, set and vstr.
ECHO--
The echo command is pretty simplem it will output white
text at the top of the screen.
Syntax:
echo <text>
Example:
//echo example
echo FIRE
//end
FIRE would apear at the top of the screen.
SET & VSTR--
You can use the alias command to define custom commands.
Syntax:
set <variable> <value>
-The variable would be the new comand and the
value would be the effect (commands to exec).
vstr <variable>
-The variable would be the command you set with
'set.'
Example:
//Example Alias: Change Saber Color When You Attack
set red "sabercolor red"
bind m "vstr red"
//end
Yeah, yeah, yeah...I know there are easier ways this can
be done, but this is just an example of how to use the
set and vstr functions.
SABER COLOR MENU--
//Saber Color Script
echo Choose Saber Color
echo F1=[RED] F2=[BLUE] F3=[GREEN] F4=[YELLOW] F5=[ORANGE] F6=[PURPLE]
set color1 "sabercolor red; echo Saber Color Changed To Red"
set color2 "sabercolor blue; echo Saber Color Changed To Blue"
set color3 "sabercolor green; echo Saber Color Changed To Green"
set color4 "sabercolor yellow; echo Saber Color Changed To Yellow"
set color5 "sabercolor orange; echo Saber Color Changed To Orange"
set color6 "sabercolor purple; echo Saber Color Changed To Purple"
bind F1 "vstr color1"
bind F2 "vstr color2"
bind F3 "vstr color3"
bind F4 "vstr color4"
bind F5 "vstr color5"
bind F6 "vstr color6"
//end
IV.OTHER COMMANDS THAT CAN BE USED IN SCRIPTS
---------------------------------------------
force_throw - use push force power
force_pull - use pull force power
force_speed - use speed force power
force_distract - use distract force power
force_heal - use heal force power
+force_grip - use grip force power
+force_lightning - use lightning force power
+attack - attack
+altattack - alternate attack
+moveup - jump
+moveleft - move left
+moveright - move right
+back - move backwards
+forward - move forwards
toggleconsole - bring console up or down
There are many, many, many, many, many more......
look in jk2config.cfg in /base
V.OTHER STUFF
-------------
Version 0.0.1 - First Release
Version 0.0.2 -
-Fixed some spelling errors
-Added stuff
(c)2002 Daniel Leet. This document may be used and distributed
for commercial use only. It may not be in any way edited/
modified. If this document is not shown in its entirety, the
information must be correctly cited.