Here are your instructions, as well as the uncompiled scripts that are 99% ready to compile.First
is the new On_Enter for the Endar Spire using the coordinates for Weston (you can re-use this exact script for Zaalbar's trainer by substituting trainer's name and coordinates.
I am not fiddling with orientation at this time, as the NPC will move to you On_Perception
void main ()
CreateObject(OBJECT_TYPE_CREATURE, "endar01_weston", Location(Vector(25.16541, 22.92172, -1.27500), 0.0));
For the above script to work, you will need to rename the original On_Enter for the Endar Spire, "k_pend_1b_area", to "al_pend_1b_area" or something else. Keep your filename under 16 characters though.
This new script will be saved as .nss in Notepad and compiled as "k_pend_1b_area" by KotOR Tool and will result in a .ncs file.
(For Zaalbar's, obviously the on_enter script will also need to be changed, and you may need to find that script. Rename the old script to al_kash_old or something, and your edited version of k_pend_1b_area.nss that we just made to whatever the old one was actually called.
is the On_Perception Event. Using CONVERSATION_TYPE_CINEMATIC makes the camera focus on the speaker, so you don't need to do any camera work unless building a cut-scene.
int nEvent = GetUserDefinedEventNumber(); // OnPerception
if (nEvent == 1002)
DelayCommand(0.5, AssignCommand(oTrainer, ActionMoveToObject(oPC)));
This script can be modified for your Zaalbar trainer with simple tag substitution. You will save this version as al_westpercp.nss, compile, and it will go in your override.Third
, User Defined On_Spawn, to enable the perception event - using a spoiler here, because it is a large script from the vanilla game with one commented section activated
You can save this one, as al_westspawn.nss and compile, it will also go in override. There are some other things here you might want to play with, as you can uncomment the ambient behaviors, which will make your trainer do some ambient animation until the perception event. This I leave to your discretion - it is very easy to play with this script, recompile, and see results in-game. (Again, this script will be lightly edited to work for your Zaalbar trainer, you can name it al_johclispawn.nss or something
, RedHawke's Multiclass script, altered by me, to be inserted into a Dialog node or run via checking some Global variables that we haven't made (ergo - do it in a dialog node)
For the PC-
object oPC = GetFirstPC();
AddMultiClass(3, oPC)); //this allows you to use the same script to multiclass both players, with just a name change
The above needs to have tags substituted, for the character in question for any items you wish to bestow upon the multiclassing of your PC. It can be saved as jedifyPC.nss and compile, and place in override.Fifth,
object oPC = GetFirstPC();
Again, substitute tags for something you like, and save as jedifyZaalbar.nss. It will also be compiled and placed in override.Final Point
: These scripts need to be used in various places. They must be compiled and placed in override. The spawn and perception scripts also must be attached to your creature using the KotOR Tool Creature Editor and inserting them in the correct script slots.
The other places are in dialog files, that you have. They need to fire upon certain places in your dialog, which I have not looked at.