PDA

View Full Version : NSS Script Compiler tool problem...


Vor
06-26-2004, 09:56 AM
I think it might just be(I hope this isn't somewhere else on the fourm.....I tried searching but it sayys something about nss being under the word miniumum or sumthin'),but whenever I try using the compiler,it says "Error:Unable to open output file "Override\*".I'm using this with Doom_Dealer's tutorial. Please help.

tk102
06-26-2004, 10:12 AM
For some reason a lot of people are afraid of the command line, and yet many KotOR utilities are command line utilities... but of course not you Vor :) :) :)

Here's what I do, Vor. I make a new (temporary) folder. I drop nwnnsscomp.exe into it along with any .nss file that I want to compile. Then I open a command prompt in that folder. Next I type 'nwnnsscomp -v1.00 *.nss' and that's all.

Darth333
06-26-2004, 10:14 AM
Use a command prompt to open the compiler. Then type:

nwnnsscomp -v1.00 "scriptname.nss"

Other solution: ( It saves time and this is what I use 90% of the time)

Put "NWNNSSCOMP.exe" in your SWKotor directory (not the override directory), then open notepad and paste this:


NWNNSSCOMP -v1.00 -co Override\* Override\
pause


Save the file as "Compile.bat" and also put it in your main SWkotor directory.

Now, put the scripts you want to compile in the override diectory (.nss files).
Now, whenever you want to compile a script, just double click the Compile.bat and it should compile all the scripts that are in your override folder. Look into your override folder and the compiled scripts should be there ( .ncs files).

Vor
06-26-2004, 10:17 AM
thanks for the help :),now I might be able to complete the mod I'm working on.

edit:nm.....I'm lost.The faster way didn't work,and I don't know what a command propt is...

Darth Khasei
06-26-2004, 05:06 PM
None of those EXCELLENT methods is as user friendly as use the "run" option box in windows;)

Hit start then "run" and type this in the box and press enter "C:\Program Files\LucasArts\NCS\1\nwnnsscomp.exe" -v1.00 dk_sup_ns.nss

(Make sure that the directory is pointing to "your" location for the nwnsscomp.exe file) Also replace the file name dk_sup_ns.nss to the file name you want. Cheers.

Vor
06-26-2004, 08:00 PM
uhhh.....that didn't work either....it says "Windows cannot find 'C:\Program'.Make sure you typed the name correctly,and then try again.To search for a file,click the Start button,and then click search."......and niether of the other 2 methods worked either....... 0/3 worked......I believe this is a bad omen......lol.

Darth333
06-26-2004, 08:14 PM
Nice method Darth Khasei but it doesn't beat the double click :D

Originally posted by Vor
thanks for the help :),now I might be able to complete the mod I'm working on.

edit:nm.....I'm lost.The faster way didn't work,and I don't know what a command propt is...

ok, let's try again:

A command prompt is the black little ms-dos window.
But with the the method I gave you, you don't need to use it (you just have to look at it :p ) .

1. Open notepad and paste the text :

NWNNSSCOMP -v1.00 *.nss
pause


then save it as Compile.bat and put the new Compile.bat in the same folder as the scripts you want to compile.

2. Put NWNNSSCOMP.exe in same folder as the scripts you want to compile (I created a folder called Kotor_Compile where i put all this)

3. Put the script you want to compile, blahblah.nss in your the same directory as above.

4. Double click the Compile.bat file

5. You should see a black command prompt popping up and if the script has compiled successfully you'll see:


Compiling: blahblah.nss
Total Execution time = 75ms (or whatever times it takes)


press any key to close the command prompt.

