Toolset Woes

The NWN2 toolset is probably one of the most frustrating pieces of software I’ve ever used. Does anyone know how to completely reset it without fully reinstalling NWN2?

Somehow, the toolset has lost the schema for the action datatype. Which, as you might imagine, makes scripting things quite impossible.

I’ve cleared out all custom content from %userDir%\Neverwinter Nights 2, nuked the AppData\Local\NWN2Toolset folder, and begun poking into the contents of %programs%\Atari\Neverwinter Nights 2\NWN2Toolset\ to see if something jumped out at me, but nothing’s solved the issue.

Edit: I’ve also tried running the toolset in administrative mode, no joy.

Advice would be greatly appreciated.

I don’t use the toolset for scripting (I use Sublime Text with NWScript syntax highlitning plugin + Skywing’s standalone compiler), so could you explain what exactly you mean by this?

Have you tried View -> Options -> Reset method?

Attempting to declare an action variable results in a compiler error: “UNKNOWN STATE IN COMPILER” for the declaration line.

SOMETHING I’ve done must have changed something else, because the second error isn’t popping up all the time anymore. I attempted to bypass the unknown state error by calling the action directly from within AssignCommand and kept getting “DECLARATION DOES NOT MATCH PARAMETERS” compile errors. That’s gone away.

So, this works (now):

void main() { 



But this errors out with unknown state for line 3:

void main () {

	action a = ActionSpeakString("string");

Edit (Because I’m Scatterbrained): Ran the view>options>reset, It was functionally the same as nuking AppData\Local\NWN2Toolset.

Well, what you are trying to make in your second example, isn’t possible technically in NWScript. You can’t declare variables or functions with the action type (but any void function can be turned into an action with ActionDoCommand()).

ActionSpeakString is actually a void. In your example, you can use a wrapper like so:

void a()

void main ()
	AssignCommand(OBJECT_SELF, a());

Ah. So the original invalid parameter error was the toolset having one of its funks and then not appearing fixed because of a combination of user ignorance and deceptive keywording and internal documentation. Thank you both for helping me solve this problem.

1 Like