Jump to content

Home

A few questions


Miltiades

Recommended Posts

I have a few questions

 

1) I can spawn an NPC, by attaching the spawnscript to a .dlg file. If you talk a couple of times to the NPC who has that dialog, then multiple NPCs spawn. Is there a way to prevent this? (I know the best way is to just attach the script to an entry which can only been seen once in one game, but there isn't always that option)

 

2) I can't find a tutorial for making custom dialogs here. Not that it's too difficult, but I don't know everything that is needed. Both for neutral people, as for enemies. Is there a tutorial, or not?

 

3) Ok, I want to make a planet (spaceship, actually). I haven't done it before, but I saw you can do this with Kotor Tool. Should I wait for the new version of Kotor Tool, because the module editor gets some additions, or can I already start with it?

Link to comment
Share on other sites

I have a few questions

 

1) I can spawn an NPC, by attaching the spawnscript to a .dlg file. If you talka couple of times to the NPC who has that dialog, then multiple NPCs spawn. Is there a way to prevent this? (I know the best way is to just attach the script to an entry which can only been seen once in one game, but there isn't always that option)

 

 

If you want to spawn the npc only once there are several ways of doing it:

a. If you intend to keep this npc in the module all the time, then you can add a line to your script to check to see if the npc is already present in the module:

if  (!GetIsObjectValid(GetObjectByTag("my_npc_tag")))

 

 

You can also use a global variable and the game will keep track of the event.

 

void main() 
{
 int nCreatureSpawned = GetGlobalBoolean("my_global_bool");
 if (nCreatureSpawned) { return; } //exit if TRUE
 CreateObject( OBJECT_TYPE_CREATURE, "creature_template", GetLocation(GetFirstPC()) );

// now close the door so we can't re-enter
 SetGlobalBoolean("my_global_bool",TRUE);
}

 

If you use this method, You will have to edit globalcat.2da by adding a line for "my_global_bool"

 

Check this thread for more examples and info: http://lucasforums.com/showthread.php?t=143536 Note that You can also use the module on Enter event instead of a dlg file to fire your script.

 

 

2) I can't find a tutorial for making custom dialogs here. Not that it's too difficult, but I don't know everything that is needed. Both for neutral people, as for enemies. Is there a tutorial, or not?

Get tk102's DLGeditor, open an existing .dlg file, look at the file and read the readme at the same time. I think itès pretty much self-explanatory.

You will find info on .dlg files in this thread: http://lucasforums.com/showthread.php?t=143356

 

3) Ok, I want to make a planet (spaceship, actually). I haven't done it before, but I saw you can do this with Kotor Tool. Should I wait for the new version of Kotor Tool, because the module editor gets some additions, or can I already start with it?

Check if the map for the module you want to edit has been done on the new Kotor tool website (btw, Fred released a KT update yesterday): http://www.kotortool.starwarsknights.com)

 

If not, you can post a request in the kotor tool thread in the t3-m4 forum: http://lucasforums.com/showpost.php?p=1981927&postcount=1443 ;)

 

But, you can always make your own modules and edit the .git file with tk102's K-gff: http://www.lucasforums.com/showthread.php?s=&threadid=149407 (you will need my whereami armband to get the coordinates for your npcs and placeables in kotor 2: http://www.lucasforums.com/showthread.php?s=&threadid=144260)

 

There are two area editing tutorials around: one made by Doom_Dealer and another one made by Gameunlimited. They are a bit outdated but if you end up using the 3rd method, you will certainly find them very useful. Use the search function to find them.

Link to comment
Share on other sites

The Conditional fields determine the availability of a reply/entry

 

You can insert several checks here: sex, skills, appearance, level, accompanying npcs, equipment, plot advancement, available credits etc.

 

Check my posts in these threads to more detailed explanations as well as some examples:

 

http://www.lucasforums.com/showthread.php?t=154032

http://www.lucasforums.com/showthread.php?t=154242

http://www.lucasforums.com/showthread.php?t=153890

Link to comment
Share on other sites

Is it necessary to fill anything in that field for the dialog to work?

 

Because I don't want the dialog to have any requirements (for now).

 

What I later want to do, is: 1) The NPC comes towards you and talks to you, first saying you aren' strong enough and that you have to come back later.

