Jump to content

Home

New version of nwnnsscomp


Fred Tetra

Recommended Posts

I've posted a new version of Edward Smith's nwnnsscomp script compiler/decompiler to the Downloads section of the Kotor Tool website. This version is the one I customized for Kotor Tool and it has a number of different command-line options. You still have to run it from the command line, though ;)

 

From the help.txt file:

 

About this tool:

 

nwnnsscomp is a tool used for compiling and decompiling the script files

that are used by Star Wars: Knights of the Old Republic. It is a

command-line only tool; no Windows GUI is present and it must be run

from the Command Prompt.

 

It is based on the original version by Edward Smith and contains code added by Fred Tetra.

 

 

 

How to use it:

 

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 one directory with the .ncs output files going in a different directory:

 

nwnnsscomp -c --outputdir d:\myoutput\ *.nss

 

 

The one case that nwnnsscomp *does not* presently handle is compiling 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

 

 

 

 

 

USAGE:

 

nwnnsscomp {-c|-d} [--outputdir <Directory Path>] [-o <File Name>]

[--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

 

--optimize

Turn on code optimizations

 

-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

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...