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

Treasure Floppy

Started by zortag, 28 June 2015 - 11:04 AM
zortag #1
Posted 28 June 2015 - 01:04 PM
How can I add a custom Treasure Floppy?
I'm making a modpack and i need a custom floppy for a spawning structure.
If i use a common floppy with a program inside, it spawn only in the world where it was created, because the program is in the world save directory.
Treasure floppies are stored inside the Computercraft jar file, so are "universal"
There is a way to create an "universal" floppy?
zortag #2
Posted 28 June 2015 - 02:47 PM
solved myself:
compile your program and save it [es. sampleprogram]
close Minecraft
navigate to the mods folder of your modpack
open the computercraft jar with winrar.
navigate to [\assets\computercraft\lua\treasure]
create a new folder [es. \assets\computercraft\lua\treasure\zortag] and open it
create a new folder [es. \assets\computercraft\lua\treasure\zortag\example] and open it
copy your program [es. sampleprogram] there (1)
close winrar
start Minecraft and load your world
search "disk" in NEI
one of the blue floppies will be your program (you can recognize it by the name [es. sampleprogram] in the NEI tooltip

(1) the program is in the \save\[yourworldname]\computer\[computernumericID] [es. \save\testworld\computer\1]. To know the numeric ID of the computer write in its prompt [id] then press [return].
InDieTasten #3
Posted 28 June 2015 - 03:17 PM
Actually, you can and probably should use resourcepacks for this:
http://www.computercraft.info/forums2/index.php?/topic/14049-how-to-make-and-install-lua-resource-packs/

I'm not 100% sure about how updated this is, but I guess it still works this way and is much cleaner and easier than editing the mods archive

you don't even have to put those to a treasure disk, but let them injected into the rom instead
Dog #4
Posted 28 June 2015 - 04:45 PM
InDieTasten's method is the correct way to add treasure disks. Also, I believe the license for ComputerCraft doesn't allow the distribution of modded CC jar files; so editing the jar would preclude you from sharing it with anyone (unless you violate the license).