2) When you're strong enough, he gives you a mission. So that means he talks to you, but still there's a requirement for another part of his dialog that will unlock when you're stronger.

 

But that's for later, now I only need a dialog that works, an NPC who talks to you, and then fights you or just keep standing there after the conversation.

Do I need to fill in something in the conditional field for that?

Link to comment
Share on other sites

Ok. That wasn't so difficult.

 

Well, at least when the NPC is friendly. When I chose, in the creature Editor, for the NPC to be hostile (hostile_1) then he isn't there. When I chose hostile_2, he's there, but he attacks me, instead of first talking. What's the problem?

Link to comment
Share on other sites

Make him change faction afterwards with a script in his dialogue, don't make him hostile on spawn, which is what you are currently doing. There is a sample script like this in the excellent module editing tut by Doom_Dealer, which would be very helpful for the kind of thing you are doing ;)

 

Do you how to make that script? I found this in the tutorial, but i don't know if it's correct.

 

void main()

{

ChangeToStandardFaction(OBJECT_SELF, STANDARD_FACTION_HOSTILE_1);

}

 

Anyways, thank you, but the tutorial is quite old, I don't use any of the programs he uses, because it has al been made easier (or so I think, i never used the other programs). I only use Kotor Tool and DLG Editor (for now).

Link to comment
Share on other sites

Do you how to make that script? I found this in the tutorial, but i don't know if it's correct.

Yes, it's correct

 

 

Anyways, thank you, but the tutorial is quite old, I don't use any of the programs he uses, because it has al been made easier (or so I think, i never used the other programs). I only use Kotor Tool and DLG Editor (for now).

Count you lucky...I remember too well when when the only available tool was a gff editor more or less...just imagine doing all the dialogues with this (that was before Doom_Dealer's tutorial) :xp:

Link to comment
Share on other sites

void main()

{

//do a whereami cheat to get the coordinates of the location

//where you want the npc to spawn

float x=156.47188f;

float y=137.56346f;

float z=1.92204f;

//unless you want something specific, forget about orientation

float r=0.0f;

vector vecNPC=Vector(x,y,z);

location locNPC=Location(vecNPC, r);

//insert your npc tag instead of dan26_duncan. Don't remove the quotes.

object oNPC=CreateObject(OBJECT_TYPE_CREATURE,"My_NPC",locNPC);

object oPC=GetFirstPC();

AssignCommand(oNPC,ActionMoveToObject(oPC));

//replace man26_duncan by the name of the dlg file the npc is supposed to use

AssignCommand(oNPC,ActionStartConversation(oPC,"daraala"));

}

 

I see the problem, can I just delete the line "AssignCommand(oNPC,ActionMoveToObject(oPC));", or is there more I need to delete?

Link to comment
Share on other sites

Guess what, I have another question :p

 

I'm using the tutorial "Adding voice and lipsync to a custom dialog", and I'm already stuck on step 1.

 

If you do a "whereami" cheat code in-game this is the part

of the Module Name that starts with 'm' followed by 2 numbers and 2

letters. (Example: if whereami shows module name kas_m23aa then m23aa

is the part you're looking for.) If you are using a custom-made mod, it

is the first 'm' followed by 4 characters.

 

This works for Kotor1. But in Kotor2, there isn't an 'm' in the Module Name. What now?

Link to comment
Share on other sites

It doesn't matter. You don't need to do this anymore. Kotor tool gives you the module names ;)

 

and just name your .lip file the same as your sound file and when you package it in a .mod file, use the same name as your module: if your module name is mymodule.mod, then your .lip files should be in mymodule_loc.mod.

Link to comment
Share on other sites

and just name your .lip file the same as your sound file and when you package it in a .mod file, use the same name as your module: if your module name is mymodule.mod, then your .lip files should be in mymodule_loc.mod.

 

In K2:TSL at least you don't need to put the .lip files in a separate .mod file if you make a custom area. You can pack them in the same mod file as the rest of your files for the area.

Link to comment
Share on other sites

It doesn't matter. You don't need to do this anymore. Kotor tool gives you the module names ;)

 

Can you give an example as to how Kotor Tool gives the module names. I only see 202Tel for example, but in the tutorial, I see it has to be an 'm' first.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...