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.

How to recruit an npc in less than 10 steps

Page: 1 of 2
 Darth333
07-16-2004, 10:57 PM
#1
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 (http://www.pcgamemods.com/7438/)

3. For more info concerning dialogues, read this post of mine (http://www.lucasforums.com/showthread.php?s=&postid=1569117#post1569117).

Check the Guide for the Newbie sticky (http://www.lucasforums.com/showthread.php?s=&threadid=129789) 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 (http://img47.photobucket.com/albums/v144/Darth333/script_fields.jpg)

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:

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/showthread.php?s=&postid=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/showthread.php?s=&postid=1579579#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/v144/Darth333/dlgkt.jpg)
example BiowareGFF (http://img47.photobucket.com/albums/v144/Darth333/gff_script1.jpg)
example customGFF (http://img47.photobucket.com/albums/v144/Darth333/gff_script.jpg)
With dlg edit the procedure is similar: example DLGedit (http://img47.photobucket.com/albums/v144/Darth333/dlgedit.jpg).

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?page=tutorial_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 :D :

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/showthread.php?s=&threadid=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 (http://img47.photobucket.com/albums/v144/Darth333/portrait2da.jpg)

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 )


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. (http://www.lucasforums.com/showthread.php?s=&threadid=124284).
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)


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.
 Achilles
07-16-2004, 11:22 PM
#2
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!
 Darth333
07-16-2004, 11:43 PM
#3
I corrected the tag for t3m4 and repaired the broken links. :)
 RedHawke
07-17-2004, 12:13 AM
#4
Awesome tutorial Darth333! :D

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?
 Darth333
07-17-2004, 12:19 AM
#5
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! :D You can recruit anything you want, even a Bantha ! :p I think the problem is not who to recruit but who to replace...:rolleyes:
 RedHawke
07-17-2004, 12:30 AM
#6
Originally posted by Darth333
Your own custom made npc of course! :D You can recruit anything you want, even a Bantha ! :p I think the problem who to recruit but who to replace...:rolleyes:

True... I've noticed that replacing T3 is one of the most common.
 Mav
07-17-2004, 12:32 AM
#7
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. :D :D :D
 Achilles
07-17-2004, 12:34 AM
#8
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 =)
 Mav
07-17-2004, 12:36 AM
#9
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
 Jackel
07-17-2004, 1:46 AM
#10
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 :)
 EnderWiggin
07-17-2004, 7:40 AM
#11
Someone should give this to T7's Start Here Sticky or make this a sticky itself! Thanks Darth333! Great Work!

_EW_
 Darth Dex
07-17-2004, 7:48 AM
#12
I vote for a STicky!
 Darth333
07-17-2004, 9:24 AM
#13
Originally posted by Jackel
You missed Big Z :)
I knew I was forgetting someone :rolleyes: :headbump 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.
 Achilles
07-17-2004, 12:49 PM
#14
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.
 deathdisco
07-18-2004, 12:16 AM
#15
Oh no:p
Another tutorial... must resist urge to mod.....:D

At least until I have some free time.
Good work, thanks Darth333.
 Tanesh
07-21-2004, 2:15 PM
#16
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)


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! :crybaby:
 Mono_Giganto
07-22-2004, 3:44 PM
#17
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?
 Darth Dex
07-22-2004, 3:47 PM
#18
Yeah, Darth333 would tell you how, but she's on vaction.
 Tanesh
07-22-2004, 4:58 PM
#19
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. :confused:
 RedHawke
07-25-2004, 8:54 AM
#20
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! :D

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! :D

Originally posted by Darth333
Your own custom made npc of course! :D I think the problem is not who to recruit but who to replace...:rolleyes:

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. :fett:

So thanks again, for the tutorial Darth333! :D
 Darth333
07-25-2004, 10:03 AM
#21
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...
 RedHawke
07-26-2004, 12:50 AM
#22
You know Darth333 thats a bloody brilliant idea, and not too hard to do either. :D

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! :D
 Darth333
07-26-2004, 1:18 AM
#23
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.
 RedHawke
07-26-2004, 2:34 AM
#24
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;


int StartingConditional() {
IsObjectPartyMember("T3M4"));
}


Or is it something else?
 tk102
07-26-2004, 2:46 AM
#25
Close...

int StartingConditional() {
return IsObjectPartyMember("T3M4"));
}
 RedHawke
07-26-2004, 2:48 AM
#26
Originally posted by tk102
Close...

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

Cool! :D So all I was missing was return. Thanks TK! :D

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;

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! :D

Whoo Hoo!!!
 RedHawke
07-26-2004, 5:25 AM
#27
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! :D

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?
 Darth333
07-26-2004, 10:28 AM
#28
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/showthread.php?s=&threadid=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)
 tk102
07-26-2004, 12:44 PM
#29
Hi RedHawke,

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


int StartingConditional() {
return IsObjectPartyMember(GetObjectByTag("Juhani"));
}
 90SK
