lfnetwork.com mark read register faq members calendar

Thread: How to recruit an npc in less than 10 steps
Thread Tools Display Modes
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Old 07-16-2004, 10:57 PM   #1
Darth333
Administraterror
 
Darth333's Avatar
 
Status: Administrator
Join Date: Feb 2004
Location: In my secret dungeon...
Posts: 8,292
Arrow How to recruit an npc in less than 10 steps

This is a tutorial on how to make your own recruitment mod:

1. Tools:
Kotor tool
Gff editor (I'll use Bioware's GFFeditor for this mod) edit (10-03-2004): now you can do most of this job with Kotor tool
Graphic application that supports the .tga extension ( to add a portrait to the party selection table: otherwise, you can recruit the npc but his portrait will be black)
Notepad
HazardX script compiler

2. Make your custom dialogue: use Kotor tool integrated dialogue editor or tk102's wonderful DLGeditor

3. For more info concerning dialogues, read this post of mine.

Check the Guide for the Newbie sticky to get all and the tools and for instructions on how to use them.

2. Making the mod:

step 1 --> extract the .utc file for the future recruit:

Select the npc you want to recruit. Extract the corresponding .utc. Since it is easier to work with an example, I will use Dustil ( you can download the mod at http://www.pcgamemods.com/u/3451/ - pls use my website only if you are unable to access pcgamemods: it is a 2.7 MB download - because of the sound files - and I have limited bandwidth. If I exceed it, then the site is down for a couple of hours ). I included the source code in the download. I strongly suggest that you follow this tutorial with the mod in hand.

For Dustil, I extracted: kor35_dustil.utc

Then rename the file: for dustil, i used p_dustil.utc. The name doesn't matter as it won't appear in the game. You could name it hello_holowan.utc and it would work, as long as it is a unique name (not used by the game). However, I recommend you use a name that will permit to identify the file easily. The reason why the name has to be unique is that it you simply use g_sithtroop002.utc (for a sith trooper), you'll end up overwriting everysingle g_sithtroop002.utc file in the game. Not only you'll have a ton of new friends (you'll see later, we will change the faction and behavior of the npc to that of a party member) but the game may crash when you reach certain points.

For Dustil, I extracted: kor35_dustil.utc

step 2 --> edit the utc file for the future recruit:

Open the .utc file with GFFeditor.
Now, we will edit the following fields (note, the present tutorial also covers editing .utc files for custom made npcs. However, it covers only the basics of making a recruitment mod. You can edit class, feats, inventory, etc. in the utc file but it is not covered here):

a) AppearanceType: the number at the side , corresponds to yor npc's appearance row number in apprerance.2da. For Dustil, it is 432. Put the number corresponding to the appearance of the npc (in short, you will use this only if you recruit a custom made npc)

b) then go down to the conversation field: type the name of the dlg file (without the extension) . Per example, for dustil i wrote p_ductilc: which is the name of the .dlg file that will be used by ductil once recruited.

c) FactionID field: set it to 2 which is the faction id for party members.

d) FirstName: This is the name that will appear on top of your npc's head when you paly the game. If you want to change the npc's first name (useful for custom made npcs) , put -1 in the top box (this means you are not referring to an entry no. in the .tlk file) and , if you have the English version of the game, 1 in the lower box. For other laguages, type one of the following numbers in the lower box:

Language ID
English 0
French 1
German 2
Italian 3
Spanish 4
Polish 5
Korean 128
Chinese Traditional 129
Chinese Simplified 130
Japanese 131

e) you may also alter the ForcePoints and GoodEvil fields ( for force points, take your npc's level into consideration and for GoodEvil:100 is 100% good and 0 is 100% evil )


f) Last name: works the same way as as first name but it is the last name of your npc...

g) portrait id, this number will correspond to the row of your npc's portrait in portaits.2da file (this will bu used to make the portrait appear in the party selection table) . You may leave it blank for now unless except if you are not using any ither recruitment mod. If you are not using any other recruitment mod, then type 41, the original portraits.2da stops at 40)

h) the scripts: this will define your npc's behavior. You want your npc to follow your pc and to react like a party member and not like an ennemy during battles, etc...

Replace k_hen_blahblah by k_def_blahblah as follows in the following fields:

ScriptAttacked --> k_hen_attacked01
ScriptDamaged --> k_hen_damage01
ScriptDialogue --> k_hen_dialogue01
ScriptEndRound --> k_hen_combend01
ScriptHeartbeat --> k_hen_heartbt01
ScriptonBlocked -->k_hen_blocked01
ScriptonNotice --> k_hen_percept01
ScriptSpawn --> k_hen_spawn01

Delete the entries in the other script fields.
Example

i) go to the tag field: type the tag of the npc you want to replace: (don't use a custom tag or the game will crash when it doesn't find the original npc when it was supposed to talk or do something )


T3M4: T3M4
Canderous: Cand
Mission: Mission
Jolee: Jolee
Juhani: Juhani
HK-47: HK47
Bastila: Bastila
Carth: Carth
Zaalbar: Zaalbar

j) go to the TemplateResRef field and type a custom Template ResRef for your new npc: could be new_npc (i recommend using a name that will allow you to regognize the npc easily - it will not be seen in game but if you type hlf_f8fsrdfs you'll have probelms remembering what to type later on...)

k) save and close the utc file.


