PDA

View Full Version : Help with dialogues! :)


Ravager
12-22-2007, 06:40 AM
Hello!

Im new in this forum. I like Kotor very much, so i try modding.

I want to make new NPC and dialogue on Onderron. I found very much tutorials, but i cant do it ;) I have .utc file of my character, and .dlg file, but i dont know how can i add this to game. Can you help me?

PS: Sry for my English ;)

Marius Fett
12-22-2007, 09:24 AM
You can either spawn your NPC using a script or by adding him/her to the CreatureList in the .git file for the module you want it in.

Ravager
12-22-2007, 12:23 PM
I have syntax error when i try to compile script :/

Marius Fett
12-22-2007, 12:58 PM
What's the script you are using?

Ravager
12-22-2007, 01:36 PM
// Generated by jmac7142's KotOR Script Generator
// Spawn Creature / Open Merchant

#include "k_inc_debug"
#include "k_inc_utility"

void main()
{
float x = -4.91913;
float y = 110.52753;
float z = 12.74434;
float r = 242.17688;

vector vCre = Vector(x, y, z);
location lCre = Location(r, vCre);

object oCre = CreateObject(OBJECT_TYPE_CREATURE, "g_sithcomm01", lCre);

}

Sorry i have "dd.nss(15): Error: Type mismatch in parameter 1 in call to "Location".

Marius Fett
12-22-2007, 01:51 PM
Try

void main()

{

object oCre = CreateObject(OBJECT_TYPE_CREATURE, "g_sithcomm01", lCre);

float x = -4.91913;
float y = 110.52753;
float z = 12.74434;
float r = 242.17688;

vector vCre = Vector(x, y, z);
location lCre = Location(r, vCre);


}

It may or may not work and since i'm no scripter I can't be of much more help if this fails :)

Ravager
12-23-2007, 02:06 PM
I compiled it:



void main()
{
CreateObject(OBJECT_TYPE_CREATURE, "g_sithcomm01", Location(Vector(-5.26764,109.80170,12.74003), 0.0));
}

But NPC doesn't appear :/

Marius Fett
12-23-2007, 02:11 PM
Did you remember to attatch it to the dialog and remember to put the .ncs in your Override and not the .nss?

Ravager
12-23-2007, 05:30 PM
attatch it to the dialog?

darthriddick
12-23-2007, 06:48 PM
Say you named your script blahblah.nss. Once you compiled that script using the kotor tool, you would have a file called blahblah.*ncs*.

Then you open a dialog (.DLG) withing the modual you want to spawn your NPC. (this dialog must be a pre-existing dialog, preferably one that only fire ONCE).

Now enter the name of the new script you created (blahblah) into the (script that fires when spoken, or script #1 field).

that should allow you to spawn the NPC.

let me know if that worked.

Ravager
12-24-2007, 04:12 PM
Ok i added NPC to the CreatureList. Thanks