lfnetwork.com mark read register faq members calendar

Thread: NPC Replacement Question
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 03-19-2006, 06:21 PM   #1
idontknow3300
Rookie
 
idontknow3300's Avatar
 
Join Date: Mar 2006
Posts: 15
NPC Replacement Question

I don't know if the title is misleading or not, but here's my question. If I wanted to replace Jolan Aphett, the Pazaak playing guy on West Central Manaan, with, i don't know, a random Jedi named Dave, how would I do that? I thought I could do it in the creature editing thing in KT, but that always has me save somewhere else and doesn't replace it. The tutorials don't really help much either, so if anyone knows what I mean can they tell me how to do this, or give me a link to a thread with the answer?
idontknow3300 is offline   you may: quote & reply,
Old 03-19-2006, 07:25 PM   #2
Darth333
Administraterror
 
Darth333's Avatar
 
Status: Administrator
Join Date: Feb 2004
Location: In my secret dungeon...
Posts: 8,295
You would first have to remove the existing npc by using a script like this one:

Code:
 void main()
{
   DestroyObject(GetObjectByTag(npc_tag"));
}
and then spawn a new npc as indicated in this tutorial: http://www.lucasforums.com/showthread.php?t=143536

You could also simply change his appearance either using a script calling the disguise function or editing his .utc file (creature editor). Note that the disguise trick won't change his name. If you use the creature editor, you can change the name and the apperance but you have to make sure that your file is unique or it could lead to some game stopping bugs if the .utc file is not unique. You can use findrefs to verify if the file is unique or not.

A sample script to change the appearance in K1 (this one will turn the npc into a tach):
Code:
void main(){
//select the disguise - look at nwscript.nss:
effect eDisg = EffectDisguise(DISGUISE_TYPE_C_TACH);
//select your target by inserting the tag
object oTarget= GetObjectByTag(my_npc_tag"); 
//apply the disguise
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eDisg, oTarget);
}
The above script works for Kotor 2 but there is a much cooler ChangeApperance function for this.
Darth333 is offline   you may: quote & reply,
Old 03-20-2006, 04:54 PM   #3
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! 
Quote:
Originally Posted by Darth333
(this one will turn the npc into a tach):
You have quite a bit of experience with that function, don't you?




Mono_Giganto 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 > NPC Replacement Question

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 03:16 PM.

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