Posted 16 October 2013 - 01:02 AM
Not sure if this is the proper place for this, but I searched all over and found nothing helpful. "Ask a Pro" seemed more code related than turtle specific. So, on a multiplayer server, for the server admin(s), to give all your turtles access to all your turtle scripts, without having to get each turtle their own set, do the following: (I haven't figured out how to get this to work on single player, yet)
In Windoze . . .
- go to the folder on your hard drive where you have your Minecraft server installed
- go to the folder called "rom". If you have turtles, you'll have a mods folder.
- you want to have the following directory structure inside the "mods" folder: ComputerCraft/lua/rom/programs/turtle
Create whatever folders you don't have. I run a FTB Ultimate server and had to create all of it.
- in your web browser, go online to pastebin.com, find a script you like, and copy the code.
- in the "turtle" directory, create a text file and name it whatever you like (keep the ".txt" file extension for now if you like - it makes it easier to open it).
- open the file and paste your copied code. Save and exit.
- now, rename the file and remove the ".txt" if you like. The turtles will still run the code, whether it has a ".txt" or not. Removing the file extension makes it shorter and easier to type in the turtle UI.
- drop a turtle, new or old, labeled or not, and right click it.
- using some old command line phrases, type "cd rom/programs/turtle" (no quotes) and hit enter. Then type "dir" and hit enter. You will see the name of the file you just created. You can run the newly copied programs from the root (> ) folder without having to change directories to the "turtle" folder.
- every one of your turtles will be able to see these files and these files do not get deleted if your turtle gets lost or destroyed.
- to get back to the directory where you have all your other turtle programs saved, type "cd /" and hit enter.
Some more details:
1. You can actually save your "programs" (like the file you just created) in rom, programs, turtle, or any other folder you create in "rom" or further down the directory structure. The programs will run just fine in any of those folders, and you can even create your own custom named folders if you don't like the defaults. It's just easier to keep your programs in the "turtle" folder along with the default turtle programs. Your choice though.
2. Any files you copy into the Minecraft folders are available IMMEDIATELY to all turtles. You don't need to restart your server, your client or reboot your turtles. Inside the turtle UI, just type "dir" again after you have copied in the new programs using Windows Explorer, and you'll see all the new programs.
2. Regardless of what your permissions are in Windows, once you are in Minecraft, and using a turtle, from the "rom/programs/turtle" folder, you can't edit or delete any files/programs you created from inside Windows Explorer. You can't copy programs from your turtle's working/root directory (the "> " prompt) TO the "rom/programs/turtle" directory either.
3. You CAN copy files FROM the "rom/programs/turtle" directory to your turtle's root directory, and THEN you can edit them. Easiest way to edit the programs is using something like Notepad from inside Windows, where you can edit the files, save them, and then immediately run a turtle to check the code. Another way, is to change the code on pastebin, and then just copy and paste the code into the file again.
4. Because the program files are write protected by the server admin, no one can grief the turtle scripts on the server unless they have access to the folders from inside Windows. All the program files are available to all the turtle users on the server. I will edit the post when I can test that out, or anyone else can test it and post a reply.
I think that covers most of the salient points. There are a lot of cool little things hiding in the turtle UI. Just type "dir" and start exploring :)/>/>/>/>
In Windoze . . .
- go to the folder on your hard drive where you have your Minecraft server installed
- go to the folder called "rom". If you have turtles, you'll have a mods folder.
- you want to have the following directory structure inside the "mods" folder: ComputerCraft/lua/rom/programs/turtle
Create whatever folders you don't have. I run a FTB Ultimate server and had to create all of it.
- in your web browser, go online to pastebin.com, find a script you like, and copy the code.
- in the "turtle" directory, create a text file and name it whatever you like (keep the ".txt" file extension for now if you like - it makes it easier to open it).
- open the file and paste your copied code. Save and exit.
- now, rename the file and remove the ".txt" if you like. The turtles will still run the code, whether it has a ".txt" or not. Removing the file extension makes it shorter and easier to type in the turtle UI.
- drop a turtle, new or old, labeled or not, and right click it.
- using some old command line phrases, type "cd rom/programs/turtle" (no quotes) and hit enter. Then type "dir" and hit enter. You will see the name of the file you just created. You can run the newly copied programs from the root (> ) folder without having to change directories to the "turtle" folder.
- every one of your turtles will be able to see these files and these files do not get deleted if your turtle gets lost or destroyed.
- to get back to the directory where you have all your other turtle programs saved, type "cd /" and hit enter.
Some more details:
1. You can actually save your "programs" (like the file you just created) in rom, programs, turtle, or any other folder you create in "rom" or further down the directory structure. The programs will run just fine in any of those folders, and you can even create your own custom named folders if you don't like the defaults. It's just easier to keep your programs in the "turtle" folder along with the default turtle programs. Your choice though.
2. Any files you copy into the Minecraft folders are available IMMEDIATELY to all turtles. You don't need to restart your server, your client or reboot your turtles. Inside the turtle UI, just type "dir" again after you have copied in the new programs using Windows Explorer, and you'll see all the new programs.
2. Regardless of what your permissions are in Windows, once you are in Minecraft, and using a turtle, from the "rom/programs/turtle" folder, you can't edit or delete any files/programs you created from inside Windows Explorer. You can't copy programs from your turtle's working/root directory (the "> " prompt) TO the "rom/programs/turtle" directory either.
3. You CAN copy files FROM the "rom/programs/turtle" directory to your turtle's root directory, and THEN you can edit them. Easiest way to edit the programs is using something like Notepad from inside Windows, where you can edit the files, save them, and then immediately run a turtle to check the code. Another way, is to change the code on pastebin, and then just copy and paste the code into the file again.
4. Because the program files are write protected by the server admin, no one can grief the turtle scripts on the server unless they have access to the folders from inside Windows. All the program files are available to all the turtle users on the server. I will edit the post when I can test that out, or anyone else can test it and post a reply.
I think that covers most of the salient points. There are a lot of cool little things hiding in the turtle UI. Just type "dir" and start exploring :)/>/>/>/>