step 3 --> the script:

This is the script that will tell your game to recruit your npc.

Open notepad and paste the following script:
Code:
void main()
{
   RemoveAvailableNPC(7);
   AddAvailableNPCByTemplate(7, "p_dustil");
   ClearAllActions();
    DelayCommand(1.5,ShowPartySelectionGUI());
}
In RemoveAvailableNPC, number 7 will replave t3m4, for other npcs, use one of the following slot numbers:

BASTILA = 0
CANDEROUS= 1
CARTH = 2
HK_47 = 3
JOLEE= 4
JUHANI= 5
MISSION= 6
T3_M4 = 7
ZAALBAR = 8

In AddAvailableNPCByTemplate(7, "p_dustil"), also replace number 7 by the slot number of the npc you want to replace and replace p_dustil by the TemplateResRef you usedin the .utc file.

Save the script as "recruit_npc.nss" (or whatever name you wish as long as it has a .nss extension - for dustil , the script is : 'dus_recruit.nss' - ) and compile with HazardX's script compiler. For instructions and troubleshooting concerning the script compiler, read this thread: http://www.lucasforums.com/showthrea...ostid=1555923. COMPILING YOUR SCRIPT IS MANDATORY. YOU CANNOT BYPASS THIS.

Once compiled, you should now have an new .ncs file - example the dustil mod gives you 'dus_recruit.ncs' (if you followed the instructions in the script compiler thread, the compiled script (.ncs file) should be placed in your override folder.

You could also give the player the option to recruit whoever he wants. See this post and the following: http://www.lucasforums.com/showthrea...79#post1579579

step 4 --> attach the script to a conversation:

To recruit your npc, you need to attach the script somewhere in order to fire it. The best bet is to attach it to a conversation (dlg file).
Open the dlg file with GFFeditor or TK102's dlg edit and select and entry or a reply. In the script field of that entry, type the name of your script without the extension anme in the field entitled script. Per eaxmple, in the Dustil mod, the script is attached to Entry no. 104 in the kor39_utharwynn.dlg file. Note, contrary to DLGedit, you wont be able to see the text with Gff editor so you will need to knoe the exact Entry/Reply number to which you want to attach the script to. You can view (BUT NOT EDIT) a dlg file with Kotor Tool: select the dlg you wish to view in the RIMs and press ctrl + double click. You should see something like this: http://img47.photobucket.com/albums/...h333/dlgkt.jpg
example BiowareGFF
example customGFF
With dlg edit the procedure is similar: example DLGedit.

step 5 --> edit the apprearance of your npc:

If you want your npc to be able to wear armors and robes, you have to edit appearance.2da with Kotor Tool.
I suggest you follow the BIFs section in T7's tutorial concerning editing appearance.2da: http://www.map-review.com/index.php?...ial_view&id=28
In any event, look at what i did in the appearance.2da file for the Dustil mod: compare row 432 in the original file and the file included in my mod download. I edited the columns from modela to texj. (model is for model and tex is for texture...but do I need to explain this...)
Look at the row number of the apprearance. If you need , reopen the utc file and change the row number corresponding to your npc's appearance in the apperance field (number 432 for Dustil).

step 6 --> take a photo of your npc :

You can now test your mod. Go to the game and test it, recruit your npc, select your new npc in the party selection table and take screenshot of your npc while in game, open it with a graphic application suc as photoshpop or paint shop pro (it has to support the .tga extension) and make a 64 or 256 pixels square, per example, and save at 32 bits. Check this thread for a state of the art explanation: http://www.lucasforums.com/showthre...hlight=sv%F6sh.

Save your image as po_blahblah.tga ( for dustil, i used po_dustil.tga)

Then, go to the portrait.2da file and add a new row:
If you don't know how to add a new row to a.2da file, look at this thread: http://www.lucasforums.com/showthrea...hreadid=130290

In the baseref column, type the name of your .tga file (po_blahblah) without the extension. Then, in the "appearance number", "appearance_f" and "appearance_s" colums, enter the row number of the appearance.2da file corresponding to the appearance of your npc. Race, normally it's 6 but check the "Race" field in your npc's .utc file just in case. screenshot of portraits.2da modifications in the dustil mod

Save and close (before saving, just click on another row you'll loose your new row). Check the portrait.2da file in one of my recruitable mods to see how it's done.

Finally, open the utc file with GFF editor and in the field entitled portraitID, and check the number of the row you just added to the portrait.2da file (per example 41).

Step 7 --> eliminate "twins" :

If you are recruiting an npc that is already used by the game, you may want to use an additional script or you may end up with twins. If you look at step 1 of this tutorial, you'll remember that we extracted the original .utc and renamed it. For the game these are two different objects, even if they have the same appearance. So when you recruit the npc, the original npc will still be there and you'll end up with 'twins". In order to avoid this, you can use the following script which will destroy the original npc on place: (note: don't look for this in the Dustil mod, it's not there. I made him run away instead of destroying him on place )

Code:
void main() 
{
ActionPauseConversation();
object oGoodbye;
oGoodbye = GetObjectByTag("my_npc_tag");
SetGlobalFadeOut(1.0, 0.5);    
DelayCommand(1.0, DestroyObject(oGoodbye));
DelayCommand(1.0,SetGlobalFadeIn(0.7,0.0));
ActionResumeConversation();
}
oGoodbye = GetObjectByTag("my_npc_tag"); (leave the quotes there) and replace my_npc_tag by the tag of the original npc in the the game. OPen the .utc file of the original npc in the game with GFF or Kotor tool, for Dustil the .utc file is named kor35_dustil.utc, and check the tag field. For Dustil the tag is also kor35_dustil but the name of the file does not always correspond to the tag field so always check.

Save with an .nss extension, compile and attach to dialog (do this at the very end of the conversation with the original npc or you'll ran into trouble if he disappears permanently before the end of the conversation).

Additional stuff:

What you can do with a recruit mod is infinite. You can add sound, conditions upon which the npc will be recruited, sidequests, journal entries, experiance points, etc. : these have all been covered at holowan labs and look at T7's stickcy Do you want to start modding? Then start here..
Therefore, there is only one more thing I will add: If you want to recruit a custom npc and want to spawn him somewhere before recruiting it.

You need another custom .utc file. Extract a .utc file from a similar npc in the game (not the apperance but in characteristics - it's easier to simply change the appearnace number than re-edit all the stats). This is a new npc for the game so give it a new name. For the purpose of this tutorial , we will call it not_recruited_yet.utc

a) Change the AppearanceType filed to the row number you wish in appearance.2da
b) then go down to the conversation field: type the name of the custom dlg file (without the extension) . ër example, not_recruited_speaks
c) FactionID field: set it to 5 which is neutral (if you set it to 1, you'll only have a battle and no dialog so no possibility to recruit).
d) FirstName: This is the name that will appear on top of your npc's head when you paly the game. Refer to the 1st part of this tutorial
e) Last name: works the same way as as first name but it is the last name of your npc...
f) the scripts that define the npc's behavior should be already set if you did not first extracted an original party member .utc
g) go to the tag field: type a custom tag. example "not_yet_recruited"
j) go to the TemplateResRef field and type a custom Template ResRef : you can use the same name as the tag, "not_yet_recruited"
k) save and close the utc file

