This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
NanoBob's profile picture

ME like storage management system

Started by NanoBob, 21 June 2016 - 05:25 PM
NanoBob #1
Posted 21 June 2016 - 07:25 PM
Purpose

These programs are intended to make an advanced storage system, somewhat like an ME system from the applied energistics mod. So if you're using a modpack without applied energistics, or you simply play vanilla with some computer mods then this can be used to make an easy to use storage system.

So if you hate opening up 100 chests to find that 1 item you needed. Or want to automaticly craft items for you which you often need then this might be for you!

Requirements

Mods:
This program requires computercraft ( any version that has wireless & wired modems, crafty turtles )
Also requires openperipherals for their peripheral proxies.

Items:
  • A regular computer
  • An advanced wireless pocket computer
  • A or several wireless crafting turtle
  • Peripheral proxies (1 per chest)
  • Wired modems (1 per chest and 1 for the regular computer)
  • Wireless modems (1 for the regular computer, 1 for the pocket computer & 1 per turtle)
How to set it up:

Central computer

The central computer is the computer hooked up to all chests, and manages the traffic between the clients and turtles. The central computer requires both a wireless and a wired modem. The wired modem would be wired up to chests attached to peripheral proxies (or any other inventory containing item which works with openperipherals).
The wireless modem will be used to communicate with the turtles and the hand held client.

Here's an example of how it would be set up.
Spoiler

Besides the inventory chests you would need one more block where the items will be brought to. If you lack this the items will be dropped onto the ground. This chest should be placed on a different elevation than the regular chests for storage to aid in turtle path finding, and prevent them from blocking one another.

This computer's program is http://pastebin.com/qfKhdZGw . The beginning of the program contains some variables which would require to be changed depending on setup. Here's my example setup showcased in the video.
Spoiler

local localChannel=666
local rest={x=156,y=7,z=263}
local drop={x=160,y=6,z=264}

local chests={
{chest=peripheral.wrap("iron_0"),pos={x=156,y=5,z=260}},
{chest=peripheral.wrap("iron_1"),pos={x=157,y=5,z=260}},
{chest=peripheral.wrap("iron_2"),pos={x=158,y=5,z=260}},
{chest=peripheral.wrap("iron_3"),pos={x=159,y=5,z=260}},
{chest=peripheral.wrap("iron_4"),pos={x=160,y=5,z=260}},
{chest=peripheral.wrap("iron_5"),pos={x=161,y=5,z=260}},
{chest=peripheral.wrap("iron_6"),pos={x=162,y=5,z=260}},
{chest=peripheral.wrap("iron_7"),pos={x=163,y=5,z=260}},
{chest=peripheral.wrap("iron_8"),pos={x=164,y=5,z=260}},
{chest=peripheral.wrap("iron_9"),pos={x=165,y=5,z=260}},
}

local modem=peripheral.wrap("back")
local wireless=peripheral.wrap("bottom")

localChannel is the channel which you will receive messages on, this can be kept default but I would recommend change for safety.
rest is the x,y,z position where the turtles would move to when they are assigned with no task. This should be on a different level than any of the previously placed chests in order to prevent pathfinding issues.
drop is the x,y,z position where the turtles would move to to drop the items (below it), so the y value should be above the chest.

Then there's the chest table. This table which contains all peripherals which you want interfaced as storage. Connect these with modems to your storage server. In the table the chest value is the peripheral wrap for the peripheral proxy. The pos is the position of 1 block above the chest, where the turtles will go in order to pick up items.

Beneath the chest table there's 2 modems wrapped, it's requires to change these sides to the appropriate ones for the modems.


Turtle

The turtle program is http://pastebin.com/CYeudwFd
The turtles should have the wireless modem on the left, and crafting table on the right. The program also has 1 config option at the start of the program

local sendChannel=666
This would be the same channel as you set the storage server channel to.
On the first launch it will ask for coordinates and direction, set the x,y,z coordinates to the ones the turtle is at. And the facing to the direction it is facing. Valid directions are "north", "east", "south" and "west".

Hand-held Client

The pocket computer program is http://pastebin.com/Wk6pirxW

The hand-held client is a wireless advanced pocket computer. It's also possible to run on an advanced computer, but the UI is not designed for that.
The first line is to be edited as well like the turtle, to the channel set in the storage server.

local targetChannel=666
On first launch it will also ask for a channel, this should be a channel below 1000. This will be the channel used to connect to the server, if you want to add a second hand held client you simply do the same but input a different channel than the other ones.

How to use:

Screenshot:
Spoiler




Video:

http://www.youtube.com/watch?v=yzmo2chwzFw

Search:
The search function allows you to type a search query, and any items in the system matching that search query will be shown up in a list on screen, including the ammount of said item in the system. You can click this item and it will change to a different screen where you can specify the ammount you wish to get, and click enter. One of the turtles will then pick up the item and bring it to the dropoff point.
Get Count:
Type the name of an item in the get count window, press enter. And it will display the ammount of that item thats in the system.
Request:
Type the name of an item in the request window, press enter. And then type the ammount you wish, press enter once again and it will pick up the item like it would in the search function.
Turtles:
Shows a list of turtles connected to the system, their current state and task.
View Que:
Shows a list of commands waiting to be executed when the next turtles becomes available.
Ping:
Updates the ping number in the left top corner of the screen, this displays the time it took to bounce a message to and from the server. You can use this to double check if you're still connected.
Craft:
Allows you to craft one of the recipes you set up earlier, will work with a multiple step recipe as long as all items required are in the system.
New Recipe:
Allows you to create a new crafting recipe to be used with auto crafting.


Planned updates:
  • Easy configuration ( configuring new chests through the UI)
  • Moving items to other inventories (like furnaces and such)
  • Crafting que
  • Automated processing (like crafting but with furnaces and other machines)
Irongron #2
Posted 28 July 2016 - 07:09 AM
This looks awesome, I'm going to bookmark this page to check with updates
renjestoo #3
Posted 31 August 2016 - 05:57 PM
Are there any updates to this program? For example that it will automatically detect connected chests?
NanoBob #4
Posted 27 September 2016 - 06:50 PM
I am working on a new version but it will take some time before finished.