Jump to content

Home

custom NPCs: how does remove a standard NPC for a new one affect the game?


Simbacca

Recommended Posts

i am currently working on a new party character right now.

 

my question is, how does the loss of a standard NPC, when adding the new one in, affect the game?

 

example: say i add a custom NPC on Dantoonie in place of Jolee. how will the game be affected when the time comes to actually meet him, and utilize his assistance?

 

should i only make my new NPC available over current party members that no longer have major story functions?

Link to comment
Share on other sites

Originally posted by Simbacca

would n e 1 happen to know how i can add restrictions such as that, or any kind for that matter?

 

You don't add a restriction.

You make a dialogue that causes the character to enter the party.

All you have to do is make sure that this dialogue is triggered after the character has done his part in th story.

 

Take Atton for example. You firts meet him in his cell where you can talk to him, but you can't ask him to join your party at this point.

The dialogue where he joins the party happens later, when you're about to board the republic ship.

Link to comment
Share on other sites

Conditional scripting is used in conjunction with the dialogue. Now there are 2 different methods of conditional scripting. One method is used within the Dialogue itself. In K1 dialogues could only use to scripts per branch one was a conditional and the other was the action. In K2 that has changed a little.

 

However the other method is you write the conditional right into the script itself. This allows you to set multiple conditions before your script performs its required task. The best way to have your conditionals make checks is have your scripts check for global variables having both a numeric and boolean globals.

Link to comment
Share on other sites

Originally posted by Simbacca

perhaps i will not yet try conditional scripting, since i did not understand that at all :giveup:

 

Sounds like the first 20 times I tried to figure out conditional scripting. I'm still not sure of my scripting 75% of the time.:p

 

Okay seriously though lets aproach your new NPC recruit and his joining the party as more of a step by step.

 

Let's start with who you want to replace and we will go from there.

 

Also your example earlier referenced K1 characters. Is this going to be for K1 or K2?

 

We will use this thread as a step by step to walk you and others through writing the conditionals to meet your desired results.

Link to comment
Share on other sites

yes this is KotOR 1

 

i wanted to recruit someone on Dantoonie. i put into the very end of the dialogue with extended options to recruit the new NPC in place of HK-47, Zaalbar, or not at all (i do plan on adding more replacement options).

 

i just didn't want to replace T3-M4 as everyone else does because i actually find him useful. though it would probably be easier as i'm sure he doesn't have major plot lines after Dantoonie (i say i'm sure because i haven't actually finished the game yet. i've completed Tatoonie and Kashyyyk, currently on Manaan)

 

i just wanted to set up the conditions that he can't be recruit until those other character's major plotlines have been completed (meaning not being able to recruit him over Zaalbar before completing Kashyyyk for example)

Link to comment
Share on other sites

Then this might be relatively easy to setup as far as the scripting goes. You will want to go through and look at your global variable related to Kashykk. Tk102's Findrefs utility will help alot with this. You will soon find globals that read/sound like they are related to your quest completion on the planet.

 

I'll take a look through the globals as well and see if I can't unearth some that you can use.

Link to comment
Share on other sites

Originally posted by Simbacca

i just wanted to set up the conditions that he can't be recruit until those other character's major plotlines have been completed (meaning not being able to recruit him over Zaalbar before completing Kashyyyk for example)

 

For this specific case, there is a script already written for this check called k_hzal_notkash2. See scripts.bif in KotOR Tool. You can simply use this as the condition for your recruitment dialog branch. (This is what Tanesh used in the Mekel recruitment mod too. :) )

Link to comment
Share on other sites

that's cool that a conditional script like that is already there. thanks for bring that to out attention.

 

i tried to open it and read it to understand how to make one, but i couldn't. i wonder if there are other scripts in the game just like that to use with others. if not, i still would of liked to of learned how to make one. i suppose i could just stick with replacing the droids in my mods.

Link to comment
Share on other sites

Look at my party manager armband for Kotor 1 if you want: http://pcgamemods.com/7386/ there are plenty of those scripts and as tk102 mentionned, just look at scripts.bif: you'll find tons of examples (I would give you some file names but I don't have the game with me). Don't hesitate to explire: it's the best way to learn.

 

edit: ...and I found Tanesh's script:

 
#include "k_inc_debug"

int StartingConditional()
{
 return ((IsNPCPartyMember(NPC_ZAALBAR) == TRUE) && (GetGlobalBoolean("mekel_party") == FALSE));
}

 

Sample from my armband:

int StartingConditional()
{
return IsAvailableCreature(1);
}
Link to comment
Share on other sites

Originally posted by Darth333

...as tk102 mentionned, just look at scripts.bif: you'll find tons of examples (I would give you some file names but I don't have the game with me). Don't hesitate to explire: it's the best way to learn...

 

i do want to look in scripts.bif, but what i was saying b4 was that when i try to open up the scripts contained in there, they dont open. what program do i open them in?

 

i thank you for posting those scripts, but i still wish to understand how they work. i know nothing of scripting at all, so not only do i not understand the scripts posted here, i probably wouldn't understand the scripts.bif if i actually could get them open.

 

eh but nevermind all this. i just have to spend some time with the scripting tutorials i guess. try before and was confused, but i could've just been skimming over them, not needing them for what i was doing at the time.

Link to comment
Share on other sites

well when i try, it says:

 

Error launching nwnnsscomp.exe

is it installed in the same directory as KotOR tool?

 

 

which the answer to that question is yes it is. i extracted nwnnsscomp.exe right into Progam Files/Fred Tetra/KotOR tool/. it is there. i got the zip file from this site, specifically this thread:

 

http://www.lucasforums.com/showthread.php?s=&threadid=143681

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...