ALPHA000102 5 Posted December 23, 2018 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. Quote Share this post Link to post Share on other sites
Thor110 486 Posted December 23, 2018 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 Quote Share this post Link to post Share on other sites
JCarter426 1,214 Posted December 23, 2018 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. 1 Quote Share this post Link to post Share on other sites
ALPHA000102 5 Posted December 24, 2018 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. Quote Share this post Link to post Share on other sites
Thor110 486 Posted December 31, 2018 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. Quote Share this post Link to post Share on other sites
ALPHA000102 5 Posted January 28, 2019 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 Quote Share this post Link to post Share on other sites
Guest Qui-Gon Glenn Posted January 29, 2019 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. Quote Share this post Link to post Share on other sites
ALPHA000102 5 Posted February 15, 2019 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. Quote Share this post Link to post Share on other sites
Guest Qui-Gon Glenn Posted February 15, 2019 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. Quote Share this post Link to post Share on other sites
ALPHA000102 5 Posted February 18, 2019 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 but adjust the vector coordinates. To quote another forum: "In KOTOR Tool, the GIT (dynamic area info) is in the XYZ.rim along with the ARE (static area info) and IFO (module info).". I want to know how to do that. 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 Quote Share this post Link to post Share on other sites
JCarter426 1,214 Posted May 9, 2019 If you want to add a placeable via the GIT file, you'll want to extract and edit m01aa.git from end_m01aa.rim. Open the file with K-GFF, duplicate one of the existing placeable structs, then edit the details. After you're done editing the file, you'll have to compile it into a .mod and install it to the modules folder. Extracting all the files in end_m01aa.rim and end_m01aa_s.rim, put in your edited GIT, and then create a end_m01aa.mod file with ERFEdit and add all the files. If you're planning to release it as a mod, though, you'll want to configure it with TSLPatcher or else it won't be compatible with other mods that edit that area. If you add the placeable with a script, you only have to edit one file and install to Override, so that's somewhat simpler provided you understand the NWNScript language. The best course of action in this case is to find and edit an existing script, either the OnEnter script for the area (k_pend_area01) or a script that fires early on in the opening cutscene (such as k_pend_rumble01). 1 Quote Share this post Link to post Share on other sites
ALPHA000102 5 Posted May 11, 2019 On 1/29/2019 at 2:50 PM, Qui-Gon Glenn said: 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. Can you please walk me through that step-by step? I am having trouble getting the scripts to work to spawn the container and I have already tried multiple times. I want the type of the container to be a metal box containing the Blaster Cannon weapon. Thank you in advance. On 5/9/2019 at 3:03 PM, JCarter426 said: If you want to add a placeable via the GIT file, you'll want to extract and edit m01aa.git from end_m01aa.rim. Open the file with K-GFF, duplicate one of the existing placeable structs, then edit the details. After you're done editing the file, you'll have to compile it into a .mod and install it to the modules folder. Extracting all the files in end_m01aa.rim and end_m01aa_s.rim, put in your edited GIT, and then create a end_m01aa.mod file with ERFEdit and add all the files. If you're planning to release it as a mod, though, you'll want to configure it with TSLPatcher or else it won't be compatible with other mods that edit that area. If you add the placeable with a script, you only have to edit one file and install to Override, so that's somewhat simpler provided you understand the NWNScript language. The best course of action in this case is to find and edit an existing script, either the OnEnter script for the area (k_pend_area01) or a script that fires early on in the opening cutscene (such as k_pend_rumble01). Can you please walk me through that step-by step on the first option? I am having trouble getting the scripts to work to spawn the container and I have already tried multiple times and I have had absolutely no experience with the .mod files. I want the type of the container to be a metal box containing the Blaster Cannon weapon. Thank you in advance. Quote Share this post Link to post Share on other sites
JCarter426 1,214 Posted May 12, 2019 Spoiler Extract entire RIM file for both of the module's files (e.g. end_m01aa.rim and end_m01aa_s.rim) to an empty folder somewhere. Open the GIT file in K-GFF. Go down to the placeable list and copy an existing struct. Paste into the placeable list. Edit the new struct's details. For the resref, use the file name of your new UTP. (You'll have to make a new UTP of course, but that's the same basic procedure.) When you're done editing, save. Create a new MOD file with ERFEdit (e.g. end_m01aa.mod). Drag all the files you extracted in step 1 (along with the edited GIT) into the ERFEdit window, then save. Install the MOD file to the modules folder. The changes will only take effect if you start a new game or load a save from before you ever visited the area in that run of the game. Quote Share this post Link to post Share on other sites
ALPHA000102 5 Posted May 18, 2019 On 5/11/2019 at 7:17 PM, JCarter426 said: Reveal hidden contents Extract entire RIM file for both of the module's files (e.g. end_m01aa.rim and end_m01aa_s.rim) to an empty folder somewhere. Open the GIT file in K-GFF. Go down to the placeable list and copy an existing struct. Paste into the placeable list. Edit the new struct's details. For the resref, use the file name of your new UTP. (You'll have to make a new UTP of course, but that's the same basic procedure.) When you're done editing, save. Create a new MOD file with ERFEdit (e.g. end_m01aa.mod). Drag all the files you extracted in step 1 (along with the edited GIT) into the ERFEdit window, then save. Install the MOD file to the modules folder. The changes will only take effect if you start a new game or load a save from before you ever visited the area in that run of the game. I was not able to get the .mod file to work. No matter what I did after multiple tries I could not get the container to spawn. However I was able to get around this problem. I was able to take a placeable file and its spawning script from another mod I have: the Utility Armbands. I would like to thank the creator of the mod, Star Admiral, for creating the mod and giving permission that the files can be reused in other mods. As he requested in the readme I grant him full credit for the mod as well. I have now actually been able to get the container to spawn but it is in the wrong spot. I want to be on the other side of the room and in the center of it. Can you please help me figure out what adjustments I should place in the location vectors. I have placed the files below so you can take a look at them. Thank you in advance. Container Files.zip Quote Share this post Link to post Share on other sites
JCarter426 1,214 Posted May 19, 2019 The part you want to change is in the NSS file: Location(Vector(11.85, 15.91, -1.27), 0.00) The Vector() part is the XYZ coordinates. You can get the new set of these with the whereami cheat. The last number is the bearing, in degrees. You kind of have to guess with that, as the game is inconsistent about whether 0 degrees means north or east. I'd suggest leaving it as 0.0, and then if it's facing the wrong way, try 90.0, 180.0, or -90.0 as needed. Of course you can give it any angle in between, as well. Once you have edited that, you need to compile it into an NCS file and replace the existing one. There should be a tutorial for that either on this site or in the LucasForums archives here. 1 Quote Share this post Link to post Share on other sites