tModLoader Too many modded items in shops

MorgulUruk

Official Terrarian
Hello everyone
I have something like 44 mods installed, and pretty often the vanilla NPC's shop isn't big enough to contain all the new and vanilla items they sell (there are doubles too, for example my Dryad sells duplicates of every vanilla boss summon, and it takes a lot of space in the shop inventory)
There is a mod that extends NPC's shop inventories, or some other ways around to at least removes the duplicate items from their shops ?
Thank you
 
Well, at one point I was thinking about making some kind of shop extender mod... It would involve a lot of reflection magic to do this in TModLoader, and would probably require Harmony. Actually the easiest way to deal with this would be to build it directly into TModLoader.
Removing duplicates seem simple enough though.
 
Last edited:
Well, at one point I was thinking about making some kind of shop extender mod... It would involve a lot of reflection magic to do this in TModLoader, and would probably require Harmony. Actually the easiest way to deal with this would be build it directly into TModLoader.
Removing duplicates seem simple enough though.
Harmony prolly wouldn't be needed if you know even deeper magic. Ik reflection will be needed tough (and I guess I could prolly easily extend shop using that deeper magic).
 
Harmony prolly wouldn't be needed if you know even deeper magic. Ik reflection will be needed tough (and I guess I could prolly easily extend shop using that deeper magic).
May I ask what on earth do you mean by your "deep magic"?

Now, of course Harmony isn't the only option, but what I suggested was that you are going to need to do some form of code injection to do this. (Unless you just PR this into TModLoader itself.)
Shop inventories themselves are tied to Chest objects, which store items in a length 40 array. You could of course make the array bigger, but then you still need to chop that up somehow, so it fits into the UI.
Speaking of the UI, there is no good way to replace it, other than drawing over it. It is part of the Inventory layer. It was also made before the new fancy UI system, so the drawing is all hard coded and there are no TModLoader hooks anywhere in it.
You can't really get into this setup, unless you make your own hook.
 
Hey, is anybody still planning on making this?
Because I could really use a mod like this ^^;
Sorry to revive an old thread, but I keep running into this problem.
 
I am pretty busy right now with a bunch of other things, but I do intend to look into this at some point. The new beta version of TModLoader actually has built in IL injection capabilities, and this would be a pretty good excuse to try them out. ;)
 
That's good.
It'll be especially useful with 64-bit TmodLoader, as there'll be a lot more times when shops overflow with that many mods.
 
I'm just necroposting to inform that now a mod exists !
And it's called Extended Shop
Thanks to the author
 
Back
Top Bottom