Nss vs ncs

Is there a difference between these 2 files? If they’re named the same but have these different extensions, is there any difference?

Yes, the .nss version is the source code (which any text editor can show) whereas the .ncs file is the compiled (executable by the engine) version.

So basically, they go hand-in-hand, you can’t have one but not the other.

technically you can

.nss only - uncompiled source, won’t run in game, can be used as a template for other scripts
.ncs only - compiled source, will run in game, modification usually requires disassembly first

but 99.9999999999999999% they go together.

So I can use just NCS, but just in case, use both.


gui-scripts (scripts controlling a gui) have slightly different rules

the engine compiles them on-the-fly so iirc they don’t need .ncs

which means they use a different compiler, which has its own peculiarities … etc

just treat gui-scripts as normal scripts by and large ( but there are differences )

How exactly can you edit an NCS file?

you open the .nss on the toolset (or any script compiler) and then compile it, it will overwrite the associated .ncs, or create a new one if it doesn’t exist.
But you can’t edit them directly (bar some level 99999+ hack skillz I’m not aware of).

1 Like

Huh, thought I’d have to deal with them separately. Guess the NSS file has a real purpose after all.

If NwN 2 works like NwN as far as scripts are concerned, they also allow you to create custom versions of built-in scripts that only work for the module you create them for.


1 Like