SevenBlue Posted October 3, 2017 Share Posted October 3, 2017 Hey, so I'm working on my MCM for my mod and I'm currently on the toggle option for certain items to appear in the merchant's inventory. It works fine if the player waits 2 days for the merchant chest to respawn, but I was wondering if there was another way of handling it? I have it set up with two layers of leveled lists, ListA gets added to a vanilla leveled list oninit, the only item on ListA is ListB, the toggle option I currently have set up uses addform and revert to control the single item being added and removed from ListB. This works but like I said you also gotta wait for the merchant's chest to respawn. I also tried using globals with a similar set up, and this works in that the item spawns in the vendor's chest immediately, since it was technically always there just hidden, but then when the option to show the item is disabled the item persists in the merchant chest. I'm not even sure if there is a viable solution beyond just having the player wait 2 days in game but I figure I'd throw this out there. Link to comment Share on other sites More sharing options...
foamyesque Posted October 3, 2017 Share Posted October 3, 2017 There's ways, but I'd need to know more about what you're after before making a specific recommendation. 1. Is this a singular, known merchant chest?2. If not, is it a set of known merchant chests?3. Do you care if the rest of the chest's inventory gets reset at the same time? Link to comment Share on other sites More sharing options...
SevenBlue Posted October 3, 2017 Author Share Posted October 3, 2017 No, three known merchant chests, the three caravans. I've been using the moonsugar leveled item list to target all three at once. Ideally no since that's exploitable by the player, they could just toggle the option to reset the inventory. Link to comment Share on other sites More sharing options...
foamyesque Posted October 3, 2017 Share Posted October 3, 2017 No, three known merchant chests, the three caravans. I've been using the moonsugar leveled item list to target all three at once. Ideally no since that's exploitable by the player, they could just toggle the option to reset the inventory. Okay. Is the item being added a new item created by your mod, or something vanilla? Link to comment Share on other sites More sharing options...
SevenBlue Posted October 3, 2017 Author Share Posted October 3, 2017 Okay. Is the item being added a new item created by your mod, or something vanilla? New item Link to comment Share on other sites More sharing options...
foamyesque Posted October 3, 2017 Share Posted October 3, 2017 Okay. Is the item being added a new item created by your mod, or something vanilla? New item In that case, you should be able to take your current global setup and, when disabled, grab the chests, and use RemoveItem() on them. Have you tried that? Link to comment Share on other sites More sharing options...
SevenBlue Posted October 3, 2017 Author Share Posted October 3, 2017 Won't compile not sure why, tried tweaking it in various ways. SetToggleOptionValue(iKit, KitVal) If (SB_SkoomaSetGlobal.GetValue() == 0) SB_SkoomaSetGlobal.SetValue(1) Else SB_SkoomaSetGlobal.SetValue(0) MerchantCaravanAChest.RemoveItem SB_SkoomaSet 10 and here are the errors C:\Games\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\SB_MCMScript.psc(100,26): no viable alternative at input 'RemoveItem' C:\Games\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\SB_MCMScript.psc(100,37): no viable alternative at input 'SB_SkoomaSet' Link to comment Share on other sites More sharing options...
Kapteyn Posted October 3, 2017 Share Posted October 3, 2017 (edited) MerchantCaravanAChest.RemoveItem(SB_SkoomaSet,10)Also, I'm not sure if GetValue() should be GetValueInt() for a bool toggle. Oh... I don't know anything about merchant inventories, but I'm wondering if you could change the levelled list instead. So you have one list with skooma in it, then when you're resetting it you switch it for a list which does not have skooma. Might be more practical than directly adding or removing stuff. Edited October 3, 2017 by Kapteyn Link to comment Share on other sites More sharing options...
SevenBlue Posted October 4, 2017 Author Share Posted October 4, 2017 RemoveItem is not a function or does not exist Annoying but this is what I got Link to comment Share on other sites More sharing options...
foamyesque Posted October 4, 2017 Share Posted October 4, 2017 RemoveItem is not a function or does not exist Annoying but this is what I got If you want compiler errors diagnosed you need to post the exact script you're trying to compile. Best guess is you're calling it on something that isn't an ObjectReference. Link to comment Share on other sites More sharing options...
Recommended Posts