Page 1 of 1

Recycling mod -works now - still need some lua help

Posted: Sun Jul 07, 2013 4:59 pm
by tonberrytoby
Hi, I have decided to write a Recycling mod.
I wrote a proof of concept, but now I am too lazy to add all those recipes.
https://www.dropbox.com/s/r290m83zqy8eguv/smeltdown.zip

I have decided to write a script to write the recipe file for me, but I don't really know lua.
Can someone tell me how I can import and export to the format that is used for the recipe game files.

Re: Recycling mod -need some lua help

Posted: Sun Jul 07, 2013 8:11 pm
by tonberrytoby
Ok I finished this on my own:
This is my recycling mod. You can dump almost any item in a furnace and you will receive the most common basic item back. Some problems: Items that use over the stacksize only give the stacksize, for example underground express belts. Also things that use less then a full unit of anything can't get recycled, those are cables and basic poles.
https://www.dropbox.com/s/gdiqe1f80y4fa ... .5.3-a.zip

You can run the file generator.lua to generate the smelting recipes from the construction recipes. You still need to copy the basic recipes by hand into the generator file. I don't know enough lua to do this automatically. You also need to delete a comma on the third from last line in the output.

There should be a way to generate this list at startup time to automatically include the other mods, but I would need someone more experienced to program this.

Re: Recycling mod -need some lua help

Posted: Mon Aug 12, 2013 8:49 pm
by Jani25051
tonberrytoby wrote:Ok I finished this on my own:
This is my recycling mod. You can dump almost any item in a furnace and you will receive the most common basic item back. Some problems: Items that use over the stacksize only give the stacksize, for example underground express belts. Also things that use less then a full unit of anything can't get recycled, those are cables and basic poles.
https://www.dropbox.com/s/gdiqe1f80y4fa ... .5.3-a.zip

You can run the file generator.lua to generate the smelting recipes from the construction recipes. You still need to copy the basic recipes by hand into the generator file. I don't know enough lua to do this automatically. You also need to delete a comma on the third from last line in the output.

There should be a way to generate this list at startup time to automatically include the other mods, but I would need someone more experienced to program this.
Hey (:
Can i copy all your recipes and change them to use them in my own mod? :?