Tools you will need:
DLG Editor by tk102
KotOR Tool by Fred Tetra
K-GFF by tk102
Concepts I'll be covering:
Global Variables
DLG Editing
Action Scripts (Scripts that do something and then stop)
Conditional Scripts (Scripts that check something, or several things, and then return 0 or 1)
I will mostly leave the DLG Editor to you to learn, but some things I will mention:
NPC lines are Red, Player responses are Blue. Entries are NPC, Replies are PC. Paste Node as Copy adds a reference to the entry or reply, instead of a new instance (moves the dialog to that entry's or reply's section, and helps reduce file-size by avoiding needless duplicates). When you select an Entry, the Speaker part is the tag of the creature (or placeable or door) and is what the camera will focus on. If blank, the game will use the object the PC is talking to (so leave it blank by default).
Some concepts for you about DLG nodes (a node is anything in the DLG file, regardless of whether it is an Entry or a Reply): The Script part is the Action Script that will be ran when that node is used in-game (if it's an Entry, it's when that line shows up; if it's a Reply, it's when that line is activated or used). When you put a script in, don't add the ".ncs" part.
The Conditional part is the Conditional Script that will return 0 (FALSE) or 1 (TRUE), which will determine whether that node shows up or is available in-game. When you put a script in, don't add the ".ncs" part.
The VO Resref part is the file in the StreamVoice folder, and is also the name of the .lip file used for lip-sync (animates the mouth as the character talks).
The Sound part is the file in the StreamSounds folder, and is used for alien VO. You need to check the Sound present box, though.
A quick way to have "First-time you meet them" dialog is to make two main Entries (two entries right off the black filename line at the top of the dlg) and have the top one be your first-time dialog's starting point. You'd enter "k_con_talkedto" as the Conditional and "k_act_talktrue" as the Script.
Now, here is a sample script that you can use as a template for your Conditional Scripts for the dlg files to make certain dialog only appear at certain points in the quest:
int StartingConditional()
{
// And DO NOT leave the < > marks.
// == means equal
// <= means number on the left is less than or equal to
// < means number on the left is less than
// >= means number on the left is greater than or equal to
// > means number on the left is greater than
if(GetJournalEntry("<tag of the quest in the global.jrl file>") == ##)
{
return TRUE;
}
else
{
return FALSE;
}
}
Besides this, I'd say to use KotOR Tool's Text Editor for scripting, and be sure to select KotOR 1 in the Script menu to see all the functions you can use (the empty text line above the list can be used to search for functions).