1. Hey Guest! We're currently translating StarMade. Anyone can translate, if you can, feel free to!
      Dismiss Notice
    2. Hey Guest! We're currently looking for new forum administrators. If this interests you, head over to this thread.
      Dismiss Notice

    Factory Automatization & Virtual Storage Block

    Discussion in 'General Discussion' started by happahappa, Jun 16, 2017.

    1. happahappa

      Jun 19, 2016
      Factory Automatization & Virtual Storage Block

      I tried to built an automated factory, that turns itself on as soon as the amount of any type of block falls below a specific value x.
      But I ran into some issues. If anyone can think a solution, please help me.
      I started with sensors over storages, which turn the corresponding factory either on or off. In order to do this, each block type got its own storage, which pulls from a dedicated factory, producing only one specific block type. With sensors i define a lower and upper limit on the cargo usage to trigger that particular factory. (Then just link all factories to other block storages as the recipy requires).

      But I didn't like that very much, because I couldn't figure out a way to test the cargo usage of being equal to zero, such that the factory only gets activated, if the cargo is completly empty. It seems we can only test for all ratios, but not for zero.
      Anyway, arguing that the factory is turning on before you ran out of all blocks isn't such a bad thing, I used a lower limit above zero.

      But the other issue arose on the upper limit. Naturally, I wanted the cargo to fill up completly, until the sensor shuts down the factory, which is not impossible, since i can test it for 100% usage. But the problem is auto-pull. I didn't want to pull one block at a time, but say 1000 blocks. The problem is, if you have only have space for 900 blocks left in your cargo, but auto-pull is trying pulling 1000 blocks, which are waiting at the factory, then it wont just pull 900 blocks of 1000 to fill the cargo up to 100%, so the 900 free slots remain empty.

      Ok, so not biggy, since the factory will just produce, until it ran out of 'buffer', which is the cargo capacity, the factory has itself. But the factory will continue running, since the sensor doesn't get into the state, where it could disable the factory, so you have the energy consumption of that factory without producing anything.

      And of course, i could just make the block storage capacity bigger, set the upper limit lower, so there is more tolerance for error. I just need to use more cargo blocks, that i'm actually never going to use. But this is not a reliable solution either, because the same issue is repeating itself there, under certain conditions.

      The best solution would actually be, that the auto-pull fills the storage up to 100% and leave all remaining blocks, for which is no space left in the factory buffer.

      Ok, either way, lets assume, this works more or less, so I have a lot of single storages, dedicated to one specific block type.
      In this configuration, it is completly useless, since you would have to go from storage to storage to get blocks you need.

      So what you are forced to do, it to built some another storage, that is at least as big as the total capacity of all block storages and pull all blocks from the block storages in there, so you can use it as personal cargo. But by doing so, the whole point of having an automated factory vanishes. First, you have to use some sort of main switch, to disable all factories, since the all sensors would trigger for production. So while you are using your personal storage, you can not produce any blocks in the background, because that would just fill up all block storages again.

      Now you can make the setting really complicated by trying to built a system, that tests one central storage, if a minimum amount of blocks of a specific block type can be pulled in some time interval. So the factories would get triggered, if the minimum could not be pulled, implying that less then that amount is available, so factories could produce a larger amount of blocks of this type, that somehow finds its ways into the central storage. I tried serveral ways of doing this, which way all way to complicated and eventually failed due to lag induced inconsistencies.

      As so often, you begin to hink: "hmmm ... maybe we need a new block, solving this." :)
      Maybe some sort of virtual storage block. But instead of the auto-pull configuration, you can set up, which block type should go into which storage. You can give your storage a name. So you could have a table of two columns, where the first column is a drop down menu of all categorized block types you have not yet associated with a dedicated storage, and the second column is a drop down menu of all available storages in the entity. So if you put grey hull in the virtual storage, it is being put into the dedicated block storage for grey hull. But you don't have to make it that granular. You can make a dedicated systems storage, if you which, and set the virtual storage up to put and pull all systems directly in this one storage. Would be nice, if it groups the blocks automatically together, so you don't have several piles of the same block type.

      And then I thought, how nice it would be, if the game had a modding framework, that would actually enable you to make this very block yourself.

      And as someone, who prefers of producing larger amounts of blocks, i was wishing, that factories could share factory enhancers with each other, such that if only one factory is producing at a given moment, it can use 100% of the enhancers, but each additional factory activated would be given its share (2 factories: each use 50% of the enhancers, 3 factories: each use 1/3 of the enhancers, ...)

      Well ... you tell me, what you think about it, and if there is a solution to this which can be implemented by using the existing blocks, please don't hesitate to point it out.
    2. Extholious

      Jun 21, 2013
      you could just link all the storages to a shipyard and instead of have the blocks in hand build the ship and let the system handle it (i think you can have a shipyard pull from multiple storages if not please correct me), and use the system for automated production you already talked about, you could set it to have one limit and then a toggle so when it goes under say 50% it starts and when it goes back above that limit it stops
    3. MacThule

      MacThule Rocket Man

      Jan 31, 2015
      Bigger storage with a 95% threshold instead of 100%. The 5% remainder includes your buffer.
    4. happahappa

      Jun 19, 2016

      That is true. But that would exlucde any case, where you built something outside the shipyard. And more then that, shipyards are buggy since I started playing this game. At the current version, none of my shipyards are woking at all. They are completly bugged out.

      So yes, it would work with shipyards, if shipyards weren't buggy. But it still would limit the use case to shipyards only.
      --- Updated post (merge), Jun 19, 2017 at 2:20 PM, Original Post Date: Jun 19, 2017 at 2:20 PM ---
      Yes, but said that already myself.
      • Agree Agree x 1