I have updated nwnnsscomp so that it properly handles wildcarded file names.
You can download it here:
nwnnsscomp 1.03 (
http://kotortool.home.comcast.net/nwnnsscomp103.zip)
From the readme.txt:
nwnnsscomp Version 1.03 2005-3-16 Fred Tetra
Introduction
------------
nwnnsscomp is a compiler/decompiler for use with Star Wars: Knights of the Old Republic
(KotOR) and Star Wars: Knights of the Old Republic: The Sith Lords (KotOR:TSL).
It is was originally written by Edward T. Smith for compiling NeverWinter Nights scripts.
It has been updated since that time by Fred Tetra to work with KotOR and KotOR:TSL.
nwnnsscomp is a command-line only tool; no Windows GUI is present and it must be run
from the Command Prompt.
Setting up the environment
--------------------------
There are several cases that might apply to the way you want to work with the compiler:
Case 1: Compiling KotOR I script files with only KotOR I installed
No special setup is needed. The compiler will use the nwscript.nss file contained in
the game's scripts.bif file.
Case 2: Compiling KotOR I script files without KotOR I installed
Some users may wish to compile scripts on a different machine from where KotOR is
installed. You will need to use a utility such as Kotor Tool to extract the nwscript.nss
file from scripts.bif and put it in the same folder as nwnnsscomp.
Case 3: Compiling KotOR:TSL script files with only KotOR:TSL installed
If you have the US version of the game, You will need to use a utility such
as Kotor Tool to extract the nwscript.nss file from scripts.bif and put it in the same
folder as nwnnsscomp. If you have a non-US version, there is a syntax error in the
nwscript.nss file; you will have to either extract the file and fix the error or obtain
a copy with it corrected first.
Case 4: Compiling KotOR:TSL script files only without KotOR:TSL installed
Some users may wish to compile scripts on a different machine from where KotOR:TSL is
installed. If you have the US version of the game, You will need to use a utility such
as Kotor Tool to extract the nwscript.nss file from scripts.bif and put it in the same
folder as nwnnsscomp. If you have a non-US version, there is a syntax error in the
nwscript.nss file; you will have to either extract the file and fix the error or obtain
a copy with it corrected first.
Case 5: Compiling KotOR I and KotOR:TSL script files with both games installed.
If you are compiling script files for KotOR I and KotOR:TSL installed, perform the
following steps:
Extract the nwscript.nss file from KotOR I's scripts.bif into KotOR I's Override folder
US version of KotOR:TSL:
if you have a US version of KotOR:TSL, extract the nwscript.nss file from KotOR:TSL's
scripts.bif into KotOR:TSL's Override folder. If the Override folder doesn't already
exist, create it first.
Non-US version of KotOR:TSL:
There is a syntax error in the nwscript.nss file; you will have to either extract the file
from KotOR:TSL's scripts.bif and fix the error or obtain a copy with it corrected first.
Copy the file to KotOR:TSL's Override folder.
Examples
--------
Compile multiple source files for KotOR:TSL, putting the output files all in one directory:
nwnnsscomp.exe -c -g 2 --outputdir "C:\test output" script1.nss script2.nss script3.nss
Compile one source file for KotOR, putting putting the output file in the same directory:
nwnnsscomp.exe -c script1.nss
-or-
nwnnsscomp.exe -c -g 1 script1.nss
Compile one source file for KotOR:TSL, putting the output file in a directory and
specifying a different filename for it:
nwnnsscomp.exe -c -g 2 --outputdir "C:\test output" -o foo.ncs ft_invoke.nss
To compile a .nss file with the .ncs output file going in the same directory:
nwnnsscomp -c mysource.nss
To compile a .nss file with a differently named .ncs output file going in the same directory:
nwnnsscomp -c --outputdir d:\myoutput\ mysource.nss
To compile a .nss file with a differently named .ncs output file going in a different directory:
nwnnsscomp -c -o d:\myoutput\mycompiledfile.ncs mysource.nss
OR
nwnnsscomp -c --outputdir d:\myoutput\ -o mycompiledfile.ncs mysource.nss
To compile a list of .nss files with the .ncs output files going in the same directory:
nwnnsscomp -c mysource1.nss mysource2.nss mysource3.nss
OR
nwnnsscomp -c *.nss
To compile many .nss files in the current directory via a wildcard with the .ncs output
files going in a different directory:
nwnnsscomp -c --outputdir d:\myoutput\ *.nss
To compile many .nss files in one directory via a wildcard with the .ncs output files
going in a different directory:
nwnnsscomp -c --outputdir d:\myoutput\ c:\sourcfiles\*.nss
NOTE: Any path that has spaces in it must be surrounded by double quote marks (").
For example:
nwnnsscomp -c --outputdir "d:\my output files\" *.nss
Release history
---------------
1.03 - 2005-3-16
Adjusted a feature in TCLAP (Command Line Parser) that prevented proper wildcard
handling of .nss files
1.02 - 2005-3-4
Updated to work with KotOR II:TSL, supporting override folder look-up for nwscript.nss
1.01 - 2004-10-29
Initial version rewritten for Star Wars: Knights of the Old Republic by Fred Tetra
to work with Kotor Tool
Command Line Reference
----------------------
USAGE:
nwnnsscomp {-c|-d} [--outputdir <Directory Path>] [-o <File Name>] [-g
<Game number>] [--optimize] [--] [-v] [-h] <file name> ...
Where:
-c, --compile
(OR required) Compile an NSS file
-- OR --
-d, --decompile
(OR required) Decompile an NCS file to byte code
--outputdir <Directory Path>
(value required) Output directory for compiled/decompiled files
-o <File Name>, --outputfile <File Name>
(value required) Output file
-g <Game number>, --game <Game number>
(value required) KotOR Game Version: 1=KotOR, 2=KotOR:TSL; default=1
--optimize
Turn on code optimizations
--, --ignore_rest
Ignores the rest of the labeled arguments following this flag.
-v, --version
Displays version information and exits.
-h, --help
Displays usage information and exits.
<file name> (accepted multiple times)
(value required) file name(s) to compile/decompile
NeverWinter Nights Script Compiler/Decompiler
Copyright 2002-2003, Edward T. Smith
Rewritten for Star Wars: Knights of the Old Republic
by Fred Tetra to work with Kotor Tool
Version 1.03 2005-3-16 Fred Tetra