6. Look into your folder wehre you initially put your scripts. You should now see the following files:
- blahblah.nss (you don't need this one anymore but keep it for reference purposes)
- blahblah.ndb (just discard this one. It's debugging info that was used in nwn - read: send to garbage bin)
- blahblah.ncs (this is the compiled script that you need)

7. Well not really a step, just a comment: next time you use the compiler, start at step no. 5 :D

Hope this helps. :)

What more than 550 posts and I'm a RANCOR????? :mad: How insulting! :D

Vor
06-26-2004, 10:02 PM
dude,I did all that.It still said the error message.........

tk102
06-26-2004, 10:14 PM
put quotes around the path to your script:

nwnnsscomp -v1.00 "c:\program files\blahblah\blah.nss"


You always need quotes when your path contains a space.

Vor
06-27-2004, 02:41 PM
I asked one of my friends about it,and he said if you first save it as a .nss,then do "save as" and make it a .ncs,and put it to all files.it works......so does it work?

Darth333
06-27-2004, 02:47 PM
Originally posted by Vor
I asked one of my friends about it,and he said if you first save it as a .nss,then do "save as" and make it a .ncs,and put it to all files.it works......so does it work?

no. The script wont be compiled. If it was as simple as that we wouldn't need script compilers :D

Vor
06-27-2004, 02:59 PM
ok....well,for your faster method,I just simpy and paste EXACTLY what u said and change nothing,right?none of these have worked so far......I think something might be wrong with my computer.

tk102
06-27-2004, 11:29 PM
Can you be more specific? What exactly are you seeing?

If you are running from a command prompt or from a .bat file that contains "pause" in it, you should see the output of nwnnsscomp -- and it's pretty exact as to what the problem is.

Edit:
Oh, just read your edit that you don't know what a command prompt is...

A command prompt (aka DOS prompt) is when you see the C:\> in a black window and a blinking cursor... you can to one by clicking Start -> Run and typing cmd

If you can understand how run an application from a command prompt, all the rest of the advice will make sense.

Vor
06-28-2004, 12:57 PM
well,what I'm seeing is this:1.if I do the command propt way or the run way,I see the black nwnnsscomp for a split second,and can't read it for that split second,and 2.Darth333's way if still says the error message I got with the normal way before I asked.

tk102
06-28-2004, 01:04 PM
1.if I do the command propt way or the run way,I see the black nwnnsscomp for a split second,and can't read it for that split second,and

That means you are NOT using a command prompt.


Start: Programs: Accessories: Command Prompt

Darth Khasei
06-28-2004, 01:12 PM
You know I thought about this when I posted before. Are you "100%" positive that the script amd properly syntaxed. As you know one period or comma in the wrong place and the script will not compile. Trust me on this one I wrote tons of them and had the same result that it would not compile.

If you are positive that you are correctly doing the commands to compile correctly, then I would check not only the syntax, but the script structure as well. You can always e-mail it to me and I'd be glad to take a look at it for ya. Let me know.

Darth333
06-28-2004, 01:21 PM
Just in case, I uplaoded a .bat file. You can get it here: http://mars.walagata.com/w/darth333/Compile.zip

1. Just put the Compile.bat file in your main SWKotor Directory together with NWNNSSCOMP.exe.

2. Then put your .nss files inyour override folder.

3. Double click the Compile.bat file: your scripts should compile automatically.

4. If it doesn't work, tell us exaclty what it says when you double click the Compile.bat file.

Vor
06-28-2004, 08:58 PM
well......it says all of the stuff that says what it is,where it is,ect.....then it says "Error:Unable to open input file "Override\*".....and I don't even know what a synax is.......The script is small,it's only an attack script.......

Darth333
06-28-2004, 09:06 PM
Originally posted by Vor
well......it says all of the stuff that says what it is,where it is,ect..... It's very hard for us to help you if we don't have complete info. Can you paste the complete error message? or post a screenshot of what you see. To upload screeshots, you can use: http://www.photobucket.com

Lorden Darkblade
06-28-2004, 09:17 PM
You can also use ImageShack (http://www.imageshack.us/) .
It's very good cuz you dont have to sign-up or anything.

Vor
06-28-2004, 09:29 PM
'C:\Program Files\LucasArts\SWKotOR>NWNNSSCOMP -v1.00 -co Override\* Override\' Star Wars:Knights of the Old Republic' Script Compiler/Decompiler based on 'NeverWinter Nights' Script Compiler/Decompiler Modified by Hazard(hazard_x@gmx.net)

Error:Unable to open input file "Override\*"

C:\Program Files\LucasArts\SWKotOR>pause
Press any key to continue...'


that's EXACTLY what it says each time.

tk102
06-29-2004, 12:38 AM
Check:
1. Do you have your .nss files in the override folder?
2. Are you sure those files are named blahblah.nss and not blahblah.nss.txt?
3. Have you renamed your override folder accidently?

Vor
06-29-2004, 09:43 AM
1.it's in the override folder
2.it says it's a text document,but it doesn't have .txt,only .nss
3.my override folder is called "Override",so I don't think it's been renamed......

Darth Khasei
06-29-2004, 02:10 PM
Hmm, txt file. I think I know what may be going on. Did you make this NSS from scratch yourself? I got that when I did. So what I ended up having to do was to use an exsisting NSS taking out the script guts and replacing them with my new stuff. Then saved the file. Then rename it "outside" of the editor. That or a scripting syntax error are probably things keeping it from compiling.

Vor
06-29-2004, 02:17 PM
uhh.....yeah...I made it using notepad....I thought that's what I was supposed to do..so I should use kotor editor or another utility program to extract a .nss file,and then try the process again?

Darth Khasei
06-29-2004, 02:22 PM
Just get an exsisting NSS from somewhere and replace the guts and save. Then rename it "outside" of the notepad editor.

Vor
06-29-2004, 02:30 PM
ok.Thanks alot for all of the help,and sorry for taking up your time.But thanks alot.

tk102
06-29-2004, 02:45 PM
Next time you use notepad, when you Save As, choose *.* All Files and then you can save with .nss extension.

If you choose *.txt Text Files and try to save with .nss, Notepad will save as .nss.txt.

It sounds like you have "Hide extensions of known file types" turned on. For your own peace of mind and to protect you from virii that disguise themselves, you should have that unchecked -- In Windows Explorer: Tools: Folder Options: View: uncheck "Hide extensions of known file types" and click OK.

Darth Khasei
06-29-2004, 03:51 PM
Originally posted by Vor
ok.Thanks alot for all of the help,and sorry for taking up your time.But thanks alot.

No problem.:cool:

KoviCZ
08-22-2004, 06:23 AM
Hi everybody!
Here's my problem I can't seem to be able to solve and I hope you guys will be able to help me with.

So, here it is: We have almost translated KotOR to Czech, but during final betatest we found a problem on Korriban. In the final tomb there is a puzzle with several pillars and you have to transfer systems from one pillar to the other and even though we translated lines describing the currtent state of pillars (like No systems active or Mid-Upper System, Top System), they still appear in English in the game. So I made a little digging and found these lines in modules\korr_m39aa_s.rim\k_pkor_pillar01.ncs. I got this .ncs file out ouf the .rim file. Now I use HazardX's script compiler/decompiler (nwnnsscomp.exe -d k_pkor_pillar01.ncs) to get k_pkor_pillar01.pcode that I can edit in Notepad. Save it and what now? When I try to compile it back (nwnnsscomp.exe -c k_pkor_pillar01.pcode) it says "Error: Unable to open input file...". So i rename it to k_pkor_pillar01.nss. But then it says "Leaked PStackEntry h:\programmieren.... Compilation aborted with errors". So, what am I doing wrong here, guys? Can you help me with this problem? Thanks!

RedHawke
08-22-2004, 06:36 AM
Hello KoviCZ, and welcome to the forums! :D

HazardX's compiler will compile .nss scripts into the .ncs file the game needs. You can delete the .ndb files it creates.

But HazardX's compiler does not decompile scripts very well, and when you do use it to decompile you can only get the main function calls from the script, along with a lot of gibberish, and most importantly you can't recompile a script decompiled with HazardX's compiler, so unless you can find the source .nss file for the script somewhere you are mostly out of luck.

Sorry to be the bearer of bad news on this one, but we can only alter the .nss source scripts and then use HazardX's compiler to compile them.

EDIT: In KOTOR Tool look in BIF's / Scripts / Script,Source for the available source scripts in the game, the script you are looking for could be in there.

I hope this helps! :D

KoviCZ
08-22-2004, 02:27 PM
RedHawke: Thank you for welcoming me here and for your information... well... but yes, thanx for it, because I would otherwise be trying to make it somehow forever:-) I see, so that is why the "decompiled" version I got looked so different from the .nss file I downloaded somewhere on nwvault.ign.com:-) I tried to find the needed source script in the BIFs, but it seems that it is not in there... OK... Well... I will have to think up something else:-) But thank you once again for your reply.