Spawning: use the following script:
I'll use the Spawn Deadeye Duncan on Manaan Mod as an example. I uploaded the mod at pcgamemods but forgot to include the source. Here you have a complete package that includes the source code: http://mars.walagata.com/w/darth333/duncan_source.zip

Spawn script: paste in notepad, make apporpriate changes, save as an .nss file and compile:
(originally made by tk102)

Code:
void main() 
{
//do a whereami cheat to get the coordinates of the location 
//where you want the npc to spawn
float x=0.00f;  
float y=0.00f;
float z=0.00f;
//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,"dan26_duncan",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,"man26_duncan"));
}
Attach the script to a mandatory conversation - there are other ways of doing it but this is the most simple way: the idea here is to get you started - branch in the game, located in the same module you want to spawn the npc. Per example, when you first arrive on Manaan, a conversation begins with a republic officer. I attached the script to Entry no. 4, which is not being repeated (thus no problems spawning a new deadeye Duncan everytime you speak to the officer and no need to add anything else to the script.

Feedback always appreciated. If you feel some points are not clear or if i forgot something, just say so and I'll complete the tutorial.

Last edited by Darth333; 10-03-2004 at 12:44 PM.
Darth333 is offline   you may: quote & reply,
Old 07-16-2004, 11:22 PM   #2
Achilles
Dapper Chimp
 
Achilles's Avatar
 
Join Date: May 2004
Posts: 8,204
Helpful! Veteran Modder Forum Veteran 
Re: How to recruit an npc in less than 10 steps

Quote:
Originally posted by Darth333
Feedback always appreciated. If you feel some points are not clear or if i forgot something, just say so and I'll complete the tutorial.
Other than a few broken links and misspelled entries (see the Tag for T3-M4 in section 2-i for an example) this is great! I wish this was around about a week ago, this would have made things much easier =)

Great work!
Achilles is offline   you may: quote & reply,
Old 07-16-2004, 11:43 PM   #3
Darth333
Administraterror
 
Darth333's Avatar
 
Status: Administrator
Join Date: Feb 2004
Location: In my secret dungeon...
Posts: 8,292
I corrected the tag for t3m4 and repaired the broken links.

Last edited by Darth333; 07-17-2004 at 04:23 PM.
Darth333 is offline   you may: quote & reply,
Old 07-17-2004, 12:13 AM   #4
RedHawke
Shadow Lord Of The Sith™
 
RedHawke's Avatar
 
Status: Moderator
Join Date: Mar 2004
Location: Stormreach CA.
Posts: 9,184
Current Game: DDO, Stormreach
Awesome tutorial Darth333!

Now you have left me no excuse, I'm just going to have to use this tutorial and try a recruit mod.

Hmm... Now... Whom to recruit?


"Beware the form-fitting black armor-clad Drow hottie with twin Mineral II Greensteel Khopeshes!"
"Liella d'Orien says, '"You're the fool, Devil. -- Witness the power of this fully ARMED and OPERATIONAL Titan!"'"
----------------------------------------------------------------------
RedHawke is offline   you may: quote & reply,
Old 07-17-2004, 12:19 AM   #5
Darth333
Administraterror
 
