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

How to make and install Lua resource packs

Started by dan200, 12 July 2013 - 07:30 AM
dan200 #1
Posted 12 July 2013 - 09:30 AM
Hey all,

as of ComputerCraft 1.55, Lua programs can now be included in Minecraft resource packs. Indeed, this is the only way to add custom programs to the ComputerCraft rom folder now.

So how do I make then?

A resource pack is a zip file or a folder containing resource files that, when installed, replace or add to the default ones included in Minecraft or mods. In ComputerCraft, this can be used to add programs to the ROM, or add programs to the pool of spawnable Treasure Disks (1.56 and above). To do this, a resource pack must include them in the subfolders "assets/computercraft/lua":So how do I install them?

To install a resource pack, simple drag it to the "resourcepacks" folder of your Minecraft installation, and launch or relaunch Minecraft. There is no need to select it from the resourcepacks options menu, all Computercraft lua resources are combined and loaded permanently.

If you're playing in multiplayer, you need to install the resoucepack to the server. To do this: create the "resourcepacks" folder manually, and drag the resource pack zip file to it.

Happy hacking!
Tjakka5 #2
Posted 12 July 2013 - 09:46 AM
Thank you for this explanation, Im sure it will be usefull for lots of people.
ElvishJerricco #3
Posted 12 July 2013 - 01:41 PM
Tsk tsk dan. This should be in the tutorials section ;)/>
rhyleymaster #4
Posted 12 July 2013 - 02:01 PM
I believe this is the wrong section, Dan.
dent308 #5
Posted 12 July 2013 - 02:05 PM
What about being able to edit in the rom folder? Unzip - edit - rezip seems really clunky for hacking / testing.
TheOddByte #6
Posted 12 July 2013 - 03:38 PM
What about being able to edit in the rom folder? Unzip - edit - rezip seems really clunky for hacking / testing.
Uhmm.. Then test it in ccDesk or something before putting it in a resource pack :P/>
MCGamer20000 #7
Posted 12 July 2013 - 08:44 PM
How about removing default files? Is that possible?
theoriginalbit #8
Posted 12 July 2013 - 09:42 PM
I believe this is the wrong section, Dan.
I don't believe it is… It's in a place that will grab people attention…
ElvishJerricco #9
Posted 12 July 2013 - 09:46 PM
I believe this is the wrong section, Dan.
I don't believe it is… It's in a place that will grab people attention…

… It's a tutorial. It goes in the tutorials section. If someone is looking for a tutorial on making resource packs, they're not going to look in the programs board.
PixelToast #10
Posted 12 July 2013 - 10:39 PM
i dont like this :s this way i cant edit the programs directly
any other way around?
ElvishJerricco #11
Posted 12 July 2013 - 11:26 PM
i dont like this :s this way i cant edit the programs directly
any other way around?

Just unzip CC and copy the file you need to edit. Not too hard. A wee bit more inconvenient though.
PixelToast #12
Posted 12 July 2013 - 11:47 PM
not what i meant, i want to edit all the files in as single folder (how it used to be) without having to shutdown / rezip anything ;_;
ElvishJerricco #13
Posted 13 July 2013 - 01:08 AM
not what i meant, i want to edit all the files in as single folder (how it used to be) without having to shutdown / rezip anything ;_;

Oh right. Yea I posted in the suggestions about that. I wrote a script to do all that work for me but it takes time to reboot the game entirely. Really messes with my workflow.
Zudo #14
Posted 13 July 2013 - 01:57 AM
This was a really neat idea!


Hehehehehehehehehehehehehehe
Xfel #15
Posted 13 July 2013 - 03:59 PM
So… As mods are now resource packs too… can they add their peripheral apis this way?
electrodude512 #16
Posted 13 July 2013 - 07:51 PM
So… As mods are now resource packs too… can they add their peripheral apis this way?

Only mods like Forge and hopefully Optifine are now resource packs. All other mods go in minecraft/mods/ like they used to.
dan200 #17
Posted 14 July 2013 - 02:13 AM
So… As mods are now resource packs too… can they add their peripheral apis this way?

