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

Buildcraft controls programs

Started by virtualayu, 04 April 2012 - 11:38 AM
virtualayu #1
Posted 04 April 2012 - 01:38 PM
Hi, for the record i'm french and my english is not that good so excuse me if i spell or say wrong.
My programs will be in french (only the part print on CC screen) but i put the traduction on commentary.

I open this tread to post my programs for using Buildcaft with computers.
I will try to make everything (if possible) in Buildcraft controllable by computer.

Of course I use the alpha 3.1.4 release of Buildcraft for the new "gates".
That's very very usefull.

My first on : "Tank lvl control"
SpoilerSo this is my first program in this tread is just a "tank control" it just show the "level of all tanks"






an exemple of how to make it.

Link to my program (pastbin) : (New version with config file)
http://pastebin.com/L9CYQCDr

If you want to make it in english be carefull the numbers of spaces is verry important so if you change anything on "print" command count the difference Between the original and your words to make it fit.

If you have some advice or comment to do, don't hesitate.
Wolvan #2
Posted 04 April 2012 - 01:58 PM
You could make the colors changeable. I could help with a configuration program so if you boot it it ask which color is for example the fuel tank
virtualayu #3
Posted 04 April 2012 - 02:09 PM
effectively now you say that i think i can make something like that but only the part for chosing color not the part that change value on the program…. so i need help ^^
Wolvan #4
Posted 04 April 2012 - 10:17 PM
It would be a pleasure
virtualayu #5
Posted 05 April 2012 - 02:20 PM
i think a can create a *.ini file with that command : conf = fs.open("conf.ini", "w")
and i write data inside with : conf.writeLine("..waterColor1..") conf.writeLine("..waterColor2..") etc with the part who ask what color we want
and at the start of the code i check if the file conf.ini exist and read it with : if fs.exists("conf.ini") == true then waterColor1 = conf.readLine() waterColor2 = conf.readLine() …etc

what dou you think about something like that?
virtualayu #6
Posted 06 April 2012 - 04:48 AM
i finaly made it… ^^ it takes me somthing like 6 or 7 hours of hard coding, but i made it (by my self XD yeah^^)
It was really really difficult for me… This is my first "real" program (my first one was a pasword program ^^) and i'm a beginner on lua.

Now in my place it's almost 6:00 am so i will make the translate and post it tomorrow.
Now i'm tired so i'm going to sleep but i'll go with a real good feeling of fulfillment!! ^^
virtualayu #7
Posted 06 April 2012 - 04:50 PM
Well i changed the pastebin link with my new code.
Now on the first use it say First use and ask for all the colors.
Then he write everything in a configuration file named tankConf.ini
after that at every launch of the program it will read the conf file and apply it.

So now you can do your wire configuration like you want and even change it if you want you juste have to delete the conf file.

if you have a bug, a comment or an advice tell me ^^.
Wolvan #8
Posted 07 April 2012 - 12:51 AM
you could create a reconfigure program which automatically removes the conf.ini and starts the config wizard :P/>/>
virtualayu #9
Posted 07 April 2012 - 05:06 AM
Well… ^^ maybe later ^^ i plain to modify my programs and add rednet in the futur in order to centralize everyting on 1 computer but this will be better ^^
Wolvan #10
Posted 07 April 2012 - 11:27 AM
I could help with rednet. and btw: it's plan not plain. Plain would be as far as I know a big open space
nagojolokio #11
Posted 08 July 2012 - 03:55 AM
on the last pic, what are those nodes next to the tanks that the wires connect to?
Wolvan #12
Posted 10 July 2012 - 11:11 AM
on the last pic, what are those nodes next to the tanks that the wires connect to?
I think you mean the Buildcraft 3.x Gates. They can read for example inventories of tanks and chests
nagojolokio #13
Posted 11 July 2012 - 11:26 PM
I think you mean the Buildcraft 3.x Gates. They can read for example inventories of tanks and chests

yep thanks
ShadowZenoX #14
Posted 13 July 2012 - 06:30 PM
Would be nice if this was english but good job
snowmaster97 #15
Posted 16 July 2012 - 06:43 AM
Wait, so is it in english yet or no?