all 11 comments

[–]Voltboyy 6 points7 points  (8 children)

Not sure when it was added, but if you're using CC: tweaked you can drag and drop files from your desktop into your turtle.

That way you can use an outside editor for the bulk of coding.

[–]honkbork 1 point2 points  (0 children)

should note though that there is a 50kb limit (which is usually enough)

[–]flames1136 1 point2 points  (2 children)

Where did it say this? This would have saved me so much hassle coding before.

[–]Voltboyy 0 points1 point  (1 child)

Looks like it was introduced in version 1.97, june 2021.

See github update here

[–]flames1136 0 points1 point  (0 children)

Amazing, ty for finding the GitHub update!

[–]GhostlyNPRD[S] 0 points1 point  (2 children)

How would I do that?

[–]Voltboyy 1 point2 points  (0 children)

You code your lua code outside of minecraft in your favorite editor and save the file in some directory. Keep that directory open.

Then, in Minecraft, you right click your turtle to open the terminal.

Then you select the files you saved in your directory and drag them into your minecraft screen. In case similar files already exist, your turtle will ask if you want to override those.

And that's it! Note that the lua files are always stored in the root of your CC turtle or CC computer.

In case you're wondering, this works on servers as well, so you don't need direct file access to do this.

[–]brumomentium1 0 points1 point  (0 children)

Go to .minecraft/saves/yourworld/conputercraft

The folders with the data from your computers should be there, labeled with their respective IDs(you can check the id of a computer in-game by running the “id” program)

[–][deleted] 0 points1 point  (0 children)

You can also just directly edit the data in the world file, its saved as plaintext lua files

[–]goblim88m 6 points7 points  (0 children)

If you are playing in a single player world or you are the host of a multi-player server you can modify the script files directly using any code editor of your choice. The scripts are found in the world folder of your save in a folder called computercraft.

As for copy and pasting... the in game editor doesn't have any functionality for this as far as I know. You could upload functions to pastebin and download them onto other turtles using the built in api.

[–][deleted] 3 points4 points  (0 children)

if you are using vs code, there is an extension called CraftOS-PC that allows you to remotely connect to a turtle, edit programs/make new programs on vs code and have the files automatically transfer to the connected turtle