Script Question

Oh yeah, Geany is basically VSCode. Is there any info on setting it up for NWN2?

not that im aware of. Setting up an IDE has always been a bit mucky for me and getting the most out of Geany was too …

NWShacker wrote a syntax highlighter for it, though, and that might have some instructions/tips …

So, I downloaded the scripts, slapped the new files at the bottom of the ToB folder and replaced the bot9s_inc_levelup.NSS from the main folder, ran the advanced script compiler from console on all the scripts on ToB, fired up NWN2, started a martial character, acquired the ToB item, then ran on the console:

rs amc_make_tob
rs amc_set_tobint
rs amc_get_tobint

“It Worked”

So basically, your wai- cough compiler is trash :upside_down_face:.


Hahaha damnit! I am going to get an IDE up and running so I don’t have to deal with this nonsense. I have written miles of script for NWN1 in VSCode and not experienced anything like this. My VSCode is configured for python, R and nwscript. The JSONs are starting to get cluttered.

At least now I know that it wasn’t me making a dumb mistake. :slight_smile:


i haven’t used VSCode, but Geany has a pretty decent way of specifying different compile commands →

under Build|Set Build Commands

so you could spec. different compile commands for Nwn1 and Nwn2

eg. mine look like this →

ASC :         c:\nwn2\asc -ago -i c:\nwn2 -v1.69 %e.nss
ASC Load :    c:\nwn2\asc -aglo -v1.69 %e.nss
ASC Load OC : c:\nwn2\asc -aglo -i "C:\Neverwinter Nights 2\Campaigns\Neverwinter Nights 2 Campaign" -v1.69 %e.nss

where ASC is used to compile a script that has no #includes but does -i to access a directory where a copy of NwScript.nss resides

ASC Load tells the AdvancedScriptCompiler to load game resources -l in order to access all #include libraries (stock and override #includes)

ASC Load OC loads game resources -l and uses -i to access #includes in the OC Campaign directory


But you could reserve one of those nss command slots for Nwn1 … (etc)

1 Like


That’s way above my understanding to use at this stage … but I have found the Skywing’s AdvancedScriptCompiler plugin appears to work fine for me now. :slight_smile:

1 Like

Yeah I am almost there. I’m doing basically exactly what you are displaying, but scripting it in a JSON. (For some reason I that I cannot pinpoint I hate JSON) Is there anywhere that lists the complete list of args for the advanced compiler exe?

just run asc.exe at the system console without any args and it prints help

note i renamed the .exe on my hardrive …


hehe, am familiar with YAML and its bad enough …

Ahahaha, wow I must need coffee! Thank you, huge help as always.

Love the asc.exe. Making things as short as possible even at the expense of other people understanding it or it actually representing the command makes me think fondly of Linux/Unix. Just renamed mine to the same!

1 Like


ps. here’s my lovely little batchfile …


@echo off
echo c:\nwn2\asc -aglo -v1.69 -y

for /r %%1 in (.) do if exist "%%1\*.nss" c:\nwn2\asc -aglo -v1.69 -y "%%1\*.nss"


Compiles all .nss files in which the batchfile resides and its subdirectories.

1 Like

Nice! I added a batch option to my VSCode JSON, but that will come in handy if I ever want to compile a non-workspace directory.

It is working, but it is spitting out something with the .ndb extension along with the .ncs. Appears to be a big list of includes, constants and hex code. Any idea what that is?

EDIT: never mind. I need to have the -g arg to skip that.

1 Like

Anyone know if there is a way to make my in-game console not look like this? It would really help this process to be able to see what I’m doing.

I’ve never seen it look like that so it must be something on a mod on your end. Perhaps the font got screwed?

1 Like

Tarinth is right. I’ve had NWN2 installed almost constantly for about 15 years and I’ve never seen that one before.