Darth333's Avatar
 
Status: Administrator
Join Date: Feb 2004
Location: In my secret dungeon...
Posts: 8,292
Quote:
Originally posted by RedHawke
Now you have left me no excuse, I'm just going to have to use this tutorial and try a recruit mod.

Hmm... Now... Whom to recruit?
Your own custom made npc of course! You can recruit anything you want, even a Bantha ! I think the problem is not who to recruit but who to replace...

Last edited by Darth333; 07-17-2004 at 04:24 PM.
Darth333 is offline   you may: quote & reply,
Old 07-17-2004, 12:30 AM   #6
RedHawke
Shadow Lord Of The Sith™
 
RedHawke's Avatar
 
Status: Moderator
Join Date: Mar 2004
Location: Stormreach CA.
Posts: 9,184
Current Game: DDO, Stormreach
Quote:
Originally posted by Darth333
Your own custom made npc of course! You can recruit anything you want, even a Bantha ! I think the problem who to recruit but who to replace...
True... I've noticed that replacing T3 is one of the most common.


"Beware the form-fitting black armor-clad Drow hottie with twin Mineral II Greensteel Khopeshes!"
"Liella d'Orien says, '"You're the fool, Devil. -- Witness the power of this fully ARMED and OPERATIONAL Titan!"'"
----------------------------------------------------------------------
RedHawke is offline   you may: quote & reply,
Old 07-17-2004, 12:32 AM   #7
Mav
8-Bit Code Monkey
 
Mav's Avatar
 
Join Date: May 2004
Location: A House
Posts: 4,043
Current Game: SWTOR
Very good stuff Darth333 hopefully this will lead to some great new mods, if I ever find some free time I'll know what to do.


"Women are like sunsets… they’re beautiful, but there will be a different one tomorrow." - Gilder
Mav is offline   you may: quote & reply,
Old 07-17-2004, 12:34 AM   #8
Achilles
Dapper Chimp
 
Achilles's Avatar
 
Join Date: May 2004
Posts: 8,204
Helpful! Veteran Modder Forum Veteran 
Quote:
Originally posted by RedHawke
True... I've noticed that replacing T3 is one of the most common.
Bunch of frickin' droid haters...

I'm actually making a NPC that replaces T3, but not because I dislike him. The other one I'm working on replaces Zaalbar =)
Achilles is offline   you may: quote & reply,
Old 07-17-2004, 12:36 AM   #9
Mav
8-Bit Code Monkey
 
Mav's Avatar
 
Join Date: May 2004
Location: A House
Posts: 4,043
Current Game: SWTOR
Quote:
Bunch of frickin' droid haters...

I'm actually making a NPC that replaces T3, but not because I dislike him. The other one I'm working on replaces Zaalbar =)
I look forward to seeing those mods achillies


"Women are like sunsets… they’re beautiful, but there will be a different one tomorrow." - Gilder
Mav is offline   you may: quote & reply,
Old 07-17-2004, 01:46 AM   #10
Jackel
Senior Member
 
Jackel's Avatar
 
Join Date: Sep 2003
Posts: 1,056
Re: How to recruit an npc in less than 10 steps

Quote:
Originally posted by Darth333
i) go to the tag field: type the tag of the npc you want to replace: (don't use a custom tag or the game will crash when it doesn't find the original npc when it was supposed to talk or do something )


T3M4: T3M4
Canderous: Cand
Mission: Mission
Jolee: Jolee
Juhani: Juhani
HK-47: HK47
Bastila: Bastila
Carth: Carth

You missed Big Z
Jackel is offline   you may: quote & reply,
Old 07-17-2004, 07:40 AM   #11
EnderWiggin
Sine Amore Nihil Est Vita
 
EnderWiggin's Avatar
 
Join Date: Jul 2004
Location: Pennsylvania
Posts: 3,395
Forum Veteran LF Jester 
Sticky

Someone should give this to T7's Start Here Sticky or make this a sticky itself! Thanks Darth333! Great Work!

_EW_



Hello, Pot? This is Kettle. You're black. ~ Prime

Yes, I hate you.

J7 - thanks for accepting me as part of the 'family.'

Last edited by EnderWiggin; 05-27-2008 at 07:58 PM.
EnderWiggin is offline   you may: quote & reply,
Old 07-17-2004, 07:48 AM   #12
Darth Dex
Forumite
 
Darth Dex's Avatar
 
Join Date: Jun 2004
Location: Look at a Map
Posts: 516
I vote for a STicky!


When you start thinking you should just quit right there!

Ben says, "stop ruining my storys! You always ruin my storys."
Darth Dex is offline   you may: quote & reply,
Old 07-17-2004, 09:24 AM   #13
Darth333
Administraterror
 
Darth333's Avatar
 
Status: Administrator
Join Date: Feb 2004
Location: In my secret dungeon...
Posts: 8,292
Re: Re: How to recruit an npc in less than 10 steps

Quote:
Originally posted by Jackel
You missed Big Z
I knew I was forgetting someone I just added Big Z to my list

