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.

How to get item

Page: 1 of 1
 LordRevan999
01-22-2008, 2:40 AM
#1
I have made a new reskined armor of bendakstarkiller.I have used his utc file to change his appearance to the reskined armor I made.Now my question is how do I make that hutt(which ever is his name in the arena)give bendak's armor to pc when bendak dies I know there was mod like this but can you still tell me how can I do this stuff.
 Stream
01-22-2008, 2:51 AM
#2
Hey there, compile this script and attach it to the Hutt's dialog sometime after defeating Bendak, either when you collect the credits of when you talk to him to do the next fight. - It's been a while since I've played this part of the game and I can't remember when you fight Bendak.


void main()
{
object oPC=GetFirstPC();

CreateItemOnObject("Tag_Of_Armour", oPC);

}

--Stream
 LordRevan999
01-22-2008, 2:59 AM
#3
And how do I compile a script.And from where can attach the script with hutt's dialog.
 Stream
01-22-2008, 6:10 AM
#4
There are many ways to compile a script, I personally use TSL Patcher as I use it to edit 2da and journal files, this thread explains how to compile scripts and the tools you need http://www.lucasforums.com/showthread.php?t=143681).

As for attaching the script to a dialog, use DLG Editor and look at the nodes, when you find the right one just enter the script name, without the extension, into the 'script that fires when spoken' field.

--Stream
 LordRevan999
01-23-2008, 10:50 AM
#5
Alright I read the tutorial and I like to use the kotor tool method of scripting,but as always problems come,I opened the text editor from kotor tool and then chose script for K1.But now at the bottom right corner a list box is present and there are functions so how do I find that which function would give me a script similar to the one deadly stream posted above.
 Stream
01-23-2008, 11:34 AM
#6
If you scroll down you'll see the CreateObject function if you double click it, it will add that function into the script but you don't actually have to do that, just copy what I put above and paste it into the text editor, all you have to do is add the tag of the armour into the script and compile it.

--Stream
 LordRevan999
01-23-2008, 11:44 AM
#7
I have compiled it and now how do I attach that to the nodes or whatever you were saying.And another question is there a site or link where I can find all the scripts like the one above.

By the way I just tried the other method of creating the script by clicking on the CreateObject Function It gives me something like this: "CreateObject("So if I want to use this method what should I write next to the "(".
 Marius Fett
01-23-2008, 11:51 AM
#8
To attatch it to a dialog node open the dlg file in DLGEditor.

Find the node you want it attatched to click it and enter the script name in the Script that fires when spoken field.
 LordRevan999
01-23-2008, 11:56 AM
#9
Can you give me a pic of what you are telling I can't just seem to understand that nodes stuff.
P.S=What is a node?
 Stream
01-23-2008, 1:42 PM
#10
Here's two images of DLG Editor in action, one is for KoTOR and the others for TSL.

In both cases the Red text is what the NPC says and the Blue is the PC.

KoTOR
http://www.deadlystream.com/Images/KT1.jpg) (http://www.deadlystream.com/Images/K1.jpg)

TSL
http://www.deadlystream.com/Images/KT2.jpg) (http://www.deadlystream.com/Images/K2.jpg)

Click on the images to view the bigger image.

--Stream
 Marius Fett
01-23-2008, 2:01 PM
#11
Whoever wrote that dlg file spelt taught wrong :lol:
 Stream
01-23-2008, 2:26 PM
#12
That was me and you're right, well spotted mate - I haven't got around to double checking yet but I'm not looking forward to it, I have a bad habit of not looking at the screen when I'm writing, no matter how hard I try I can't get out of it.

--Stream
 Marius Fett
01-23-2008, 2:55 PM
#13
Keen eyes... :D
 LordRevan999
01-24-2008, 4:35 AM
#14
I have opened dlgeditor but how and where can I find my dlg file so I can open it.
 Stream
01-24-2008, 5:21 AM
#15
You have to extract them with KoTOR Tool first, for K1 they're in the s_rim file of the module and for TSL they're in erf>modules>modulename.

--Stream
 LordRevan999
01-24-2008, 7:39 AM
#16
I found the dialog I want to edit but the line of ajurr the hutt already has a script's name in the script that fires when spoken.So what should I do.And I also want to edit that line to add some words how do I do that.
 Stream
01-24-2008, 9:23 AM
#17
So you can have both scripts running on the same node, use this code for your script;

void main()
{
object oPC=GetFirstPC();

CreateItemOnObject("Tag_Of_Armour", oPC);

ExecuteScript("Original_Script_Here", OBJECT_SELF);

}

And attach that to the node - now both your script and the original will fire from the node.

As for changing the text, delete whatever is in the StrRef field and replace it with -1, now the text area below it will be empty and you can type whatever you'd like in there.

--Stream
 LordRevan999
01-24-2008, 4:56 PM
#18
I did what you said but that string ref part is not working.I change it to -1 and then write what I want then I save it and close dialog editor and then when I open it again or check in the game it is not there but the old original line is present.
 Stream
01-25-2008, 2:42 AM
#19
Sorry I forgot about this part, once you've changed it you have to click on another node before saving or closing do the changes don't take effect.

--Stream
 LordRevan999
01-25-2008, 6:05 AM
#20
OK worked thanks by the way where can I find other scripts as there are many I think.
 Stream
01-25-2008, 10:32 AM
#21
What kind of scripts are you looking for? The best way is to take a look at the source scripts in the KoTOR Tool bif sections. Another good place is to look through nwscript as it has all the script functions, if you take a look through there you'll see that the script above is 135 in nwscript.

--Stream
 LordRevan999
01-25-2008, 10:54 AM
#22
Um,what is nwscript?
 Stream
01-25-2008, 11:37 AM
#23
You'll find it in the source scripts section of KoTOR Tool or with any script complier.

--Stream
Page: 1 of 1