kind of. Look at the new mounting methods in the api
Galactica4 #18
Posted 14 July 2013 - 03:30 AM
This is going to damage people's workflow, I mean, it is not very convenient to edit pastebin and download it every time, especially in bug testing, download, run, BUG, edit pastebin, download , run, BUG e.c.t + the inbuilt editor is not 'the best.'
BTW does this affect '.minecraft/saves/ save name/computercraft/computerID method because if it does, oh I am annoyed!
Don't do this Dan, don't do this
ElvishJerricco #19
Posted 14 July 2013 - 04:01 AM
This is going to damage people's workflow, I mean, it is not very convenient to edit pastebin and download it every time, especially in bug testing, download, run, BUG, edit pastebin, download , run, BUG e.c.t + the inbuilt editor is not 'the best.'
BTW does this affect '.minecraft/saves/ save name/computercraft/computerID method because if it does, oh I am annoyed!
Don't do this Dan, don't do this

The only people whose workflow this messes with is people who edit the ROM files. For any other purpose, things are no different. Editing programs through the save folders is the same as always.

Don't get me wrong, the idea of using resource packs instead of having to actually edit the ComputerCraft package is great. But the fact that we can't use folders for these resource packs, and the fact that it doesn't seem to properly update when you update your zip file makes for some big problems. The feature just needs some cleaning.
theoriginalbit #20
Posted 14 July 2013 - 04:19 AM
This is going to damage people's workflow
Not at all. This change, makes no difference to how peoples workflow would need to be set up.

I mean, it is not very convenient to edit pastebin and download it every time, especially in bug testing, download, run, BUG, edit pastebin, download , run, BUG e.c.t + the inbuilt editor is not 'the best.'
You are not able to edit the programs that have been loaded in with `resource packs`, just like you cannot edit those that are loaded in through `rom`

BTW does this affect '.minecraft/saves/ save name/computercraft/computerID method because if it does, oh I am annoyed!
No it doesn't. It isn't a change to how the computers work, it is a way to add/remove new programs and APIs to all computers/turtles just by putting in one location on the server instead of just having to pastebin it onto each computer.

Don't do this Dan, don't do this
Too late, it is done and implemented in the latest version. Also even if it wasn't in, he isn't going to listen to just one person, especially one who is brand new to the forums.
Pharap #21
Posted 14 July 2013 - 10:19 AM
Simple question:

Does this mean that if we want to write our own OS/bios we still have to edit the mod Jar or will creating an assets/computercraft/lua/bios.lua in the resourcepacks directory automatically override the one in the computercraft mod jar? (The latter would be nicer to work with)

What about being able to edit in the rom folder? Unzip - edit - rezip seems really clunky for hacking / testing.
You don't have to unzip zip files to edit them.
Windows will allow you to view zips in the default document browser.

There are also versions of p7-Zip for most OS versions: http://www.7-zip.org/download.html
In which case you just drag the files out of the 7-Zip window and into your OS's regular file browser.

not what i meant, i want to edit all the files in as single folder (how it used to be) without having to shutdown / rezip anything ;_;

Oh right. Yea I posted in the suggestions about that. I wrote a script to do all that work for me but it takes time to reboot the game entirely. Really messes with my workflow.

It'll be fine once CCemu updates.
Or that new one that was made recently with the extra features (forgot its name)
theoriginalbit #22
Posted 14 July 2013 - 10:59 AM
It'll be fine once CCemu updates.
Never going to happen, the project was abandoned in light of CCDesk.

Or that new one that was made recently with the extra features (forgot its name)
CCDesk
PixelToast #23
Posted 14 July 2013 - 09:28 PM
This is going to damage people's workflow
Not at all. This change, makes no difference to how peoples workflow would need to be set up.
nope
me and many others work from the ROM
have you read the posts?

