Jump to content

Home

Place Items on Spawn


CorSton

Recommended Posts

Hi :)

I've edited some robe textures, created a new related .uti (to not overwrite the original base items) and with the "giveitem" cheat I've received in game the object with custom texturing ... good, but I need to place that robe on a character right on spawn for a module.

 

I think I have to edit a .2da, but I don't know which one: the appearance.2da seems for char model looks only, baseitems.2da has already an entry for my object (it is just a retexturized item)...

 

Right now, if I place that robe on a char in a module, I can see the name of that char only (no body).

 

:confused:

Link to comment
Share on other sites

You can edit the .utc file for a creature to add item to its inventory. However, as explained in this post, .utc editing can be hazardous and could cause game crashes:

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

 

The best thing is to use a script to add the item to a creatures inventory.

Check this thread: http://lucasforums.com/showthread.php?s=&threadid=143412

and this one (it works the same way for creatures) http://lucasforums.com/showthread.php?s=&threadid=143536

 

If you want a sample script that will add the items in the inventory when the module loads, you can have a sample script here: http://mars.walagata.com/w/darth333/raghoul_fix.zip (it was made for Kotor 1 to change canderous's rifle in Taris Undercity - It works exactly the same for Kotor 2)

 

If you have difficulties, I'll update the tutorial this evening to add more details about removing/adding items to a creatures inventory with scripts.

Link to comment
Share on other sites

Many thanks, darth, you're fantastic :)

 

I've tried to create a very simple script (IE, a newbie script :D ) based on raghoul_fix, placing it on the module onSpawn (and, later, on the receiving char onSpawn)

 

void main ()
{
object oMan=GetObjectByTag("dan14_man1");
object oItem=CreateItemOnObject("custom_item",oMan);
AssignCommand(oMan, ActionEquipItem(oItem,INVENTORY_SLOT_BODY));
}

 

Now, it's visible just the head of the char.

It seems a problem of the item/texture, but I repeat: if I use the giveitem cheat, I receive the object without problems...

Link to comment
Share on other sites

Well, certain characters can't wear some clothes/armor/robes, and some characters can't wear anything except their default appearance outfit.

 

You need to find out the appearance number of the character. This can be done by examining its UTC file.

Then you should check appearance.2da and scroll to the correct row (the number you got from UTC). Then you can check columns modelb, modelc, etc. If there is lots of empty entries "****", then it means the characters can't wear many things. This is it... in a nut shell.

Link to comment
Share on other sites

Originally posted by CorSton

um, yeah, that's the problem: after some testing I can confirm the specific char can't wear that specific robe... :(

 

It can be fixed though, provided the character has separate head model. There are some models that don't have heads,.. erm.. in a manner of speaking.. they are just one model (body and head).

 

What's the character UTC name and in what module is he/she placed?

Link to comment
Share on other sites

Ok, good for you, he has head. :D

 

in appearance.2da

 

scroll down to his row number (Unique_deadeye)

the scroll right till you see his "modelj" and "texj" column values.

As you can see, they're blank, as filled with ****

Enter PMBJL in his "modelj" field

Enter PMBJ in his "texj" field

 

Save this 2da to your Override and try the script.

I am not sure it will work, but it might.

Link to comment
Share on other sites

Originally posted by CorSton

woo, it worked! thanks!

 

I haven't understood how you get around the problem... why you told me to add those values? what are they?

 

Those values are default player's model+texture values for Star Forge Robes. You simply copied them to deadeye.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...