maltron66

Need help on item equipping

Recommended Posts

The little mod I've been working on for quite some time is almost complete. It's a mod that completely changes your party's stats, items, feats... pretty much everything, except for their appearance. About two weeks ago, I made a thread asking for help on changing the amount of vitality points each character earns per level up, a problem that had kept my project on hiatus for a good amount of time. This time, I've run into a different kind of problem, which is significantly less important, but I'd still want to fix it.

 

Each character's template can be modified so that they have specific items equipped when they spawn in the game. After poking at some .utc files, I managed to match most item slots with the values used to "identify" them in the .utc files. For example, the Head Gear/Sensor slot's value is 1, the Body/Plating slot is 2, the right weapon slot is 16 and the left weapon slot is 32. My problem is that I'm missing the value of the Implant/Utility slot. And also, I don't know how to set a character to have 2 different kinds of weapons equipped when they spawn. For example, I want to modify Mandalore's template so that he starts with his blaster rifle, but he also has a melee weapon as a secondary weapon that he can switch to whenever he feels like it. In short, I know how to set his primary weapons (slots 16 and 32), but I don't know how to set his secondary weapons (slots ??).

 

I looked through at least 30 different .utc files, but I didn't have any luck finding what I was looking. Which makes sense for the Implant/Utility slot value (since the characters that have an item equipped on that slot are few to none), but I expected to find a character who has both a ranged and a melee weapon equipped (since almost ALL characters use both ranged and melee weapons in combat).

 

A little help please?

Share this post


Link to post
Share on other sites

I would suggest to simply use Kotor Tools .utc editor. It has a very nice GUI for editing the inventory including all equipment slots as well as the "backpack inventory" (additional items). The only problem is that all items are set to Dropable when saving but this shouldn't be a problem for party members and if it is you can always use K-GFF to fix it.

Share this post


Link to post
Share on other sites

You're in luck. I blame KSE and the Toolset for having the knowledge I have in this case:

 

Head = 1

Body = 2

Hand/Glove = 8

1st Right hand = 16

1st Left hand = 32

Left forearm = 128

Right forearm = 256

Implant = 512

Belt = 1024

 

You probably don't need the invisible creature item slots, but I can provide those if you want. Prime examples of their usage are the Kinrath's poison attacks and HK-47's stat boosts.

 

2nd Right hand = 262144

2nd Left hand = 524288

 

If any of the info on the Right/Left-ness of some slots is incorrect, then I definitely ask you to correct me, but this info should be accurate.

Share this post


Link to post
Share on other sites

The inventory slots were adapted from Neverwinter Nights beforehand. 4 = Boots, 64 = Cloak, 2048 = Arrows, 4096 = Bullets, and 8192 = Bolts.

 

The Left and Right Ring slots were converted to the forearms, as was the Neck->Implant and Arms->Hands.

Share this post


Link to post
Share on other sites

And I figure I might as well fill in the gaps.

 

16384 = Creature Weapon L (Left?)

32768 = Creature Weapon R (Right?)

65536 = Creature Weapon B (Back? Backup?)

121072 = Creature Armor (this is often used for party member upgrades, and I believe gives the droids resistances)

Share this post


Link to post
Share on other sites

Sorry for the late reply, guys. After checking this thread a couple of times the day I created it, I completely forgot about...xD

 

FairStrides, I've said this once and I'll say this again: You're a lifesaver. The values you've provided are all correct (surprise, suprise...). I'm happy I decided to ask for help instead of testing values myself because I'd never find the right ones. I mean, 262144 and 524288? How'd you find these anyway? And why does this game not use the values 8 and 64, like l2daorch pointed out? If they were used in an older game, you'd think that they would be used in this one as well because... why change them? There's no reason to do that, but they did it. Anyway...

 

One thing I noticed is that some of the other values you mentioned are found in the .utc files of some party members. By "other", I mean values that do not correspond to an item slot. Specifically, there's a struct with the value 131072 that equips an "item" named "g_i_crhide008" and it's found on several of the player's party members' templates, such as HK-47, G0-T0, T3-M4 and Mandalore, I'm not sure what it is but I don't really care, so I left it alone. I'm not really that interested in finding out what it is anyway, since I now have all I need to finish my mod.

Thank you for helping out (again) and also, thanks to Kexikus for suggesting to use the Kotor Tool's .utc editor (I had completely forgotten about that, since I had been away from modding for a long time, and I always prefered the K-GFF editor over the Kotor Tool's utc editor to begin with. Regardless, it was a very helpful piece of advice, since I found out that the value for the Head/Sensor slot is 1 thanks to that) and finally, thanks to l2daorch for giving up some of his free time to bother with my thread. ;)

Share this post


Link to post
Share on other sites

The 8 and 64 were named according to their use. Since this game has no concept whatsoever of ammo, those slots were skipped over and probably disabled.

 

As to the other slots, I know you don't need the info, but I'll give it anyway to explain. The slots actually do exist and the items in them are real items. There are 4 "invisible"/hidden slots that you physically cannot access in-game. Three of these are for weapons and the last for an armor slot. These are the Creature slots.

 

Each of those slots are in my previous post. :)

 

As far as how I figured it out, I literally just used the .UTC editor in KT and some old format docs from Never Winter Nights to get an idea of the slots by entering an item in one slot, saving the file, opening in K-GFF to check the number, then writing it down. I had to for KSE. Though when you think about it... They were smart. The started with 1 and literally just doubled the number for each slot's ID.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.