im going to stay at 1.5.2 due to the combination of the new launcher (wich i dont like) and this specifically
theoriginalbit #24
Posted 14 July 2013 - 09:43 PM
me and many others work from the ROM
People who are working from the rom are doing their workspace wrong then. Yes that includes you. There is only one time that you would need to directly access and/or modify the files in rom, and that is if you're making a real OS. Short of that, use the `saves` folder, and that is no broken workspace.
ElvishJerricco #25
Posted 14 July 2013 - 10:32 PM
People who are working from the rom are doing their workspace wrong then. Yes that includes you. There is only one time that you would need to directly access and/or modify the files in rom, and that is if you're making a real OS. Short of that, use the `saves` folder, and that is no broken workspace.

I don't like this philosophy. I could say that if you want to do green screening, you're doing it wrong and you should shoot your footage on a real set. My point is, some people actually want to mess with the rom. CC's new resource pack features were supposed to make that easier. They've made it harder. They've taken the workflow others had for editing rom, and made it useless. As great as the idea for using resource packs is, it's not currently being handled well.
GravityScore #26
Posted 14 July 2013 - 11:31 PM
I don't like this philosophy. I could say that if you want to do green screening, you're doing it wrong and you should shoot your footage on a real set. My point is, some people actually want to mess with the rom. CC's new resource pack features were supposed to make that easier. They've made it harder. They've taken the workflow others had for editing rom, and made it useless. As great as the idea for using resource packs is, it's not currently being handled well.

I agree with this. Although I haven't had to edit the rom myself, I can definitely see how having to restart Minecraft and re-zipping the resource pack would be an absolute pain for those wanting to frequently edit the rom. I could also see how placing all your files in the rom instead of on individual computers is beneficial to workflow, no need to worry about which computer you click on or place, they all have the files.
PixelToast #27
Posted 15 July 2013 - 01:47 AM
me and many others work from the ROM
People who are working from the rom are doing their workspace wrong then. Yes that includes you. There is only one time that you would need to directly access and/or modify the files in rom, and that is if you're making a real OS. Short of that, use the `saves` folder, and that is no broken workspace.
why are you assuming the saves folder is correct and the rom is wrong without giving any reasoning besides "its broken" and "you dont have to"
there have been multiple cases ive had to modify the ROM (including default programs)
and it makes it much much much more easy to test because the programs are available on every computer
the saves folder is hard to use because i have to get the computers id, copy the program to it, edit it, i have to keep switching between the saves folder and the folder where i keep all my programs and it gets messy and hard to work
toxicwolf #28
Posted 15 July 2013 - 04:17 PM
Simple question:

Does this mean that if we want to write our own OS/bios we still have to edit the mod Jar or will creating an assets/computercraft/lua/bios.lua in the resourcepacks directory automatically override the one in the computercraft mod jar? (The latter would be nicer to work with)
This is a question that never seems to get answered ever since this change; and something that I would really like to know.
Cranium #29
Posted 15 July 2013 - 04:47 PM
Well, to those complaining about the fact that they edit the ROM, you seem to be forgetting one major thing: That anything you accomplish by editing the ROM can be done by making your own files anyway. You just overwrite whatever functions you deem necessary, and any program can do that.

I have never had any reason to write over anything in ROM unless I had a program that I wanted accessable via all computers on the server.
ElvishJerricco #30
Posted 15 July 2013 - 05:15 PM
Well, to those complaining about the fact that they edit the ROM, you seem to be forgetting one major thing: That anything you accomplish by editing the ROM can be done by making your own files anyway. You just overwrite whatever functions you deem necessary, and any program can do that.

I have never had any reason to write over anything in ROM unless I had a program that I wanted accessable via all computers on the server.

I'll go back to my green screen metaphor: You don't have to use a green screen when you can just shoot on a real set!

