Auto-repair armour?

  • Please make sure you are posting in the correct place. Server ads go here and modpack bugs go here
  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord

Someguy

New Member
Jul 29, 2019
121
0
1
My T5 zombie spawner generates a lot of damaged armour pieces, so I've got helms, chests, legs and boots of gold, leather, iron and chainmail, piling up all over the place.

Because I'm a stingy bugger and can't stand to throw anything away, I've actually been manually repairing the pieces, and then either smelting/pulverising them down (for the metals) or using an uncrafting table to get the leather bits. It's surprisingly profitable but also time-consuming/annoying.

Now, fourteen bazillion manually-repaired armour pieces later, I'm coming to my senses and thinking... "Surely there has to be a way to automate this". But is there? I tried an auto-crafting table, and a xycraft fabricator. No joy so far. Anyone tried/succeeded at this?
 

Golrith

Over-Achiever
Trusted User
Nov 11, 2012
3,834
2,137
248
I believe there is a way with turtles. I remember a discussion about this somewhere before. The turtle grabs an item, compares it to another item, can somehow repair, and spit the combined item out. Send along a barrel network, a barrel will only ever hold fully repaired items, so send the damaged items back to the chest for the turtle to repair further.

Can't be more helpful then that.
 

solidity

Active Member
Jul 29, 2019
53
0
26
I don't have the complete code anymore, but I believe you needed one crafty turtle and four chests: we'll call the chests I (input from the mobfarm), O (output to your sorting system or whatever), A and B (for cycling items through).
pseudo code:
Code:
while less than 2 items in inventory
    grab item from A
    if no items in A, take item from I
end
-- at this point, you should have two items in your inventory
if item 1 = item 2 (different damage values should still compare as equal)
    if you can craft it, do it and put the result in B
    if you can't craft it, put item 1 in O (because it's fully repaired)
if item 1 != item2
    put item 2 in B
end
if B is full (putting in B failed above)
    take all items from B and put them in A
end

This is from memory though, so I might have overlooked something. If you can't put this into lua code, I could try and do that for you, but I'd would have to wait until next week.
 

ThemsAllTook

New Member
Jul 29, 2019
386
0
0
Code:
    if you can craft it, do it and put the result in B
    if you can't craft it, put item 1 in O (because it's fully repaired)

Maybe crafty turtles work differently, but on the crafting grid you can put two fully repaired items together and repair them again. Not sure how you'd detect when something has been fully repaired...best way might be to try to store it in a barrel, as mentioned above.
 

Whovian

New Member
Jul 29, 2019
1,181
0
1
Guys, guys.

AE Crafting (possibly,) or Factorization Craftpackets.

I think Fabricators might be able to do stuff like that, too, I remember Soaryn mentioning that them not being able to do that was a bug the first time DW20 showed off the Fabricator.

But, seriously, Craftpackets.
 

solidity

Active Member
Jul 29, 2019
53
0
26
Maybe crafty turtles work differently, but on the crafting grid you can put two fully repaired items together and repair them again. Not sure how you'd detect when something has been fully repaired...best way might be to try to store it in a barrel, as mentioned above.

Yeah, it seems that was changed some time ago, but crafting two fully repaired items works and just destroys one. So you could output to a set of barrels after every successfull craft, looping the overflow back into the input chest. Although in my test-setup, neither Soulshard nor Vanilla spawners dropped anything but Rotten Flesh, Carrots, Potatoes and Iron Ingots when killed by turtles.

How would you go about doing this with Factorization? It's one of the mods I've played the least with so far.
 

Whovian

New Member
Jul 29, 2019
1,181
0
1
How would you go about doing this with Factorization? It's one of the mods I've played the least with so far.

Eh, one Craftpacket Maker gets a damaged Helmet pumped into it, Craftpacket gets piped out and enters the next Craftpacket Maker. It adds another Helmet, and put it in your Stamper ... there's your repaired Helmet.

Basically, it relies on the fact that the highlighted "x"s are for anonymous items; (most) other autocrafting systems always associate a slot in the table with a specific item to go there.
 

ThemsAllTook

New Member
Jul 29, 2019
386
0
0
Although in my test-setup, neither Soulshard nor Vanilla spawners dropped anything but Rotten Flesh, Carrots, Potatoes and Iron Ingots when killed by turtles.

Chance to spawn with armor is relatively rare, and chance to drop armor when killed is rarer still. Maybe you just didn't get lucky during testing? I know for sure that wither skeletons will drop stone swords, but I haven't run a setup like this on zombies or regular skeletons.

Incidentally, I just realized that I've never seen a naturally armored wither skeleton. Strange that that would be a thing that never happens; though again, maybe I just haven't had the random chance for it to happen come up yet.
 

solidity

Active Member
Jul 29, 2019
53
0
26
Eh, one Craftpacket Maker gets a damaged Helmet pumped into it, Craftpacket gets piped out and enters the next Craftpacket Maker. It adds another Helmet, and put it in your Stamper ... there's your repaired Helmet.

Basically, it relies on the fact that the highlighted "x"s are for anonymous items; (most) other autocrafting systems always associate a slot in the table with a specific item to go there.

