.nss files are the basis of scripting (also called coding) actions, effects, events, and checks in the Star Wars: Knights of the Old Republic game, and its sequel, The Sith Lords.

It might take you a while to learn scripting, but once you do, it is well worth it. Scripting allows for a lot of creativity, to some extent. You can script just about anything, if you know where to look for the functions. By the way, functions are best described as "shortcuts to doing tasks that you might or have to do", such as sending a meesage to the PC (Player Character).

The source scripts from the original game can be found using Kotor Tool and searching, starting from the game you want to examine, this:

<TSL or KotOR here> -> BIFs -> Scripts -> Source

and then pick one and click on it to display it in Kotor Tool's Text Editor.

When you script, you will use source scripts to actually detail what you want to happen. Kotor Tool then will compile this source code into what is known as a "compiled script", which has .ncs at the end of the file name.

When you release a mod that involves scripts, it is generally frowned upon/disliked if you don't release your source code with your mod.

NSS example

A typical source script.