NwnNssComp is a standalone NWScript compiler and decompiler for Bioware's Neverwinter Nights game. It allows module developers to quickly recompile all their scripts. This is based on Torlack's older version.
I'm trying to use this to DEcompile scripts, and it outputs pcode, which I'm having trouble reading. Is there a way to get it to output ordinary NWN script code? Thanks!
Posted by DM-Taino at on03/30/09
Thanks Dagesh and Chris421 for this brief information. I finally got this thing to work. DMT
Posted by Dagesh at on01/15/09
(Intro you can skip)I had a bit of a time figuring this out as I've only learned to code in NWScript (sad but true). I know enough Command Prompt stuff to get me in trouble but I'll write what I know for the next guy as I was helped by Chris421.(/end intro) I assume the least amount of knowledge. Step 1) Go to your NWN directory folder (ex. C:\Program Files\Neverwinter Nights). In that file, then open the "utils" folder. Create a new text document in there. We'll rename it later. Step 2) Open that document and type in what Chris421 posted: CD C:\NeverwinterNights\NWN\modules\temp0 C:\NeverwinterNights\NWN\utils\nwnnsscomp.exe -cego *.nss CD .. PAUSE NOTE: Make sure that the paths are the same (ex. C:\NeverwinterNights\NWN\modules\temp0). If they are not, it will not compile. (Also, the temp0 folder is created when you open your NWN module in the builder) Save that file and name it something unique (like PRCCompiler) and make sure to save it as a .cmd file. What I mean is, as word documents on windows have .doc and text files have .txt, make the new file .cmd (ex. PRCCompiler.cmd). Now you'll have a little gear box icon instead of the text file. Step 3) Run the new cmd file. You should see lines blazing along in the command prompt. If the script is fine you'll see "- passed" or "- include". If it comments on a specific line, it would be good to check it out. EXTRA INFO: ===========================COMPILER COMMAND SCREEN==================================== Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp. C:\Documents and Settings\Building>CD\Games\NWN\utils C:\Games\NWN\utils>nwnnsscomp Usage: nwnnsscomp [-cdegoqx] [-t#] [-v#] [[-i pathspec] ...] infile [outfile] pathspec - semicolon separated list of directories to search for files. infile - name of the input file. outfile - name of the output file. -c - Compile the script (default) -d - Decompile the script (can't be used with -c) -e - Enable non-Bioware extensions -g - Don't produce ndb debug file -i - Add Search Path -o - Optimize the compiled source -q - Silence most messages -x - Extract script from NWN data files -vx.xx - Set the version of the compiler -t1 - Perform a compilation test with BIF scripts -t2 - Perform a compilation test with the given module -t3 - Optimization space saving report with the given module -t4 - Perform a compilation test with the given file or files ===========================COMPILER COMMAND SCREEN==================================== This is what you will see if you opened the file from the command prompt. You'll notice that the letters we placed in the .cmd file above are reflected in here. This will give you an idea of what they are. for "infile" and "outfile" you don't need to add those words if you're changing the .cmd file. You add the name of your infile (ex. MyMod.mod) in place of that. The rest (I hope) is fairly self-explanatory-ish. You play with it and make sure to "Save File As" (also make sure the module is open in the builder) Chris421's post was very helpful in figuring this out. I assume the least amount of knowledge. Step 1) Go to your NWN directory folder (ex. C:\Program Files\Neverwinter Nights). In that file, then open the "utils" folder. Create a new text document in there. We'll rename it later. Step 2) Open that document and type in what Chris421 posted: CD C:\NeverwinterNights\NWN\modules\temp0 C:\NeverwinterNights\NWN\utils\nwnnsscomp.exe -cego *.nss CD .. PAUSE Keep in mind that Chris421's post was very helpful in figuring this out.
Posted by mirrormirror at on11/20/08
Loving it! Toolset memory issues are a thing of the past!
Posted by maddogfargo at 2008-11-1510:37:00
Stratov... Tried the links listed and some come up blank. Went to the PRC website and looked at the 'Manual' section and didn't see info on the compiler. I'm guessing I can just create a shortcut to it and add a comment in that shortcut to specify the module I want compiled? If you could provide a readme of some kind (* or a link to it) it would be greatly appreciated. Thanks in advance for the assistance. - MDF
Posted by ShaDoOoW at on10/12/08
Found out I haven't voted. Well, interface would be great. _________________________ [Boost System] [Door System] [Devastating Critical Immunity] [HIPS remake] [Circle Kick Mode] [1.69 Full 2da Source]
Posted by wmb1957 at on09/23/08
Thank you, invaluable to many neverwinter users. The source is available in PRC CVS last I knew. Search in google or another search engine and you should be able to find it.
Posted by Tormented_Blood at on09/22/08
THANK YOU for the 1.69 update. if i could get hold of the source too it would be nice as i have a friend that would love to port it to linux for us linux users. drop me a line prc guys.
Posted by Inayity at on09/16/08
The fact that this has 5k downloads and only like 4-5 votes is a real shame. This is probably one of the most useful utilities for Neverwinter period- right up there with other revolutionary applications like NWNX. A 10!