Jump to content




How To Make Turtle Programs Available To All Turtles

turtle

3 replies to this topic

#1 25hz

  • Members
  • 14 posts

Posted 16 October 2013 - 12: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 :)/>/>/>

#2 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 16 October 2013 - 09:44 AM

Moved to Tutorials. This information is outdated.

#3 25hz

  • Members
  • 14 posts

Posted 16 October 2013 - 06:19 PM

Thanks for moving it, sorry I put it in the wrong spot in the first place.

After going through the search feature as well as all 7 pages of the tutorial section, including the FAQ thread, there's no information about making programs available to all users. Also, the advice of putting the programs in the .minecraft users' folder didn't work either on multiplayer, so how is the information outdated? It works. ?

#4 amtra5

  • Members
  • 166 posts
  • LocationMelbourne, Australia

Posted 17 October 2013 - 12:09 AM

In the newer versions of CC, you are meant to change the rom using resource packs. http://www.computerc...resource-packs/





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users