08-18-2004, 6:10 PM
#30
Yes! This is exactly what I've been looking for! Thank you! (though it kind of seemed like more than 10 steps :p )
 En liten mus
08-18-2004, 6:21 PM
#31
Why not make a Lightsaber for hier....

to do this you maby could make the character see trough
How would you do that....?
 Darth333
08-18-2004, 6:54 PM
#32
Welcome to the forums, CaptainSkye :)
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 :p )
I wouldn't call it false advertisement but let's say it's a marketing technique :p It's just that some steps are longer than others :D

Again, if some parts of the tutorial are not clear, pls don't hesitate to tell me and I will bring modifications.
 RedHawke
08-19-2004, 7:14 AM
#33
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;


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! :D
 Darth333
10-03-2004, 12:36 PM
#34
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 ;) ):

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)...
 Arutoo
10-12-2004, 6:52 AM
#35
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...:amidala:
 Darth333
10-12-2004, 8:00 AM
#36
I can check it. Check your PMs :)
 whitguy
11-06-2004, 7:30 PM
#37
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

:firehead :lightning

:newbie:
 whitguy
11-10-2004, 9:07 AM
#38
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.

:firehead :lightning

:newbie:
 Darth333
11-10-2004, 9:27 AM
#39
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:

float x=0.00f;
float y=0.00f;
float z=0.00f;
 whitguy
11-10-2004, 4:15 PM
#40
thanks i'm finily going to be able to continue with my mod.

:firehead :lightning

:newbie:
 whitguy
11-11-2004, 7:09 PM
#41
Originally posted by Darth333
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:

float x=0.00f;
float y=0.00f;
float z=0.00f;


thanks for the help but there was one thing that went wrong,I did every thing you told me to do but for some reason when i make him spawn (i just attached the script to a DLG) he move without moving his legs so it looks like he is just gliding and i have no idea whats going on PLEASE HELP.

:firehead :lightning

:newbie:
 Darth333
11-11-2004, 8:21 PM
#42
Originally posted by whitguy
...for some reason when i make him spawn (i just attached the script to a DLG) he move without moving his legs so it looks like he is just gliding and i have no idea whats going on PLEASE HELP.
:confused: Did you tried to reload your game? Maybe it's just a glitch. Which npc are you using?
 whitguy
11-12-2004, 10:19 AM
#43
Originally posted by Darth333
:confused: Did you tried to reload your game? Maybe it's just a glitch. Which npc are you using?

ya thats what i thought so i reloaded it but it just happend again so i checked the script and it looked right.

JUST WONDERING:umm did you look at my recruite npc that i sent you.

:firehead :lightning

:newbie:
 Darth333
11-12-2004, 10:32 AM
#44
That's weird but what appearance are you using for your recruit? I noticed that sometimes HK-47 "glides" in the desert of Tatoine.

And no, I didn't look at your recruit mod, I thought from another e-mail you sent me that your problem was solved. If you want me to look at it, then just send me the files again and describe what is the problem :)

Edited typos
 whitguy
11-12-2004, 10:54 AM
#45
Originally posted by Darth333
That's weird but what appearance are you using for your recruit? I noticed that this sometimes HK-47 "glides" in the desert of Tatoine.

And no, I didn't look at your recruit mod, I thought from another e-mail you sent me that your problem was solved. If you want me to look at it, then just send me the files again and describe what is the problem :)

ok i'll check that out

and ok i'll send the mod to you soon.
:D THANKS OVER OVER AND OVER AGAIN:D :D

:firehead :lightning

:newbie:
 magnet
11-18-2004, 9:14 AM
#46
When I activate the dialogue that fires my script, the choose party screen comes up, but i can choose nothing and so my npc is not spawned
 Darth333
11-18-2004, 9:25 AM
#47
You mean you end up with no mouse pointer? This happened to me sometime ago when I wasn't inserting a delay.

Are you using something like this? If not, what script exactly are you using?

void main()
{
RemoveAvailableNPC(7);
AddAvailableNPCByTemplate(7, "p_dustil");
DelayCommand(1.5, ShowPartySelectionGUI());
}
 magnet
11-18-2004, 9:32 AM
#48
No, my mouse pointer is fine. It's just that I cannot add my new npc because all the portraits are black outlines and I cannot select Carth (who I chose to replace).
I am using the script from this thread
 Darth333
11-18-2004, 9:41 AM
#49
oh i see. Then it may not be the script. It may have to do with the area you are in. Where are you trying to recruit your npc?

And would you mind posting your scripts please? It will make things much easier.
 magnet
11-18-2004, 9:47 AM
#50
I am trying to recruit outside your apartment on Taris.
Here is the script I am using


void main()
{
RemoveAvailableNPC(2);
AddAvailableNPCByTemplate(2, "p_darthrevan");
ClearAllActions();
DelayCommand(1.5,ShowPartySelectionGUI());
}
Page: 1 of 2