Most people don't have to edit the rom, just like most people don't need to edit the linux kernel. But some people want to. And there's a lot of work done to make editing the linux kernel easier. And either way, there's many reasons to edit the rom. If I want to modify rednet for my whole server without requiring each computer to download a pastebin. Or if I want to add a program. Or change the way the shell looks to match my server's theme. There's a million and one reasons to edit the rom. Restricting the option to do so is just wrong, even if most people don't need it.
Cranium #31
Posted 15 July 2013 - 05:20 PM
I never said that there is no reason. The main reason I can see is to make programs available for all computers. However, I stand by it saying that it can all be done with self installed programs.

You can still edit programs directly via the saves folder though, and for me, that's still enough for any of my purposes.
I would however, like to be able to reload the resource pack for programs/rom folders without having to restart minecraft. That is going to be annoying for when I do need to edit the ROM.
BlockDriller #32
Posted 15 July 2013 - 07:15 PM
Not a bad addition. Can't wait to try this out.
dent308 #33
Posted 17 July 2013 - 09:18 PM
The main thing about editing files in the ROM folder is I can setup a 'project' in a proper editor or IDE and bang away at code full speed.
Editing in the saves folder is less than optimal because they move about as computers / turtles are created or destroyed.
Zee #34
Posted 18 July 2013 - 03:57 AM
And time for my OS to shine. Question about the resource packs. Can you have multiple packs running at one time? Or would you have to unzip each, merge assets and then rezip?

The main thing about editing files in the ROM folder is I can setup a 'project' in a proper editor or IDE and bang away at code full speed.
Editing in the saves folder is less than optimal because they move about as computers / turtles are created or destroyed.
That's what I was thinking. Notepad++ until 5 AM. Lol.

EDIT: Mojang confirmed that they will implement multiple packs at a time. We need to unzip both, merge assets, and then zip it again right now. Damn.
ElvishJerricco #35
Posted 18 July 2013 - 09:32 AM
The main thing about editing files in the ROM folder is I can setup a 'project' in a proper editor or IDE and bang away at code full speed.
Editing in the saves folder is less than optimal because they move about as computers / turtles are created or destroyed.

I'm not sure if Windows can do this, but any UNIX or Linux system has symlinks. Basically like a shortcut, except the entire operating system sees it as actually being a folder. So you can create the symlink .../computer/{id} and have it point to ~/Documents/MyProject, and going to .../computer/{id}/somefolder will lead to MyProject/somefolder. So just keep the project in your documents and symlink to it in your saves.


And time for my OS to shine. Question about the resource packs. Can you have multiple packs running at one time? Or would you have to unzip each, merge assets and then rezip?

EDIT: Mojang confirmed that they will implement multiple packs at a time. We need to unzip both, merge assets, and then zip it again right now. Damn.

CC does some special resource pack loading that loads all CC resources from all available resource packs. No need to merge. This custom handling is actually the main cause of the problems people have with the new resource pack compatibility.
toxicwolf #36
Posted 18 July 2013 - 09:37 AM
EDIT: Mojang confirmed that they will implement multiple packs at a time. We need to unzip both, merge assets, and then zip it again right now. Damn.
Dan200 has already said (I forget where) that ComputerCraft already extracts and merges all CC assets from resource packs, independent of Mojang's implementation of how resource packs are loaded.

EDIT: Ninja'd ;)/>
PixelToast #37
Posted 18 July 2013 - 12:03 PM
The main thing about editing files in the ROM folder is I can setup a 'project' in a proper editor or IDE and bang away at code full speed.
Editing in the saves folder is less than optimal because they move about as computers / turtles are created or destroyed.

I'm not sure if Windows can do this, but any UNIX or Linux system has symlinks. Basically like a shortcut, except the entire operating system sees it as actually being a folder. So you can create the symlink .../computer/{id} and have it point to ~/Documents/MyProject, and going to .../computer/{id}/somefolder will lead to MyProject/somefolder. So just keep the project in your documents and symlink to it in your saves.
making symlinks wouldnt help much because we would have to create them for every id we want them on, this is useful for editing all the files on computers at once but its still a pain in the ass to manage, and most people use windows / mac for minecraft
ElvishJerricco #38
Posted 18 July 2013 - 02:45 PM
making symlinks wouldnt help much because we would have to create them for every id we want them on, this is useful for editing all the files on computers at once but its still a pain in the ass to manage, and most people use windows / mac for minecraft

