PDA

View Full Version : NPC Attacks?


Caedus
01-04-2008, 09:03 PM
Hey all,

I just signed up today because I figured it would be the only way to get help on this, so I really really hope someone can help me.

I just started modding KotOR yesterday (literally), and have managed to put in some new dialogue.

I have been working on a small little mod where in the dialogue for when you talk to Bastila, there is a line that says "I'm going to kill you, Bastila!!" (which I have managed to get in the game), and then after that she attacks you. However, I have not been able to find a script that will allow her to attack me. I have looked through the thread located here (http://www.lucasforums.com/showthread.php?s=&threadid=123618), but none of those scripts worked, which was very likely due to an error or errors on my part.

Any help is welcome... thanks...

Exile007
01-04-2008, 09:15 PM
Alright, so you're looking to have her attack you once you say "I'm gonna kill you Bastila."

Try this:

void main()
{
ChangeToStandardFaction(OBJECT_SELF, STANDARD_FACTION_HOSTILE_1);
}

Then use Kotor tool to compile in text editor.

Then in dialog editor. Go to "script to run" and type in your script name.

It should then work, but I would not recommend doing this, since the game looks for Bastila at some parts, and when it can't find her then it just doesn't trigger the cutscenes. So I would say do this for experimenting.

P.S. Good luck with your modding!

Caedus
01-04-2008, 09:20 PM
Thanks for the quick response!

I'll try that and post back.

I'm afraid it didn't work. I got in all the dialogue that I wanted and everything, but the script didn't work. I don't think I compiled it correctly. When you hit compile, you save it as a .nss, right?

Exile007
01-04-2008, 09:52 PM
Before you compile it you save it as a .nss, when it is compiled it should be .ncs. Be sure to be the script in the Override folder.

e-varmint
01-04-2008, 09:55 PM
I'm afraid it didn't work. I got in all the dialogue that I wanted and everything, but the script didn't work. I don't think I compiled it correctly. When you hit compile, you save it as a .nss, right?

You save it as .nss from notepad. Make sure you have Save As Type set to All Files. When the script is compiled, you will get a .ncs. The .ncs file is the one you want to put in your override folder (or .mod file) along with the dialog and any other modifications.

Caedus
01-05-2008, 05:58 PM
Well, the script didn't work for Bastila, however, it works for other NPC characters like Iziz the Jawa on Tatooine. I'm guessing that Iziz doesn't have attack animations because he just stood there and let me slice him up. Then when he "died", he continued standing. lol.

Thanks for the help, and I'm looking forward to modding some more... or attempting to. Heh heh.

lactose_
01-06-2008, 12:52 AM
How about:void main()
{
object Basty = GetObjectByTag("p_bastilla", 0);
ChangeToStandardFaction(Basty, STANDARD_FACTION_HOSTILE_1);
}Depending where you talk to Bastila, the tag may need to be changed.