Okay, but you would still have to sort the items before you can put them into the craftpackets, because a craftpacket with a damaged helm and a damaged chestpiece wouldn't work, right?

edit: okay, I remade my repair script. It should work with any kind of items, as long as you filter out the stuff that can't be repaired (Rotten Flesh, Iron Ingots etc). Place the turtle down, have one chest below, in front on top and to the left of it. Front chest is the input, left side is the output. Pastebin this http://pastebin.com/u0cMerFx program and run it. The turtle should cycle through the items, trying to repair them and put the successfully repaired items in the output chest. From there, try to put them into barrels and put the overflow into the input chest. In the beginning you will need to do a lot of manual labor since empty barrels will fill up with partially repaired items, but once you get one fully repaired item of each kind, the system should work well. Be careful to have big enough chests on top and below the turtle. They need to be able to hold one of each possible item that can be dropped.
 

SatanicSanta

New Member
Jul 29, 2019
4,849
-3
0
You either would need to craft them into fixed armor, or install EE2 and use the Talisman of Repair, which I don't think is updated to 1.4.
 

Whovian

New Member
Jul 29, 2019
1,181
0
1
Okay, but you would still have to sort the items before you can put them into the craftpackets, because a craftpacket with a damaged helm and a damaged chestpiece wouldn't work, right?

Yep. Sorting's a little tricky, there are some systems which work with metadata and some that don't. Tubing I remember was problematic for one of those reasons, I think it works with metadata. So Diamond Pipes? Maybe?
 

YX33A

New Member
Jul 29, 2019
3,764
1
0
You either would need to craft them into fixed armor, or install EE2 and use the Talisman of Repair, which I don't think is updated to 1.4.
Or use Alchemine which has a Book of Repair, but I don't know how well that would work for autocrafting(plus I don't think it was included in 1.4.7 editions of it).
 

Someguy

New Member
Jul 29, 2019
121
0
1
Okay, but you would still have to sort the items before you can put them into the craftpackets, because a craftpacket with a damaged helm and a damaged chestpiece wouldn't work, right?

edit: okay, I remade my repair script. It should work with any kind of items, as long as you filter out the stuff that can't be repaired (Rotten Flesh, Iron Ingots etc). Pastebin this http://pastebin.com/u0cMerFx program and run it. The turtle should cycle through the items, trying to repair them and put the successfully repaired items in the output chest. From there, try to put them into barrels and put the overflow into the input chest. In the beginning you will need to do a lot of manual labor since empty barrels will fill up with partially repaired items, but once you get one fully repaired item of each kind, the system should work well. Be careful to have big enough chests on top and below the turtle. They need to be able to hold one of each possible item that can be dropped.

Thanks for whipping up that repair script. I'd like to try it out, but I don't understand this sentence: "Place the turtle down, have one chest below, in front on top and to the left of it. Front chest is the input, left side is the output."

Is that a total of four chests or two chests? "one chest below, in front on top"? I'm confused...
 

tehBlobLord

New Member
Jul 29, 2019
547
0
0
Thanks for whipping up that repair script. I'd like to try it out, but I don't understand this sentence: "Place the turtle down, have one chest below, in front on top and to the left of it. Front chest is the input, left side is the output."

Is that a total of four chests or two chests? "one chest below, in front on top"? I'm confused...
Four, one below, one in front, one on top and one to the left.
 

Someguy

New Member
Jul 29, 2019
121
0
1
Wow, I do believe it's working. The stuff that ends up in the output chest isn't necessarily fully repaired, but that's ok... very clever stuff, Mister solidity.
 

solidity

Active Member
Jul 29, 2019
53
0
26
Wow, I do believe it's working. The stuff that ends up in the output chest isn't necessarily fully repaired, but that's ok... very clever stuff, Mister solidity.
Thank you :)
The output chest is meant to feed into a loop over barrels with the fully repaired items inside and after that back into the input chest. That way the fully repaired items get stored for later use and the partially repaired stuff gets reintroduced into the system.
 

brujon

New Member
Jul 29, 2019
496
0
0
Ars Magica would have you covered, but alas, it has not been added to DW20 pack yet, and likely won't be to Ultimate, since apparently the author doesn't wish to give permissions out like candy :S; However, it has a block that uses essence to repair items, and it can work with damn nearly anything that stores a damage value... Doesn't work with TConstruct tools because the way they store the damage is different, but since they never fully break and since can always be repaired, this is less of an issue. It's finally a block that makes the use of Thorns armor without Unbreaking possible!
 

ApSciLiara

New Member
Jul 29, 2019
1,216
0
0
Ars Magica would have you covered, but alas, it has not been added to DW20 pack yet, and likely won't be to Ultimate, since apparently the author doesn't wish to give permissions out like candy :S; However, it has a block that uses essence to repair items, and it can work with damn nearly anything that stores a damage value... Doesn't work with TConstruct tools because the way they store the damage is different, but since they never fully break and since can always be repaired, this is less of an issue. It's finally a block that makes the use of Thorns armor without Unbreaking possible!
Just don't forget to repair your armour after using it :p

Sent from my phone using black magic