tModLoader MechTransfer - Item translocation and more...

send help.PNG

This doesn't work for some reason (the chests are from Simple Auto Chests)
 
View attachment 182271
This doesn't work for some reason (the chests are from Simple Auto Chests)

The stuff from Simple Auto Chests is not being recognized as a chest, because they aren't marked as TileID.Sets.BasicChest. Maybe @efhosci could fix this? I can also add some extra search conditions to my code to make it a bit more robust.
Also, on your picture, the top chests would not be connected to the receiver, because extractors don't act as pipes.
 
The stuff from Simple Auto Chests is not being recognized as a chest, because they aren't marked as TileID.Sets.BasicChest. Maybe @efhosci could fix this? I can also add some extra search conditions to my code to make it a bit more robust.
Also, on your picture, the top chests would not be connected to the receiver, because extractors don't act as pipes.
Ah. Makes sense.
 
Ah. Makes sense.

I'll see what I can do about that, thanks for alerting me.

Edit: I'm sorry, but I don't know how I would add that to a modded chest. I copied almost everything from the ExampleMod's "Example Chest", and I don't see anything like the TileID.Sets.BasicChest you mentioned. Can you help?
 
Last edited:
I'll see what I can do about that, thanks for alerting me.

Edit: I'm sorry, but I don't know how I would add that to a modded chest. I copied almost everything from the ExampleMod's "Example Chest", and I don't see anything like the TileID.Sets.BasicChest you mentioned. Can you help?

Sorry, it turns out it was my mistake. TModLoader actually sets TileID.Sets.BasicChest automatically in Mod.SetupContent.
Code:
foreach (ModTile current3 in this.tiles.Values)
{
     Main.tileTexture[(int)current3.Type] = ModLoader.GetTexture(current3.texture);
     TileLoader.SetDefaults(current3);
     if (!string.IsNullOrEmpty(current3.chest))
     {
          TileID.Sets.BasicChest[(int)current3.Type] = true;
     }
}
I guess the other mods I tested only worked because they come before "MechTransfer" alphabetically...
 
Sorry, it turns out it was my mistake. TModLoader actually sets TileID.Sets.BasicChest automatically in Mod.SetupContent.
Code:
foreach (ModTile current3 in this.tiles.Values)
{
     Main.tileTexture[(int)current3.Type] = ModLoader.GetTexture(current3.texture);
     TileLoader.SetDefaults(current3);
     if (!string.IsNullOrEmpty(current3.chest))
     {
          TileID.Sets.BasicChest[(int)current3.Type] = true;
     }
}
I guess the other mods I tested only worked because they come before "MechTransfer" alphabetically...

That's unfortunate. I guess I could rename my mod "Easy Auto Chests" or something. :p I'll ask on the discord or the tModloader help thread, maybe there's some way to force it.
 
That's unfortunate. I guess I could rename my mod "Easy Auto Chests" or something. :p I'll ask on the discord or the tModloader help thread, maybe there's some way to force it.
I fixed it by looking for chests in AddRecipes. Recipes are kinda the same thing, they are only loaded after all the SetupContent is done, so you can use items from other mods.
Thanks for the offer though. :)
 
I fixed it by looking for chests in AddRecipes. Recipes are kinda the same thing, they are only loaded after all the SetupContent is done, so you can use items from other mods.
Thanks for the offer though. :)

Great, glad you could fix it! I'm kinda stumbling blindly through Terraria modding, I always appreciate information like this!
 
Oh my god!! This such a good mod however the worst part of this mod is you used 1x1 sprite so please rework at sprites, change it to 2x2 `;)
 
Oh my god!! This such a good mod however the worst part of this mod is you used 1x1 sprite so please rework at sprites, change it to 2x2 `;)
Um... What exactly do you mean by "1x1" sprites? The tiles are 16x16, as always, and the items are 26x26. Admittedly they are just scaled up/down versions of the tiles. I know my sprites aren't very pretty. I am not much of a pixel artist. I think I mentioned that in my original post.
 
I'm sure that you didn't understand what I'm talking about so here is a example of 1x1 and 2x2 sprite and also I did know that you didn't good at pixel art however I think it would be better if you make it to 2x2 sprite so I suggested it to you
example.png
 
I'm sure that you didn't understand what I'm talking about so here is a example of 1x1 and 2x2 sprite and also I did know that you didn't good at pixel art however I think it would be better if you make it to 2x2 sprite so I suggested it to you View attachment 185055
Still a bit confused... You mean I should just do a 2x scaling with the item sprites without interpolation?
 
Still a bit confused... You mean I should just do a 2x scaling with the item sprites without interpolation?

Ah Well you can just do 2x scaling without interpolation in your sprites however it would be nice as well if you going to interpolate it a bit
 
There should be a way to obtain these other than the mechanic, or some low-tier turret that doesn't require the mechanic.

Like a slow shooter that shoots every 1 second.
Something like that

(Totally not since i have to kill skeletron in my world)
 
There should be a way to obtain these other than the mechanic, or some low-tier turret that doesn't require the mechanic.

Like a slow shooter that shoots every 1 second.
Something like that

(Totally not since i have to kill skeletron in my world)
I don't think that would be possible, unfortunately. Most of the devices in this mod require wiring to operate. I could make them obtainable before the mechanic, but you wouldn't be able to do a whole lot with them.
 
I don't think that would be possible, unfortunately. Most of the devices in this mod require wiring to operate. I could make them obtainable before the mechanic, but you wouldn't be able to do a whole lot with them.
maybe it automatically shoots every 5 seconds? Or a custom switch that adds onto the turret. I just think there should be a turret pre-mechanic.
 
maybe it automatically shoots every 5 seconds? Or a custom switch that adds onto the turret. I just think there should be a turret pre-mechanic.
Well, I can't really fit a pre-mechanic turret into this mod. It's a cool idea though to have a kind of early game auto sentry thing. Like the pea shooters from Plants vs Zombies... In fact it would be cool to make a whole Plants vs Zombies mod for terraria. ;)
 
Is your mod compatible with SimpleAuto Chests and Magic storage? If it was it would be amazing! :happy:
It's compatible with Auto Chests, as you'll see in the posts at the top of this very page. It should work fine with any chest or dresser added by any mod.
It doesn't work with magic storage, though that is a planned feature. There are a couple of reasons why I didn't implement it yet. Mostly I'm just putting it off, because all the late binding I'll have to do won't be very pretty... I do have a system that would allow other mods to add support for their special containers quite simply, but I don"t really want to bother anyone else with this right now.
 
It's compatible with Auto Chests, as you'll see in the posts at the top of this very page. It should work fine with any chest or dresser added by any mod.
It doesn't work with magic storage, though that is a planned feature. There are a couple of reasons why I didn't implement it yet. Mostly I'm just putting it off, because all the late binding I'll have to do won't be very pretty... I do have a system that would allow other mods to add support for their special containers quite simply, but I don"t really want to bother anyone else with this right now.
Sounds good! Thanks anyway
 
Back
Top Bottom