Well just FYI Mac is a fully certified UNIX OS so it has all the nifty UNIX magic powers. But yea managing which computers had the symlinks was a pain but it was a really useful trick
BlankWolf #39
Posted 18 July 2013 - 03:06 PM
Well I have tried to add an api to the example resourcepack.
I put an "apis" folder in "rom" and my api in the "apis" folder.
But now my computers don't load. I just get a blackscreen and I can't find any error in mc luncher console.
PixelToast #40
Posted 18 July 2013 - 10:15 PM
could you please upload the resoursepack?
did you follow the same format as the one dan uploaded?
BlankWolf #41
Posted 19 July 2013 - 02:23 AM
could you please upload the resoursepack?
did you follow the same format as the one dan uploaded?
I used the resourcepack from dan. I just add the apis folder in rom and my api in it.
Pharap #42
Posted 19 July 2013 - 11:36 PM
The main thing about editing files in the ROM folder is I can setup a 'project' in a proper editor or IDE and bang away at code full speed.
Editing in the saves folder is less than optimal because they move about as computers / turtles are created or destroyed.

I'm not sure if Windows can do this, but any UNIX or Linux system has symlinks. Basically like a shortcut, except the entire operating system sees it as actually being a folder. So you can create the symlink .../computer/{id} and have it point to ~/Documents/MyProject, and going to .../computer/{id}/somefolder will lead to MyProject/somefolder. So just keep the project in your documents and symlink to it in your saves.
making symlinks wouldnt help much because we would have to create them for every id we want them on, this is useful for editing all the files on computers at once but its still a pain in the ass to manage, and most people use windows / mac for minecraft

Try using perl, it values linking so highly it has a built in operator for it.
A simple foreach and you're good to go.
NeverCast #43
Posted 21 July 2013 - 11:46 PM
You can symlink in all major operating systems, including Windows.
Mklink or Junction ( Vista+, Windows 2000+ respectively )
BlankWolf #44
Posted 22 July 2013 - 08:42 AM
Well I have tried to add an api to the example resourcepack.
I put an "apis" folder in "rom" and my api in the "apis" folder.
But now my computers don't load. I just get a blackscreen and I can't find any error in mc luncher console.
could you please upload the resoursepack?
did you follow the same format as the one dan uploaded?
I used the resourcepack from dan. I just add the apis folder in rom and my api in it.

Well… I hope I don't nerve, but my question is not answered yet and I wanna know what I'm doing wrong.
GravityScore #45
Posted 22 July 2013 - 08:49 AM
Well… I hope I don't nerve, but my question is not answered yet and I wanna know what I'm doing wrong.

It's working for everyone else, so you can't be doing it exactly the same way we are. Maybe try re-downloading a fresh Minecraft, install forge/CC, and try loading the resource pack again, making sure you follow exactly what's described in the install steps for everything.
coaster3000 #46
Posted 25 July 2013 - 03:52 PM
I have had problems before this update where an api loaded into rom breaks when put there…

You have to check all the code in the api to make sure it still matches the directory.

Its a little odd. But was my problem when I had black screen problems

Example fixing steps:

You have the api code loading this api.
 os.loadAPI("apis/api1")
That is just putting it on computer. And it will work.

However if loaded via rom same with other api.

This change would fix it.
 os.loadAPI("rom/apis/api1")
Pharap #47
Posted 29 July 2013 - 01:31 AM
You can symlink in all major operating systems, including Windows.
Mklink or Junction ( Vista+, Windows 2000+ respectively )
Do you happen to know the dll and/or function call required to programatically create symlinks in windows?
TorakTu #48
Posted 06 August 2013 - 02:40 PM
Something I have done with my other physical computer sitting here on my other desktop is my own OS from scratch written in Assembly and C. Now that TorNet is under way and half way working, I was looking around at a complete API replacement for an OS of my own in ComputerCraft. I want to add TorNet as a HTTP gateway into my OS so computers can talk to each other like Windows, Mac and Linux does.

