PDA

View Full Version : adding new PCs...??????


darthriddick
09-16-2006, 06:55 PM
i've followed the 10step tutorial by darth999
but when i got to the scripting part i ran up against some problems...
when i use kotor tool to compress the nss file to give me a nsc (or whatever)
file i can't find the nsc file!!!
i'm notr sure what to do i'm not an experianced modder just started like 4 weeks ago... so please any help would be WONDERFULL!!!
mabey like an demestarion or somthin...
thanx.

SithRevan
09-16-2006, 07:06 PM
First off welcome to LF:waive1:

Ok well there are a couple things that could have happened, did you notice any errors when the popup screen came up after compiling it? Also did you save it and tell the compiler it was a kotor 1 or kotor 2 script? If any of those happened or did not happen that would be your problem.

Darth Dragoon
09-16-2006, 07:13 PM
welcome to the forums.
usually the script is compiled into the override folder.

darthriddick
09-17-2006, 02:56 AM
hi! thanks for stopping by ^_* i've been on here before but that was like over a year ago soo.....

hmm no i think everything worked like it's supposed to...exept that i can't find the gorram file!
would the file change it's name when moved to override??

T7nowhere
09-17-2006, 03:34 AM
hmm no i think everything worked like it's supposed to...exept that i can't find the gorram file!
would the file change it's name when moved to override??

A what file? I've never heard of that before.

darthriddick
09-17-2006, 03:19 PM
heh. soryy i've watched to much firefly to be good for me.
it's a swear word from the hit tv series firefly.
anyway i found the GORRAM ^_^ ncs file but now little dumb me has another problem....
in the 10 step thingy by darth333 it says to attatch your ncs file to a conversation, i think i got that far but not sure how to place that conversation in the game.....
once again PLEASE HELP!!!!!!

RedHawke
09-19-2006, 02:13 AM
but now little dumb me has another problem....
in the 10 step thingy by darth333 it says to attatch your ncs file to a conversation, i think i got that far but not sure how to place that conversation in the game.....
once again PLEASE HELP!!!!!!
The how to recruit an NPC in 10 steps makes certain assumptions about your previous knowledge levels. There is no way for Darth333 to elaborate on what that means in that tutorial as there is no way for her to know where in the game you want to put the NPC in at. What she is stating is that you need to run your NPC spawn script from a pre-existing game dialog, you should set the NPC Spawn script to be run from within a mandantory game dialog file.

Example: On Manaan there is a mandantory cutscene, which is basically a dialog, between some Sith and Republic Soldiers, it only runs once as well. You would need to extract and edit that dialog file and using a dialog editor set your script to run on one of the spoken nodes/lines in that file. And when the cutscene runs your NPC will be spawned wherever you set them to in that module. But this example only works for that particular Manaan module. There are a few other dialogs in the game like this in other modules.

I'll quote myself from the other thread you posted asking how to make force powers.

Also note that the tutorials we have are what we have, please realise that many of our tutorials are written for those who have some understanding of how the game works. Hence why my advice is to always start with small mods, like items and placing them into the game, as that will build up the neccissary knowledge to start the more complicated mods. ;)

Perhaps if you elaborated on what module/place in the game you wished to spawn your NPC, myself or someone else can be of further help. :)

darthriddick
09-19-2006, 02:57 AM
ok! thanks RH!!!
i'm working on some item stuff now almost ready to out on the web!!!
but yha i'd like to try to place my npc in korraban. but just about any place would do, like the maanan thing would be great to.

Edit: i think all i need is a basic understanding of how the GFF editor

RedHawke
09-21-2006, 02:15 AM
i think all i need is a basic understanding of how the GFF editor
This is where the trying smaller mods first comes into play... partially for the enjoyment but mostly to learn the tools and how the game works.

What is the name of your spawn script?

I'll look around later on (If I have the time, mind you) and see if there is a place on Korriban to insert a script. Might be able to do it without touching a dialog, that's my personal favorite way of doing things. ;)

Edit: On Korriban, there is a place to do this...

Right when you land on Korriban there is the Sith Student torturing some NPC's if you extract that dialog file kor33_shaardan.dlg with KotOR Tool.

