I also have another question, so you know when creating a dialogue tree that there is a wizard icon that allows you to setup skill/attribute checks with ease? well I did one for intimidation and it doesn't work in-game, I'm quite a novice at NWN's toolset so I don't understand what's wrong, I'm also unfamiliar with NWN's scripting language, and I'd rather not take a college course on the whole thing, among other things.
I just want to make a medium-sized module that focuses a ton on characterization and dialogue, but I'm quite unskilled at this whole 'scripting' thing that encompasses a ton of NWN modules, I want my intro to be short but concise, but there needs to be quite a few scripted events that I don't know how to get down pat.
The way dialogue works is a "fall through" approach meaning that, when there are multiple responses per node, the NPC will always select the first (highest) one that qualifies. "Qualifies" means that it has no script conditional or that its script conditional returns True.
So when you set up a skill check in dialogue, you write the PC's line (e.g.
[Intimidate] "Plane tickets, bitch!") and then you write two NPC responses under it, first the pass and then the fail (e.g.
[Success] "I was just trolling, you guys!" and, respectively,
[Failure] "LOL DANCING DONUT GO BRRRR"). Now select the first line and, under the
Text Appears When, select your starting conditional script or create a new one (manually or using the Wizard). You leave the second one alone, with no conditional, so when you run the conversation, if your skill check script returns True, the NPC will go on the Success branch, or if it returns False, it'll fall through to the Failure.
An easy rookie mistake would be to load the script on the PC's line instead of the NPC's or feeding the Wizard the wrong object to check on. I write all my scripts manually so I'm not familiar with what you can screw up in the Wizard off the top of my head, but if you did put your script in the right place, the first thing you wanna do if it doesn't seem to be working is to check it actually gets called. A quick and dirty way to do that is to make it spit out whatever it's returning:
- Open the script in the Script Editor
- Right at the end, above the closing curly bracket, you'll have a line that says
return suchAndSuch;
- Backspace over the
return and type in
int iResult = so that the line now reads:
int iResult = suchAndSuch;
- Now enter a new line underneath (but above the curly bracket, that stays at the bottom and don't miss the semicolons!) that says exactly:
FloatingTextStringOnCreature("Script debug:" + IntToString(iResult), GetFirstPC());
- And underneath
that line, enter another new line that says:
return iResult;
- Hit the
Save And Compile button at the top left of the Script Editor and close it
Essentially, if the original code just returns a variable or calculation, you are changing it to store that into a new variable, display it and then return it. Now when you test your module again, when the NPC replies to that conversation node, you should see a "Script debug: " pop up above your PC followed by 1 or 0 - 1 means True, and that your scripted check has succeeded, and 0 means False.
So that would be some general scripting advice. When it comes to dialogue skill checks in particular, you should also know that BioWare included a lot of default auto-roller ones (automatically generate a DC based on your level). The tutorial you linked is a comprehensive affair, but if you're an absolute beginner you should start with the
old official BioWare tutorial and, whenever you run into a snag, it's a good idea to crack open an existing module where you remember encountering a similar function and just look at how it was handled there, Aurora's accessible enough that it's an effective approach.
You can absolutely make a decent module in Aurora without ever touching the Script Editor, but don't be afraid to engage with it. There's certainly more complex functions to it, but the basics - particularly what the Script Wizards spits out - are easy to follow along with and can help you make more interesting features later on. When you need to check something out, there's a complete and detailed API reference at the
NWN Lexicon.
But anyway, check what I said above with where you loaded your script and try the debug if that's not the problem. If you're still having trouble, you can post your script here and I'll have a look when I'm next on.