So this resource pack idea is interesting. I'll have to play around with it and see how this works. Thanks for posting this info.
TorakTu #49
Posted 07 August 2013 - 11:50 PM
OK Question… please keep in mind, I think the resource pack is a cool idea, so that you can go back to the default CraftOS if you need too. But.. Is there a way with the Resource Pack to replace the Bios.lua file with it ? I tried to do it, but it didn't work. I can still see the example file in the demonstration ZIP file that dan posted, but the Bios.Lua file didn't get replaced. Is this on purpose ?

Or is there some special place where it should go that I might not know about ?
GravityScore #50
Posted 08 August 2013 - 03:36 AM
OK Question… please keep in mind, I think the resource pack is a cool idea, so that you can go back to the default CraftOS if you need too. But.. Is there a way with the Resource Pack to replace the Bios.lua file with it ? I tried to do it, but it didn't work. I can still see the example file in the demonstration ZIP file that dan posted, but the Bios.Lua file didn't get replaced. Is this on purpose ?

Or is there some special place where it should go that I might not know about ?

The BIOS can't be replaced in the resource pack system :(/>
TorakTu #51
Posted 08 August 2013 - 07:38 AM
The BIOS can't be replaced in the resource pack system :(/>

Ahh ok. I'll just have to do it manually inside the minecraft ZIP file and then use the resource pack for everything else. It also means anyone who uses my OS would need to do that same thing. Thanks for the info.
BlankWolf #52
Posted 09 August 2013 - 02:16 AM
Well… I hope I don't nerve, but my question is not answered yet and I wanna know what I'm doing wrong.

It's working for everyone else, so you can't be doing it exactly the same way we are. Maybe try re-downloading a fresh Minecraft, install forge/CC, and try loading the resource pack again, making sure you follow exactly what's described in the install steps for everything.

Thanks for the help. It don't worked but now I know what was wrong.
I used other api's like the color & term api but (thanks to Grim Reaper) my api was loaded BEFOR the color api loads.
So I called functions and values who don't exists.
Ryltarr #53
Posted 10 August 2013 - 01:19 PM
What about if I want to bundle a program with the mod for players on a server?
gollark8 #54
Posted 15 September 2013 - 12:55 PM
What about if I want to bundle a program with the mod for players on a server?
Server textures and resource packs could help.
frostthejack #55
Posted 21 October 2013 - 07:22 AM
How has no one mentioned this. Some one used modifying red net as an example. Boot up minecraft place computer type cp ROM/APIs/Redstone Redstone or whatever the api is called then open your save folder find that computer find the api edit it in your ide of choice save back in your save folder it updates instantly then test it makes sure it works if it works make a resource pack plop it in there name it properly so it overwrites the old one and tada you have successfully edited the program without having to reboot until you were completely done with it. Do the same thing for everything you want to edit when they all work properly then place in resource folder and restart game.

You only need to restart once and that's when you have finished editing the programs.

Create yourself a creative world for the soul purpose of fixing your programs it's extremely simple.

Honestly this is the coolest feature ever it has made adding programs to cc idiot proof
awsmazinggenius #56
Posted 10 November 2013 - 08:53 PM
Just one question…

Is it possible, by means of an extra file (probably in .mcmeta format) to choose the color of the disk and it's label (say, "awesomness" by awsmazinggenius, just like any label on any other disk?) If not, it would probably work well as a feature as treasure-disk submitters could label their program and choose a color themselves.

