Toolset Woes


#1

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.


#2

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?


#3

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() { 

	AssignCommand(OBJECT_SELF,ActionSpeakString("string"));

}

But this errors out with unknown state for line 3:

void main () {

	action a = ActionSpeakString("string");
	AssignCommand(OBJECT_SELF,a);
	
}

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


#4

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()).

https://nwnlexicon.com/index.php?title=Action_(datatype)


#5

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

void a()
{
	ActionSpeakString("string");
}

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

#6

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.