PDA

View Full Version : Triggering Custom Scripts


StormTrooper789
06-18-2004, 11:57 AM
I need some good information about Triggering custom made scripts. Like in dialogue is what I mean because I want to use my cool scripts. So can somebody give me a brief tutorial on this? I'm kind of a noob but I know alot of other things about Modding KOTOR. Please Reply.

Darth333
06-18-2004, 12:59 PM
Calling a script from a dialog is very easy:
You can use either a gff editor or dlg edit.

DLG edit:
If you open the dlg file with DLG edit you'll see a menu that contains EntryList and ReplyList ( I think Entry is no. 5 and reply is no. 6 ). The entry list is what the npc says and the reply list is for the pc. Open one of the two, select the dialog branch you want to attach the script to and press enter. Then select the field called "script" and type the name of your script. Press enter: the script name should now appear beside the field called script. Save your file and test.
Screenshot:http://img47.photobucket.com/albums/v144/Darth333/?action=view&current=dlgedit.jpg

GFF editor:
Same thing: you'll see and EntryList and a ReplyList. However, unless you typed custom entries and replies, you wont be able to see the text that is spoken. You can view the .dlg file (but not edit) with KT. Just press ctrl and double click.
Select the dilaog branch you want to attach the script too and type the name of the script you want to attach to the dialog.
Screenshot GFF editor (the screenshot was taken using the custom made GFFeditor) :
http://img47.photobucket.com/albums/v144/Darth333/?action=view&current=gff_script.jpg

With Bioware GFF Editor:
http://img47.photobucket.com/albums/v144/Darth333/?action=view&current=gff_script1.jpg

(links for GFF editor and DLGedit provided in my sticky): Guide for the newbie: how to install mods. /What tools do I need to start modding? (http://www.lucasforums.com/showthread.php?s=&threadid=129789)

Hope this helps :)

tk102
06-18-2004, 04:28 PM
If you like reading ( ;) ) take a look at the readme.txt with DLGEdit as well as Bioware's own documentation at http://nwn.bioware.com/developers/Bioware_Aurora_Conversation_Format.pdf

You can also do script-y things in the StartingConditional scripts that are attached to the Active field in the StartingList, EntriesList, and RepliesList. But for the most part, you'll want to execute a custom script in the Script field of EntryList and ReplyList structs as Darth333 mentioned.

tk102
06-18-2004, 04:47 PM
What are the ways to trigger custom scripts in the game...
[list=1]
Dialogs: conditional and normal
Armbands (via spells.2da)
Droid Utilities (via spells.2da)
Force Powers (via spells.2da)
Trigger objects
Creature objects (OnSpawn and UserDefined)
Module.ifo -- various conditions that can occur on a module-level
[/list=1]

I'm sure I'm missing some.

Darth333
06-18-2004, 05:57 PM
Originally posted by tk102
I'm sure I'm missing some.
.are file :D
-->OnEnter
-->OnExit
-->OnHeartbeat
-->OnUserDefine

tk102
06-19-2004, 01:30 AM
And Door Objects (.utd) files have a variety of script events. Also Merchants (.utm) have a OnOpenStore script event.