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

how to save programs globally

Started by weaselnoob, 11 January 2018 - 11:37 PM
weaselnoob #1
Posted 12 January 2018 - 12:37 AM
So I wanted to make a program on a turtle, which i then did, and destroyed the turtle and it was gone, no big deal, but i wanted to save the program globally, so i made it in a normal computer. now i want the program from the computer to go onto a turtle, how do i transfer it? ingame if possible.
Bomb Bloke #2
Posted 12 January 2018 - 01:55 AM
Transferring data in-game is generally done by crafting a Disk Drive and Floppy Disk. Any system (be it a computer or turtle) placed next to the drive will be able to interact with its disk. You can then use cp to copy files around.
valithor #3
Posted 12 January 2018 - 05:38 AM
A few other things worth noting.

In the newer versions of the mod you can actually place computers/turtles in a floppy drive similar to how you would a floppy disk, and if you do this you can edit the files on the turtle/computer directly.

If you label a computer/turtle, then any programs (and fuel level in a turtle) will be saved whenever you break and replace the turtle/computer.
Lupus590 #4
Posted 12 January 2018 - 12:01 PM
If you have access to the real computer filesystem (i.e. you are the server owner or are playing single player) you can manipulate the files directly.

Go to your minecraft save folder, inside that is your worlds, inside those should be a folder called computer. Inside that is folders with numbers, these are your computer IDs, everything within an ID folder is that computer's file system. Turtles and computers share an ID pool, the disk folder is for floppy disks.

Ignore the lastid and lastid_computer text files, these are important for the mod and not usesful outside of the mod.
EveryOS #5
Posted 12 January 2018 - 12:16 PM
Ignore the lastid and lastid_computer text files, these are important for the mod and not useful outside of the mod.
I use these files all the time, what do'ya mean?
They are useful for placing a computer with a lower id (if you delete it you can place a computer with an id of 0), and also for making two computers share a filesystem without all the extra programming.
Luca_S #6
Posted 12 January 2018 - 06:22 PM
If you label a computer/turtle, then any programs (and fuel level in a turtle) will be saved whenever you break and replace the turtle/computer.
For this check out the label command.
Edited on 12 January 2018 - 05:23 PM
Lupus590 #7
Posted 12 January 2018 - 06:47 PM
Ignore the lastid and lastid_computer text files, these are important for the mod and not useful outside of the mod.
I use these files all the time, what do'ya mean?
They are useful for placing a computer with a lower id (if you delete it you can place a computer with an id of 0), and also for making two computers share a filesystem without all the extra programming.

The standard user doesn't need to change those files, although you can do your trick and not get an issue from the mod.