Jump to content

Coding Questions

Recommended Posts

Domi, sorry for the off topic, but I am starting learning about NWN2 scripting just in these days and maybe I have misunderstood the whole thing.

From what I've read so far, you can trigger dialogues with a script that checks several things (ie: the state of a quest, the presence of an item in the inventory, your influence with a companion, one of the abilities, etc). But from what I've understood in your last post, you are saying that the only way of triggering a dialogue is by adding it to an existing one. So is it impossible to say, "ie: Casavir would start this dialogue only if 1) the PC is a female, 2) the trial quest is ended, 3) the PC has at least 10 points of influence, 4) they are at the Flagon" ?


Have I misunderstood everything about scripting? I am confused o_O

Link to comment

Yes, you can write a script like this (baring the "they are in the Flagons" check, there is no in-built gc script for specific area, though I am sure you can write one; they do not need it because they trigger off the area anyway), just like in the Infinity, but to make the script RUN, you have to place a trigger in the area with that script attached to it. Then as the character literally *walks* into it, the script runs, and the character starts speaking. With Bishop, trying to run dialogues off the scripts with the delay ended up badly, lots of talks got dropped, game just overwhelmed those weak scripts. Hence we went with the default ga_start_convo off a dialogue. It is more robust.


In Infinity, you had timers and character-specific scripts. So, the script on the character run, checking the timers and conditions, and if they were met, the character fired a talk. Or it could be triggered from the areal script.


Aurora is more complicated, it has a lot of scripts attached to a character, but there are no timers, and heart-beat scripts are not as powerful as they were in Infinity. They went for area triggers, that's the relaible ones.


NWN2 is friendly to make your own mods, not to modify the existing game. Not that Infinity was, but the modding software for Infinity was written by the users, specifically for that purpose, so it's adapted to modding the game.


This thread might have more: http://forums.gibberlings3.net/index.php?showtopic=12589


Have fun learning to mod :blush:

Link to comment

1) thank you for the "splitting", so I can ask some further questions :-P

2) I supposed script were triggered entering the area... but in a different way. I supposed that each time you enter an area, all the scripts area-releted would start. Maybe an example would help.


This is what I had understood:

Let us suppose that our party, the PC + 2 companions (Kelgar and Neeshka) enter the Flagon.

As soon as the area (Flagon) loads, some scripts start their execution.

a) check area script: "are we in the Flagon? yes"

b) check quest script: "have the characters finished the quest X? yes"

c) check item script: "is it item Y in the inventory of someone? yes"

logical AND => then do the thing Z (ie: trigger a dialogue)


From what I've understood now from your post:

As soon as the characters enter the Flagon, they must to walk into a specific are to get the same dialogue initiated. Is it correct?


I am going to read the thread you linked, but I really would like a comment on my previous examples.

And another question:

has anyone tried to create a "they are in the Flagon-check" script?

Link to comment

Ok, new question. I read the other link you gave me and now I have another curiosity.


You said (in the other thread) that there's a big problem in adding new NPCs in the game, due to the lack of several scripts. But from what I've seen around, there's a mod ("dark soul" or something like that) that adds Bishop in the entire MotB, with a new area (I suppose to bring him off the wall... I haven't finished the OC yet, so I haven't even tried it) and also many dialogues.

So, combining the two things (what you said in the other thread and the things added by this mod) I suppose the person who created it, had solve the problem.


Could be correct? Because if this is the answer, I could ask him/her about the script, maybe s/he has already written one...

Or in your opinion is there another way to add a character?


Hope I was able to express my question in a comprehensible way! :-P

Link to comment

Oh, don't worry! I have asked in the bio forum and I am finally seeing the light at the end of the tunnel :-D


But I suppose it would take a lot longer for writing the script able to trigger time-related dialogue! But I am working on it :-)

Link to comment


This topic is now archived and is closed to further replies.

  • Create New...