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

[1.4/1.5] Turtle API improvements

Started by Pharap, 06 August 2012 - 06:51 AM
Pharap #1
Posted 06 August 2012 - 08:51 AM
At the moment the turtle api has 3 main item slot functions and 3 main detect functions.

These all give data about blocks/items, but none of them actually give the name/type or even block id of the item.

I think that if some more functions were added (checkDown, checkUp, check, checkSlot) it would drastically improve the turtle's capabilities. For example, you could send out a turtle to hunt for only one type of resource and return once it has obtained it, or perhaps when making build scripts, you wish to make the turtle alternate blocks, or perhaps even build a sign spelling something using different block types. The possibilities go as far as one's imagination.

I'm sure almost everyone could find a use for this

Thank you for taking the time to read this, and have a nice day.

PS -
The ability to select a slot with an item name/id would also be greatly appreciated, and I believe not too hard to implement
Noodle #2
Posted 06 August 2012 - 11:07 AM
turtle.compare()
It compares the item in the slot selected. This is the closest I think it should get..
Cloudy #3
Posted 06 August 2012 - 11:15 AM
Yeah, anything else isn't going to happen (we had a discussion about it on IRC yesterday).
Pharap #4
Posted 06 August 2012 - 11:26 AM
turtle.compare()
It compares the item in the slot selected. This is the closest I think it should get..
Why? What is wrong with the turtle knowing what Items it has?
It can only be an improvement.
Cloudy #5
Posted 06 August 2012 - 11:35 AM
It is overpowered compared with other mods (do you know of any other mods that allow you to enter an ID to search for?), it breaks the fourth wall, it is too cheaty - and other reasons. If people do want this functionality they can make a peripheral for it (IDetector is a good start).
Pharap #6
Posted 06 August 2012 - 11:43 AM
It is overpowered compared with other mods (do you know of any other mods that allow you to enter an ID to search for?), it breaks the fourth wall, it is too cheaty - and other reasons. If people do want this functionality they can make a peripheral for it (IDetector is a good start).
There's a mod that makes pigs fly, there are chests that are see-through, knowing what items are in a turtle is underpowered in comparison.
Aside from which it can always be another optional extra, like the http api.
Breaking the forth wall is nothing, the ender poem does it several times, and a lot of servers are actually based around it.
Cloudy #7
Posted 06 August 2012 - 11:47 AM
Like I said - this isn't going to happen. However, we realise that our vision isn't for everybody which is why we give you the tools which allow you to break those restrictions yourself.
Sebra #8
Posted 11 August 2012 - 02:44 PM
Yeah, anything else isn't going to happen (we had a discussion about it on IRC yesterday).
May I convince you to allow Turtle to detect several situations on top/forward/bottom?
0.nil (outer space);
1.Air (empty space);
2.Liquid (any);
3.Non-solid block (like Torch);
4.Loose block (like Sand);
5.Solid block (like Stone);
6.Inventory available (Chest, Furnace, Turtle, ChestCart, … ).
… may be I miss something useful
Pharap #9
Posted 11 August 2012 - 07:55 PM
It is overpowered compared with other mods (do you know of any other mods that allow you to enter an ID to search for?), it breaks the fourth wall, it is too cheaty - and other reasons. If people do want this functionality they can make a peripheral for it (IDetector is a good start).

Actually, come to think of it, NotEnoughItems allows you to seach for items, and EquivalentExchange has a tablet that records items and allows you to actually make them providing you have enough Emc to exchange for it. So yes, there are other mods that allow you to search for items. Difference between those and computercraft being able to do it would be that computercraft wouldn't actually give you the items, just allow you to test if an item was the item you are after.
Cloudy #10
Posted 11 August 2012 - 08:02 PM
It is overpowered compared with other mods (do you know of any other mods that allow you to enter an ID to search for?), it breaks the fourth wall, it is too cheaty - and other reasons. If people do want this functionality they can make a peripheral for it (IDetector is a good start).

Actually, come to think of it, NotEnoughItems allows you to seach for items, and EquivalentExchange has a tablet that records items and allows you to actually make them providing you have enough Emc to exchange for it. So yes, there are other mods that allow you to search for items. Difference between those and computercraft being able to do it would be that computercraft wouldn't actually give you the items, just allow you to test if an item was the item you are after.

NEI is an item manager - why wouldn't it let you search for items? That it is its Raison d'être.

Equivalent Exchange is the most overpowered mod out there. Hence what it does or not doesn't do doesn't matter. It also lets you make diamonds from thin air - is that something CC should look at for basing new features?


May I convince you to allow Turtle to detect several situations on top/forward/bottom?
0.nil (outer space);
1.Air (empty space);
2.Liquid (any);
3.Non-solid block (like Torch);
4.Loose block (like Sand);
5.Solid block (like Stone);
6.Inventory available (Chest, Furnace, Turtle, ChestCart, … ).
… may be I miss something useful

That idea is interesting. I'll have to think about that one and speak to dan.
Pharap #11
Posted 11 August 2012 - 08:16 PM
It is overpowered compared with other mods (do you know of any other mods that allow you to enter an ID to search for?), it breaks the fourth wall, it is too cheaty - and other reasons. If people do want this functionality they can make a peripheral for it (IDetector is a good start).

Actually, come to think of it, NotEnoughItems allows you to seach for items, and EquivalentExchange has a tablet that records items and allows you to actually make them providing you have enough Emc to exchange for it. So yes, there are other mods that allow you to search for items. Difference between those and computercraft being able to do it would be that computercraft wouldn't actually give you the items, just allow you to test if an item was the item you are after.

NEI is an item manager - why wouldn't it let you search for items? That it is its Raison d'être.

Equivalent Exchange is the most overpowered mod out there. Hence what it does or not doesn't do doesn't matter. It also lets you make diamonds from thin air - is that something CC should look at for basing new features?

I agree on both points, but at the same time, you asked if I could think of mods that let you search for items, and I gave you some. I was merely pointing out they do exist.

For most mods however, being able to tell what kind of a block something is, doesn't make sense. For Computercraft however, it would make sense for the turtle to be able to identify blocks. It's not that overpowered as it could only be used for searching for blocks and building maps. The player still has to guess the location of the items, so it's not the same as a dowsing device, the player still has to guess where items might be before checking.

To cap it, you could just make it that the turtle has to log the item in it's memory before it can identify it, so it would be like compare, but without wasting precious inventory space. If you did it that way, a person would actually have to obtain an ore before they could search for it, thus it would make it more of an earned ability.