1. Please make sure you are posting in the correct place. Server ads go here and modpack bugs go here

Auto-repair armour?

Discussion in 'General FTB chat' started by Someguy, May 16, 2013.

  1. Someguy

    Someguy New Member

    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?
     
  2. Darknesschaos

    Darknesschaos New Member

    With either case, you would need a crafting table for each type of possible broken item drop.
     
  3. Golrith

    Golrith Over-Achiever Trusted User

    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.
     
  4. solidity

    solidity New Member

    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.
     
  5. ThemsAllTook

    ThemsAllTook New Member

    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.
     
  6. Whovian

    Whovian New Member

    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.
     
  7. solidity

    solidity New Member

    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.
     
  8. Whovian

    Whovian New Member

    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.
     
  9. ThemsAllTook

    ThemsAllTook New Member

    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.
     
  10. solidity

    solidity New Member

    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.
     
  11. SatanicSanta

    SatanicSanta New Member

    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.
     
  12. Whovian

    Whovian New Member

    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?
     
  13. YX33A

    YX33A New Member

    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).
     
  14. Someguy

    Someguy New Member

    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...
     
  15. tehBlobLord

    tehBlobLord New Member

    Four, one below, one in front, one on top and one to the left.
     
  16. Someguy

    Someguy New Member

    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.
     
  17. solidity

    solidity New Member

    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.
     
  18. brujon

    brujon New Member

    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!
     
  19. ApSciLiara

    ApSciLiara New Member

    Just don't forget to repair your armour after using it :p

    Sent from my phone using black magic
     

Share This Page