Okay, you've not seen the decompiled code. What you just did was directly open up the .ncs and see the final form of the script. You have not decompiled anything.
Download DeNCS in zipped form, then unzip. Do you know how to unzip a folder? (Note "Unzip" doesn't mean "open")
Once you've extracted the folder, there should be two files, labeled as such "DeNCS Readme.txt" and DeNCS.jar which is an executable file.
Double click on the DeNCS.jar, to begin installing. According to the readme, you will need java; my mistake on my previous comment.
Additionally you will need the source script for kotor (nwscript.nss), which can be found in your KT folder, or you can follow the Readme's advice and extract it using the KT. Place nwscript into the same folder of the DeNCS, where you tell it to output the decompiled script.
Once you have the nwscript.nss inside the DeNCS folder, you can now use it to open any .ncs script.
So once again, go to the BOS:SR mod folder, copy and paste the script into the DeNCS folder, then open that script with the DeNCS.
Then right click to view decompiled code.
Please try to follow these directions. Your end result should be this decompiled code> void main() {
object oBos_bosghost1 = GetObjectByTag("bos_bosghost1", 0);
object oBos_bosghost2 = GetObjectByTag("bos_bosghost2", 0);
object oBos_bosghost3 = GetObjectByTag("bos_bosghost3", 0);
object oNearest = GetNearestObject(32767, GetFirstPC(), 1);
location location1 = GetLocation(oNearest);
if ((GetIsObjectValid(oBos_bosghost1) == 0)) {
string string1 = "cs_sithghost";
PlaySound(string1);
CreateObject(1, "bos_bosghost1", location1, 0);
ApplyEffectAtLocation(0, EffectVisualEffect(3003, 0), location1, 0.0);
}
else {
if ((GetIsObjectValid(oBos_bosghost2) == 0)) {
string string2 = "cs_sithghost";
PlaySound(string2);
CreateObject(1, "bos_bosghost2", location1, 0);
ApplyEffectAtLocation(0, EffectVisualEffect(3003, 0), location1, 0.0);
}
else {
if ((GetIsObjectValid(oBos_bosghost3) == 0)) {
string string3 = "cs_sithghost";
PlaySound(string3);
CreateObject(1, "bos_bosghost3", location1, 0);
ApplyEffectAtLocation(0, EffectVisualEffect(3003, 0), location1, 0.0);
}
else {
object oNPC = GetPartyMemberByIndex(0);
AssignCommand(oNPC, ActionStartConversation(GetPartyMemberByIndex(0), "bos_shadowpower", 0, 0, 0, "", "", "", "", "", "", 0));
}
}
}
}
And if you want to edit that, good luck! I can't really help you there. I am a poor coder and wouldn't be able to easily integrate what you wish to do, though I'm sure its fairly simple.
Alternatively, if you cannot follow my process you could, hypothetically, just copy and paste the script and then tinker with it.