Post by Keets on Jul 31, 2008 14:34:46 GMT -5
Tools Needed:
KOTORTool (not gonna get link. You should already have it if your looking for tutorials)
Ok, follow this path:
KOTOR 2 -> BIFs -> Scripts.bifs -> Script, Source
In there, you should double click on the script you want to study, and the text editor of KTool will automatically open with the script..
Now, keep that Source Script open, and go to the bottom of the source scripts. There should be a script called "nwscript.nss" (without quotes). That has all the information of scripting.
Lets use an example.
There is a script called "a_makejedi.nss" open it. It should look like this:
It should be pretty simple. But, I shall help those slow in the head (no offense). Lets say we use this script to make Mandalore a Jedi.
Or if you want to make Hanharr a Jedi, do the same thing, except don't put in Mandalore (unless you want him in it) and.. well you should be able to do it just by looking at the other ones.
(If anyone tries my above script, and it doesn't work, send me a message either here, or at LF, as most members here are also at LF
KOTORTool (not gonna get link. You should already have it if your looking for tutorials)
Ok, follow this path:
KOTOR 2 -> BIFs -> Scripts.bifs -> Script, Source
In there, you should double click on the script you want to study, and the text editor of KTool will automatically open with the script..
Now, keep that Source Script open, and go to the bottom of the source scripts. There should be a script called "nwscript.nss" (without quotes). That has all the information of scripting.
Lets use an example.
There is a script called "a_makejedi.nss" open it. It should look like this:
// This global script is intended to be used for making each CNPC a Jedi.
/* Parameter Count: 1 (Which CNPC you intend to make a Jedi.)
NPC numbers, as specified in NPC.2da
0 Atton
1 BaoDur
2 Mand
3 g0t0
4 Handmaiden
5 hk47
6 Kreia
7 Mira
8 T3m4
9 VisasMarr
10 Hanharr
11 Disciple
*/
//// CFA 10-5-04
void main()
{
// Grab the Parameter.
int nScriptNumber = GetScriptParameter( 1 );
// If Param = 0, then it's Atton. (Trying to make it consistent with the CNPC integers.)
if ( nScriptNumber == 0 ) {
AddMultiClass (CLASS_TYPE_JEDISENTINEL, GetObjectByTag ("Atton") );
}
// If Param = 1, then it's Bao-Dur. (Trying to make it consistent with the CNPC integers.)
if ( nScriptNumber == 1 ) {
AddMultiClass (CLASS_TYPE_JEDIGUARDIAN, GetObjectByTag ("BaoDur") );
}
// If Param = 4, then it's the Handmaiden. (Trying to make it consistent with the CNPC integers.)
if ( nScriptNumber == 4 ) {
AddMultiClass (CLASS_TYPE_JEDIGUARDIAN, GetObjectByTag ("Handmaiden") );
}
// If Param = 7, then it's Mira. (Trying to make it consistent with the CNPC integers.)
if ( nScriptNumber == 7 ) {
AddMultiClass (CLASS_TYPE_JEDISENTINEL, GetObjectByTag ("Mira") );
}
// If Param = 11, then it's the Disciple. (Trying to make it consistent with the CNPC integers.)
if ( nScriptNumber == 11 ) {
AddMultiClass (CLASS_TYPE_JEDICONSULAR, GetObjectByTag ("Disciple") );
}
}
It should be pretty simple. But, I shall help those slow in the head (no offense). Lets say we use this script to make Mandalore a Jedi.
void main()
{
int nScriptNumber = GetScriptParameter( 1 );
if ( nScriptNumber == 0 ) {
AddMultiClass (CLASS_TYPE_JEDISENTINEL, GetObjectByTag ("Atton") );
}
if ( nScriptNumber == 1 ) {
AddMultiClass (CLASS_TYPE_JEDIGUARDIAN, GetObjectByTag ("BaoDur") );
}
if ( nScriptNumber == 2) {
AddMultiClass (CLASS_TYPE_JEDIGUARDIAN, Get ObjectByTag ("Mand") );
}
if ( nScriptNumber == 4 ) {
AddMultiClass (CLASS_TYPE_JEDIGUARDIAN, GetObjectByTag ("Handmaiden") );
}
if ( nScriptNumber == 7 ) {
AddMultiClass (CLASS_TYPE_JEDISENTINEL, GetObjectByTag ("Mira") );
}
if ( nScriptNumber == 11 ) {
AddMultiClass (CLASS_TYPE_JEDICONSULAR, GetObjectByTag ("Disciple") );
}
}
Or if you want to make Hanharr a Jedi, do the same thing, except don't put in Mandalore (unless you want him in it) and.. well you should be able to do it just by looking at the other ones.
(If anyone tries my above script, and it doesn't work, send me a message either here, or at LF, as most members here are also at LF