I don't think this tutorial should be a sticky: there are enough stickies on the first page. I think it would be better to add a simple link in the 'Do you want to start modding kotor? then start here' sticky.
Darth333 is offline   you may: quote & reply,
Old 07-17-2004, 12:49 PM   #14
Achilles
Dapper Chimp
 
Achilles's Avatar
 
Join Date: May 2004
Posts: 8,204
Helpful! Veteran Modder Forum Veteran 
Re: Re: Re: How to recruit an npc in less than 10 steps

Quote:
Originally posted by Darth333
I think it would be better to add a simple link in the 'Do you want to start modding kotor? then start here' sticky.
Agreed! This needs to be added.
Achilles is offline   you may: quote & reply,
Old 07-18-2004, 12:16 AM   #15
deathdisco
Bastards of Young
 
deathdisco's Avatar
 
Join Date: Jan 2004
Location: Left of the Dial
Posts: 715
Veteran Modder Contest winner - Modding 
Oh no
Another tutorial... must resist urge to mod.....

At least until I have some free time.
Good work, thanks Darth333.

deathdisco is offline   you may: quote & reply,
Old 07-21-2004, 02:15 PM   #16
Tanesh
Rookie
 
Tanesh's Avatar
 
Join Date: Jun 2004
Posts: 157
Re: How to recruit an npc in less than 10 steps

Quote:
Originally posted by Darth333

Spawning: use the following script:
I'll use the Spawn Deadeye Duncan on Manaan Mod as an example. I uploaded the mod at pcgamemods but forgot to include the source. Here you have a complete package that includes the source code: http://mars.walagata.com/w/darth333/duncan_source.zip

Spawn script: paste in notepad, make apporpriate changes, save as an .nss file and compile:
(originally made by tk102)

Code:
void main() 
{
//do a whereami cheat to get the coordinates of the location 
//where you want the npc to spawn
float x=0.00f;  
float y=0.00f;
float z=0.00f;
//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,"dan26_duncan",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,"man26_duncan"));
}
Okay, I did it exactly as it was described here and I had a look at the source of the Duncan Mod, too. But somehow, it only works halfway. The NPC spawns, but just keeps standing on his spawn-point. He doesn't walk to my PC and start the conversation. The dialgoue starts only if I walk to him and talk to him. I just don't know why. And I really checked it several times. It has to work, but it doesn't. Please help!
Tanesh is offline   you may: quote & reply,
Old 07-22-2004, 03:44 PM   #17
Mono_Giganto
Giant Monkey of Doom™
 
Mono_Giganto's Avatar
 
Join Date: Dec 2003
Location: Florida
Posts: 2,478
Current Game: Baldur's Gate EE
Veteran Modder Helpful! 
STICKY STICKY STICKY

Hehehe, I'll be using this...

And actually, I thought of something. It would be a short time recruitment, but what if you recruited a character after the leviathan, and have it take Bastila's slot? If you go lightside, they stay with you, then maybe darkside they die with Mission and Zaalbar(Maybe)? Is it possible to make them die if you go darkside?




Mono_Giganto is offline   you may: quote & reply,
Old 07-22-2004, 03:47 PM   #18
Darth Dex
Forumite
 
Darth Dex's Avatar
 
Join Date: Jun 2004
Location: Look at a Map
Posts: 516
Yeah, Darth333 would tell you how, but she's on vaction.


When you start thinking you should just quit right there!

Ben says, "stop ruining my storys! You always ruin my storys."
Darth Dex is offline   you may: quote & reply,
Old 07-22-2004, 04:58 PM   #19
Tanesh
Rookie
 
Tanesh's Avatar
 
Join Date: Jun 2004
Posts: 157
Ok, forget about my post above. After a hard fight, I was able to make it work using a combination of Darth333's spawn script and one of Lilac Soul's Script Generator. Still don't know why Darth333's original spawn script didn't work for me, though.
Tanesh is offline   you may: quote & reply,
Old 07-25-2004, 08:54 AM   #20
RedHawke
Shadow Lord Of The Sith™
 
RedHawke's Avatar
 
Status: Moderator
Join Date: Mar 2004
Location: Stormreach CA.
Posts: 9,184
Current Game: DDO, Stormreach
Just 'officially' used the walkthrough Darth333, got everything working for the NPC recruit section in just a few hours, the dialogues took me the most time, but they are up and running.

And I found no confusion with the tutorial, it went roughly step by step as you listed. You made doing a recruit mod far less intimidating, and provided the links all in one place...

So Thanks Darth333!

Now I'll just have to do the scripting for the new NPC's 'removal' from the party in the Unknown World temple, it goes with the NPC's story, and I'll be all set!

Quote:
Originally posted by Darth333
Your own custom made npc of course! I think the problem is not who to recruit but who to replace...
Also Darth333 I decided on a completely custom NPC, as you suggested.

It took around 6+ hours last night setting up the body and head models, fidgeting with body and head textures, making items, etc.

I broke down and went ahead and replaced T3, I didn't have the heart to replace Canderous.

So thanks again, for the tutorial Darth333!


"Beware the form-fitting black armor-clad Drow hottie with twin Mineral II Greensteel Khopeshes!"
"Liella d'Orien says, '"You're the fool, Devil. -- Witness the power of this fully ARMED and OPERATIONAL Titan!"'"
----------------------------------------------------------------------
RedHawke is offline   you may: quote & reply,
Old 07-25-2004, 10:03 AM   #21
Darth333
Administraterror
 
