tModLoader Shop Expander

The mod may have some problem with AlchemistNPC, an error occurred when I talk to the Alchemist.
Here is the log:
Code:
[18:20:46] [1/INFO] [ShopExpander]: --- SHOP EXPANDER ERROR ---
[18:20:46] [1/INFO] [ShopExpander]: Shop Expander failed to load ModNPC from mod AlchemistNPC.
[18:20:46] [1/INFO] [ShopExpander]: System.TypeLoadException: Could not load type 'CalamityMod.World.CalamityWorld' from assembly 'CalamityMod_0, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.
   at AlchemistNPC.NPCs.Alchemist.get_CalamityModDownedGuardian()
   at AlchemistNPC.NPCs.Alchemist.SetupShop(Chest shop, Int32& nextSlot) in AlchemistNPC\NPCs\Alchemist.cs:line 573
   at ShopExpander.Patches.SetupShopPatch.Prefix(Int32 type, Chest shop)
[18:20:46] [1/INFO] [ShopExpander]: --- END SHOP EXPANDER ERROR ---

[18:20:46] [1/INFO] [ShopExpander]: --- SHOP EXPANDER ERROR ---
[18:20:46] [1/INFO] [ShopExpander]: Shop Expander failed to load GlobalNPC from mod AlchemistNPC.
[18:20:46] [1/INFO] [ShopExpander]: System.TypeLoadException: Could not load type 'CalamityMod.World.CalamityWorld' from assembly 'CalamityMod_0, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.
   at AlchemistNPC.NPCs.ModGlobalNPC.get_CalamityModRevengeance()
   at AlchemistNPC.NPCs.ModGlobalNPC.SetupShop(Int32 type, Chest shop, Int32& nextSlot) in AlchemistNPC\NPCs\ModGlobalNPC.cs:line 236
   at ShopExpander.Patches.SetupShopPatch.Prefix(Int32 type, Chest shop)
[18:20:46] [1/INFO] [ShopExpander]: --- END SHOP EXPANDER ERROR ---
This is a problem with AlchemistNPC. It doesn't really have anything to do with Shop Expander. Looks like Calamity changed some stuff in an update again.
 
It appears Material Trader NPC and Fargo's Mutant Mod are causing issues. Some items won't be sold and I think that's due to multiple shops. Some items from Thorium cannot be sold and same for Calamity. I am not sure where I can find the full logs, because I literally looked at them but didn't see anything relating to the problem.
[doublepost=1565496504,1565496011][/doublepost]I am gonna disable the mods. Fargo's Mutant Mod and Material Trader NPC. Then I am gonna go into the world, and then re-enable them and see what happens.
 
It appears Material Trader NPC and Fargo's Mutant Mod are causing issues. Some items won't be sold and I think that's due to multiple shops. Some items from Thorium cannot be sold and same for Calamity. I am not sure where I can find the full logs, because I literally looked at them but didn't see anything relating to the problem.
[doublepost=1565496504,1565496011][/doublepost]I am gonna disable the mods. Fargo's Mutant Mod and Material Trader NPC. Then I am gonna go into the world, and then re-enable them and see what happens.
That could happen if the same mod, in the same ModNPC class tries to add more than 40 items. Like I said before, unless the mod specifically tells Shop Expander to provide more space, those items will still get cut off. Though, I am planning to add a sort of failsafe to prevent that in the next version.
If these items were displayed correctly in previous versions, it's also possible that Thorium renamed them, but Gargo's/Material Trader are still looking for the old names.
 
Hello! After tModLoader 0.11.5 happened, this mod stopped functioning properly. Please fix! Thank you.
Yeah, I was afraid this would happen, after I read the chagelog... I've already started work on a new version of this mod quite a while ago, but currently I don't have time to work on it, due to studies. But I'll finish it eventually.
 
I hadn't noticed the mod not working... Odd.
That said, however, I did find a bug. It seems with Shop Expander enabled, the right-click-to-apply function of Box of Gadgets' Reforging Kits fails to happen. They don't get used, and the item you're holding the kits over when right-clicking isn't reforged. After a LOT of testing, I narrowed it down to specifically Shop Expander that was the issue. Not sure why, since I didn't have any shops open, but figured I'd mention it.
There's also a noticable "flicker" of the UI when shift-click selling items to vendors. Not sure if that one's an issue with Shop Expander or something else though.
 
I hadn't noticed the mod not working... Odd.
Well, honestly I haven't tested it. I just know a lot of things have changed recently in TModLoader, that could potentially break my reflection. But it's possible it still works.

That said, however, I did find a bug. It seems with Shop Expander enabled, the right-click-to-apply function of Box of Gadgets' Reforging Kits fails to happen. They don't get used, and the item you're holding the kits over when right-clicking isn't reforged. After a LOT of testing, I narrowed it down to specifically Shop Expander that was the issue. Not sure why, since I didn't have any shops open, but figured I'd mention it.
That could be down to the fact that Shop Expander still uses Harmony for patching instead of tModLoader's Mono Mod. I'm pretty sure there's no built in hook for right clicking stuff into the inventory, so Box of Gadgets probably also uses a patch to do this. Then, when Shop Expander loads, Harmony overrides all the existing Mono Mod patches. I believe Mono Mod has some kind of compatibility mode, to make it work with Harmony, but that probably needs some extra setup. Anyways, migrating to Mono Mod is on my todo list.


There's also a noticable "flicker" of the UI when shift-click selling items to vendors. Not sure if that one's an issue with Shop Expander or something else though.
So, like, the whole UI just starts flickering? Yeah, I'm not sure about this one...
 
Well, honestly I haven't tested it. I just know a lot of things have changed recently in TModLoader, that could potentially break my reflection. But it's possible it still works.

