Cyberchest is a smart chest, addition to an assembling machine that enables whole production chains maid with a single machine.
Just build it right next to an assembler, set up the chain, put raw components in and let it do the rest.
BASIC INSTRUCTIONS
Research technology "Cyberchests" (needs "Advanced electronics")
1. Build a chest and an assembler next to each other.
2. Open the chest and set items to be produced in the Logistics menu (Keep the right order of recipes!).
3. Press Start/Pause button in GUI
Compatible with any assembling machine types from any mods!
Multiplayer compatible!
BASIC INSTRUCTIONS IMAGES
1. Properly position the chest (assembler)
2. Maintain the sequence in order.
3.Press start button, to start the sequence.
ADVANCED INSTRUCTIONS
1. If there are several adjacent assemblers, chest will search for assembler in clockwise direction starting from the top. (i.e top, right, left, bottom)
2. To switch the assembler press the < > ^ v buttons.
3. Every chest can only hook up to one assembler.
4. Reset button will start the production sequence over.
5. Autoreset: If the chest waits for the ingredients more then five seconds it will reset, assuming there are not enough ingredients were made previously/some of the ingredients were taken out in the process.
6. Do NOT take any items directly from the assembler, as this will make the chest stuck, waiting for results forever.
7. Ingredients, already used in production can not be recovered if the chest swithes recipe
8. You can insert some but should not insert all of the ingredients directly into the assembler. Example: When producing green circuits, you are inserting both cables and plates directly into the assembler. Provided the speed of the assembler is slow enough, inserters can stack up to 6 cables and 2 plates in the assembler inventory. Just produced circuit will be transferred to the chest inventory and new production will be immediately triggered, as there is enough ingredients. If the chest doesn't need more circuits, it will retrieve surplus ingredients and switch the recipe, but the ingredients used in production will be lost!
9. No recipes, that produce liquids are allowed.
10. Compatible with modules (except the productivity ones)
11. If your recipe requires a liquid, make sure the assembler is properly oriented to be able to connect to the pipe.
12. If your recipe requires a liquid, try to produce as much such items in a row as possible. When chest swithes the recipe, liquid, already contained in the chest, will dissapear.
Update 0.6.0
Added "Reserve slots" checkbox. Imitates item filters by allowing chest to use all but one of each kind of ingredient (So that ingredients will reserve their slots).
Check the option, set chest inventory bar (red cross) so there is just enought slots for all the items, and you free to use plain (not smart) inserters to insert ingredients to the chest!
Update 0.7.0
New tech!
Inventory override. Allows chest to use off-limit slots of it's inventory (red ones). Now free slots are needed only for raw materials. (Tip: Inserters can grab items from red slots)
Tentacle arms. Chest can automatically grab items from the ground, belts, i.e. in 9x9 area around itself. (Option is in GUI)
Also there are slight performance optimizations.
Update 0.8.0
Performance is dramatically improved. Some bugs fixed.
Recipe defining system reworked! Compatibility with mods recipes is much better. Now able to find recipe for the item in most cases!
WARNING: Chest does not react to changes made in slots right away. After the changes were made, press Reset button. If any of the recipes are invalid chest won't start.
Due to previous statement, chest is now compatible with the logistic system!
1. Set up your sequence.
2. Press start.
3. If chest starts working, erase all the requested items. (Alternatively you can leave all the items, except end product(s) intact)
4. Setup raw materials instead.
New tech!
Cyberfusion - 4 tiers
Speeds up hooked assembler: +50, +100, +200, +400% speed. (Also energy consumption increased and chest itself consumes 100 kW).
Update 0.9.0
Even better performance!
Some tech balancing was done. Tech costs are increased. Additional dependencies are added.
New option: Ignore errors
If you wish to use your chest as a requester, you can turn on this option, before setting up the recipes. This will make the chest ignore items, that have no recipe/unavailable recipes, while checking recipe sequence.
Localized recipe names:
Be able to understand what you are producing!
New tech!
Burst input 4 tiers
Allows chests to catch up to the faster assemblers. Burst input speed limits: 3, 6, 12, infinite (depending on stack sizes). Base speed limit: 1.5.
(Hint: A chest can't catch up, not exactly the speed, but the amount of production cycles per second. Base value: 3 cycles/sec, which is a frequency of cycles that assembler with 1.5 speed can reach, when producing an item with 0.5 sec crafting time)
Acknowledgements
YuokiTani, for letting me use some of his graphics.
Klonan, for making the spotlight
If you have any questions or suggestions, post them below!
Re: [Mod 0.11.22] CyberChest 0.5.0
Posted: Sun May 24, 2015 10:36 am
by BrkDmrkn
Game doesn't detect the mod. Sounds awesome though!
Re: [Mod 0.11.22] CyberChest 0.5.0
Posted: Sun May 24, 2015 11:14 am
by SigmatroN
BrkDmrkn wrote:Game doesn't detect the mod. Sounds awesome though!
W-what? Are you sure, you put it in the right folder, and run game of version 11.22? Does something similar happen with any other mod?
Re: [Mod 0.11.22] CyberChest 0.5.0
Posted: Sun May 24, 2015 12:09 pm
by BrkDmrkn
SigmatroN wrote:
BrkDmrkn wrote:Game doesn't detect the mod. Sounds awesome though!
W-what? Are you sure, you put it in the right folder, and run game of version 11.22? Does something similar happen with any other mod?
I am playing with other mods so i know i put it on the correct folder. My game is 11.22 and no, something like this has never happened before. If this happens only to me i am going to be quite sad.
other mods i am using
Advanced Equipment
Belt Blocker
Compression Chests
Cursed Exp
Default Request Amount
Equalizer Chests
Fluid Void
Item Count
Landfill
Larger Inventory
Morelight
More Logistics Slots
Ore Expansion
Resource Monitor
Slipstream Chests
Smart Splitters
Smart Trains
The Fat Controller
Treefarm
Void Chest
Air Filtering
Floors
Recycling Plant
Tankwerkz
Tree Collision
Re: [Mod 0.11.22] CyberChest 0.5.0
Posted: Sun May 24, 2015 12:19 pm
by SigmatroN
What do you mean by "detect"? Not showing it on the mod list?
Re: [Mod 0.11.22] CyberChest 0.5.0
Posted: Sun May 24, 2015 1:08 pm
by BrkDmrkn
SigmatroN wrote:What do you mean by "detect"? Not showing it on the mod list?
Yes. It's not showing on the mod list and there is no item in game either.
Re: [Mod 0.11.22] CyberChest 0.5.0
Posted: Sun May 24, 2015 4:36 pm
by SigmatroN
Well, the item should not be in the game right away. First there is a tech. But mod not showing up? Really strange. In fact this is the first time I heard such kind of issue with any mod ever.
Try renaming folder of CyberChest, let's see if game shows any error.
Re: [Mod 0.11.22] CyberChest 0.5.0
Posted: Sun May 24, 2015 5:06 pm
by Lonewolf
I'm guessing he placed the rar file in the mods directory but the game reads only zip? So unpacking it will most likely solve it.
It is showing up in my game anyway (after unpacking the rar file)
Re: [Mod 0.11.22] CyberChest 0.5.0
Posted: Sun May 24, 2015 5:11 pm
by daniel34
Lonewolf wrote:I'm guessing he placed the rar file in the mods directory but the game reads only zip? So unpacking it will most likely solved it
Just wanted to post that. The download is a .rar-Archive, and on systems that have an extractor that can read rar (like WinRAR) the symbol is the same as for zip. I didn't even notice it was a rar, until I extracted it and then the mod was detected.
@SigmatroN: please pack your mod into a .zip-File instead of .rar, so you don't need to install WinRAR or other tools to extract it, also the .zip is automatically detected by Factorio.
EDIT: Just tried the mod on an existing save that has several mods already, and the GUI doesn't pop up when opening the CyberChest, so I can't click the Start/Pause button.
I do have the upgrade planner mod installed and it adds a GUI, maybe that's why your GUI doesn't show.
Re: [Mod 0.11.22] CyberChest 0.5.0
Posted: Sun May 24, 2015 6:09 pm
by BrkDmrkn
daniel34 wrote:
Lonewolf wrote:I'm guessing he placed the rar file in the mods directory but the game reads only zip? So unpacking it will most likely solved it
Just wanted to post that. The download is a .rar-Archive, and on systems that have an extractor that can read rar (like WinRAR) the symbol is the same as for zip. I didn't even notice it was a rar, until I extracted it and then the mod was detected.
@SigmatroN: please pack your mod into a .zip-File instead of .rar, so you don't need to install WinRAR or other tools to extract it, also the .zip is automatically detected by Factorio.
EDIT: Just tried the mod on an existing save that has several mods already, and the GUI doesn't pop up when opening the CyberChest, so I can't click the Start/Pause button.
I do have the upgrade planner mod installed and it adds a GUI, maybe that's why your GUI doesn't show.
Wow im surprised i didn't notice it was a rar... Thanks for pointing that out!
Re: [Mod 0.11.22] CyberChest 0.5.0
Posted: Sun May 24, 2015 7:05 pm
by SigmatroN
daniel34 wrote:
Lonewolf wrote:I'm guessing he placed the rar file in the mods directory but the game reads only zip? So unpacking it will most likely solved it
Just wanted to post that. The download is a .rar-Archive, and on systems that have an extractor that can read rar (like WinRAR) the symbol is the same as for zip. I didn't even notice it was a rar, until I extracted it and then the mod was detected.
@SigmatroN: please pack your mod into a .zip-File instead of .rar, so you don't need to install WinRAR or other tools to extract it, also the .zip is automatically detected by Factorio.
EDIT: Just tried the mod on an existing save that has several mods already, and the GUI doesn't pop up when opening the CyberChest, so I can't click the Start/Pause button.
I do have the upgrade planner mod installed and it adds a GUI, maybe that's why your GUI doesn't show.
Thanks for the advice! I'll look into that issue. Does the GUI work fine without mods?
Edit: Well, I just have started fresh game with some mods and test mode. Upgrade planner mod GUI does not seem to interfere with mine.. as well as the FARL's. I can even open all three at once.
Any other suggestions, clues?
I've used glob.gui to store my GUI. As far as I know, every mod has it's own glob table.. am I correct? If not, try to rename all "glob.gui" in control.lua into.. say "glob.gui_1".
Re: [Mod 0.11.22] CyberChest 0.6.0
Posted: Wed May 27, 2015 1:16 am
by darkshadow1809
awh man. This is AWESOME :d ! Can I put it in the modpack ? Credits will be ofcourse added!
Re: [Mod 0.11.22] CyberChest 0.6.0
Posted: Wed May 27, 2015 3:35 pm
by SigmatroN
darkshadow1809 wrote:awh man. This is AWESOME :d ! Can I put it in the modpack ? Credits will be ofcourse added!
Sure.
Re: [Mod 0.11.22] CyberChest 0.6.0
Posted: Thu May 28, 2015 1:30 pm
by scitor
This mod is so awesome, it just reduced my assembly lines to a fraction of the space needed before.
I've got a few questions though and a bug to report.
The bug is kind of annoying as it happend to me a few times already and it just closes the current game, without saving anything!
How to reproduce
1. Place chest and assembler
2. Select a (raw?) material in the Logistics menu (e.g. wood)
3. Press "Start/Pause"
4. Remove the wood recipe
5. Boom:
- After clicking OK you're in the Main menu, without save or anything
- Also it's a bit confusing that it states the recipe doesn't exist, although it's true. At first I though that wouldn't work but as the robots fill the chest the status bar goes up and it starts production as soon as it has enough, really nice. EDIT: I It appears that it doesn't start the production after the "recipe doesn't exist" status, I have to reset it to restart production. So maybe I should provide the items manually, but then the Requester Chest functionality becomes obsolete to me?
Factorio v0.11.22, Mod Version is 0.6.0, I'm using the ShadowsMegaModpack V-7.0.2 (with a bunch of it disabled), on windows x64 (don't think thats important)
The questions:
a) I've noticed that the Cyberchests act like Requester Chests to the Logistics network. That's really cool as I can let it request even the base materials. But I tried to produce some items that I already had in my logistics network and the robots kept filling the chest with the (intermediate) products. Is there a way I can prevent this? The problem is in a few cases that produced a loop without crafting anything. I tried it by moving the chest out of the logistics range, but that means I can't use it as Requester Chest for the base materials. It would be nice to be able to disable the Logistics functionality (entirely or maybe per slot?), so that I can insert any base material manually. Or maybe multiple tiers which you'd have to research,w ith a basic version and an advanced requester version, just an idea
b) When I use inserters to fetch out the end product, it doesn't honor the "Reserved Slot" setting. As I understand it the Cyberchest will always leave one of a kind in itself but that doesn't seem to affect other machines accessing its inventory. Maybe the chest could "report" just one item less than it's actually holding, to prevent inserters from removing all of the products. (On the other hand, to remove specific items I need a smart inserter anyway, so the only thing that would save would be the red/green wire to detect the contents).
Thanks for this small but powerful mod, already using it where I can
Re: [Mod 0.11.22] CyberChest 0.6.0
Posted: Thu May 28, 2015 11:36 pm
by SigmatroN
scitor wrote:This mod is so awesome, it just reduced my assembly lines to a fraction of the space needed before.
I've got a few questions though and a bug to report.
The bug is kind of annoying as it happend to me a few times already and it just closes the current game, without saving anything!
How to reproduce
1. Place chest and assembler
2. Select a (raw?) material in the Logistics menu (e.g. wood)
3. Press "Start/Pause"
4. Remove the wood recipe
5. Boom:
- After clicking OK you're in the Main menu, without save or anything
- Also it's a bit confusing that it states the recipe doesn't exist, although it's true. At first I though that wouldn't work but as the robots fill the chest the status bar goes up and it starts production as soon as it has enough, really nice. EDIT: I It appears that it doesn't start the production after the "recipe doesn't exist" status, I have to reset it to restart production. So maybe I should provide the items manually, but then the Requester Chest functionality becomes obsolete to me?
Factorio v0.11.22, Mod Version is 0.6.0, I'm using the ShadowsMegaModpack V-7.0.2 (with a bunch of it disabled), on windows x64 (don't think thats important)
The questions:
a) I've noticed that the Cyberchests act like Requester Chests to the Logistics network. That's really cool as I can let it request even the base materials. But I tried to produce some items that I already had in my logistics network and the robots kept filling the chest with the (intermediate) products. Is there a way I can prevent this? The problem is in a few cases that produced a loop without crafting anything. I tried it by moving the chest out of the logistics range, but that means I can't use it as Requester Chest for the base materials. It would be nice to be able to disable the Logistics functionality (entirely or maybe per slot?), so that I can insert any base material manually. Or maybe multiple tiers which you'd have to research,w ith a basic version and an advanced requester version, just an idea
b) When I use inserters to fetch out the end product, it doesn't honor the "Reserved Slot" setting. As I understand it the Cyberchest will always leave one of a kind in itself but that doesn't seem to affect other machines accessing its inventory. Maybe the chest could "report" just one item less than it's actually holding, to prevent inserters from removing all of the products. (On the other hand, to remove specific items I need a smart inserter anyway, so the only thing that would save would be the red/green wire to detect the contents).
Thanks for this small but powerful mod, already using it where I can
Thanks for the report. I think, I fixed this bug for new mod version.
a) I defined cyber chest as a requester chest with a sole purpose - to use it's convenient GUI. And, unfortunately, there is no way to disable requester abilities. So, I pointed out that it was useless as a requester in the original post, Advanced Instructions chapter. However, I slightly altered the logic, so now it should work as you described (i.e wait for the gauge to fill and go on). And there is a way now, not a very reliable one, however, to use it as a requester. (Guess yourself how )
b) It's a partially resolved issue now. Now you need only smart inserter (and no wires) to fetch the products.
Re: [Mod 0.11.22] CyberChest 0.7.0
Posted: Tue Jun 02, 2015 6:23 pm
by Nathan1852
Sadly it seems like the script used by the cyberchests is not very optimised. Could you look at it again?
2015-06-02_00003.jpg (691.69 KiB) Viewed 16064 times
Re: [Mod 0.11.22] CyberChest 0.7.0
Posted: Tue Jun 02, 2015 7:11 pm
by SigmatroN
Nathan1852 wrote:Sadly it seems like the script used by the cyberchests is not very optimised. Could you look at it again?
2015-06-02_00003.jpg
How many chests do you have, exactly?
Re: [Mod 0.11.22] CyberChest 0.7.0
Posted: Tue Jun 02, 2015 7:34 pm
by Nathan1852
I have four chests.
EDIT: The fix isn't working atm, I'm working on it
I experimented a little bit and it seems like I found a fix by changing the start of cyberchest.initialize_assembler to this:
function cyberchest.wait_for_ingredients(self)
if not self.assembler.recipe then self:set_state_ready() end
if not self.asm_out then
self.asm_out = self.assembler.getinventory(defines.inventory.assemblingmachineoutput)
self.asm_in = self.assembler.getinventory(defines.inventory.assemblingmachineinput)
self.inv = self.entity.getinventory(defines.inventory.chest)
self.ing = ingredients_to_simplestack(self.assembler.recipe.name)
end
if not self.asm_out.isempty() then --already contains results
self.state = self.wait_for_output
self.message = "Waiting for results.."
--self:state()
end
local asm_in_count, needed_stack = {};
local inv_count;
self._itemnumber = #self.ing
if self._actnumber == 1 then
self:reset_bar()
end
--for _,item_stack in pairs(self.ing) do
local num = self._itemnumber - self._actnumber > 2 and 2 or 1
for i = self._actnumber, num do
local item_stack = self.ing[i]
asm_in_count = self.asm_in.getitemcount(item_stack.name)
inv_count = self.inv.getitemcount(item_stack.name)
if self.reserve_slots then
inv_count = inv_count - 1 --reserve 1 item
end
if inv_count + asm_in_count < item_stack.count then
needed_stack = {name = item_stack.name, count = item_stack.count - asm_in_count - inv_count} --only needed count
if self.collect_from_ground and self.inv.caninsert(needed_stack) then --option, tech, space
if self:collected_from_ground(needed_stack) then
self.inv.insert(needed_stack)
inv_count = inv_count + needed_stack.count
else
self.all_in_place = false
end
else
self:restore_bar()
return
end
end
end
self._actnumber = self._actnumber + num
if self._actnumber >= self._itemnumber then
self:restore_bar()
if not self.all_in_place then
if self.autoreset then --resets after 5 seconds
self:autoreset_countdown()
end
return --not enough of something
end
self.autoreset_count = 30 --reset countdown
--all in place
for _,item_stack in pairs(self.ing) do
--insert only needed count
if item_stack.count > 0 then
if not stack_transfer(self.inv, item_stack, self.assembler) then
self.message = "Unknown error while trying to insert ingredients"
return
end
end
end
end
self.state = self.wait_for_output
self.message = "Waiting for results.."
--self:state()
end
And deleting every self:state() call exept in cyberchest.state_execute
This brings it down from 7.170 to about 0.5 and puts the FPS drops from 10 to a maximum of 1 every few seconds.
Re: [Mod 0.11.22] CyberChest 0.7.0
Posted: Tue Jun 02, 2015 7:57 pm
by SigmatroN
Nathan1852 wrote:I have four chests.
EDIT: The fix isn't working atm, I'm working on it
I experimented a little bit and it seems like I found a fix by changing the start of cyberchest.initialize_assembler to this:
function cyberchest.wait_for_ingredients(self)
if not self.assembler.recipe then self:set_state_ready() end
if not self.asm_out then
self.asm_out = self.assembler.getinventory(defines.inventory.assemblingmachineoutput)
self.asm_in = self.assembler.getinventory(defines.inventory.assemblingmachineinput)
self.inv = self.entity.getinventory(defines.inventory.chest)
self.ing = ingredients_to_simplestack(self.assembler.recipe.name)
end
if not self.asm_out.isempty() then --already contains results
self.state = self.wait_for_output
self.message = "Waiting for results.."
--self:state()
end
local asm_in_count, needed_stack = {};
local inv_count;
self._itemnumber = #self.ing
if self._actnumber == 1 then
self:reset_bar()
end
--for _,item_stack in pairs(self.ing) do
local num = self._itemnumber - self._actnumber > 2 and 2 or 1
for i = self._actnumber, num do
local item_stack = self.ing[i]
asm_in_count = self.asm_in.getitemcount(item_stack.name)
inv_count = self.inv.getitemcount(item_stack.name)
if self.reserve_slots then
inv_count = inv_count - 1 --reserve 1 item
end
if inv_count + asm_in_count < item_stack.count then
needed_stack = {name = item_stack.name, count = item_stack.count - asm_in_count - inv_count} --only needed count
if self.collect_from_ground and self.inv.caninsert(needed_stack) then --option, tech, space
if self:collected_from_ground(needed_stack) then
self.inv.insert(needed_stack)
inv_count = inv_count + needed_stack.count
else
self.all_in_place = false
end
else
self:restore_bar()
return
end
end
end
self._actnumber = self._actnumber + num
if self._actnumber >= self._itemnumber then
self:restore_bar()
if not self.all_in_place then
if self.autoreset then --resets after 5 seconds
self:autoreset_countdown()
end
return --not enough of something
end
self.autoreset_count = 30 --reset countdown
--all in place
for _,item_stack in pairs(self.ing) do
--insert only needed count
if item_stack.count > 0 then
if not stack_transfer(self.inv, item_stack, self.assembler) then
self.message = "Unknown error while trying to insert ingredients"
return
end
end
end
end
self.state = self.wait_for_output
self.message = "Waiting for results.."
--self:state()
end
And deleting every self:state() call exept in cyberchest.state_execute
This brings it down from 7.170 to about 0.5 and puts the FPS drops from 10 to a maximum of 1 every few seconds.
7 for 4? That's rough, I had 7 for 16.
I appreciate it, but what logic is behind that _actnumber? Also I put self:state() for a reason. To allow script to skip to the next stage and do not wait for another update. This allows assembler to produce 6 items per second instead of.. 1, i think.
Re: [Mod 0.11.22] CyberChest 0.7.0
Posted: Tue Jun 02, 2015 8:09 pm
by Nathan1852
The problem with sels:state() is that it can cause many functioncalls after each other.
This wouldn't be a problem if some of the functions wouldn't take long to finish.