Jump to content

Home

NPC Spawn/despawn


LiquidZoo

Recommended Posts

Sort of a continuation from this thread

 

I got my NPC's to spawn, and the scripts to give the items in relation to dialog choices/alignment. 2 things I can't seem to get right.

 

1. I decided on a Rodian for my Dark Side "Mysterious Jedi" (I know, I've never heard of a Rodian Jedi either), but I can't get the NPC to equip the jedi robe I created for him. The LS Twilek Female equips them, no problem. Not sure what the problem is here.

 

2. My goodbye script isn't working, unless I have it listed wrong somewhere. I followed the example from tk102 here and I attached it to the end dialog node of the dlg file I was using as a test, but they still stay put and I can talk to them over and over and over, which is not what I want. I'll post one of the 2 scripts (sub n_rodian01 for oNPC and you have the other one) so that maybe someone can help me out.

 

void main () {

 // This script will make any NPC 
 // move to a desired location and vanish.

 object oNPC=GetObjectByTag("n_twilekf01");    

 float x=75.54;                        
 float y=91.24;                        
 float z=5.36;                        

 int bRun=FALSE;                         

 vector vExit=Vector(x,y,z);
 location lExit=Location(vExit,0.0);
 ActionDoCommand(SetCommandable(TRUE,oNPC));
 AssignCommand (oNPC,ActionForceMoveToLocation(lExit,bRun));
 AssignCommand (oNPC,ActionDoCommand(DestroyObject(oNPC)));

  ActionDoCommand(SetCommandable(FALSE,oNPC));

}

Link to comment
Share on other sites

I believe the Rodian models are a complete model not a seperate head and body like the twileks. This means they can not wear clothing (normal clothing, armour, robes etc) other then what they are wearing already. They will get the benefits from any robes etc you put on them but their appearance won't change to a Rodian wearing a robe.

Link to comment
Share on other sites

These aliens have all-in-one models (forgive me for not knowing all their right names)--Aqualish, the little bat-eared guys, the three eyed dudes, Bith, Ithorians, Sullustan, Duros, Mandalorians in armor, Rakata, Selkath, the ones commonly called "Black Vulkars", Tusken Raiders, Wookiees, Jawas, Hutts, Trandoshans, and Yoda-types. There's also what I believe is a Quarren in this catagory, but there's one with seperate textures, too.

 

Devaronians use seperate head models, the Zeltron(?) lady does also. Quarren use seperate heads as well. Whatever Weeq is has a seperate head. So does the lone Cathar, but all of her textures are only in K1 (although there's nothing preventing you form repainting a texture to make a reasonable facsimilie of a Cathar). To get them in robes, if they can't already, create a new NPC row in appearances.2da with the correct numbered head and change the bodies so they can wear robes. They'll loose unique hands if they have them, but they'll wear whatever you want them to.

Link to comment
Share on other sites

I had another thought, but I would have to figure out how to do it.

 

I would like to get a hooded robe model for an NPC (preferably without affecting any other NPC's, which will probably involve appearance.2da edits) and stick a mask on him. That way it wouldn't matter which voice files I stuck with them (wouldn't matter anyway, really, but I would care)

 

Now my question is: I know there are several hooded robe models available out there. How would I go about getting one of them equipped on an NPC? Perhaps t7 or RedHawke could help me with this one, since I know they've both created/released hooded models.

Link to comment
Share on other sites

These aliens have all-in-one models (forgive me for not knowing all their right names)--Aqualish, the little bat-eared guys, the three eyed dudes, Bith, Ithorians, Sullustan, Duros, Mandalorians in armor, Rakata, Selkath, the ones commonly called "Black Vulkars", Tusken Raiders, Wookiees, and Yoda-types.

 

Devaronians use seperate head models, the Zeltron(?) lady does also. Quarren use seperate heads as well. Whatever Weeq is has a seperate head. To get them in robes, if they can't already, create a new NPC row in appearances.2da with the correct numbered head and change the bodies so they can wear robes. They'll loose unique hands if they have them, but they'll wear whatever you want them to.

 

Sorry, I should have specified that it was for K1, not TSL. Not sure if this all applies.

Link to comment
Share on other sites

My mistake. In K1, the all-in-one aliens are the same, the only one other than Twi'leks with seperate heads are Cathar. You could repaint Juhani to make a unique Cathar. Otherwise, you might be able to paint a robe-like texture onto your Rodian, but there's not much more you could do with that as far as I know.

 

(Oh yeah, Gamorreans are all-in-one also.)

Link to comment
Share on other sites

Ok. Did some research and found this post by RedHawke. Will need some appearance.2da editing, but that's no big deal. I can manage that. So it appears that having the hooded robes/mask option for one of the NPC's is possible.

 

I also found some things while checking other mods that have custom npc's that exit after you talk to them (Revan Mask+ 2.0 is definitely one of them), and in that particular mod, T7 uses the stock departure script from the game, so I'm going to try that tomorrow. Unless, of course, someone can figure out what's wrong with the script above.

Link to comment
Share on other sites

Devaronians use seperate head models, the Zeltron(?) lady does also. Quarren use seperate heads as well. Whatever Weeq is has a seperate head. So does the lone Cathar, but all of her textures are only in K1 (although there's nothing preventing you form repainting a texture to make a reasonable facsimilie of a Cathar). To get them in robes, if they can't already, create a new NPC row in appearances.2da with the correct numbered head and change the bodies so they can wear robes. They'll loose unique hands if they have them, but they'll wear whatever you want them to.

 

Real quick fix to this list.

 

The Weequay and quarren do not have seperate head & body models. Just like many of Kreia's appearances they have seperate textures but one solid model. It's something the devs did in K2 that was a slight change from K1 for some of the aliens. However the Ubese found in the Jek'Jek'Tar sublevels do have seperate head models.

Link to comment
Share on other sites

Hmmm...

 

Ok, odd things happening now.

 

Changed my ls template from n_twilekf01.utc to ls_mystjed.utc, made the changes to my script, while also changing my n_rodian01.utc to ds_mystjed.utc. I added a line in appearance.2da for the dark side jedi because I wanted him to have a unique appearance. Took one of the PC lines and customized it.

 

Ok, on to the issues. DS Jedi spawns great, but...

 

I wanted him to have custom hooded robes. So, I extracted g_a_mstrrobe06.uti and PMBJ02 (Star Forge Robes), renamed them to 09 and retextured the tga file, but the robes still show up in-game looking like Revan's DS Robes. This is the only mod I have installed, so I did something wrong here. I also did a new head for him, saved it, added it to heads.2da and made the change to the appearance.2da file to be the new head, but he has no head in-game... I tried putting a custom mask on, but that doesn't show either. Creepy. (btw, anyone know what model I_Sithmask2.tga really belongs to?)

 

Ok, on to the LS issues. My Twi'lek jedi no longer spawns after I renamed the utc file. I tried adding an entry to the appearance.2da file, but still nothing. Anyone have any ideas on this one?

Link to comment
Share on other sites

Did you changed your spawn script? (sometimes it's just a little thing we forget )

void main()
{
object oPC=GetFirstPC(); 
vector myVec=Vector(52.35, 70.75, 8.76);  
location myLoc=Location (myVec, 0.0);     
if(GetGoodEvilValue(oPC)>=50){  //PC is ight

   object oNPC1=CreateObject(OBJECT_TYPE_CREATURE,"[color=skyblue]ls_mystjed[/color]",myLoc);
    }

else{                           //PC id dark
   object oNPC1=CreateObject(OBJECT_TYPE_CREATURE,"[color=skyblue]ds_mystjed[/color]",myLoc);

    }

ExecuteScript("k_pdan_makejedi", OBJECT_SELF);

}

Link to comment
Share on other sites

I wanted him to have custom hooded robes. So, I extracted g_a_mstrrobe06.uti and PMBJ02 (Star Forge Robes), renamed them to 09 and retextured the tga file, but the robes still show up in-game looking like Revan's DS Robes.

Did you change the texture variation number within the uti file to 09 aswell? Or just the uti name? If you didn't change the texture number then that is why it is appearing wrong.

Link to comment
Share on other sites

Did you change the texture variation number within the uti file to 09 aswell? Or just the uti name? If you didn't change the texture number then that is why it is appearing wrong.

 

Yeah. I changed the Template ResRef to g_a_mstrrobe09, the Tag to g_a_mstrrobe09, and the Texture Variation to 9. Didn't change anything else except mess with the properties to just make it a base robe, nothing else. If I use the giveitem cheat to give it to myself, it shows up correctly; which is just puzzling to me.

 

For the appearance file, I copied line 143 (P_MAL_MED_03) to the very end (line 509) and changed the modelj column to n_DarthRevanM and texj to N_DarthRevan and the head to 107 (retextured head from the same base body)

Link to comment
Share on other sites

On further reading

 

You will need a texture to replace the Star Forge Robes as it doesn't have parts skinned, but you just need a Revan Robe skin to drop into override to replace it named PMBJ02.tga, there are many floating around out there or you can make your own. You can then easily add more robe texture variants by naming them PMBJ03.tga, PMBJ04.tga, etc.

 

From this thread

 

It seems that I am using the wrong robe model perhaps. I will try messing around with the Revan Robes instead of the Star Forge Robes.

 

It's a shame, though. I really would like to use the SF Robe texture instead of the Revan Robes. The design is different enough to make me happy, that and I seem to suck at retexturing. I can never get the colors to look exactly right (blacks and whites turn grey, dark colors appear light, weird things with photoshop)

Link to comment
Share on other sites

Yeah. I changed the Template ResRef to g_a_mstrrobe09, the Tag to g_a_mstrrobe09, and the Texture Variation to 9. Didn't change anything else except mess with the properties to just make it a base robe, nothing else. If I use the giveitem cheat to give it to myself, it shows up correctly; which is just puzzling to me.

Couple things, make sure your appearance.2da edits are correct for your NPC.

 

Also is your texture named properly, is it PMBJ09.tga or is it N_DarthRevan09.tga, you need to name it whatever you put for your NPC's texj cell. If I have read your posts correctly it would need to be N_DarthRevan09.tga.

 

For the appearance file, I copied line 143 (P_MAL_MED_03) to the very end (line 509) and changed the modelj column to n_DarthRevanM and texj to N_DarthRevan and the head to 107 (retextured head from the same base body)

When making 2da changes with KotOR Tool's 2da editor always make sure you click on a line you haven't edited before saving.

Link to comment
Share on other sites

Also is your texture named properly, is it PMBJ09.tga or is it N_DarthRevan09.tga, you need to name it whatever you put for your NPC's texj cell. If I have read your posts correctly it would need to be N_DarthRevan09.tga.

 

Good point. I'll try that out.

 

When making 2da changes with KotOR Tool's 2da editor always make sure you click on a line you haven't edited before saving.

 

I've made it a habit of clicking on another line no if I make any changes or not. I made a couple of those mistakes early on when I was starting to play around with the modding, so it's habit now.

 

Now, if I can get the robe looking right, and the LS NPC to spawn again, I can start adding sound files to my dialogs and get everything done.

 

Oh, by the way, the script k_act_exitarea works perfectly for the end dialog. Not sure why my other one isn't working.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...