Thanks
theoriginalbit #57
Posted 10 November 2013 - 09:48 PM
-snip-
As far as I can tell, the label is the name of the program in the resource pack.
TheWhoAreYouPerson #58
Posted 25 December 2013 - 12:56 AM
You can symlink in all major operating systems, including Windows.
Mklink or Junction ( Vista+, Windows 2000+ respectively )
Do you happen to know the dll and/or function call required to programatically create symlinks in windows?
How has no one mentioned this. Some one used modifying red net as an example. Boot up minecraft place computer type cp ROM/APIs/Redstone Redstone or whatever the api is called then open your save folder find that computer find the api edit it in your ide of choice save back in your save folder it updates instantly then test it makes sure it works if it works make a resource pack plop it in there name it properly so it overwrites the old one and tada you have successfully edited the program without having to reboot until you were completely done with it. Do the same thing for everything you want to edit when they all work properly then place in resource folder and restart game.

You only need to restart once and that's when you have finished editing the programs.

Create yourself a creative world for the soul purpose of fixing your programs it's extremely simple.

Honestly this is the coolest feature ever it has made adding programs to cc idiot proof

The part where you say "You only need to restart once and that's when you have finished editing the programs." is why everyone is complaining, unless you are used to dealing with problems in big batches, you NEED to edit the file to do a bugfix/change setting then restart minecraft EVERY SINGLE time. Imagine having a 1 billion line long program with one thousand errors in it. You would need to start MC back up one thousand times to squash each and every bug, now would you like to deal with that or would you like to make a quick change in an external IDE, save and run the program again to find the next error (Which is what we are now un-able to do)?
You can symlink in all major operating systems, including Windows.
Mklink or Junction ( Vista+, Windows 2000+ respectively )
Do you happen to know the dll and/or function call required to programatically create symlinks in windows?
You can do it easily in the command prompt.

MKLINK /D %PathOfFileYouWant% %PathOfFileToSymlink%
Of course replacing the "%PathOfFileYouWant%" with something like "C:\Users\Pharap\AppData\roaming\.minecraft\saves\CCTestin\
computer\4" and replacing %pathOfFileToSymlink% with something like "C:\Users\Pharap\Desktop\MyCustomAPIFolderOrFile".
You would also need to know batch if you want to do extremly fancy things with it (make a symlink for every file/folder at a location to another, etc) but if you want just static links, drop that in a .bat file and your good to go (or the command prompt)
MrChoffe #59
Posted 08 February 2014 - 09:53 AM
(Computercraft version 1.53)

Hello everyone.
This is my first post and I'm new to LUA so please be gentle ;)/>

I'm starting (sort of) to get a hand of things and I have made my first couple of programs saving them locally in mining turtles labelling the turtle.
Writing code and longer programs is sort of inefficient and I would much rather work in notepad outside of the game and then insert my programs to globally affect all turtles.

I have ready this entire thread and have so far been succesful in adding a program in the modpack.zip and uploaded it to the server overwriting the modpack serverside. This however makes the turtle OS dark (no prompt) and after a server restart the change is brought into the world.
However since I'm new to LUA programming I will be wanting to test the programs frequently and so far my "solution" would require an unmotivated large amounts of server restarts.

In short:
I want to write programs using eg. notepad
I want to move them into the game affecting all turtles (they are able to run them)
Optimally this would not require a server restart for the effect to take place.

Question:
Is there a better way of doing this? I read just a littlebit about pastebin but are unsure about how that link using http: server protocol.
Any help is appreciated :)/>

Cheers
MrChoffe
Bomb Bloke #60
Posted 08 February 2014 - 08:35 PM
Unfortunately, use of your current method (or even correct use of resource packs) is gonna require one restart per edit. It's not an ideal system in that regard.

If you really want to make frequent edits to scripts that are available to all turtles, then what I recommend is this:

Create one script which all turtles can access, set it up as part of a resource pack or whatever. All this script does is grab another script off Pastebin and download it to whichever turtle runs it.

That second script should, if used, download a list of other pastes - one for each of the other scripts you want on your turtles.

So, whenever you place a new turtle, you just run the first installer script to get the second, and the second installer script to get up to date versions of all your other scripts. In this manner you'll never have to do a server restart, as all changes to your code from that point forward go through Pastebin.

