Stormie97 253 Posted October 11, 2019 Hey folks, I've picked my WIP Luke robe from ROTJ up where I leftyesterday and it's almost done, I just have to insert it somewhere for the player to acquire it. I want to put it in Dendis Dobo's merchant inventory, the Duros merchant on Telos. But I can't get to work for some reason. Here's what I have tried so far: I followed this tutorial and added my robse item to his inventory by moddifying m_202_001.utm which appears to be the corresponding merchant utm file. However, putting it in my override folder seems to have no effect on his inventory IG whatsoever. I used TSLPatcher to inject the modifications into the appropriate RIM file (202TEL_s.rim). What I have done seems to have worked since I can now see my custom item when I open m_202_001.utm in KoTORTool: Spoiler Yet, his inventory IG still remains unchanged. Even adding existing jedi robes from the vanilla game doesn't seem to work so surely there is something I'm missing here. Any ideas on what I'm doing wrong here? Quote Share this post Link to post Share on other sites
DarthParametric 3,783 Posted October 11, 2019 If you are loading a save in the module it won't work, as the save will have a copy already stored in it (inside the specific module's GIT). You'll have to load a save from before entering the area for the first time to see the changes. Quote Share this post Link to post Share on other sites
Stormie97 253 Posted October 11, 2019 Just now, DarthParametric said: If you are loading a save in the module it won't work, as the save will have a copy already stored in it (inside the specific module's GIT). You'll have to load a save from before entering the area for the first time to see the changes. I loaded an earlier save. That solved it. However, since this area is entered pretty early on in the game, this would make it impossible to get the item without cheating for those who have already made further progress in the game. What are my options then, besides putting the robes in another merchant's inventory on one of the later planets? Quote Share this post Link to post Share on other sites
DarthParametric 3,783 Posted October 11, 2019 You could spawn it via script, either adding it to the store or a container. There would be a couple of ways to go about it. Hijack the module's OnEnter script and have it spawn it (and use a local boolean to make sure it only spawns once). Or edit the merchant's DLG and add a spawn script on a repeated node (like the generic greeting they always do, etc.) that does a similar check/spawn. Quote Share this post Link to post Share on other sites
Stormie97 253 Posted October 11, 2019 6 minutes ago, DarthParametric said: You could spawn it via script, either adding it to the store or a container. There would be a couple of ways to go about it. Hijack the module's OnEnter script and have it spawn it (and use a local boolean to make sure it only spawns once). Or edit the merchant's DLG and add a spawn script on a repeated node (like the generic greeting they always do, etc.) that does a similar check/spawn. Never done scripting before, so I'll look into it. Editing the merchant's DLG seems to be most doable of those options for a beginner. Quote Share this post Link to post Share on other sites
DarthParametric 3,783 Posted October 11, 2019 2 hours ago, Stormie97 said: I used TSLPatcher to inject the modifications into the appropriate RIM file You don't want to do that by the way. You want to create a MOD and inject your changes into that. Edit: Try this @Stormie97 and see if it works (you'll need to add your item's template name and compile it): void main() { object oStore = GetObjectByTag("m_202_001", 0); // To make sure the item only spawns once, check Dendis for the presence of // a custom local boolean we'll create. If it returns false, spawn the item. // Since the DLG we are firing the script from is owned by Dendis, we can use // OBJECT_SELF for any call that requires a target object, like the boolean set/get. if (!GetLocalBoolean(OBJECT_SELF, 66)) { // The check returned false, so set the boolean to true so that the // item won't spawn a second time on future triggers of this script. SetLocalBoolean(OBJECT_SELF, 66, TRUE); // Create the item in the store's inventory. The values are of the form: // Item template resref (string) / target (object) / item stack size (int) CreateItemOnObject("item_template_here", oStore, 1); } } After compiling it, you'll also need to edit Dendis's DLG and add the script name to one of the nodes. I would put it in the Script #2 slot on Reply 9 ("Just let me shop"). Just make sure not to replace any existing script. 1 2 1 Quote Share this post Link to post Share on other sites
Stormie97 253 Posted October 11, 2019 7 hours ago, DarthParametric said: You don't want to do that by the way. You want to create a MOD and inject your changes into that. Edit: Try this @Stormie97 and see if it works (you'll need to add your item's template name and compile it): void main() { object oStore = GetObjectByTag("m_202_001", 0); // To make sure the item only spawns once, check Dendis for the presence of // a custom local boolean we'll create. If it returns false, spawn the item. // Since the DLG we are firing the script from is owned by Dendis, we can use // OBJECT_SELF for any call that requires a target object, like the boolean set/get. if (!GetLocalBoolean(OBJECT_SELF, 66)) { // The check returned false, so set the boolean to true so that the // item won't spawn a second time on future triggers of this script. SetLocalBoolean(OBJECT_SELF, 66, TRUE); // Create the item in the store's inventory. The values are of the form: // Item template resref (string) / target (object) / item stack size (int) CreateItemOnObject("item_template_here", oStore, 1); } } After compiling it, you'll also need to edit Dendis's DLG and add the script name to one of the nodes. I would put it in the Script #2 slot on Reply 9 ("Just let me shop"). Just make sure not to replace any existing script. It works perfectly, thank you so much for your help! Quote Share this post Link to post Share on other sites