Darth333's Avatar
 
Status: Administrator
Join Date: Feb 2004
Location: In my secret dungeon...
Posts: 8,292
Thanks a lot for this great feedback RedHawke! This is exactly the kind of feedback every modder dreams of: it allows us to see if we are on the right track or not.

And congrats on the new mod I'll try it out. Concerning who to replace, I had an idea this week: why not add conversation options that would let the player chose who he want to replace. It could be something like this:

PC:
1. ok, come with me, i have a droid to replace (attach script to replace t3-m4) (and why not add the obligation for the pc to sell him to a merchant first - conditional script - to make place on the ebon hawk )
2. ok, come with me, you'll take the place of my wookie slave (attach script here)
3. ok, come with me, you'll certainly be more useful than a 14 yrs old girl for this "mission"... (attach script to replace Mission)
etc...

Last edited by Darth333; 07-26-2004 at 12:59 AM.
Darth333 is offline   you may: quote & reply,
Old 07-26-2004, 12:50 AM   #22
RedHawke
Shadow Lord Of The Sith™
 
RedHawke's Avatar
 
Status: Moderator
Join Date: Mar 2004
Location: Stormreach CA.
Posts: 9,184
Current Game: DDO, Stormreach
You know Darth333 thats a bloody brilliant idea, and not too hard to do either.

The recruit takes place on Dantooine so it would either be Mission, Zzalbar, Canderous or T3 to choose from and that would give the player the choice, I really like that, and I think other people will too.

Then I need to play through From Dantooine to make sure everything works right, and then I need to do a departure script / dialogue / scene for her in the Temple on the Unknown world.

Excellent idea Darth333, I'll whip the selection dialogue part up tonight!


"Beware the form-fitting black armor-clad Drow hottie with twin Mineral II Greensteel Khopeshes!"
"Liella d'Orien says, '"You're the fool, Devil. -- Witness the power of this fully ARMED and OPERATIONAL Titan!"'"
----------------------------------------------------------------------
RedHawke is offline   you may: quote & reply,
Old 07-26-2004, 01:18 AM   #23
Darth333
Administraterror
 
Darth333's Avatar
 
Status: Administrator
Join Date: Feb 2004
Location: In my secret dungeon...
Posts: 8,292
Quote:
Originally posted by RedHawke

The recruit takes place on Dantooine so it would either be Mission, Zzalbar, Canderous or T3 to choose from and that would give the player the choice, I really like that, and I think other people will too.
Looks cool
If your mod can be accessed when the pc returns to Dantoine later in the game, you could also add replies for other npcs, even if it's on Dantoine: just add a conditional script in the active field of the 'RepliesList' in the EntryList that checks if an npc is a party member and, depending on the result, make those replies available or not.

Last edited by Darth333; 07-26-2004 at 01:29 AM.
Darth333 is offline   you may: quote & reply,
Old 07-26-2004, 02:34 AM   #24
RedHawke
Shadow Lord Of The Sith™
 
RedHawke's Avatar
 
Status: Moderator
Join Date: Mar 2004
Location: Stormreach CA.
Posts: 9,184
Current Game: DDO, Stormreach
Quote:
Originally posted by Darth333
If your mod can be accessed when the pc returns to Dantoine later in the game, you could also add replies for other npcs, even if it's on Dantoine: just add a conditional script in the active field of the 'RepliesList' in the EntryList that checks if an npc is a party member and, depending on the result, make those replies available or not.
I could make her avilable later on, I think that would be allright, so the script to check for the party members, that would be something like;

Code:
int StartingConditional() {
IsObjectPartyMember("T3M4"));
}
Or is it something else?


"Beware the form-fitting black armor-clad Drow hottie with twin Mineral II Greensteel Khopeshes!"
"Liella d'Orien says, '"You're the fool, Devil. -- Witness the power of this fully ARMED and OPERATIONAL Titan!"'"
----------------------------------------------------------------------
RedHawke is offline   you may: quote & reply,
Old 07-26-2004, 02:46 AM   #25
tk102
Well past expiration date
 
tk102's Avatar
 
Join Date: Jan 2004
Posts: 5,765
Current Game: Watch_Dogs
Forum Veteran Helpful! Notable contributor 
Close...

Code:
int StartingConditional() {
return IsObjectPartyMember("T3M4"));
}


tk102 is offline   you may: quote & reply,
Old 07-26-2004, 02:48 AM   #26
RedHawke
Shadow Lord Of The Sith™
 
RedHawke's Avatar
 
Status: Moderator
Join Date: Mar 2004
Location: Stormreach CA.
Posts: 9,184
Current Game: DDO, Stormreach
Quote:
Originally posted by tk102
Close...

Code:
int StartingConditional() {
     return IsObjectPartyMember("T3M4"));
}
Cool! So all I was missing was return. Thanks TK!

EDIT: That script doesn't compile it gives errors but I found a similar call further on down that does compile, it looks like this;

Code:
int StartingConditional() {
     return IsAvailableCreature(7);
}
According to nwscript this does the same thing, that is; This returns whether a NPC is in the list of available party members.

And this script did the trick!

[Homer] Whoo Hoo!!! [/Homer]


