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.

A few questions

Page: 1 of 1
 Miltiades
01-03-2006, 1:11 PM
#1
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?
 Darth333
01-03-2006, 1:33 PM
#2
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.
 Miltiades
01-03-2006, 2:03 PM
#3
Thank you very much!

I have another question: What do I fill in in the "Conditional #1" or "script that determines availability" field?
 Darth333
01-03-2006, 2:47 PM
#4
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)
 Miltiades
01-03-2006, 3:21 PM
#5
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?
 Darth333
01-03-2006, 3:31 PM
#6
no, if you don't want any conditions, just leave it blank. If you want to add conditions, just type the name of your script without the extension.
 Miltiades
01-03-2006, 3:54 PM
#7
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?
 Darth InSidious
01-03-2006, 7:22 PM
#8
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 ;)
 Miltiades
01-03-2006, 8:18 PM
#9
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).
 Darth333
01-03-2006, 8:23 PM
#10
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:
 Miltiades
01-04-2006, 7:17 AM
#11
It worked! Thanks everybody.

Edit: I almost forgot my question. (yes, another one :p) From the moment my NPC spawns, he walks towards me. How can I stop this, and make it so he stays where he spawns?
 Darth333
01-04-2006, 9:43 AM
#12
What spawn script are you using? Can you post it here? I imagine you added a command to make him walk towards your pc because normally they just stand there when you spawn them.
 Miltiades
01-04-2006, 9:52 AM
#13
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?
 rgdelta
01-04-2006, 10:04 AM
#14
nope that is the one causing it to approach you
 Miltiades
01-04-2006, 10:17 AM
#15
nope that is the one causing it to approach you

So, only that line needs to be deleted. Ok, I'll try

Edit: It worked. Thx.
 rgdelta
01-04-2006, 10:25 AM
#16
no problem
 Miltiades
01-04-2006, 11:28 AM
#17
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?
 Darth333
01-04-2006, 11:41 AM
#18
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.
 Miltiades
01-04-2006, 11:55 AM
#19
Do I still need to follow the process of that tutorial?
Because everything seems much harder now. In the tutorial there isn't any sign of Kotor Tool, and you say Kotor Tool gives you the module names.
I'm a little confused.
 stoffe
01-04-2006, 12:17 PM
#20
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.
 Darth333
01-04-2006, 1:56 PM
#21
Good to know :)
 Miltiades
01-06-2006, 8:38 AM
#22
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.
 Darth333
01-06-2006, 10:49 AM
#23
202TEl is the name of the module. Kotor 2 just uses different names than Kotor 1. Ignore the M_ part.
 Miltiades
01-06-2006, 10:50 AM
#24
202TEl is the name of the module. Kotor 2 just uses different names than Kotor 1. Ignore the M_ part.

Oh. Ok. Now I'm feeling stupid :p
 Miltiades
01-06-2006, 12:02 PM
#25
I got another problem. If I want to add a lip file in ERF builder, it says that the filename can't be longer than 16 char. Mine's 17 char.
 RedHawke
01-06-2006, 12:08 PM
#26
You will have to reduce that file's name by one character, no game file can be over 16 characters in length. ;)
 Miltiades
01-06-2006, 12:50 PM
#27
You will have to reduce that file's name by one character, no game file can be over 16 characters in length. ;)

'n' + Modprefix + VO_ID + 3-digit index + '_'

If I follow these instructions, I have 17 char. And I can't shorten it, because: The game engine is pretty strict in this regard and requires that each step be followed exactly to get it to work properly.
 stoffe
01-06-2006, 2:34 PM
#28
Shorten the name of your sound file?

You name the LIP file the same as the sound file it is supposed to provide lip-sync for (but with a .lip suffix instead of .wav of course). And you set the name of the sound file on the dialog node where it should be used. This is a Resref as well, so your sound file name cannot be longer than 16 characters at any rate.
 Miltiades
01-06-2006, 5:15 PM
#29
Shorten the name of your sound file?

You name the LIP file the same as the sound file it is supposed to provide lip-sync for (but with a .lip suffix instead of .wav of course). And you set the name of the sound file on the dialog node where it should be used. This is a Resref as well, so your sound file name cannot be longer than 16 characters at any rate.

