Elwood288 8 Posted May 19, 2020 I'm finally getting around to fixing my Darkstar Gear mod. The first time around I placed it in the footlocker in your room on the Harbinger. This caused multiple other containers in the game, including the one containing the mining gear on Peragus, to be replaced with this footlocker. Obviously not ideal. I clearly don't understand how to add items to a container. So I had the idea of putting them on an NPC. I've had some success with that in K1. I chose Benok, the jerk of an Exchange Lieutenant. Problem with that is his cantina utc and exchange compound utc have the same file name. So the questions: 1. How would I go about adding items to a container without repeating my prior sins? 2. How would I reconcile the issue of both of Benok's utc files having the same name? Quote Share this post Link to post Share on other sites
DarthParametric 3,785 Posted May 19, 2020 There's no reason you need to switch if you'd prefer to use a container, you just need to do it properly. And in TSL especially, as you've discovered, all you've really done is exchange that problem for a different flavour of the same problem. Obsidian was extremely lazy with their design and reused a lot of Tags/ResRefs across multiple modules. This means you can't just dump stuff in the Override folder, you need to learn how to use TSLPatcher and do module injection. For either case, module injection should solve your issue, since you'll only be adding it to that specific instance of an inventory. Whichever one you prefer, the basic operation is the same. Extract a copy of the original template. Make a duplicate of that and edit it with your changes. Use TSLPatcher's ChangeEdit to create a new changes.ini and difference your edited file and the original to generate a list of required changes, making sure to specify the destination module it needs to go to. If you have additional items that need to be added, like custom UTIs, these can also be added, either to the module or the Override as necessary. Then you need to extract the vanilla module files from the two RIM files (and in TSL also the associated xxx_dlg.erf) and bundle them into a MOD using ERFEdit, and in ChangeEdit set this up to be added to the Modules directory (importantly, not set to overwrite). You should read the PDF that comes with TSLPatcher as well as browsing through the tutorial sub-forum for further information. 1 Quote Share this post Link to post Share on other sites
Elwood288 8 Posted May 19, 2020 I've actually been using TSLPatcher for my Jolee Hermit Robe mod so I have a little experience with it. When you say extract a copy of the original template do you mean the container or the module? Quote Share this post Link to post Share on other sites
DarthParametric 3,785 Posted May 19, 2020 Template refers to UTx - UTI, UTC, etc. That's what the T stands for, Template. 1 Quote Share this post Link to post Share on other sites
Elwood288 8 Posted May 19, 2020 Alright. Kinda confused but I think I'm on the right track. I had it compare the vanilla container vs the one I made changes to and then set the destination to the harbinger module I want. So is this right? Quote Share this post Link to post Share on other sites
DarthParametric 3,785 Posted May 19, 2020 You need to post the changes.ini it produces to properly see what is actually going on. But in a word, no. Most of what you have there is incorrectly under GFF. 1 Quote Share this post Link to post Share on other sites
Elwood288 8 Posted May 19, 2020 Great... Well here's the changes.ini. changes.ini Quote Share this post Link to post Share on other sites
DarthParametric 3,785 Posted May 19, 2020 Here you go. changes.ini So, some explanations for the changes. You didn't add the module (MOD) file to the install list. You always want to make sure this is set to copy, NOT replace (it will say "File" if in changes.ini if it is set to copy). That way it will only copy it there if it does not already exist. Since most people will have TSLRCM installed, and that adds MODs for almost every module in the game, you don't want to overwriting them. Or ones added by other mods, more so in K1. Most of the files intended for the Override, textures and new UTIs, got added to the GFF list. As the name suggests, the GFF list is for GFFs (e.g. UTPs, UTCs, GITs, etc.), but only for ones you are actively editing. This is sometimes a new one you are editing, especially in the case of UTCs where you may need to dynamically change an appearance.2da reference, but in your case you needed to add these to the file list. I have set them to replace, mostly so you can see how that works. For your own unique files this is typically fine, and may sometimes be a requirement for a patch/update to an existing mod or the like. But in some instances copy may be the more desirable approach. You did not set the target destination for the actual GFF that was correctly in the list (g_tresmillow007.utp). This is critical (and the entire point of this TSLPatcher setup) because if you don't specify a target then it defaults to the Override. Which is the same problem you had originally. The destination has now been set to the MOD added above (I have assumed 152HAR is the intended module, so change if necessary). It should be noted that for a file in the GFF list that already exists in the target location, such as in this case, you don't need to include a physical copy of the file in the mod, since everything TSLPatcher needs is in the ini. However, if you are adding a completely new file then you do have to include a copy. More of a minor issue, but you had it set to automatically look up the game install location, which is the default setting. You should always set it to user defined, since TSLPatcher only knows about the CD version. Typically in modern use (with GOG or Steam versions of the game) it just fails to find the install and asks the user, but in certain edge cases this can cause problems. You can change this in the Settings section up the top, but you have to manually hit the Save Settings button for anything in there (unlike changes made in any other section, which update automatically). As a final note, you should take a look at changes.ini so you can get a better understanding of what the program is doing. There are some things that are just easier to change in the ini file directly (and at least one thing that is only possible to change there), so checking it after every edit is a good practice to get into. 2 Quote Share this post Link to post Share on other sites
Elwood288 8 Posted May 19, 2020 Man I feel kinda embarrassed for being so dumb buuuuuut my desire to learn this and make it work out ways that so ONWARD!!! Okay so let me make sure I built the 152har.mod correctly 1. Extracted 152HAR.rim, 152HAR_s.rim and 152HAR_dlg.erf to a new folder. 2. Added the files in that folder to ERF Builder and had it build a new .mod named 152har 3. Put that in tslpatchdata EDIT: Well it worked so I think I did it right. Thanks for your help Darth. As usual you are the absolute best! Quote Share this post Link to post Share on other sites
DarthParametric 3,785 Posted May 20, 2020 Everyone has to start somewhere, and TSLPatcher is kind of opaque in how/why it does certain things. The best advice I can give you is to look at existing mods. Chances are whatever you want to do, someone has done something similar at least once in the last 15 years. Find that mod and poke through its innards to see how it was put together. Although you do need to be careful with older mods, since there were some bad practices in the early days, like putting pre-edited 2DAs in the Override instead of dynamically editing them, one of the primary tasks TSLPatcher exists for. Quote Share this post Link to post Share on other sites