PDA

View Full Version : The Art of Banter and the scripts for its


Valandhir
03-21-2007, 04:43 AM
Hi,

I know that sounds stupid, but is there a tutorial that explains more about the scripts and Global needed to trigger Banter? I read the scripts of the existing Banters already, and it looks easy enough to create some for new banters, but all these scripts start checking on a certain variable. How do I get this one set true, once the Banter has happened?
And where exactly (which folder) do I have to save the new scripts in, to work with the rest of the mod? Override?

Thanks for the help!

Valandhir

stoffe
03-21-2007, 09:40 AM
I read the scripts of the existing Banters already, and it looks easy enough to create some for new banters, but all these scripts start checking on a certain variable. How do I get this one set true, once the Banter has happened?
And where exactly (which folder) do I have to save the new scripts in, to work with the rest of the mod? Override?


With Banter you mean the talk between different NPC party members that happen when you walk past certain locations in the game (KotOR1), correct?

If so they work by having a trigger firing the script k_bant_trig.ncs when a player walks in that area. This script uses a series of global variables to keep track of if a particular banter scene has already happened. If not it will check if both the involved party members are in the group and closer than 8 meters to each other.

If everything checks out it sets that the trigger has been fired and starts a conversation with the player using the Banter.dlg file. This DLG file contains all the banters between party members. Each top entry here has a conditional script k_hbanter#.ncs. This script checks again if each scene has not already been done, and if they involved party members are there. When a banter dialog entry passes this checks that one is fired. When it is, the dialog fires another script hbanter#x.ncs which sets the global variable indicating that this particular banter has been done (which the trigger script and dialog conditional scripts check for).

So, to add new banter using the same method you could
modify the k_bant_trig script (found in scripts.bif) to add a new check.
You'll have to add a new global boolean variable to globalcat.2da to keep track of if your new scene has been played.
Then add a new top-level entry to banter.dlg which contains the conversation.
On the top node, create one conditional script that checks for the presence of your party members and that the new Global Boolean you added has not been set.
Also on the top node, create an action script that sets the same new Global Boolean to TRUE.
Then put your modified k_bant_trig.ncs and banter.dlg along with your two new dialog scripts in the override folder.


If you are creating a new area where you want a banter location you'll have to add a trigger using the k_bant_trig.utt template where you want the banter to start.