Whether or not these "updates" are performed automatically or manually is entirely up to how you wish to code things. Personally I wouldn't want every turtle hammering Pastebin every time they start up. Depends how many scripts you're changing and how often, but I'm sure you'll work out a system to suit you.

In regards to actually using pastebin with ComputerCraft, there's a script included which handles that for you (which is just called "pastebin"). When I want to call it from within my scripts, I tend to do so with shell.run(), eg like so:

shell.run("pastebin","get","<pasteID>","<scriptName>")

Note that it won't automatically overwrite existing scripts - you'll need to make sure old versions are deleted first, if present.
RoD #61
Posted 04 April 2014 - 06:06 PM
Can we change the terminal font using a resource pack?
apemanzilla #62
Posted 04 April 2014 - 08:00 PM
Can we change the terminal font using a resource pack?
Any resource pack that adds custom fonts will override the font used by CC.
RoD #63
Posted 04 April 2014 - 10:06 PM
Can we change the terminal font using a resource pack?
Any resource pack that adds custom fonts will override the font used by CC.
and the resource pack font is a normal font file or just an ascii image file?
apemanzilla #64
Posted 07 April 2014 - 01:14 PM
Can we change the terminal font using a resource pack?
Any resource pack that adds custom fonts will override the font used by CC.
and the resource pack font is a normal font file or just an ascii image file?
It is an image. Take a look at other texture packs
Edit: also note that in CC 1.58 (and possibly 1.6+) there is a bug causing custom fonts to not align properly.
Edited on 07 April 2014 - 11:17 AM
RoD #65
Posted 07 April 2014 - 06:13 PM
Can we change the terminal font using a resource pack?
Any resource pack that adds custom fonts will override the font used by CC.
and the resource pack font is a normal font file or just an ascii image file?
It is an image. Take a look at other texture packs
Edit: also note that in CC 1.58 (and possibly 1.6+) there is a bug causing custom fonts to not align properly.
Yup i edited a texture pack and the letter gone crazy.. Thnx anyways
Bomb Bloke #66
Posted 08 April 2014 - 11:34 PM
You should be able to work around the issue by loading MineCraft with default textures, then switching once it's started.
_removed #67
Posted 25 March 2015 - 06:54 AM
Cool Dan! Now I can add my pastebin api to it!
EveryOS #68
Posted 16 March 2016 - 07:32 PM
Can I make my own?
Lupus590 #69
Posted 16 March 2016 - 10:15 PM
Can I make my own?

Yes, the easiest way would be to download the example one and modify it to your needs.

you can also read the tutorial on the wiki which is more indepth: http://www.computercraft.info/wiki/Lua_Resource_Pack_Making_%28Tutorial%29
EveryOS #70
Posted 17 March 2016 - 11:51 AM
Can I make my own?

Yes, the easiest way would be to download the example one and modify it to your needs.

you can also read the tutorial on the wiki which is more indepth: http://www.computerc..._%28Tutorial%29
Thanks
MrObsidy #71
Posted 16 April 2016 - 07:48 PM
I'll stick with editing the jar file. I'm on a server.
Anavrins #72
Posted 16 April 2016 - 07:56 PM
I'll stick with editing the jar file. I'm on a server.
What?, you still can make resource pack for servers you know… editing the jar is not encouraged or supported.
Edited on 16 April 2016 - 05:56 PM
TheRockettek #73
Posted 16 April 2016 - 08:12 PM
I'll stick with editing the jar file. I'm on a server.
What?, you still can make resource pack for servers you know… editing the jar is not encouraged or supported.

Meh :P/>
Aslong as lur doesnt add a virus to the rom startup, well be fine ;P
KidBrine #74
Posted 02 September 2016 - 05:21 AM
What about being able to edit in the rom folder? Unzip - edit - rezip seems really clunky for hacking / testing.

It doesn't need to be a zip folder it can be a regular folder