PSA: Computercraft updated recently which is nice. It was a really cool update too with plenty of awesome new toys (and an excellent new Windowing API). That along with the updates to Openperipherals may have broken this program so be warned. I haven't had a chance to test it myself though but if it is broken I will try and fix it soon.
I happen to be a big fan of computercraft and I adore all of the extra goodies that come with its addons, especially open peripherals. The open peripherals website (which seems to be down right now anyway) is mostly out of date and the in game documentation is a myriad of convoluted nested tables. The information is difficult to read on the in game monitors anyway.
So I made this program which uses the fs api to make little reports of all the in game information that I know about for lots of different peripherals. The program will make a file (he files name will be the same as what is returned by peripheral.getType) in the same place it puts ordinary program files. You can also pastebin the reports if you like, or read them by typing edit (whatever the file is called) just like any other program, although the formatting is not good for this.
I have tested it on a variety of different peripherals, including vanilla computer craft stuff like monitors, logistics pipes and the big reactor computer peripheral. There is also a special method in open peripherals that gives extra information about the methods it creates. My program works with that too.
Enough talk, here are a few examples I cooked up
ME Controller - http://pastebin.com/Dub0aMsH
Buildcraft Tank - http://pastebin.com/wUMZWbUX
You can download the program here:
New version - http://pastebin.com/tZbCWSBe
Old version - http://pastebin.com/NmU8Wwkj
Recent changes to the way open peripherals organised there ingame documentation forced me to make a larger than normal update. Normally I would have just modified the old program and used the same link but the changes were big enough that I was worried I might break compatibility for older versions of open peripherals so I left the old link unchanged and made a completely new one for methodman 2.0. The old version will no longer be updated, while the new one will continue to get new features (as appropriate) and bug fixes.
If anyone finds any problems with this program, or if there is another wealth if ingame documentation that I can add support for, please let me know.
I just want to clarify that I didn't write any of the documentation my self, I just arranged it.
P.S. While looking through what I am posting, I have noticed a bug where the arguments are being displayed in the wrong order sometimes. Each argument comes with a number though so it should hopefully be obvious what the correct order is. I will work on a fix.
EDIT: I think I fixed this bug I found faster than the time it took for a single person to look at this thread, not bad for first thing after a terrible night's sleep.
Anyway, for methods that had at least 4 arguments the arguments were getting their order mixed up. I was under the impression that when you loop through a table with numeric keys it would do so numerically. Maybe my computer just can't count. Well, I replaced the generic for loops with numeric for loops so hopefully there won't be any major issues. I updated the pastebin.
Methodman: In game documentation for CC peripherals
I happen to be a big fan of computercraft and I adore all of the extra goodies that come with its addons, especially open peripherals. The open peripherals website (which seems to be down right now anyway) is mostly out of date and the in game documentation is a myriad of convoluted nested tables. The information is difficult to read on the in game monitors anyway.
So I made this program which uses the fs api to make little reports of all the in game information that I know about for lots of different peripherals. The program will make a file (he files name will be the same as what is returned by peripheral.getType) in the same place it puts ordinary program files. You can also pastebin the reports if you like, or read them by typing edit (whatever the file is called) just like any other program, although the formatting is not good for this.
I have tested it on a variety of different peripherals, including vanilla computer craft stuff like monitors, logistics pipes and the big reactor computer peripheral. There is also a special method in open peripherals that gives extra information about the methods it creates. My program works with that too.
Enough talk, here are a few examples I cooked up
Code:
METHODMAN: Practical display for in game documentation of computercraft + addons
Peripheral found
Side: right
Type: container_chest
container_chest method list:
swapStacks
pushToComputer
getInventoryName
destroyStack
pushItem
getAdvancedMethodsData
getInventorySize
pushItemIntoSlot
getStackInSlot
getAllStacks
pullFromComputer
listMethods
pullItem
condenseItems
pullItemIntoSlot
Open Peripherals Advanced Method Data
1. swapStacks
Return Type: BOOLEAN
Description: Swap two slots in the inventory
Arguments: swapStacks(from, to)
1. from
Description: The first slot
Type: NUMBER
2. to
Description: The other slot
Type: NUMBER
2. pushToComputer
Return Type: BOOLEAN
Description: Push an item from a slot to the computer buffer
Arguments: pushToComputer(slot, maxAmount)
1. slot
Description: The slot in the inventory that you're pushing from
Type: NUMBER
2. maxAmount
Description: Max amount of items to push into the computer
Type: NUMBER
3. getInventoryName
Return Type: STRING
Description: Get the name of this inventory
Arguments: getInventoryName()
No Arguments
4. destroyStack
Return Type: VOID
Description: Destroy a stack
Arguments: destroyStack(slotNumber)
1. slotNumber
Description: The slot number, from 1 to the max amount of slots
Type: NUMBER
5. pushItem
Return Type: NUMBER
Description: Push an item from the current inventory into any slot on the other one. Returns the amount of items moved
Arguments: pushItem(direction, slot, maxAmount)
1. direction
Description: The direction of the other inventory. (north, south, east, west, up or down)
Type: STRING
2. slot
Description: The slot in the current inventory that you're pushing from
Type: NUMBER
3. maxAmount
Description: The maximum amount of items you want to push
Type: NUMBER
6. getAdvancedMethodsData
Return Type: TABLE
Description: Get a complete table of information about all available methods
Arguments: getAdvancedMethodsData()
No Arguments
7. getInventorySize
Return Type: NUMBER
Description: Get the size of this inventory
Arguments: getInventorySize()
No Arguments
8. pushItemIntoSlot
Return Type: NUMBER
Description: Push an item from the current inventory into a specific slot in the other one. Returns the amount of items moved
Arguments: pushItemIntoSlot(direction, slot, intoSlotmaxAmount, )
1. direction
Description: The direction of the other inventory. (north, south, east, west, up or down)
Type: STRING
2. slot
Description: The slot in the current inventory that you're pushing from
Type: NUMBER
4. intoSlot
Description: The slot in the other inventory that you want to push into
Type: NUMBER
3. maxAmount
Description: The maximum amount of items you want to push
Type: NUMBER
9. getStackInSlot
Return Type: TABLE
Description: Get details of an item in a particular slot
Arguments: getStackInSlot(slotNumber)
1. slotNumber
Description: The slot number, from 1 to the max amount of slots
Type: NUMBER
10. getAllStacks
Return Type: TABLE
Description: Get a table with all the items of the chest
Arguments: getAllStacks()
No Arguments
11. pullFromComputer
Return Type: BOOLEAN
Description: Pull an item from the computer buffer to a slot
Arguments: pullFromComputer(slot)
1. slot
Description: The slot in the inventory that you're pulling to
Type: NUMBER
12. listMethods
Return Type: STRING
Description: List all the methods available
Arguments: listMethods()
No Arguments
13. pullItem
Return Type: NUMBER
Description: Pull an item from the target inventory into any slot in the current one. Returns the amount of items moved
Arguments: pullItem(direction, slot, maxAmount)
1. direction
Description: The direction of the other inventory. (north, south, east, west, up or down)
Type: STRING
2. slot
Description: The slot in the other inventory that you're pulling from
Type: NUMBER
3. maxAmount
Description: The maximum amount of items you want to pull
Type: NUMBER
14. condenseItems
Return Type: VOID
Description: Condense and tidy the stacks in an inventory
Arguments: condenseItems()
No Arguments
15. pullItemIntoSlot
Return Type: NUMBER
Description: Pull an item from a slot in another inventory into a specific slot in this one. Returns the amount of items moved
Arguments: pullItemIntoSlot(direction, slot, intoSlotmaxAmount, )
1. direction
Description: The direction of the other inventory. (north, south, east, west, up or down)
Type: STRING
2. slot
Description: The slot in the OTHER inventory that you're pulling from
Type: NUMBER
4. intoSlot
Description: The slot in the current inventory that you want to pull into
Type: NUMBER
3. maxAmount
Description: The maximum amount of items you want to pull
Type: NUMBER
--------------------
All actual documentation is written by the mod developer who made the peripheral, not me. I just displayed it - happy computercrafting
ME Controller - http://pastebin.com/Dub0aMsH
Buildcraft Tank - http://pastebin.com/wUMZWbUX
You can download the program here:
New version - http://pastebin.com/tZbCWSBe
Old version - http://pastebin.com/NmU8Wwkj
Recent changes to the way open peripherals organised there ingame documentation forced me to make a larger than normal update. Normally I would have just modified the old program and used the same link but the changes were big enough that I was worried I might break compatibility for older versions of open peripherals so I left the old link unchanged and made a completely new one for methodman 2.0. The old version will no longer be updated, while the new one will continue to get new features (as appropriate) and bug fixes.
If anyone finds any problems with this program, or if there is another wealth if ingame documentation that I can add support for, please let me know.
I just want to clarify that I didn't write any of the documentation my self, I just arranged it.
P.S. While looking through what I am posting, I have noticed a bug where the arguments are being displayed in the wrong order sometimes. Each argument comes with a number though so it should hopefully be obvious what the correct order is. I will work on a fix.
EDIT: I think I fixed this bug I found faster than the time it took for a single person to look at this thread, not bad for first thing after a terrible night's sleep.
Anyway, for methods that had at least 4 arguments the arguments were getting their order mixed up. I was under the impression that when you loop through a table with numeric keys it would do so numerically. Maybe my computer just can't count. Well, I replaced the generic for loops with numeric for loops so hopefully there won't be any major issues. I updated the pastebin.
Last edited: