Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

Help adding script

Page: 1 of 1
 Mandalore_The_Great
11-13-2008, 8:23 PM
#1
This is probably a really stupid question, but how do I add a new script into the game? I'm modding K1, in case you need to know.
 Darth333
11-13-2008, 8:27 PM
#2
What kind of script is it? What does it do? (It will help us determine what is best in your case)

This thread might also help:
http://www.lucasforums.com/showthread.php?t=183093)
 Mandalore_The_Great
11-13-2008, 8:29 PM
#3
well I wanted to make one so that I could add some new dialogue options when I talked to some of the jedi characters in Dantooine.
 Star Admiral
11-13-2008, 8:45 PM
#4
If you're looking to add dialog options, you'll first need to edit or create a new dlg file for the character in question. If I remember correctly, to determine if that particular dialog branch is available, you'll need type in the script file's name in the "Script to Determine if Node is available" text box. I don't have the DLGEditor in front of me now, but I can check it shortly later. As for the scripting itself, I'm afraid I can't help you, as I'm still somewhat of a scripting newbie. The tutorial Darth333 mentioned might prove handy.

- Star Admiral
 Mandalore_The_Great
11-13-2008, 8:52 PM
#5
so... how do I edit the .dlg file? it's probably somewhere in the KOTOR tool if I'm not mistaken.
 tk102
11-13-2008, 9:17 PM
#6
so... how do I edit the .dlg file? it's probably somewhere in the KOTOR tool if I'm not mistaken.
You can double click on any .dlg file found in KotOR Tool and that will open the Conversation Editor. Under the Node Scripts tab, it is, as Star Admiral mentioned "Script to Determine Node Availability". Scripts listed in this field look like this

int StartingConditional() {
// blah blah blah
}
These scripts return true or false as their result value and based on that, the node is made available or not.
 Mandalore_The_Great
11-14-2008, 1:35 AM
#7
I know there's a list of scripts somewhere here... anybody have the link? like what all the different scripts do :raise:
Could use a little help in figuring out how to have two pics in my signature, too. :(
 Darth333
11-14-2008, 4:41 PM
#8
Do you mean nwscript.nss ? All the functions are listed in there (it's in the scripts.bif ...use Kotor tool to get it).

you can also check the tutorials here: http://www.lucasforums.com/forumdisplay.php?f=597)
 Mandalore_The_Great
11-14-2008, 7:45 PM
#9
I meant the thread in the script section somewhere. Found it
alright then, thanks everybody. Needed the help a lot. Nothing big, just spawning some weps....
Page: 1 of 1