"Beware the form-fitting black armor-clad Drow hottie with twin Mineral II Greensteel Khopeshes!"
"Liella d'Orien says, '"You're the fool, Devil. -- Witness the power of this fully ARMED and OPERATIONAL Titan!"'"
----------------------------------------------------------------------

Last edited by RedHawke; 07-26-2004 at 04:22 AM.
RedHawke is offline   you may: quote & reply,
Old 07-26-2004, 05:25 AM   #27
RedHawke
Shadow Lord Of The Sith™
 
RedHawke's Avatar
 
Status: Moderator
Join Date: Mar 2004
Location: Stormreach CA.
Posts: 9,184
Current Game: DDO, Stormreach
Quote:
Originally posted by Darth333
Looks cool
If your mod can be accessed when the pc returns to Dantoine later in the game, you could also add replies for other npcs, even if it's on Dantoine: just add a conditional script in the active field of the 'RepliesList' in the EntryList that checks if an npc is a party member and, depending on the result, make those replies available or not.
Ok Darth333 I have the scripts and the multiple choice dialogue working, very cool idea BTW, I think I'm going to move her to Manaan, she is a higher level NPC so Dantooine is not as good of a place for her recruitment. So thats all good there!

But this has created a new problem, I'm going to need to create a numerical variable of some sort that is accessable to the other modules so I will be able to tell the game which NPC slot she is in when she exits the party in the unknown world temple. I think there are global booleans but I'm not sure you can make custom ones like the local booleans. Or am I wrong there?

Any ideas... anyone?


"Beware the form-fitting black armor-clad Drow hottie with twin Mineral II Greensteel Khopeshes!"
"Liella d'Orien says, '"You're the fool, Devil. -- Witness the power of this fully ARMED and OPERATIONAL Titan!"'"
----------------------------------------------------------------------
RedHawke is offline   you may: quote & reply,
Old 07-26-2004, 10:28 AM   #28
Darth333
Administraterror
 
Darth333's Avatar
 
Status: Administrator
Join Date: Feb 2004
Location: In my secret dungeon...
Posts: 8,292
Quote:
Originally posted by RedHawke

But this has created a new problem, I'm going to need to create a numerical variable of some sort that is accessable to the other modules so I will be able to tell the game which NPC slot she is in when she exits the party in the unknown world temple. I think there are global booleans but I'm not sure you can make custom ones like the local booleans. Or am I wrong there?
It is possible and easy to do: this thread may be of interest http://www.lucasforums.com/showthrea...hreadid=129333 - look at the second part of my post - (note you are not obliged to add journal entries if you want to create a new global)

Last edited by Darth333; 07-26-2004 at 01:59 PM.
Darth333 is offline   you may: quote & reply,
Old 07-26-2004, 12:44 PM   #29
tk102
Well past expiration date
 
tk102's Avatar
 
Join Date: Jan 2004
Posts: 5,765
Current Game: Watch_Dogs
Forum Veteran Helpful! Notable contributor 
Hi RedHawke,

Sorry to mislead you. According to nwscript.nss, IsObjectPartyMember accepts an Object (not a String) as a parameter. Therefore it should be

Code:
int StartingConditional() {
  return IsObjectPartyMember(GetObjectByTag("Juhani"));
}


tk102 is offline   you may: quote & reply,
Old 08-18-2004, 06:10 PM   #30
90SK
Universal Figment
 
90SK's Avatar
 
Join Date: Jul 2004
Location: Somewhere...
Posts: 4,380
Current Game: Tetris
Yes! This is exactly what I've been looking for! Thank you! (though it kind of seemed like more than 10 steps )

90SK is offline   you may: quote & reply,
Old 08-18-2004, 06:21 PM   #31
En liten mus
Rookie
 
En liten mus's Avatar
 
Join Date: Jun 2004
Location: Sweden,Stockholm
Posts: 115
Why not make a Lightsaber for hier....

to do this you maby could make the character see trough
How would you do that....?


Im Swedish...any one else swedish?

Jag är Svensk...några andra svenskar här?

==============
My Mods
==============
Click Here For My Mods!

Last edited by En liten mus; 08-18-2004 at 06:59 PM.
En liten mus is offline   you may: quote & reply,
Old 08-18-2004, 06:54 PM   #32
Darth333
Administraterror
 
Darth333's Avatar
 
Status: Administrator
Join Date: Feb 2004
Location: In my secret dungeon...
Posts: 8,292
Welcome to the forums, CaptainSkye
Quote:
Originally posted by CaptainSkye
Yes! This is exactly what I've been looking for! Thank you! (though it kind of seemed like more than 10 steps )
I wouldn't call it false advertisement but let's say it's a marketing technique It's just that some steps are longer than others

Again, if some parts of the tutorial are not clear, pls don't hesitate to tell me and I will bring modifications.

Last edited by Darth333; 08-18-2004 at 07:17 PM.
Darth333 is offline   you may: quote & reply,
Old 08-19-2004, 07:14 AM   #33
RedHawke
Shadow Lord Of The Sith™
 
RedHawke's Avatar
 
Status: Moderator
Join Date: Mar 2004
Location: Stormreach CA.
Posts: 9,184
Current Game: DDO, Stormreach
Hello Darth333,