And using a DLG Editor open that kor33_shaardan.dlg file and on the line that says "Let me pose a question to you. These hopefuls will never survive in the academy. A lesson must be taught, here, but I am at a loss as to what form it should take." on that line it has a blank script run box, so add the name of your NPC spawn script there sans the file extension so spawnmynpc.ncs would be entered there as spawnmynpc.

Then save the edited kor33_shaardan.dlg file to your override with all the other files for your NPC. It should spawn in that module when that dialog line is spoken. ;)

You will, of course, need a save game from before you exited the Ebon Hawk on Korriban, and you will need appropriate coordinates for that module in your NPC Spawn script.

darthriddick
09-21-2006, 06:58 PM
hmm ok i'm going to post everything i've done so far.

#1 i extracted g_darkjedi03 and renamed it sithjam.uct
#2 using the KT i edited the file changed the scripts ect.
#3 i copyed this script
void main()
{
RemoveAvailableNPC(7);
AddAvailableNPCByTemplate(7, "p_dustil");
DelayCommand(1.5,ShowPartySelectionGUI());
}
into source scripts k_act_t3m3add and saved it as p_sithtalk
#4 i compiled it using KT
#5 i created (using KT) my custom dialog (p_sithcon.dlg) for adding the pc, and attached the p_sithtalk script to the "script to run for this node" area.
#6 then i attached the p_sithcon.dlg to the darth bandon conversation.

is there anything i missed? i think there was but...

the othe small problem i'm having is finding all the dialogs for the game whre are they stored? cuz i can't fnd anything like what you were talking about the only files i can find are under BIFs/templates/dialog.....
thanks for all of your help!

RedHawke
09-22-2006, 02:16 AM
hmm ok i'm going to post everything i've done so far.
That's good...

#1 i extracted g_darkjedi03 and renamed it sithjam.uct
Sounds ok...

#2 using the KT i edited the file changed the scripts ect.
Ok... make sure they are the right scripts. ;)

#3 i copyed this script
void main()
{
RemoveAvailableNPC(7);
AddAvailableNPCByTemplate(7, "p_dustil");
DelayCommand(1.5,ShowPartySelectionGUI());
}
into source scripts k_act_t3m3add and saved it as p_sithtalk
Ok, did you remember to change the p_dustil in the script to the tag of your new custom recruit?

With what you wrote above that you used sithjam that needs to go where p_dustil went, like so...
{
RemoveAvailableNPC(7);
AddAvailableNPCByTemplate(7, "sithjam");
DelayCommand(1.5,ShowPartySelectionGUI());
}
Make sure the tag, and resref in your sithjam.utc is set to sithjam.

#4 i compiled it using KT
Sounds good...

#5 i created (using KT) my custom dialog (p_sithcon.dlg) for adding the pc, and attached the p_sithtalk script to the "script to run for this node" area.
The custom dialog is what your spawned NPC says to your PC, and should be one that adds the story element for them joining the party.

But this step sounds right...

#6 then i attached the p_sithcon.dlg to the darth bandon conversation.
Ok here you lost me, you can't attach a dialog to a dialog...

The basic files you need for a recruit mod are;

You need an NPC utc file... or two (For My mod I used two, one to spawn on Manaan to talk to recruit with default settings, and the other to be actually added to the party who had the proper settings and set for the in-party dialog.)
A recruitment dialog for said NPC...
A recruit script for the NPC...
An NPC spawn script...
An edited game dlg file or script to run the NPC spawn script... (Explained above.)
Optional: An in-party dialog so your NPC has something to say when in the party.
Optional: A script to remove the spawned NPC from the area after your sucessfully recruit them (Usually placed to run on the last spoken node of your recruit dialog), it makes things more professional. ;)


Also Darth Bandon doesn't always appear on Korriban. You need to use an event that always happens for recruit mods, or else only a few will ever see your NPC. ;)

the othe small problem i'm having is finding all the dialogs for the game whre are they stored? cuz i can't fnd anything like what you were talking about the only files i can find are under BIFs/templates/dialog.....
Dialogs for the specific modules are in the various module files. To find the Shaardan dialog I mentioned above look in...

RIM's / Modules / Korr_m33a_s.rim / Dialog

