this post was submitted on 09 Nov 2024
63 points (98.5% liked)

Factorio

982 readers
396 users here now

A Lemmy community for the game Factorio made by Wube Software.

Rules

founded 1 year ago
MODERATORS
 

https://factoriobin.com/post/tvqipx (v3)

older-versionUpdated; Simplified, and added descriptions above, and grouping.

  • Take any item in the combinator in the bottom left; If we dont have a full stack of it, add it to a build queue

    For each item on the build queue, pick one at random, try to build it, if we don't have enough ingredients, add them to the build queue

    When building a item, build until we have TWO stacks, or run out of ingredients. This is one stack MORE then we use to determine if something goes into the build queue by inventory alone, this prevents thrashing, so we queue at 100, but will build until 200.

    I use the H as a hold signal... this could be a lot cleaner and simpler, but it works, and I wanted to share! I'd love to see improvements.

    A dependency we can't build will get stuck in the build queue (like plastic), right now I just have that displayed on the bottom using a manual check, but this isn't very elegant.

    Inspired by https://reddit.com/r/factorio/comments/1gkhehl/behold_the_bogocrafter/ Thank you @[email protected]

    I don't have a reddit account to thank the original poster, but I do appreciate them sharing the idea! (If you use their original bogo design, be aware it doesn't recurse down the dependency tree very efficiently, so you will WANT to make your own build queue)

    Issues I'd like to improve:

    Too complicated, better alerting, less cycles rechecking recipes we already checked, if we change the original item combinator the build queue doesn't get reset, if I want MORE then one stack of something that isn't possible... that really needs to get fixed.

    top 19 comments
    sorted by: hot top controversial new old
    [–] [email protected] 11 points 1 week ago (1 children)

    Did the space expansion introduce new combinator to enable this wonderful construction? I do not recall anything like this existing before the expansion.

    [–] [email protected] 18 points 1 week ago (1 children)

    I think its Factorio 2.0, not just space age, You can now set a assemblers Recipe, read Ingredients, and read Contents

    [–] [email protected] 7 points 1 week ago

    Thanks a lit, that's a killer feature!!

    [–] [email protected] 8 points 1 week ago

    After awhile the build inventory will look something like this:

    [–] [email protected] 5 points 1 week ago (1 children)

    Is the train just for illustrative purposes?

    [–] [email protected] 5 points 1 week ago (1 children)

    Yes, and No. Any storage container will work, the train is nice and big so its good for a do-everything build; Other good options are the cargo landing pads, and the SpaceShip hubs.

    [–] [email protected] 3 points 1 week ago (1 children)

    I figured it was for the storage capacity of the cargo car; I just wasn't sure why you included an engine.

    Thanks!

    [–] [email protected] 3 points 1 week ago (1 children)

    Oh! You need the engine if you want to read the contents of the train car through the train station. The engine is mandatory, and it must be docked the station.

    [–] [email protected] 2 points 1 week ago

    Oh! Thanks, that... makes sense, actually!

    [–] [email protected] 5 points 1 week ago

    https://factoriobin.com/post/rf29ip version 5

    • Will stop when main target is finished
    • Will clear out build queue when main target is finished, and target recipe changed
    • Made some of the logic cleaner
    • Updated Warning Sign to be just one sign and look for more missing materials.
    [–] [email protected] 4 points 1 week ago* (last edited 1 week ago) (1 children)

    I love seeing all the different approaches to this. My solution was to break all the recipes up into dependency tiers (coils & gears T1, circuits T2, inserters T3 etc.), which would then let me use the sorting on the advanced combinator to sort the execution. I guess it kinda works how the player crafting queue works:

    counter cell holding an index
    If logi_requests[index] is not craftable: increment index (counter resets at logi_requests.len)
    If we "lock on" to something craftable we save it to mem
    Calculate the total resources required (raw and intermediates) using lookup combinators and have that all on a line
    Raws get requested, intermediates get "oned out" by a decider and then multiplied by the tier values.
    That then gets picked by an advanced combinator which is sorting it by low to high and sent to the assembler.
    It then makes as many as needed before moving onto the next thing until eventually it satisfies the saved logi request
    It then resets the counter and everything starts again.

    I liked that it was resilient to constantly changing network requests and made efficient use of the logi bots with bulk requests

    [–] [email protected] 3 points 1 week ago

    I'd love to see your solution if you could share a screenshot or a blueprint

    [–] [email protected] 4 points 1 week ago

    This is very different then my previous ship designs, which had a dedicated combinator for each item I wanted to build - With that approach you manually had to specify the entire build dependency tree, and set build limits. https://hackertalks.com/post/4906636

    The circuit here is a bit bigger, but I think I can make it smaller, but its far more flexible and dynamic.

    [–] [email protected] 4 points 1 week ago

    Disgusting, I love it

    [–] [email protected] 3 points 1 week ago (1 children)

    I've got something similar except the number of items I want to produce is set by the constant combinator. The new logistics groups are awesome for this because I can have the combinator synced with things I want in my inventory.

    I also have the radar network set up where trains report the items they have and stations request trains with items they want so I can request more materials be delivered to my omni-assembler when I need them.

    The downside I've been wanting to fix is the need to specify all of the intermediates that are needed. That's not too hard to fix, of course, just attempt to make ingredients that are missing (like you're doing).

    I've also been wanting to try and change from using a constant combinator to using the requests on the logistics network. So then all you'd have to do to get something added to the recipe list is start requesting it.

    [–] [email protected] 1 points 1 week ago

    That sounds really cool. Using the radars as network extenders is smart.

    The combinator groups are really powerful, I'm just starting to use them, I wish you could programmatically add items to them.

    I'd love to see your setup, if you want to share.

    [–] [email protected] 3 points 1 week ago (1 children)

    Is there a way to get a decider to output a negative constant value?

    [–] [email protected] 3 points 1 week ago (1 children)

    You can use a constant combinator if it's a constant value you need.

    Or the arithmetic combinator can be used to multiply by -1 to convert the input value to negative.

    [–] [email protected] 3 points 1 week ago* (last edited 1 week ago)

    Thats a good idea, do you think its possible to do it in a single device? I'm trying to conditionally give a negative value

    In this example, I want to output -2 on the H signal when my conditions pass.