RedHawke
08-23-2004, 12:13 AM
You are welcome KoviCZ! :D And I feel your pain! :(

At least you have the rest of KOTOR translated the way you want it... Right! :D

Lorden Darkblade
08-23-2004, 01:28 AM
A bit nothing to do with the topic but I had to say.
I still will meet a person that didnt had problems with teh Compiler Tool :D :p ;)

RedHawke
08-23-2004, 02:30 AM
Originally posted by ReLoaD2K
A bit nothing to do with the topic but I had to say.
I still will meet a person that didnt had problems with teh Compiler Tool :D :p ;)

Nice to see you still around ReLoaD2K. (Just saw what you posted on Pcgamemods about the Patch I released for my item pack so I fully recind this statement!!! :mad: )

Yes the compiler is kinda tricky for some people I have the compiler .exe in a seperate folder and have a .bat file with it made to compile all .nss scripts that I place in the folder.

Here is the contents of the Compile.bat I use.


NWNNSSCOMP -v1.00 *.nss
pause


then all I have to do is drop in the .nss files in that folder and double click compile.bat and it does its magic! :D

Drog
09-29-2004, 07:05 AM
Originally posted by tk102
Next time you use notepad, when you Save As, choose *.* All Files and then you can save with .nss extension.

If you choose *.txt Text Files and try to save with .nss, Notepad will save as .nss.txt.