:D

darthriddick
09-22-2006, 02:45 AM
right...ok. i redid everything to make sure i got i all right.
now my only problem i the dialog part..... :smash:
:ears1:
ok, so imake the custem dialog, the one were the npc i want to add talks to the pc. then i attach the script for adding the new npc to the end of the afore said dialog. now the only part i'm stuck on is #1how to put my custom dialog into the game...
how do i attach it to the shadaarn dlg???

i'm sorry for being so stoopid...but as soon as i figure this out be able to work on even more complex mods!! **and need more help too ;)**

thanx to youall whove helped me out in this my darkest hour! especially RH for being sooooo paitent!!! :coffee:
:monkey4: :3pdance: :monkey4: :clap2: :whip1:

RedHawke
09-22-2006, 03:28 AM
ok, so imake the custem dialog, the one were the npc i want to add talks to the pc.
Yup...

You know looking at other peoples recruit mods isn't a bad thing when wanting to make one of your own. ;)

then i attach the script for adding the new npc to the end of the afore said dialog.
You also will need to eliminate any possible twins... I find it better when building your dialog that you give the player an 'out' to bypass recruitment with a no thanks option. But yes, in the recruitment dialog you will need to fire the recruit script (above) and also a remove NPC script to eliminate any twins, this script is the one ran at the end of the conversation after the recruitment. It is in the walkthrough step 7.

now the only part i'm stuck on is #1how to put my custom dialog into the game...
how do i attach it to the shadaarn dlg???
You don't... you place a script to spawn your NPC somewhere in that module, you can't run the recruit dialog as without an NPC there is nothing to have a conversation with. I think you are mis-reading the tutorial.

Your NPC's utc file should have the call for the recruit dialog set in its dialog field, also it is in the spawn script... you only need to spawn that NPC utc in the area with the shaardan dialog/cutscene, the shaardan dialog only needs to be set to run a NPC spawn script (One is definitely in the walkthrough, but here is one as well.)

void main()
{
float x=-0.00f; //Whereami cordinates go here
float y=0.00f; //Whereami cordinates go here
float z=0.00f; //Whereami cordinates go here
float r=0.0f;
vector vecNPC=Vector(x,y,z);
location locNPC=Location(vecNPC, r);
object oNPC=CreateObject(OBJECT_TYPE_CREATURE,"sithjam",locNPC);
object oPC=GetFirstPC();
AssignCommand(oNPC,ActionStartConversation(oPC,"recruit_dlg_here"));
}
Be sure to put your recruit dialog tag/filename in the place of the recruit_dlg_here in the above script, you will also need to gather coordinates from within that module to enter into the script above by using the whereami cheat where you want the person to spawn.

Hence why I said you likely need two NPC utc files, one that you actually recruit with all the correct feats and skills and equipment and in-party dialog settings, and one that is a basic one that just has the recruit dialog settings.

i'm sorry for being so stoopid...but as soon as i figure this out be able to work on even more complex mods!! **and need more help too ;)**
You aren't stupid... you are biting off more than you should have at this point though, a recruit mod is very much a complex modding endeavour... it is not a beginner mod. ;)

darthriddick
02-06-2007, 12:42 AM
ok, i know this is an older thread, but i'm still interested in this so i though just starting it up again would be better than posting a new thread.

i have now, (after almost a year, gotten back into kotor modding. i still have trouble getting an NPC in the game though).

i have gotten farther into the mod but need a question answered.
after i have compleated, (using darth333's tutorial) steps 1-4.
at the moment what should happen, (i think) is my mod should make Juhani be replaced with an assissin/war droid.

the script is supposed to run in the beggining of the game, right after that duros gets killed by the sith captian.
on the duros's line, *as i said i will get rid of their body's* (or something like that)
i have put the add npc script, and have put the .dlg file, the .uct file for wardroid 5,
and the .ncs converted from .nss, files into the overide folder, with no other mods installed.

but when i get to that conversation that npc does not enter my party!

please let me know what i'm doing wrong.

(something to do with spawning the npc but i really don't get it....)

oh and also, i'm NOT using a custom DLG, i want to spawn the npc off of an existing dlg file.

thanks ~DR