Recycling mod -works now - still need some lua help

Topics and discussion about specific mods
Post Reply
User avatar
tonberrytoby
Long Handed Inserter
Long Handed Inserter
Posts: 60
Joined: Wed Apr 17, 2013 5:17 pm
Contact:

Recycling mod -works now - still need some lua help

Post 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.
Last edited by tonberrytoby on Sun Jul 07, 2013 8:12 pm, edited 1 time in total.

User avatar
tonberrytoby
Long Handed Inserter
Long Handed Inserter
Posts: 60
Joined: Wed Apr 17, 2013 5:17 pm
Contact:

Re: Recycling mod -need some lua help

Post 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.

Jani25051
Burner Inserter
Burner Inserter
Posts: 14
Joined: Sat Aug 03, 2013 11:15 pm
Contact:

Re: Recycling mod -need some lua help

Post 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? :?

Post Reply

Return to “Mods”