That could be down to the fact that Shop Expander still uses Harmony for patching instead of tModLoader's Mono Mod. I'm pretty sure there's no built in hook for right clicking stuff into the inventory, so Box of Gadgets probably also uses a patch to do this. Then, when Shop Expander loads, Harmony overrides all the existing Mono Mod patches. I believe Mono Mod has some kind of compatibility mode, to make it work with Harmony, but that probably needs some extra setup. Anyways, migrating to Mono Mod is on my todo list.

So, like, the whole UI just starts flickering? Yeah, I'm not sure about this one...
Thanks for the quick response!
But yeah I'd definitely get if stuff was breaking due to tModLoader updates, and the conflicting patches certainly explains why that wouldn't be working.
I actually should probably set up another instance to test more thoroughly, as I'm using the 64 bit unofficial branch of tModLoader, which could be affecting things (though so far it seemingly hasn't affected other mods) but... that'll wait for a bit I think, since setting up new Terraria instances is a bit slow.
The flicker isn't a big deal, it just disappears and instantly reappears each time an item is shift-click sold. Visually a bit annoying to see but it's not game-breaking or anything.
 
Do you think you could add a config to disable certain npcs from the list? the one I want to disable is the tavernkeep, because it is so messy with this mod where it all makes sense without it.
 
20200215030258_1.jpg


I get this error when accessing NPC inventories for the first time in a world after starting up. I reported it to the Survivaria team as well.
 
Every time? It should really only show up once per game startup. Could you also post the relevant parts of your log file?
Yes, sorry, once per game startup. I dont really know where is the error log, so the first thing i did is reporting it here.
Can you tell me where is that log?
Edit: I found a crashlog, but it doesnt seem to have any information about the ShopExpander mod.
[16.03.2020 14:23:33
System.InvalidOperationException: The operation is not allowed on non-connected sockets.
at System.Net.Sockets.TcpClient.GetStream()
at Terraria.Net.Sockets.TcpSocket.Terraria.Net.Sockets.ISocket.IsDataAvailable()
at Terraria.Netplay.InnerClientLoop()]
 
Last edited:
Yes, sorry, once per game startup. I dont really know where is the error log, so the first thing i did is reporting it here.
Can you tell me where is that log?
Edit: I found a crashlog, but it doesnt seem to have any information about the ShopExpander mod.
[16.03.2020 14:23:33
System.InvalidOperationException: The operation is not allowed on non-connected sockets.
at System.Net.Sockets.TcpClient.GetStream()
at Terraria.Net.Sockets.TcpSocket.Terraria.Net.Sockets.ISocket.IsDataAvailable()
at Terraria.Netplay.InnerClientLoop()]
It in "Documents/My Games/Terraria/ModLoader/Logs". There should be an area labelled "--- BEGIN SHOP EXPANDER ERROR ---", or something like that. Pretty hard to miss. I'm almost positive this is actually a problem with the mentioned "Mini-Boss Mod". Maybe it's trying to load an item that doesn't exist. That's a pretty common issue, vanilla TModLoader doesn't really complain about it, but I added a message for this sort of things to Shop Expander.
 
Hello! I've encountered a minor issue with this mod/Fargo's Mutant Mod. The log showed this message when the error occured:

[11:31:37] [1/INFO] [ShopExpander]: --- SHOP EXPANDER ERROR ---
[11:31:37] [1/INFO] [ShopExpander]: Shop Expander failed to load ModNPC from mod Fargo's Mutant Mod.
[11:31:37] [1/INFO] [ShopExpander]: System.IndexOutOfRangeException: Index was outside the bounds of the array.
at Fargowiltas.NPCs.Mutant.AddItem(Boolean check, String mod, String item, Int32 price, Chest& shop, Int32& nextSlot) in Fargowiltas\NPCs\Mutant.cs:line 332
at Fargowiltas.NPCs.Mutant.SetupShop(Chest shop, Int32& nextSlot) in Fargowiltas\NPCs\Mutant.cs:line 383
at ShopExpander.Patches.SetupShopPatch.Prefix(Int32 type, Chest shop)
[11:31:37] [1/INFO] [ShopExpander]: --- END SHOP EXPANDER ERROR ---

The error occurred after I entered the mutant's hardmode shop after killing the moon lord, and seems to result in me being unable to purchase the moon lord summon item from him.

If this isn't an issue on your end, just let me know so I can report this bug to Fargo instead.
 
Hello! I've encountered a minor issue with this mod/Fargo's Mutant Mod. The log showed this message when the error occured:



The error occurred after I entered the mutant's hardmode shop after killing the moon lord, and seems to result in me being unable to purchase the moon lord summon item from him.

If this isn't an issue on your end, just let me know so I can report this bug to Fargo instead.
Yeah, this is probably an issue with Fargo's, though it's also possible that Shop Expander actually ran out of inventory slots. I've been working on a new version of this mod a while ago, but didn't have time to finish it yet. Whenever that comes out, it should fix these slot count related issues completely.
 
Yeah, this is probably an issue with Fargo's, though it's also possible that Shop Expander actually ran out of inventory slots. I've been working on a new version of this mod a while ago, but didn't have time to finish it yet. Whenever that comes out, it should fix these slot count related issues completely.
Hey, would it be possible if you made this mod compatible with the older versions of tModLoader? Aka the ones before the steam version? I need this because I run the 64 bit version of TmodLoader, which is apparently going to take a long time to update to be compatible with the steam version and even longer to be compatible with 1.4.
I mainly need this mod when I use packs on the 64 bit version, as it's most useful there.
 
this mod have one bug when you go to world every npc even friendly npcs :inclucing bunny guide modded npcs have zombie,skeleton AI they chasing me but dont does any damage in my opinion its very annoying sorry for bad english
 
Back
Top Bottom