It sounds like you have "Hide extensions of known file types" turned on. For your own peace of mind and to protect you from virii that disguise themselves, you should have that unchecked -- In Windows Explorer: Tools: Folder Options: View: uncheck "Hide extensions of known file types" and click OK.


That was his problem .. youve solved it :) nice job

banjinsan
10-13-2004, 08:13 AM
Help, i need to decomplile a NCS for NWN. I don't have kotor so kotor tools does not work, and when i try to open nwnnsscomp, an MSDOS window blinks ounce then nothing. Is there a simple way of decompiling a NCS ?

Darth333
10-13-2004, 08:25 AM
Originally posted by banjinsan
Help, i need to decomplile a NCS for NWN. I don't have kotor so kotor tools does not work, and when i try to open nwnnsscomp, an MSDOS window blinks ounce then nothing. Is there a simple way of decompiling a NCS ?

Erm...this script compiler is for Kotor but was made after Torlak's script compiler for NWN which you can get here: http://www.torlack.com/index.html?topics=nwnnsscomp (but it works the same as explained in this thread) Torlacks also provides complete documentation with his compiler.

But it works the same as explained in this thread.

tk102
10-13-2004, 08:27 AM
Did you even read this thread? Actually it doesn't matter. If you don't have KotOR installed, the decompiler is going to complain that it can't find your KotOR directory anyway.

whitguy
11-01-2004, 11:51 AM
Originally posted by Darth Khasei
Just get an exsisting NSS from somewhere and replace the guts and save.

Im not getting this what kind of program should i use to take all the guts and stuff out im having a problom i did all the stuff darth333 told vor to do but when i click on compile thing it go's in to the little dos thing and compiles everything just fine but it dousn't even seem to be able to find my .nss file that i made please help:(

Darth333
11-01-2004, 11:56 AM
Originally posted by whitguy
Im not getting this what kind of program should i use to take all the guts and stuff out im having a problom i did all the stuff darth333 told vor to do but when i click on compile thing it go's in to the little dos thing and compiles everything just fine but it dousn't even seem to be able to find my .nss file that i made please help:(
Huh? Then if it compiles everything just fine, I don't understand what the problem is.

Suppose that you compile a script called my_script.nss, you will get two additional files, my_script.ncs (the compiled script) and my_script.ndb (debug info used in nwn). You .nss file will still be there.

Or do you mean that other scripts compile fine but not the script you made by yourself???

Fred Tetra
11-01-2004, 02:31 PM
You could try out the new Project Manager in Kotor Tool...

You just create a new project, drag some files to the treeview under the right branch and select Build from the menu.

Take a look in the Kotor Tool thread...

http://www.lucasforums.com/showthread.php?s=&threadid=121572&perpage=40&pagenumber=14

Look about half-way down the page for a description of the features; I think you'll like how it makes things easier!

You can get Kotor Tool from here (http://kotortool.home.comcast.net/index.html)