Yeah, but I have to name my sound file according to the specification listed in the tutorial, and then I have 17 char.

Look, I have to name my soundfile like this: 'n' + modprefix (this is where it gos wrong: in Kotor1, these are 5 char.; in Kotor2, these are 6 char.) + 3-digit index + '_'. It's only the modprefix that troubles me.
 stoffe
01-06-2006, 10:28 PM
#30
Yeah, but I have to name my sound file according to the specification listed in the tutorial, and then I have 17 char.

Look, I have to name my soundfile like this: 'n' + modprefix (this is where it gos wrong: in Kotor1, these are 5 char.; in Kotor2, these are 6 char.) + 3-digit index + '_'. It's only the modprefix that troubles me.

Why would you need to name it like that? As far as I have noticed there is no hardcoded pattern that names of voiceover sound files and their associated lipsync files must follow.

You should be able to name them whatever you wish (that is a valid ResRef). Bioware and Obsidian uses a naming standard with a module identifier, speaker identifier and ID number, but this (I assume) is only to make it easier for them to keep track of what the sound files are for.
 Miltiades
01-07-2006, 7:09 AM
#31
Why would you need to name it like that? As far as I have noticed there is no hardcoded pattern that names of voiceover sound files and their associated lipsync files must follow.

You should be able to name them whatever you wish (that is a valid ResRef). Bioware and Obsidian uses a naming standard with a module identifier, speaker identifier and ID number, but this (I assume) is only to make it easier for them to keep track of what the sound files are for.

Why is that typed in the tutorial then.

Oh, well, thx for the help.
 Miltiades
01-07-2006, 7:25 AM
#32
Where do I fill in the VO ID in the DLG Editor?
 stoffe
01-07-2006, 7:40 AM
#33
Where do I fill in the VO ID in the DLG Editor?

In the VO_Resref field for each node that has voiceover. Remember to check the "Sound Exists" checkbox as well.
 Miltiades
01-07-2006, 8:05 AM
#34
In the VO_Resref field for each node that has voiceover. Remember to check the "Sound Exists" checkbox as well.


Ofcourse. It worked, thx.

(But isn't this supposed to be changed in the tutorial? In the tutorial there's described that you have to fill in 2 fields, and there's only one. Also, there wasn't typed that you had to check the "sound exist" checkbox as well. => I'm not blaming anyone, certainly not. I think you guys did a great job making all these tutorials. But sometimes, Kotor2 need to be modded in different way, which makes it hard for beginners like me to understand it, (or it's just me :) )
what makes me asking all these questions, and bothering you guys with it.)
 RedHawke
01-07-2006, 10:41 PM
#35
But isn't this supposed to be changed in the tutorial?
Miltiades,

Tutorials are not easy things to write, and what we have is what we have, as they are all done on volenteer time. Perhaps when you complete your mod, you might sit down and adapt that tutorial for TSL, being you just used it and know what needs to be fixed. ;)

We never turn down a good tutorial! :D
 Miltiades
01-08-2006, 7:36 AM
#36
Miltiades,

Tutorials are not easy things to write, and what we have is what we have, as they are all done on volenteer time. Perhaps when you complete your mod, you might sit down and adapt that tutorial for TSL, being you just used it and know what needs to be fixed. ;)

We never turn down a good tutorial! :D

There's not much that has to be changed, but I might do it. It's just that, with all the new functions Kotor Tool has, the tutorials become outdated. Ofcourse, the new Tools in Kotor Tool are there to make it easier for the modder, but if you haven't modded before, you don't always know how to begin.
 RedHawke
01-08-2006, 8:56 AM
#37
There's not much that has to be changed, but I might do it.
Excellent! :D

It's just that, with all the new functions Kotor Tool has, the tutorials become outdated. Ofcourse, the new Tools in Kotor Tool are there to make it easier for the modder, but if you haven't modded before, you don't always know how to begin.
Hence why I said this... "Tutorials are not easy things to write, and what we have is what we have, as they are all done on volenteer time." ;)
 Miltiades
01-08-2006, 9:09 AM
#38
Hence why I said this... "Tutorials are not easy things to write, and what we have is what we have, as they are all done on volenteer time." ;)

Ok, ok, I get it :D
Page: 1 of 1