- ComputerCraft | Programmable Computers for Minecraft
- → joebodo's Content
joebodo's Content
There have been 69 items by joebodo (Search limited from 10-February 22)
#178755 Open Peripherals inventory.getAllStacks() issue
Posted by
joebodo
on 16 May 2014 - 02:20 AM
in
Ask a Pro
chest = peripheral.wrap('right')
if not chest then
error('no chest')
end
stacks = chest.getAllStacks()
if not stacks then
error('all stacks returned nothing!')
end
stack = stacks[1]
if not stack then
error('nothing in first slot')
end
for name,value in pairs(stack) do
print(name .. ' = ' .. tostring(value))
end
Give the above a try. When I have trouble with some code, adding error checking and printouts often helps.
#178453 Replace rednet in 1.63
Posted by
joebodo
on 14 May 2014 - 07:48 AM
in
Programs
CometWolf, on 14 May 2014 - 06:27 AM, said:
rednet.isOpen = function()
print('a' .. t) -- will cause the crash
end
and thisrednet.isOpen = nil
CometWolf, on 14 May 2014 - 06:27 AM, said:
The code is pretty good at checking parameters. I don't see an obvious way to crash it by sending a message.
( how about: local t, rednet.isOpen = rednet.isOpen, nil )
#178444 Replace rednet in 1.63
Posted by
joebodo
on 14 May 2014 - 05:25 AM
in
Programs
CometWolf, on 14 May 2014 - 05:02 AM, said:
Oops, forgot to post the last line - which is probably causing the confusion.
Just to clarify...
I replace a method that rednet.run will eventually call with one that will cause rednet.run to crash.
I replace the method that is called in bios after rednet aborts with one that will start up a new shell.
I post a 'modem_message' event that rednet.run will process (and lead to the crash).
My second method is then called and I restore everything and start up a new shell.
I do this in order to provide my own rednet.run subsequently.
#178438 Replace rednet in 1.63
Posted by
joebodo
on 14 May 2014 - 04:27 AM
in
Programs
local t = rednet.isOpen
rednet.isOpen = nil -- will cause the crash
local t2 = term.redirect
term.redirect = function() -- this is the next method called in the bios if rednet exits
term.redirect = t2
rednet.isOpen = t
print('starting shell')
os.run(getfenv(1), '/rom/programs/shell')
end
os.queueEvent('modem_message')
You will need to run some shell or program, otherwise, the bios will exit and the computer will shutdown.
#178431 nsh - Now With Previous Session Resume!
Posted by
joebodo
on 14 May 2014 - 04:16 AM
in
Programs
Not sure if others are having issues (couldn't find any posts in the bugs topic) - but rednet on our server only seems to work if there are at most 2 computers. So, i hacked in rednet from 1.58 and everything is working great.
#174587 Piston placement
Posted by
joebodo
on 20 April 2014 - 10:11 PM
in
Suggestions
The piston can be very useful for turtles to manipulate other blocks. I currently use a piston to maneuver blocks into the correct locations for a schematic builder. Due to the changes in 1.6, I can no longer use this method.
I would like to see the following changed, if possible, for piston placement:
placeUp: piston head is pointing up
placeDown: piston head is pointing down
place: piston head is furthest away from the turtle
Please consider.
Thanks
#173249 Schematic builder
Posted by
joebodo
on 13 April 2014 - 09:26 PM
in
Turtle Programs
Still working on the other requests...
#172886 Turtle mining swarm
Posted by
joebodo
on 11 April 2014 - 09:24 PM
in
Turtle Programs
#172872 Schematic builder
Posted by
joebodo
on 11 April 2014 - 06:46 PM
in
Turtle Programs
WilberP, on 11 April 2014 - 08:05 AM, said:
Quote
Oh man - it just occurred to me that it was probably out of fuel (if getting the stuck message). I'll add some fuel check in the code so you know what's going on.
WilberP, on 11 April 2014 - 08:05 AM, said:
Me and my friends sure loving the program in my server so we really thankful for this program even if it's a early release, it's a great work.
Something we notice it's that without world anchors is pretty annoying to restart build since it requires a chest (of course everyone start doing big schematics), so turtle need to be move to the starting position, maybe start from where is at moment if exist the progress file and bypass the Chest check?
Also didn't figure exactly where it start build the schematic from the start position, does it consider the block in front of turtle as the left down corner of the schematic or it give some spaces before doing it?
Turtle also destroy what it finds while on path to the building, any chance if is given the starting position to build and place the chest area above the building it will not damage the surroundings and allow precision building of schematics next to each others?
Also only the bellow chest is small for bigger buildings, need to check more about this ComputerCraft to see if already exist ways to "present" more chest to the turtle..
I'm not really considering a auto-resume function at this time (the manual resume should be 100% reliable - auto-resume would not be).
If you are going to be doing big builds, I really suggest trying an AE system. The AE system can tie in with most other mods (it does not need to be your primary source for storage - just a means for retrieving items).
Right now, the turtle starts at position -1, 0, -1 of the building. I agree that having the position within the building coordinates would be ideal - but I can't figure out a good way to do that. For example, I had a building that was 80 blocks tall. I wouldn't want to have the starting position that high up and have to run cable there
#172869 Schematic builder
Posted by
joebodo
on 11 April 2014 - 06:32 PM
in
Turtle Programs
dragontox, on 10 April 2014 - 07:50 PM, said:
Which issue?
The issue where the turtle keeps saying that he is stuck and does not move on even after i press enter. It does move on in the calculations but the turtle himself is stuck in place
Got it now - the stuck message is due to (most likely) running out of fuel. There's a couple other ways to get it as well - hitting bedrock or unable to kill a mob in it's path.
Send me a PM with the server details and a good time and I'll jump on. I'd love to see what you guys are building too. You could also pop onto Cranium's IRC and see if I'm around. Here's the post with all the info: http://www.computerc...mproved-server/
#172754 Turtle mining swarm
Posted by
joebodo
on 10 April 2014 - 09:07 PM
in
Turtle Programs
kreezxil, on 09 April 2014 - 10:12 PM, said:
joebodo, on 04 April 2014 - 08:06 AM, said:
saftus, on 01 April 2014 - 08:30 PM, said:
First, this program is awesome!
However, I play on a server where enderchests does not work. Is it possible for the turtles to place a chest at top surface when full(or done with a hole). And what do I have to do for tweaking the code? Is there maybe any other smart options for this?
Regards!
I can't really see a way to get around using ender chests. It was pretty much a core design thing. Sorry!
What about Item Tesseracts? Those act very similar to ender chests.
Might work - give it a shot
bnm12, on 10 April 2014 - 07:18 AM, said:
Quote
I don't have anything else which uses rednet running, can't speak for the other guys on the server though, I'm asking them right now... (but I don't think they do)
Well, I've reworked the communications part of the program over the last few days. I need to do a lot more testing though before I put it up for download. Maybe keep an eye on the thread to see when it's released and hopefully it will resolve your issue.
#172750 Schematic builder
Posted by
joebodo
on 10 April 2014 - 08:46 PM
in
Turtle Programs
I did find a pretty big bug that occurs when you try to begin the build. The program could hang and cause the turtle to reboot during the calculations. I should have these changes in by tomorrow (hopefully)
#172748 Schematic builder
Posted by
joebodo
on 10 April 2014 - 08:40 PM
in
Turtle Programs
WilberP, on 10 April 2014 - 06:25 PM, said:
[OpenMods] Integration module 'ComputerCraft' failed during operation 'init' and will be disabled
Downgraded ComputerCraft from 1.62 to 1.58 and that fixed the OpenModsLib problem (chest was found by the turtle) and also Setup worked as expected and properly extracted files but now i'm having issues with Turtle complain that path is always blocked when begin building.
Edit:
really new with this.. after setup GPS it start build without problems.
I'll put in the requirements that it's 1.58 only - I don't think OpenPeripherals has caught up to the latest version of CC yet.
A GPS is not required - not really sure why that changed anything!
Cranium, on 10 April 2014 - 05:07 PM, said:
I'd like to know how that was done, because it would really go well with your program, not having to use FTP access to upload the files to the server. If you wrote that, it would be great to add to the program, so it can extract .schematic files directly.
I base64'd the file and transferred it using http.get. I then decoded the base64 file on the turtle. I agree it would be nice to include a download program. I don't know how people are getting binaries currently on servers (if they are at all) - I would like recommendations or some pointers if anyone is doing this. If I cannot find something existing, I'll go ahead and post what I use.
dragontox, on 10 April 2014 - 07:50 PM, said:
Which issue?
dragontox, on 10 April 2014 - 07:50 PM, said:
The program will not clear areas - you will need to make sure the area is cleared beforehand. The turtle would have to traverse to every block in the area otherwise.
dragontox, on 10 April 2014 - 07:50 PM, said:
I would like more details - is that what you mean?
#172425 Turtle mining swarm
Posted by
joebodo
on 08 April 2014 - 07:19 PM
in
Turtle Programs
bnm12, on 07 April 2014 - 10:09 AM, said:
First I figured that it might be something about the spot loaders, but then I tried standing AFK next to the mining boss, and the whole operation still stopped (after mining 92% of the chunk)
All the miners sat just at the top of their holes, but either they didn't accept commands, or the boss didn't send any, so they just stayed there. They all had 9000+ fuel
Technical info:
Mining in a MystCraft Age
TurtleOS 1.5
FTB Monster 1.0.9
Using spot loaders
8 Miners
I've seen rednet just stop working after a period of time. I believe this can happen if there are a lot of unanswered rednet broadcasts happening. For this reason, I stay away from broadcasting - do you possibly have computers/broadcasting elsewhere in your world ?
Sam_Starfall, on 08 April 2014 - 02:01 AM, said:
Are you able to get anything else using pastebin get? Also, make sure you have enough disk space available on your turtle.
#172017 Schematic builder
Posted by
joebodo
on 06 April 2014 - 05:47 AM
in
Turtle Programs
dragontox, on 05 April 2014 - 11:36 AM, said:
Thank for the reply and It's okay you have put a lot of work into this script and created something awesome, The least I can do is tell you about the bugs.
Edit:
I also attempted to do the chicken schematic in both the sub folder and without it and it seems to not create the progress file at all.
I uploaded a new version with a bunch of optimizations (I updated the original post but forgot to increment the version number in the code - still says 0.01). I haven't been able to reproduce the issue with the progress file though. I normally name my files without an extension and place them either in a subfolder or the root folder. The last one I ran, I used the following command (the file was not in a subdirectory):
builder.lua modernhouse
Someone on Cranium's server grabbed a screenshot and sent me the link:
#171799 Schematic builder
Posted by
joebodo
on 05 April 2014 - 05:22 AM
in
Turtle Programs
dragontox, on 05 April 2014 - 12:12 AM, said:
apis.lua:364: Unable to open /easy.progresseasy being the schematic name any ideas on what's causing this?
ps it also seems to crash when adding none vanilla blocks to the me system
For now, try placing the schematic in a subdirectory (like /schematics/easy). I'll upload a fix for it shortly (i have a bunch of optimizations done).
I've done replacements before with a mod's custom nether bricks before without a problem. I'll try a few other blocks. If you see the error again, see if prints out the line number. Thx (and sorry for all the issues - you seem to be the guinea pig)
#171591 Turtle mining swarm
Posted by
joebodo
on 04 April 2014 - 08:06 AM
in
Turtle Programs
keramond, on 03 April 2014 - 11:48 PM, said:
Everything you listed sounds fine. Once the boss has filled all his slots, he will collect the resources from the 3 remaining miners and shut them off. So all that seemed to work ok. Either the miners lost their ender chests somehow (unlikely), or the boss pitched them while collecting the miners. I'll do some tests now with your exact setup to see. I really hate losing ender chests - blaze rods are a pain.
saftus, on 01 April 2014 - 08:30 PM, said:
First, this program is awesome!
However, I play on a server where enderchests does not work. Is it possible for the turtles to place a chest at top surface when full(or done with a hole). And what do I have to do for tweaking the code? Is there maybe any other smart options for this?
Regards!
I can't really see a way to get around using ender chests. It was pretty much a core design thing. Sorry!
#171491 Schematic builder
Posted by
joebodo
on 03 April 2014 - 08:42 PM
in
Turtle Programs
Amdusias, on 03 April 2014 - 07:13 PM, said:
One question: does this work on a server?
Yes - works on a server (was just on one today). You need a way to get the binary schematics to the turtle though.
dragontox, on 03 April 2014 - 06:24 PM, said:
Thanks
For an ME system, it detects if the peripheral below has the getAvailableItems method. This pretty much tells if it's a version of OpenPeripherals for 1.6.4 (1.5 did not have this method).
function MEProvider:isValid()
local mep = peripheral.wrap('bottom')
return mep and mep.getAvailableItems and mep.getAvailableItems()
end
For a chest, it looks for the getAllStacks method.
function ChestProvider:isValid()
local chest = peripheral.wrap('bottom')
return chest and chest.getAllStacks
end
What version of OpenPeripherals are you using (or what modpack)?
#171408 Schematic builder
Posted by
joebodo
on 03 April 2014 - 08:00 AM
in
Turtle Programs
dragontox, on 01 April 2014 - 05:32 PM, said:
Thanks for the answer
Edit: I cannot get this to work, it just calls back no program found after extracting the packages
Ugh, it's missing the setup part that just says to run builder.lua <filename>
So, you should be good to go with what you have. I just tested it on another modpack and it seems to be working fine. I'll upload a new version soon(ish).
Let me know how it goes - I'm very interested.
Thanks
(here's my setup)
#170943 Turtle mining swarm
Posted by
joebodo
on 31 March 2014 - 11:58 PM
in
Turtle Programs
keramond, on 31 March 2014 - 01:59 PM, said:
first: Thanks for the great work, it's awesome!
second: Right now i am testing in small ops (5 chunks with 14 miners) with 1.3a. On recalling miners, they or the boss drop the enderchest of some of them onto the ground. Is there some way to fix this?
third: I use the status turtle in combination with terminal glasses. Is the status turtle able to move with the mining op to stay in wireless range and still send to my glasses?
first: Thanks
second: I've not seen that happen before. How many ender chests do you start with in the boss?
third: I place the status turtle very high above the starting spot. If you go to the flight ceiling, you get incredible range.
#170942 Schematic builder
Posted by
joebodo
on 31 March 2014 - 11:49 PM
in
Turtle Programs
dragontox, on 31 March 2014 - 08:13 PM, said:
Extracting: builderapi.lua
Extracting: schematic.lua
io:100: out of space
I believe the default limit for computercraft is 1MB. You must have a few files already on the turtle. You can change the limit in the ComputerCraft.cfg file (and restarting).
- ComputerCraft | Programmable Computers for Minecraft
- → joebodo's Content