I found something in your destroying the NPC twins script, the Destroy object should be in between the Global Fade out and Global Fade in calls like so;

Code:
void main() 
{
ActionPauseConversation();
object oGoodbye;
oGoodbye = GetObjectByTag("my_npc_tag");
SetGlobalFadeOut(1.0, 0.5);    
DelayCommand(1.0, DestroyObject(oGoodbye));
DelayCommand(1.0,SetGlobalFadeIn(0.7,0.0));
ActionResumeConversation();
}
This darkens the screen then destroys the object and then when the screen comes up they are gone.

I hope this helps!


"Beware the form-fitting black armor-clad Drow hottie with twin Mineral II Greensteel Khopeshes!"
"Liella d'Orien says, '"You're the fool, Devil. -- Witness the power of this fully ARMED and OPERATIONAL Titan!"'"
----------------------------------------------------------------------
RedHawke is offline   you may: quote & reply,
Old 10-03-2004, 12:36 PM   #34
Darth333
Administraterror
 
Darth333's Avatar
 
Status: Administrator
Join Date: Feb 2004
Location: In my secret dungeon...
Posts: 8,292
Here is a little update for the tutorial: if you want to bring up the party selection screen when you recruit an npc just like the game does, add the following lines to your recruit script (gives a more professional look to the recruit mod ):
Code:
ClearAllActions();
DelayCommand(1.5,ShowPartySelectionGUI());
I updated the script above.

Note: my recruitable mods are quite old (march-april) and do not integrate this function (yet)...
Darth333 is offline   you may: quote & reply,
Old 10-12-2004, 06:52 AM   #35
Arutoo
Lurker
 
Arutoo's Avatar
 
Join Date: Oct 2004
Posts: 0
recruit in 10 steps

well i followed the tutorial on recruiting the best i could. (being a total newb to modding)
Anyways I'm running into trouble, my problem starts when i try to attatch my scripts to dialog because i dont know what i'm doing. I made my recruit mod but it doesn't work i can't even get it to spawn. If someone was willing to help me I would appreciate it. I have my mod in a zip file , so that if someone gave me there email address I could email them my mod so you could pick it apart and see what i'm doing wrong. I would greatly appreaciate any help that could be given, thanks alot.

Arutoo...


Arutoo
Arutoo is offline   you may: quote & reply,
Old 10-12-2004, 08:00 AM   #36
Darth333
Administraterror
 
Darth333's Avatar
 
Status: Administrator
Join Date: Feb 2004
Location: In my secret dungeon...
Posts: 8,292
I can check it. Check your PMs
Darth333 is offline   you may: quote & reply,
Old 11-06-2004, 07:30 PM   #37
whitguy
Rookie
 
whitguy's Avatar
 
Join Date: Oct 2004
Location: Newport Washington
Posts: 38
Unhappy I need some help to

OK this is my first MOD i have ever made so im a bigginer that needs help. I need your help drath333 i made my mod and it works but i need some help to fix some tweaks (its all in my ReadMe) i have all of it in a WinRAR fileready to e-mail and i was wondering if i could e-mail it to you and then you could check it out your self (I have a saved game with everything else so you can get right to the person that makes it so you can get my costum made npc) if you could help me it would really help. THANKS




Last edited by whitguy; 11-08-2004 at 10:54 AM.
whitguy is offline   you may: quote & reply,
Old 11-10-2004, 09:07 AM   #38
whitguy
Rookie
 
whitguy's Avatar
 
Join Date: Oct 2004
Location: Newport Washington
Posts: 38
hey darth333 i need help

hey darth333 in the part of your guide about spawning you saidcode

________________________________________________
//do a whereami cheat to get the coordinates of the location
//where you want the npc to spawn
________________________________________________

and im just wondering what you meen and how to do what you said.



whitguy is offline   you may: quote & reply,
Old 11-10-2004, 09:27 AM   #39
Darth333
Administraterror
 
Darth333's Avatar
 
Status: Administrator
Join Date: Feb 2004
Location: In my secret dungeon...
Posts: 8,292
Re: hey darth333 i need help

Quote:
Originally posted by whitguy
hey darth333 in the part of your guide about spawning you saidcode

________________________________________________
//do a whereami cheat to get the coordinates of the location
//where you want the npc to spawn
________________________________________________

and im just wondering what you meen and how to do what you said.
Go on the spot where you want to spawn the npc with your PC, open the cheat console and type "whereami" without quotes. Press enter.

The coordinates (XYZ) of the location will appear right under the cheat console. The you simply have to replace the 0.00 by the coordinates you get in this part of the code:
Code:
float x=0.00f;  
float y=0.00f;
float z=0.00f;
Darth333 is offline   you may: quote & reply,
Old 11-10-2004, 04:15 PM   #40
whitguy
Rookie
 
whitguy's Avatar
 
Join Date: Oct 2004
Location: Newport Washington
Posts: 38
thanks i'm finily going to be able to continue with my mod.



whitguy is offline   you may: quote & reply,
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Go Back   LucasForums > Network > Knights of the Old Republic > Editing / Modding > Holowan Laboratories > How to recruit an npc in less than 10 steps

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:51 PM.

LFNetwork, LLC ©2002-2011 - All rights reserved.
Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.