ALPHA000102

Editing Placeable Items In KOTOR

10 posts in this topic

I want to know how to add items to containers in KOTOR. Specifically I want to add items from other mods and custom items that I created to the first footlocker on the Endire Spire. I cannot get them to appear in the custom items in the Inventory Editor of KOTOR Tool as shown in the image below. This way I can get them in the game itself without having to use a cheat code or the Save Game Editor. Please help me do this and provide all details. Thank you in advance.

 

Image.PNG

Share this post


Link to post
Share on other sites

I haven't done item editing yet, but I get the feeling you might need to recompile the module through kotor tool.

You would need the .are, .git and .ifo files as well as all the scripts you have extracted and edited, then using the ERF button on kotor tool you can package them into a module with the drop down selected to "MOD" and the file saved as "MODULE.MOD" Module being the name of level and ".mod" being required for it to save properly.

You then add the .are, .git and .ifo files and the scripts you have edited and click "Build Mod"

Though I am not 100% sure I am pointing you in the right direction, I get the feeling re-compiling the module would be better than trying to edit the module, I am sure I read somewhere that when editing a module it is better to recompile / rebuild it rather than edit the in-game modules.

Thor110

Share this post


Link to post
Share on other sites

Usually you shouldn't use KOTOR Tool's inventory editor. It's buggy. If you open the file with K-GFF, you can edit the fields directly.

  • Like 2

Share this post


Link to post
Share on other sites

I have had absolutely no experience using the K-GFF Editor. Can you please explain to me how to use it. There is one item from a mod built by someone else as well as items that I have created myself that I want to add to the footlocker. Please provide any and all details very clearly. Thank you in advance.

Share this post


Link to post
Share on other sites

Just open K-GFF editor and go to the same file / location you have done in kotor tool or extract the file using kotor tool and then edit using K-GFF editor, just open the file and look through all the fields / entries and look for where you need to enter your item, you seem to already know the exact location / locker it needs to be placed in.

I have opened exactly the same file for reference.

All you need to do is add a new entry/struct to the ItemList section and add the three entries for your new item

Spoiler

ItemList[Type: LIST] Structs: 4
[STRUCT ID: 0]
InventoryRes [TYPEE: RESREF] Value: g_1_medeqpmnt01
Repos_PosX [TYPE: WORD] Value: 1 
Repos_PosY [TYPE: WORD] Value: 0

The above code is what you need to be looking for in the footlocker script file, simply add a new struct to the ItemList with right click, then enter your item's details.

Still having not added an item to the game myself yet, pretty sure this is what you need to do.

Share this post


Link to post
Share on other sites

I have been able to figure out the point with the K-GFF Editor however the item still not work entirely. According to the research I have done I will need to make edits to the scripts. The reason for this is that the footlocker I am using is not uniquely named so the game tries to place the items in each occurrence of the footlocker. Furthermore the items I am using are custom made, not those available in the game by default. I need to adjust the scripts so the items are included but only appear once in the first footlocker on the Endar Spire where you first speak to Trask. I have found some links that provide instructions which are included below but they are difficult for me to understand. I ask for someone to please provide step-by-step instructions on how I can create scripts and add my player made items to appear in the footlocker. Also can someone please tell me how to how change the links. I want all my links to be posted as text like the one at the bottom, not the image attachments like those shown below that automatically appear. Thank you in advance.

 

https://web.archive.org/web/20151203123041/http://www.lucasforums.com/showthread.php?mode=hybrid&t=143536

Share this post


Link to post
Share on other sites

IIRC, you do not want to edit the contents of that footlocker; lots of scripts attached to it.

Instead, spawn a new unique container in the same room.

Share this post


Link to post
Share on other sites

I can see that you are right. I tried to use the GFF Editor to edit the contents of the Endar Spire Footlocker and it edited the contents of every such footlocker in the game. That definitely will not help me. I am willing to create a custom container but can you please provide me with specific step-by-step instructions on how to do it? For example, I am at a complete loss on how to get the XYZ coordinates on where I want the container to be. I know there are multiple type of containers available such as bags, cylinder containers, and footlockers. I want to spawn a custom footlocker. Finally after I can get it spawned how do I establish the inventory? Again please provide step-by-step instructions for the whole thing. Thank you in advance.

Share this post


Link to post
Share on other sites

A more recent tutorial:

Older tuts, by Achilles... Probably the most staggering intellect I have encountered on the internet, which is saying something.

https://www.freewebs.com/achilles01/tutorials.htm

You need to use whereami to get your coordinates, and then as far as orientation goes it isn't massively important with containers but you may need to experiment there.

It is mostly the same process as spawning an NPC, at least if you are doing it by scripting. It is better to edit the .git but that is a bit more complicated. Try scripting first.

  • Thanks 1

Share this post


Link to post
Share on other sites

I was unable to get the whereami armband to work but I used the Orientation Armband from the Utility Armband Mod which did the same thing. I was able to get the orientation vectors but I am still have trouble. For the type of placeable I have taken a footlocker.utp file and given it a unique name so the game will recognize it as a unique item.  I know how to use the GFF Editor to edit the inventory of the placeable as I have done it before. What I want to know is how do I get the placeable to spawn where I want it to. I want to appear in the same room on the Endar Spire where the player character first meets Trask under the window do the right. I want the footlocker to be facing towards the center of the room just as the one where you get your gear is located. I will wait to edit the inventory until after I get this matter resolved. I have placed my vector coordinates below and attached the placeable file I intend to use. Please tell me if I am wrong anywhere. Please provide step-by-step instructions for everything. Thank you in advance.

Angle Orientation: 187.890487671

X Orientation: -0.990523279

Y Orientation: -0.137280092

Bearing Orientation: -2.995116711

footlker999.utp

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now