lfnetwork.com mark read register faq members calendar

Thread: KotOR II Party NPCs
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-10-2012, 01:18 AM   #1
Fallen Guardian
Wandering the Galaxy...
 
Fallen Guardian's Avatar
 
Join Date: Aug 2010
Location: Unknown Regions
Posts: 1,286
Current Game: Knights of the Old Republic
Veteran Modder Helpful! 
KotOR II Party NPCs

So I was looking through the Ebon Hawk onenter script, figuring out how everything was set up just because. And I noticed a conditional like this:

Code:
        &&  GetIsAvailable(NPC_BAO_DUR)
        &&  GetIsAvailable(NPC_CANDEROUS)
        &&  (GetInfluence(NPC_BAO_DUR) > 85)
Now what I was wondering is this: Where are the party members defined in as NPC_BAO_DUR and such. Is it NPC.2da or some other file? (I've looked through NPC.2da and it has no reference of NPC_BAO_DUR so I don't think that's right, but, I could be wrong.)


The truly fallen cannot return to the light. If someone "falls" and "returns," they never really, truly fell.

Current Work in Progress: Dantooine Tension

Released Works
Blaster Pistol Enhancement
Dustil Restoration
Ebon Hawk Texture Enhancement
Gaffi Stick Improvement
Weapon Model Overhaul Texture Rework (Thanks to Toasty Fresh!)
Sunry Murder Recording Enhancement
VP's Hi Poly Tin Cans - KotOR 1 Version

Last edited by Fallen Guardian; 07-10-2012 at 05:41 PM.
Fallen Guardian is offline   you may: quote & reply,
Old 07-10-2012, 08:59 AM   #2
Hassat Hunter
Forumite
 
Join Date: Jan 2010
Posts: 550
k_inc_glob_party.nss (If I get your question right);

Code:
// Will return the tag of the party member constant passed in.
// Will return 'ERROR' if an invalid constant is passed in.
string GetNPCTag( int nNPC )
{
    switch( nNPC )
    {
        case  NPC_ATTON:
        {
            return "atton";
        }break;
        case  NPC_BAO_DUR:
        {
            return "baodur";
        }break;
        case  NPC_CANDEROUS:
        {
            return "mand";
        }break;
        case  NPC_DISCIPLE:
        {
            return "disciple";
        }break;
        case  NPC_G0T0:
        {
            return "g0t0";
        }break;
        case  NPC_HANDMAIDEN:
        {
            return "handmaiden";
        }break;
        case  NPC_HANHARR:
        {
            return "hanharr";
        }break;
        case  NPC_HK_47:
        {
            return "hk47";
        }break;
        case  NPC_KREIA:
        {
            return "kreia";
        }break;
        case  NPC_MIRA:
        {
            return "mira";
        }break;
        case  NPC_T3_M4:
        {
            return "t3m4";
        }break;
        case  NPC_VISAS:
        {
            return "visasmarr";
        }break;
    }
    return "ERROR";
}
Hassat Hunter is offline   you may: quote & reply,
Old 07-10-2012, 11:52 AM   #3
JCarter426
Senior Member
 
JCarter426's Avatar
 
Join Date: Feb 2008
Location: Look to your left.
Posts: 1,635
It's in NWScript:
Code:
int NPC_PLAYER          =-1;
int NPC_ATTON           = 0;
int NPC_BAO_DUR         = 1;
int NPC_CANDEROUS       = 2;
int NPC_G0T0            = 3;
int NPC_HANDMAIDEN      = 4;
int NPC_HK_47           = 5;
int NPC_KREIA           = 6;
int NPC_MIRA            = 7;
int NPC_T3_M4           = 8;
int NPC_VISAS           = 9;
int NPC_HANHARR          = 10;
int NPC_DISCIPLE        = 11;

int PUP_SENSORBALL      = 0;
int PUP_OTHER1          = 1;
int PUP_OTHER2          = 2;
You can't change the name but you can use the integers rather than typing out the name.


JCarter426 is offline   you may: quote & reply,
Old 07-10-2012, 05:44 PM   #4
Fallen Guardian
Wandering the Galaxy...
 
Fallen Guardian's Avatar
 
Join Date: Aug 2010
Location: Unknown Regions
Posts: 1,286
Current Game: Knights of the Old Republic
Veteran Modder Helpful! 
Quote:
Originally Posted by Hassat Hunter View Post
k_inc_glob_party.nss (If I get your question right);

Code:
// Will return the tag of the party member constant passed in.
// Will return 'ERROR' if an invalid constant is passed in.
string GetNPCTag( int nNPC )
{
    switch( nNPC )
    {
        case  NPC_ATTON:
        {
            return "atton";
        }break;
        case  NPC_BAO_DUR:
        {
            return "baodur";
        }break;
        case  NPC_CANDEROUS:
        {
            return "mand";
        }break;
        case  NPC_DISCIPLE:
        {
            return "disciple";
        }break;
        case  NPC_G0T0:
        {
            return "g0t0";
        }break;
        case  NPC_HANDMAIDEN:
        {
            return "handmaiden";
        }break;
        case  NPC_HANHARR:
        {
            return "hanharr";
        }break;
        case  NPC_HK_47:
        {
            return "hk47";
        }break;
        case  NPC_KREIA:
        {
            return "kreia";
        }break;
        case  NPC_MIRA:
        {
            return "mira";
        }break;
        case  NPC_T3_M4:
        {
            return "t3m4";
        }break;
        case  NPC_VISAS:
        {
            return "visasmarr";
        }break;
    }
    return "ERROR";
}
Quote:
Originally Posted by JCarter426 View Post
It's in NWScript:
Code:
int NPC_PLAYER          =-1;
int NPC_ATTON           = 0;
int NPC_BAO_DUR         = 1;
int NPC_CANDEROUS       = 2;
int NPC_G0T0            = 3;
int NPC_HANDMAIDEN      = 4;
int NPC_HK_47           = 5;
int NPC_KREIA           = 6;
int NPC_MIRA            = 7;
int NPC_T3_M4           = 8;
int NPC_VISAS           = 9;
int NPC_HANHARR          = 10;
int NPC_DISCIPLE        = 11;

int PUP_SENSORBALL      = 0;
int PUP_OTHER1          = 1;
int PUP_OTHER2          = 2;
You can't change the name but you can use the integers rather than typing out the name.
Huh, okay. So if I were to add a party member would I be able to add a custom NPC_(CHARACTERNAME) thing, or would I check if he/she was in the party through some other means?


The truly fallen cannot return to the light. If someone "falls" and "returns," they never really, truly fell.

Current Work in Progress: Dantooine Tension

Released Works
Blaster Pistol Enhancement
Dustil Restoration
Ebon Hawk Texture Enhancement
Gaffi Stick Improvement
Weapon Model Overhaul Texture Rework (Thanks to Toasty Fresh!)
Sunry Murder Recording Enhancement
VP's Hi Poly Tin Cans - KotOR 1 Version
Fallen Guardian is offline   you may: quote & reply,
Old 07-10-2012, 06:36 PM   #5
JCarter426
Senior Member
 
JCarter426's Avatar
 
Join Date: Feb 2008
Location: Look to your left.
Posts: 1,635
Quote:
Originally Posted by Fallen Guardian View Post
Huh, okay. So if I were to add a party member would I be able to add a custom NPC_(CHARACTERNAME) thing, or would I check if he/she was in the party through some other means?
In theory, if you defined something like
Code:
int NPC_FALLEN_GUARDIAN = 3;
at the top of your script, you could keep referring to them as such, yes. You'd have to put it in every script, though. I prefer to just remember the numbers, but that's just what it is - a matter of preference. The integers are what matter; they're hard coded into the game. That's why we can't add new party members, only replace them. It's possible to have the player, all twelve party members, and all three puppets, all at the same time... things might be a little screwy, but it is possible because they're all individually defined in NWScript. If Mira and Hannharr or the Disciple and the Handmaiden shared integers, you wouldn't be able to do that.

Actually a thought occurs... as far as I know the GUI isn't entirely hard coded, so it's possible the issues I mentioned could be resolved. Not really my area... but I might look into it.

You can read more here about my silly exploits into the matter.


JCarter426 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 > KotOR II Party NPCs

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 08:46 PM.

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