Forked nwnnsscomp from OpenKnights and added support for Fred Tetra's command line options.
http://sourceforge.net/project/showfiles.php?group_id=157123) (source also available in SVN in the /compiler directory)
There appears to be a bug with exactly one function in nwscript.nss, so you should replace this
void SetAvailableNPCId(INT nNPC, OBJECT_ID oidNPC);
with this:
void SetAvailableNPCId(int nNPC, object oidNPC);
This version of nwnnsscomp can be used in Linux instead of Fred Tetra's version, which is only available for Windows. Here is how to run DeNCS natively in Linux:
- create a ~/.nwnnsscomp file with the following content:
2=/path/to/kotor/or/tsl
- move the "nwnnsscomp" executable you will get after compiling the compiler to /usr/local/bin or /usr/bin
- link to it under the name "nwnnsscomp.exe" in your open directory (the directory which DeNCS searches for nwscript.nss) - this is because DeNCS checks if this file exists, but doesn't touch it otherwise
- copy the modified nwscript.nss to that directory and to the game's override directory
- run the jar file, as usual: java -jar DeNCS.jar
So, as you see, instead of searching the Windows registry for the games, this version of nwnnsscomp checks a text configuration file. It consists of lines of the following format:
GSTR=/path/to/kotor/or/tsl
where GSTR is the string passed to the -g parameter. Fred Tetra's version understands only -g 1 for KOTOR and -g 2 for TSL. This version supports any string after -g.
Alternatively, you can pass the path in the environment variable NSSPATH_GSTR (the Fred Tetra compatibility modes would use NSSPATH_1 and NSSPATH_2 respectively). Doing so will override the paths in the iconfiguration file. So, instead of creating the ~/.nwnnsscomp file, you could instead launch DeNCS like this:
NSSPATH_2=/path/to/kotor/or/tsl java -jar DeNCS.jar